@ezychat/web 0.1.78 → 0.1.79
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-Bw0RmdAy.js → admin-D4nMrYTV.js} +48 -5
- package/dist-lib/chunks/{admin-Vk_4QCBI.js → admin-SGy97Cay.js} +46 -5
- package/dist-lib/chunks/{inbox-BP7OELj9.js → inbox-RAdHANUD.js} +89 -5
- package/dist-lib/chunks/{inbox-g6IVD36a.js → inbox-iUbtLuDB.js} +89 -5
- package/dist-lib/ezychat-web.css +1 -1
- package/dist-lib/index.js +8253 -6510
- package/dist-lib/public/badge-96.png +0 -0
- package/dist-lib/sw.ts +2 -1
- package/dist-lib/types/admin/AgentScheduledTasksCard.d.ts +10 -0
- package/dist-lib/types/admin/MemberChatsField.d.ts +11 -0
- package/dist-lib/types/admin/NewChatSection.d.ts +7 -0
- package/dist-lib/types/admin/ScheduledRunsDialog.d.ts +12 -0
- package/dist-lib/types/admin/ScheduledTaskDialog.d.ts +18 -0
- package/dist-lib/types/admin/scheduled-format.d.ts +16 -0
- package/dist-lib/types/api/ai.d.ts +5 -1
- package/dist-lib/types/api/inbox-mutations.d.ts +2 -0
- package/dist-lib/types/api/message-changes.d.ts +10 -2
- package/dist-lib/types/api/new-chat.d.ts +55 -0
- package/dist-lib/types/api/queries.d.ts +61 -8
- package/dist-lib/types/api/scheduled-tasks.d.ts +145 -0
- package/dist-lib/types/api/templates.d.ts +5 -1
- package/dist-lib/types/askezy/AskEzyButton.d.ts +1 -1
- package/dist-lib/types/auth/chat-scope.d.ts +7 -0
- package/dist-lib/types/i18n/resources.d.ts +244 -0
- package/dist-lib/types/inbox/NewChatDialog.d.ts +2 -0
- package/dist-lib/types/inbox/ReplyWindow.d.ts +16 -0
- package/dist-lib/types/inbox/useDirectory.d.ts +3 -0
- package/package.json +2 -2
|
@@ -661,6 +661,10 @@ export declare const enResources: {
|
|
|
661
661
|
resolvedTitle: string;
|
|
662
662
|
resolvedDescription: string;
|
|
663
663
|
tag: string;
|
|
664
|
+
chosen: {
|
|
665
|
+
title: string;
|
|
666
|
+
description: string;
|
|
667
|
+
};
|
|
664
668
|
};
|
|
665
669
|
};
|
|
666
670
|
chatListItem: {
|
|
@@ -1011,6 +1015,8 @@ export declare const enResources: {
|
|
|
1011
1015
|
hideOriginal: string;
|
|
1012
1016
|
noText: string;
|
|
1013
1017
|
};
|
|
1018
|
+
scheduled: string;
|
|
1019
|
+
scheduledNamed: string;
|
|
1014
1020
|
};
|
|
1015
1021
|
media: {
|
|
1016
1022
|
types: {
|
|
@@ -1237,6 +1243,7 @@ export declare const enResources: {
|
|
|
1237
1243
|
start: string;
|
|
1238
1244
|
startFailed: string;
|
|
1239
1245
|
listLabel: string;
|
|
1246
|
+
chosenChatsOnly: string;
|
|
1240
1247
|
};
|
|
1241
1248
|
gettingStarted: {
|
|
1242
1249
|
title: string;
|
|
@@ -1643,6 +1650,83 @@ export declare const enResources: {
|
|
|
1643
1650
|
tipTitle: string;
|
|
1644
1651
|
tipBody: string;
|
|
1645
1652
|
};
|
|
1653
|
+
newChat: {
|
|
1654
|
+
button: string;
|
|
1655
|
+
title: string;
|
|
1656
|
+
description: string;
|
|
1657
|
+
from: string;
|
|
1658
|
+
businessApi: string;
|
|
1659
|
+
phone: string;
|
|
1660
|
+
phonePlaceholder: string;
|
|
1661
|
+
phoneHint: string;
|
|
1662
|
+
phoneInvalid: string;
|
|
1663
|
+
willMessage: string;
|
|
1664
|
+
name: string;
|
|
1665
|
+
nameHint: string;
|
|
1666
|
+
banTitle: string;
|
|
1667
|
+
banBody: string;
|
|
1668
|
+
apiTitle: string;
|
|
1669
|
+
apiBody: string;
|
|
1670
|
+
usage: string;
|
|
1671
|
+
start: string;
|
|
1672
|
+
checking: string;
|
|
1673
|
+
next: string;
|
|
1674
|
+
preparing: string;
|
|
1675
|
+
existingTitle: string;
|
|
1676
|
+
existingBody: string;
|
|
1677
|
+
openChat: string;
|
|
1678
|
+
back: string;
|
|
1679
|
+
templateTitle: string;
|
|
1680
|
+
templateDescription: string;
|
|
1681
|
+
paidNote: string;
|
|
1682
|
+
sendTemplate: string;
|
|
1683
|
+
sending: string;
|
|
1684
|
+
createdToast: string;
|
|
1685
|
+
sentToast: string;
|
|
1686
|
+
problems: {
|
|
1687
|
+
not_on_whatsapp: {
|
|
1688
|
+
title: string;
|
|
1689
|
+
body: string;
|
|
1690
|
+
};
|
|
1691
|
+
own_number: {
|
|
1692
|
+
title: string;
|
|
1693
|
+
body: string;
|
|
1694
|
+
};
|
|
1695
|
+
wa_disconnected: {
|
|
1696
|
+
title: string;
|
|
1697
|
+
body: string;
|
|
1698
|
+
};
|
|
1699
|
+
new_chat_daily_limit: {
|
|
1700
|
+
title: string;
|
|
1701
|
+
body: string;
|
|
1702
|
+
};
|
|
1703
|
+
new_chat_hourly_limit: {
|
|
1704
|
+
title: string;
|
|
1705
|
+
body: string;
|
|
1706
|
+
};
|
|
1707
|
+
template_failed: {
|
|
1708
|
+
title: string;
|
|
1709
|
+
body: string;
|
|
1710
|
+
};
|
|
1711
|
+
new_chat_not_allowed: {
|
|
1712
|
+
title: string;
|
|
1713
|
+
body: string;
|
|
1714
|
+
};
|
|
1715
|
+
other: {
|
|
1716
|
+
title: string;
|
|
1717
|
+
body: string;
|
|
1718
|
+
};
|
|
1719
|
+
invalid_number: {
|
|
1720
|
+
title: string;
|
|
1721
|
+
body: string;
|
|
1722
|
+
};
|
|
1723
|
+
new_chat_unsupported: {
|
|
1724
|
+
title: string;
|
|
1725
|
+
body: string;
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
usageNoLimit: string;
|
|
1729
|
+
};
|
|
1646
1730
|
};
|
|
1647
1731
|
admin: {
|
|
1648
1732
|
title: string;
|
|
@@ -1864,6 +1948,9 @@ export declare const enResources: {
|
|
|
1864
1948
|
safetyBlock: string;
|
|
1865
1949
|
safetyUnblock: string;
|
|
1866
1950
|
safetyAutoBlock: string;
|
|
1951
|
+
chatNewNumber: string;
|
|
1952
|
+
settingsNewChatStaff: string;
|
|
1953
|
+
settingsNewChatDailyLimit: string;
|
|
1867
1954
|
};
|
|
1868
1955
|
fields: {
|
|
1869
1956
|
chat: string;
|
|
@@ -1909,6 +1996,9 @@ export declare const enResources: {
|
|
|
1909
1996
|
agent: string;
|
|
1910
1997
|
preset: string;
|
|
1911
1998
|
internal: string;
|
|
1999
|
+
startedBy: string;
|
|
2000
|
+
before: string;
|
|
2001
|
+
after: string;
|
|
1912
2002
|
};
|
|
1913
2003
|
reasons: {
|
|
1914
2004
|
rateLimited: string;
|
|
@@ -3029,6 +3119,123 @@ export declare const enResources: {
|
|
|
3029
3119
|
offHint: string;
|
|
3030
3120
|
saveFailed: string;
|
|
3031
3121
|
};
|
|
3122
|
+
scheduled: {
|
|
3123
|
+
title: string;
|
|
3124
|
+
description: string;
|
|
3125
|
+
add: string;
|
|
3126
|
+
empty: {
|
|
3127
|
+
title: string;
|
|
3128
|
+
body: string;
|
|
3129
|
+
};
|
|
3130
|
+
total: string;
|
|
3131
|
+
limitReached: string;
|
|
3132
|
+
showAll: string;
|
|
3133
|
+
showFewer: string;
|
|
3134
|
+
safety: string;
|
|
3135
|
+
noInbox: string;
|
|
3136
|
+
scheduleLine: string;
|
|
3137
|
+
days: {
|
|
3138
|
+
daily: string;
|
|
3139
|
+
weekdays: string;
|
|
3140
|
+
custom: string;
|
|
3141
|
+
};
|
|
3142
|
+
off: string;
|
|
3143
|
+
pausedShort: string;
|
|
3144
|
+
next: string;
|
|
3145
|
+
chatGone: string;
|
|
3146
|
+
lastRun: string;
|
|
3147
|
+
switchLabel: string;
|
|
3148
|
+
actions: string;
|
|
3149
|
+
edit: string;
|
|
3150
|
+
runNow: string;
|
|
3151
|
+
history: string;
|
|
3152
|
+
delete: string;
|
|
3153
|
+
deleteTitle: string;
|
|
3154
|
+
deleteBody: string;
|
|
3155
|
+
added: string;
|
|
3156
|
+
saved: string;
|
|
3157
|
+
saveFailed: string;
|
|
3158
|
+
result: {
|
|
3159
|
+
sent: string;
|
|
3160
|
+
skipped: string;
|
|
3161
|
+
failed: string;
|
|
3162
|
+
running: string;
|
|
3163
|
+
};
|
|
3164
|
+
reason: {
|
|
3165
|
+
nothing_to_say: string;
|
|
3166
|
+
needs_team: string;
|
|
3167
|
+
agent_off: string;
|
|
3168
|
+
ai_disconnected: string;
|
|
3169
|
+
wa_disconnected: string;
|
|
3170
|
+
access_closed: string;
|
|
3171
|
+
window_closed: string;
|
|
3172
|
+
missed: string;
|
|
3173
|
+
chat_gone: string;
|
|
3174
|
+
confidential_leak: string;
|
|
3175
|
+
ai_unavailable: string;
|
|
3176
|
+
lookup_failed: string;
|
|
3177
|
+
send_failed: string;
|
|
3178
|
+
interrupted: string;
|
|
3179
|
+
};
|
|
3180
|
+
paused: {
|
|
3181
|
+
title: string;
|
|
3182
|
+
agent_off: string;
|
|
3183
|
+
ai_disconnected: string;
|
|
3184
|
+
wa_disconnected: string;
|
|
3185
|
+
access_closed: string;
|
|
3186
|
+
};
|
|
3187
|
+
form: {
|
|
3188
|
+
addTitle: string;
|
|
3189
|
+
editTitle: string;
|
|
3190
|
+
description: string;
|
|
3191
|
+
name: string;
|
|
3192
|
+
namePlaceholder: string;
|
|
3193
|
+
nameRequired: string;
|
|
3194
|
+
chat: string;
|
|
3195
|
+
chatPlaceholder: string;
|
|
3196
|
+
chatSearch: string;
|
|
3197
|
+
chatNone: string;
|
|
3198
|
+
chatLoading: string;
|
|
3199
|
+
chatHint: string;
|
|
3200
|
+
chatRequired: string;
|
|
3201
|
+
chatNotInInbox: string;
|
|
3202
|
+
groups: string;
|
|
3203
|
+
people: string;
|
|
3204
|
+
when: string;
|
|
3205
|
+
time: string;
|
|
3206
|
+
timeZone: string;
|
|
3207
|
+
days: string;
|
|
3208
|
+
daysRequired: string;
|
|
3209
|
+
instruction: string;
|
|
3210
|
+
instructionPlaceholder: string;
|
|
3211
|
+
instructionHint: string;
|
|
3212
|
+
instructionRequired: string;
|
|
3213
|
+
preview: string;
|
|
3214
|
+
save: string;
|
|
3215
|
+
create: string;
|
|
3216
|
+
};
|
|
3217
|
+
preview: {
|
|
3218
|
+
title: string;
|
|
3219
|
+
lookedUp: string;
|
|
3220
|
+
wouldSend: string;
|
|
3221
|
+
wouldSkip: string;
|
|
3222
|
+
nothingSent: string;
|
|
3223
|
+
failed: string;
|
|
3224
|
+
};
|
|
3225
|
+
runNowTitle: string;
|
|
3226
|
+
runNowBody: string;
|
|
3227
|
+
runNowLimit: string;
|
|
3228
|
+
runNowSent: string;
|
|
3229
|
+
runNowSkipped: string;
|
|
3230
|
+
runNowFailed: string;
|
|
3231
|
+
openChat: string;
|
|
3232
|
+
openChatNamed: string;
|
|
3233
|
+
historyTitle: string;
|
|
3234
|
+
historyBody: string;
|
|
3235
|
+
historyEmpty: string;
|
|
3236
|
+
byRunNow: string;
|
|
3237
|
+
byRunNowUnknown: string;
|
|
3238
|
+
};
|
|
3032
3239
|
};
|
|
3033
3240
|
enrichment: {
|
|
3034
3241
|
title: string;
|
|
@@ -4499,6 +4706,43 @@ export declare const enResources: {
|
|
|
4499
4706
|
};
|
|
4500
4707
|
};
|
|
4501
4708
|
};
|
|
4709
|
+
limitedChats: {
|
|
4710
|
+
label: string;
|
|
4711
|
+
all: {
|
|
4712
|
+
title: string;
|
|
4713
|
+
hint: string;
|
|
4714
|
+
};
|
|
4715
|
+
chosen: {
|
|
4716
|
+
title: string;
|
|
4717
|
+
hint: string;
|
|
4718
|
+
};
|
|
4719
|
+
count_one: string;
|
|
4720
|
+
count_other: string;
|
|
4721
|
+
none: string;
|
|
4722
|
+
chosenLabel: string;
|
|
4723
|
+
remove: string;
|
|
4724
|
+
add: string;
|
|
4725
|
+
addLabel: string;
|
|
4726
|
+
addPlaceholder: string;
|
|
4727
|
+
noMatch: string;
|
|
4728
|
+
note_zero: string;
|
|
4729
|
+
note_one: string;
|
|
4730
|
+
note_other: string;
|
|
4731
|
+
};
|
|
4732
|
+
newChat: {
|
|
4733
|
+
title: string;
|
|
4734
|
+
description: string;
|
|
4735
|
+
staff: string;
|
|
4736
|
+
staffOn: string;
|
|
4737
|
+
staffOff: string;
|
|
4738
|
+
limitLabel: string;
|
|
4739
|
+
limitUnit: string;
|
|
4740
|
+
limitInvalid: string;
|
|
4741
|
+
limitHint: string;
|
|
4742
|
+
limitNone: string;
|
|
4743
|
+
limitBanTitle: string;
|
|
4744
|
+
limitBanBody: string;
|
|
4745
|
+
};
|
|
4502
4746
|
};
|
|
4503
4747
|
errors: {
|
|
4504
4748
|
generic: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { MessageTemplate } from '@ezychat/shared';
|
|
1
3
|
/** Meta's page where a WhatsApp Business Account creates and manages its message templates. */
|
|
2
4
|
export declare const TEMPLATES_MANAGER_URL = "https://business.facebook.com/wa/manage/message-templates/";
|
|
3
5
|
/** The 24-hour customer-service window of a Business API chat: a quiet line above the composer. */
|
|
@@ -13,6 +15,7 @@ export declare function WindowClosedPanel({ jid, inboxId, customerName, disabled
|
|
|
13
15
|
/** WhatsApp is offline: nothing can be sent. */
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
}>): import("react").JSX.Element;
|
|
18
|
+
export declare const templateKey: (tpl: Pick<MessageTemplate, "name" | "language">) => string;
|
|
16
19
|
/** The body with each {{n}} replaced by its value; an empty value keeps its placeholder. */
|
|
17
20
|
export declare function fillTemplate(body: string, values: readonly string[]): string;
|
|
18
21
|
/** Pick an approved template, fill its variables and see the message before sending it. */
|
|
@@ -23,3 +26,16 @@ export declare function TemplateDialog({ open, jid, inboxId, customerName, onClo
|
|
|
23
26
|
customerName: string;
|
|
24
27
|
onClose(): void;
|
|
25
28
|
}>): import("react").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* The template list (sendable ones selectable), the variable boxes and the live preview: shared by the
|
|
31
|
+
* reply-window dialog and New chat's template step.
|
|
32
|
+
*/
|
|
33
|
+
export declare function TemplateFields({ templates, selected, values, submitted, syncButton, onChoose, onValues, }: Readonly<{
|
|
34
|
+
templates: readonly MessageTemplate[];
|
|
35
|
+
selected: MessageTemplate | null;
|
|
36
|
+
values: readonly string[];
|
|
37
|
+
submitted: boolean;
|
|
38
|
+
syncButton?: ReactNode;
|
|
39
|
+
onChoose(tpl: MessageTemplate): void;
|
|
40
|
+
onValues(values: string[]): void;
|
|
41
|
+
}>): import("react").JSX.Element;
|
|
@@ -7,6 +7,8 @@ import { type DirectoryUser } from '../api/queries';
|
|
|
7
7
|
*/
|
|
8
8
|
export type DirectoryEntry = Omit<DirectoryUser, 'inboxIds'> & {
|
|
9
9
|
inboxIds?: DirectoryUser['inboxIds'];
|
|
10
|
+
/** 'chosen': an agent limited to chosen chats (`chatJids`, as far as the viewer may know them). */
|
|
11
|
+
chatScope?: User['chatScope'];
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
14
|
* The member may open chats of this inbox (admins and the AI member open every inbox). A row without
|
|
@@ -26,6 +28,7 @@ export interface Directory {
|
|
|
26
28
|
*/
|
|
27
29
|
assignableFor(inboxId: number, opts?: {
|
|
28
30
|
direct?: boolean;
|
|
31
|
+
chatJid?: string;
|
|
29
32
|
}): DirectoryEntry[];
|
|
30
33
|
/** Display name for a user id ("You" for the current user when `youLabel`). */
|
|
31
34
|
nameOf(id: number | null | undefined, opts?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ezychat/web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.79",
|
|
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.79",
|
|
44
44
|
"@fontsource-variable/inter": "^5.3.0",
|
|
45
45
|
"@tanstack/react-query": "^5.105.0",
|
|
46
46
|
"@types/react": "^19.3.0",
|