@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.
Files changed (45) hide show
  1. package/dist-lib/chunks/{admin-CxZlJff7.js → admin-8UHO2F19.js} +369 -6
  2. package/dist-lib/chunks/{admin-Bfr7e_J2.js → admin-aoqHNFwk.js} +369 -6
  3. package/dist-lib/chunks/common-0sL8O9KV.js +199 -0
  4. package/dist-lib/chunks/common-CIXHivlt.js +199 -0
  5. package/dist-lib/chunks/{inbox-B0qUKtSa.js → inbox-CYEiGkVa.js} +60 -2
  6. package/dist-lib/chunks/{inbox-6O27i4oH.js → inbox-DmBXnPBY.js} +60 -2
  7. package/dist-lib/ezychat-web.css +1 -1
  8. package/dist-lib/index.js +12673 -9050
  9. package/dist-lib/types/admin/AdminLayout.d.ts +4 -0
  10. package/dist-lib/types/admin/AgentDirectCard.d.ts +13 -0
  11. package/dist-lib/types/admin/AgentResolutionCard.d.ts +10 -0
  12. package/dist-lib/types/admin/SafetyPage.d.ts +6 -0
  13. package/dist-lib/types/admin/SafetyReport.d.ts +10 -0
  14. package/dist-lib/types/admin/adminUi.d.ts +4 -1
  15. package/dist-lib/types/api/ai-groups.d.ts +25 -0
  16. package/dist-lib/types/api/ai.d.ts +43 -4
  17. package/dist-lib/types/api/inbox-mutations.d.ts +7 -5
  18. package/dist-lib/types/api/queries.d.ts +56 -14
  19. package/dist-lib/types/api/safety.d.ts +203 -0
  20. package/dist-lib/types/api/templates.d.ts +9 -0
  21. package/dist-lib/types/components/app/InfoTip.d.ts +30 -0
  22. package/dist-lib/types/components/app/UpgradeEnterprise.d.ts +17 -1
  23. package/dist-lib/types/components/app/index.d.ts +3 -1
  24. package/dist-lib/types/extensions/types.d.ts +1 -1
  25. package/dist-lib/types/i18n/resources.d.ts +544 -0
  26. package/dist-lib/types/inbox/Composer.d.ts +16 -3
  27. package/dist-lib/types/inbox/MentionPicker.d.ts +16 -0
  28. package/dist-lib/types/inbox/SafetyMessage.d.ts +23 -0
  29. package/dist-lib/types/inbox/mentions.d.ts +42 -0
  30. package/dist-lib/types/inbox/reply-window.d.ts +5 -0
  31. package/dist-lib/types/inbox/useDirectory.d.ts +5 -2
  32. package/dist-lib/types/index.d.ts +2 -0
  33. package/dist-lib/types/lib/links.d.ts +6 -0
  34. package/dist-lib/types/lib/tips.d.ts +23 -0
  35. package/dist-lib/types/lite-import/LiteImportPage.d.ts +4 -0
  36. package/dist-lib/types/lite-import/LiteSetupStart.d.ts +5 -0
  37. package/dist-lib/types/lite-import/api.d.ts +42 -0
  38. package/dist-lib/types/lite-import/bridge.d.ts +27 -0
  39. package/dist-lib/types/lite-import/notice.d.ts +8 -0
  40. package/dist-lib/types/lite-import/steps.d.ts +43 -0
  41. package/dist-lib/types/lite-import/ui.d.ts +38 -0
  42. package/dist-lib/types/setup/SetupWizard.d.ts +4 -1
  43. package/package.json +5 -5
  44. package/dist-lib/chunks/common-C66WoZaM.js +0 -85
  45. package/dist-lib/chunks/common-CEBPnKob.js +0 -85
@@ -84,6 +84,120 @@ export declare const enResources: {
84
84
  agents: string;
85
85
  numbers: string;
86
86
  about: string;
87
+ dialog: {
88
+ title: string;
89
+ numbersValue: string;
90
+ numbers: string;
91
+ agentsValue: string;
92
+ agents: string;
93
+ apiValue: string;
94
+ api: string;
95
+ keeps: string;
96
+ trial: string;
97
+ install: string;
98
+ retry: string;
99
+ learnMore: string;
100
+ cancel: string;
101
+ downloading: string;
102
+ progress: string;
103
+ error: string;
104
+ startedTitle: string;
105
+ startedBody: string;
106
+ };
107
+ };
108
+ tips: {
109
+ guide: string;
110
+ showSteps: string;
111
+ hideSteps: string;
112
+ whatsappLink: {
113
+ title: string;
114
+ body: string;
115
+ };
116
+ aiConnection: {
117
+ title: string;
118
+ body: string;
119
+ };
120
+ apiKey: {
121
+ title: string;
122
+ body: string;
123
+ step1: string;
124
+ step2: string;
125
+ step3: string;
126
+ step4: string;
127
+ action: string;
128
+ };
129
+ claudeKey: {
130
+ title: string;
131
+ body: string;
132
+ step1: string;
133
+ step2: string;
134
+ step3: string;
135
+ step4: string;
136
+ action: string;
137
+ };
138
+ aiModel: {
139
+ title: string;
140
+ body: string;
141
+ };
142
+ businessContext: {
143
+ title: string;
144
+ body: string;
145
+ };
146
+ instructions: {
147
+ title: string;
148
+ body: string;
149
+ };
150
+ handoff: {
151
+ title: string;
152
+ body: string;
153
+ };
154
+ tryIt: {
155
+ title: string;
156
+ body: string;
157
+ };
158
+ voice: {
159
+ title: string;
160
+ body: string;
161
+ };
162
+ tunnel: {
163
+ title: string;
164
+ body: string;
165
+ };
166
+ lan: {
167
+ title: string;
168
+ body: string;
169
+ };
170
+ mcp: {
171
+ title: string;
172
+ body: string;
173
+ };
174
+ accessToken: {
175
+ title: string;
176
+ body: string;
177
+ };
178
+ connectors: {
179
+ title: string;
180
+ body: string;
181
+ };
182
+ safetyAi: {
183
+ title: string;
184
+ body: string;
185
+ };
186
+ autoBlock: {
187
+ title: string;
188
+ body: string;
189
+ };
190
+ lockedFiles: {
191
+ title: string;
192
+ body: string;
193
+ };
194
+ reportNumber: {
195
+ title: string;
196
+ body: string;
197
+ step1: string;
198
+ step2: string;
199
+ step3: string;
200
+ };
87
201
  };
88
202
  };
89
203
  app: {
@@ -1131,6 +1245,64 @@ export declare const enResources: {
1131
1245
  readyWith: string;
1132
1246
  aboutChatSuffix: string;
1133
1247
  };
1248
+ safety: {
1249
+ title: {
1250
+ highFile: string;
1251
+ highText: string;
1252
+ warningFile: string;
1253
+ warningText: string;
1254
+ };
1255
+ file: {
1256
+ deleted: string;
1257
+ deletedBy: string;
1258
+ locked: string;
1259
+ lockedAdmin: string;
1260
+ check: string;
1261
+ lockedToast: string;
1262
+ };
1263
+ download: {
1264
+ title: string;
1265
+ body: string;
1266
+ highTitle: string;
1267
+ highBody: string;
1268
+ openReport: string;
1269
+ confirm: string;
1270
+ };
1271
+ bar: {
1272
+ hacked: string;
1273
+ warnText: string;
1274
+ copied: string;
1275
+ copyFailed: string;
1276
+ copyWarning: string;
1277
+ autoBlocked: string;
1278
+ blocked: string;
1279
+ blockedBy: string;
1280
+ scam: string;
1281
+ unblock: string;
1282
+ unblocked: string;
1283
+ };
1284
+ rule: {
1285
+ exeInZip: string;
1286
+ executable: string;
1287
+ doubleExtension: string;
1288
+ scamNumber: string;
1289
+ cantInspect: string;
1290
+ macroFile: string;
1291
+ unlockCodeInMessage: string;
1292
+ openOnComputer: string;
1293
+ lookalikeLink: string;
1294
+ financeUrgency: string;
1295
+ firstFile: string;
1296
+ };
1297
+ };
1298
+ mentions: {
1299
+ title: string;
1300
+ loading: string;
1301
+ error: string;
1302
+ noMatch: string;
1303
+ admin: string;
1304
+ noName: string;
1305
+ };
1134
1306
  };
1135
1307
  admin: {
1136
1308
  title: string;
@@ -1145,6 +1317,7 @@ export declare const enResources: {
1145
1317
  audit: string;
1146
1318
  connectors: string;
1147
1319
  reports: string;
1320
+ safety: string;
1148
1321
  };
1149
1322
  layout: {
1150
1323
  inbox: string;
@@ -1343,6 +1516,14 @@ export declare const enResources: {
1343
1516
  aiAgentCreate: string;
1344
1517
  aiAgentDelete: string;
1345
1518
  aiAgentInboxUpdate: string;
1519
+ safetySettings: string;
1520
+ safetySafe: string;
1521
+ safetyRelease: string;
1522
+ safetyDelete: string;
1523
+ safetyReport: string;
1524
+ safetyBlock: string;
1525
+ safetyUnblock: string;
1526
+ safetyAutoBlock: string;
1346
1527
  };
1347
1528
  fields: {
1348
1529
  chat: string;
@@ -2473,6 +2654,14 @@ export declare const enResources: {
2473
2654
  contextText: string;
2474
2655
  };
2475
2656
  };
2657
+ resolution: {
2658
+ title: string;
2659
+ description: string;
2660
+ switch: string;
2661
+ onHint: string;
2662
+ offHint: string;
2663
+ saveFailed: string;
2664
+ };
2476
2665
  };
2477
2666
  enrichment: {
2478
2667
  title: string;
@@ -3063,6 +3252,19 @@ export declare const enResources: {
3063
3252
  colReplyTime: string;
3064
3253
  hourRange: string;
3065
3254
  };
3255
+ aiDirect: {
3256
+ title: string;
3257
+ description: string;
3258
+ switch: string;
3259
+ switchHint: string;
3260
+ groupOnly: string;
3261
+ answersNothing: string;
3262
+ confirmTitle: string;
3263
+ confirmBody_one: string;
3264
+ confirmBody_other: string;
3265
+ confirmAction: string;
3266
+ saveFailed: string;
3267
+ };
3066
3268
  aiGroups: {
3067
3269
  title: string;
3068
3270
  description: string;
@@ -3093,6 +3295,348 @@ export declare const enResources: {
3093
3295
  notSent: string;
3094
3296
  };
3095
3297
  };
3298
+ safety: {
3299
+ title: string;
3300
+ description: string;
3301
+ offNotice: string;
3302
+ stats: {
3303
+ toReview: string;
3304
+ filesLocked: string;
3305
+ blocked: string;
3306
+ };
3307
+ tabs: {
3308
+ flagged: string;
3309
+ blocked: string;
3310
+ settings: string;
3311
+ };
3312
+ level: {
3313
+ none: string;
3314
+ warning: string;
3315
+ high: string;
3316
+ };
3317
+ filter: {
3318
+ label: string;
3319
+ open: string;
3320
+ all: string;
3321
+ };
3322
+ empty: {
3323
+ open: string;
3324
+ all: string;
3325
+ blocked: string;
3326
+ };
3327
+ status: {
3328
+ open: string;
3329
+ safe: string;
3330
+ reported: string;
3331
+ blocked: string;
3332
+ cleared: string;
3333
+ };
3334
+ chip: {
3335
+ autoBlocked: string;
3336
+ maybeHacked: string;
3337
+ locked: string;
3338
+ downloadedBy: string;
3339
+ };
3340
+ sender: {
3341
+ customer: string;
3342
+ new: string;
3343
+ group: string;
3344
+ };
3345
+ sheet: {
3346
+ hackedNote: string;
3347
+ what: string;
3348
+ inside: string;
3349
+ fileDeleted: string;
3350
+ fileDeletedBy: string;
3351
+ fileLocked: string;
3352
+ fileOpen: string;
3353
+ why: string;
3354
+ ai: string;
3355
+ aiNone: string;
3356
+ team: string;
3357
+ noDownloads: string;
3358
+ downloaded: string;
3359
+ refused: string;
3360
+ file: string;
3361
+ };
3362
+ actions: {
3363
+ trust: string;
3364
+ safe: string;
3365
+ report: string;
3366
+ unblock: string;
3367
+ block: string;
3368
+ release: string;
3369
+ delete: string;
3370
+ openChat: string;
3371
+ };
3372
+ done: {
3373
+ safe: string;
3374
+ release: string;
3375
+ delete: string;
3376
+ report: string;
3377
+ block: string;
3378
+ unblock: string;
3379
+ };
3380
+ deleteTitle: string;
3381
+ deleteBody: string;
3382
+ report: {
3383
+ title: string;
3384
+ confirm: string;
3385
+ scam: string;
3386
+ block: string;
3387
+ cannotBlock: string;
3388
+ whatsappTitle: string;
3389
+ whatsappPhone: string;
3390
+ whatsappApi: string;
3391
+ nsrc: string;
3392
+ cyber999: string;
3393
+ };
3394
+ blockedBy: {
3395
+ auto: string;
3396
+ admin: string;
3397
+ unknown: string;
3398
+ };
3399
+ settings: {
3400
+ title: string;
3401
+ description: string;
3402
+ saved: string;
3403
+ enabled: string;
3404
+ enabledHint: string;
3405
+ ai: string;
3406
+ aiHint: string;
3407
+ aiNotConnected: string;
3408
+ autoBlock: string;
3409
+ autoBlockHint: string;
3410
+ days: string;
3411
+ daysHint: string;
3412
+ daysOption: string;
3413
+ };
3414
+ };
3415
+ safetyReport: {
3416
+ title: string;
3417
+ open: string;
3418
+ off: string;
3419
+ up: string;
3420
+ down: string;
3421
+ dangerousFiles: string;
3422
+ dangerousFilesHint: string;
3423
+ scamMessages: string;
3424
+ scamMessagesHint: string;
3425
+ riskyDownloads: string;
3426
+ riskyDownloadsHint: string;
3427
+ numbersBlocked: string;
3428
+ numbersBlockedHint: string;
3429
+ maybeHacked: string;
3430
+ maybeHackedHint: string;
3431
+ falseAlarms: string;
3432
+ falseAlarmsHint: string;
3433
+ dailyTitle: string;
3434
+ dailyFinding: string;
3435
+ dailyNone: string;
3436
+ kindsTitle: string;
3437
+ kindsFinding: string;
3438
+ kind: {
3439
+ hiddenProgram: string;
3440
+ fakeLink: string;
3441
+ paymentTrick: string;
3442
+ lockedArchive: string;
3443
+ macroFile: string;
3444
+ scamNumber: string;
3445
+ other: string;
3446
+ };
3447
+ teamTitle: string;
3448
+ teamFinding: string;
3449
+ teamNone: string;
3450
+ colTeammate: string;
3451
+ colRisky: string;
3452
+ colRefused: string;
3453
+ sendersTitle: string;
3454
+ sendersFinding: string;
3455
+ colSender: string;
3456
+ colFlagged: string;
3457
+ colStatus: string;
3458
+ senderStatus: {
3459
+ blocked: string;
3460
+ reported: string;
3461
+ maybeHacked: string;
3462
+ open: string;
3463
+ done: string;
3464
+ };
3465
+ teamLocked: string;
3466
+ };
3467
+ liteImport: {
3468
+ entry: string;
3469
+ pageTitle: string;
3470
+ backInboxes: string;
3471
+ cancel: string;
3472
+ progress: string;
3473
+ scanning: string;
3474
+ readFailed: string;
3475
+ actionFailed: string;
3476
+ step: {
3477
+ found: string;
3478
+ checks: string;
3479
+ review: string;
3480
+ running: string;
3481
+ done: string;
3482
+ };
3483
+ fig: {
3484
+ lite: string;
3485
+ enterprise: string;
3486
+ newInbox: string;
3487
+ sameInbox: string;
3488
+ noNumber: string;
3489
+ };
3490
+ tile: {
3491
+ chats: string;
3492
+ customers: string;
3493
+ team: string;
3494
+ agent: string;
3495
+ size: string;
3496
+ address: string;
3497
+ quickReplies: string;
3498
+ reports: string;
3499
+ inbox: string;
3500
+ };
3501
+ found: {
3502
+ titleMerge: string;
3503
+ titleCopy: string;
3504
+ kept: string;
3505
+ noQr: string;
3506
+ continueMerge: string;
3507
+ continueCopy: string;
3508
+ };
3509
+ none: {
3510
+ title: string;
3511
+ body: string;
3512
+ };
3513
+ check: {
3514
+ title: string;
3515
+ liteRunning: string;
3516
+ liteStopped: string;
3517
+ liteService: string;
3518
+ liteNewer: string;
3519
+ versionOk: string;
3520
+ update: string;
3521
+ updateFailed: string;
3522
+ diskLow: string;
3523
+ diskOk: string;
3524
+ again: string;
3525
+ sameNumber: string;
3526
+ newNumber: string;
3527
+ noSlot: string;
3528
+ slotOk: string;
3529
+ openInboxes: string;
3530
+ continue: string;
3531
+ };
3532
+ review: {
3533
+ addedTitle: string;
3534
+ inboxValue: string;
3535
+ reportsValue: string;
3536
+ teamTitle: string;
3537
+ teamIntro: string;
3538
+ actionLabel: string;
3539
+ match: string;
3540
+ add: string;
3541
+ skip: string;
3542
+ matchLabel: string;
3543
+ roleLabel: string;
3544
+ renamed: string;
3545
+ seesEveryInbox: string;
3546
+ staysTitle: string;
3547
+ stays: {
3548
+ aiConnection: string;
3549
+ timezone: string;
3550
+ address: string;
3551
+ };
3552
+ redoTitle: string;
3553
+ redo: {
3554
+ address: string;
3555
+ signIn: string;
3556
+ mcp: string;
3557
+ tokens: string;
3558
+ };
3559
+ merge: string;
3560
+ };
3561
+ role: {
3562
+ admin: string;
3563
+ agent: string;
3564
+ };
3565
+ run: {
3566
+ title: string;
3567
+ intro: string;
3568
+ stop: string;
3569
+ copy: string;
3570
+ migrate: string;
3571
+ merge: string;
3572
+ verify: string;
3573
+ handover: string;
3574
+ start: string;
3575
+ };
3576
+ fail: {
3577
+ title: string;
3578
+ safe: string;
3579
+ retry: string;
3580
+ support: string;
3581
+ saved: string;
3582
+ codes: {
3583
+ own_server_stop: string;
3584
+ summary_failed: string;
3585
+ no_lite_data: string;
3586
+ other: string;
3587
+ };
3588
+ };
3589
+ done: {
3590
+ titleMerge: string;
3591
+ titleCopy: string;
3592
+ openInbox: string;
3593
+ toInboxes: string;
3594
+ signInLite: string;
3595
+ signIn: string;
3596
+ agentOff: string;
3597
+ renamed: string;
3598
+ };
3599
+ list: {
3600
+ title: string;
3601
+ intro: string;
3602
+ share: string;
3603
+ signin: string;
3604
+ notifications: string;
3605
+ mcp: string;
3606
+ copyAddress: string;
3607
+ dismiss: string;
3608
+ };
3609
+ mcp: {
3610
+ title: string;
3611
+ body: string;
3612
+ newAddress: string;
3613
+ noAddress: string;
3614
+ tokens: string;
3615
+ quickHint: string;
3616
+ dismiss: string;
3617
+ };
3618
+ desktopOnly: {
3619
+ title: string;
3620
+ pc: string;
3621
+ admin: string;
3622
+ };
3623
+ setup: {
3624
+ title: string;
3625
+ subtitle: string;
3626
+ bring: string;
3627
+ bringChats: string;
3628
+ bringTeam: string;
3629
+ new: string;
3630
+ newAccount: string;
3631
+ newQr: string;
3632
+ onlyHere: string;
3633
+ steps: {
3634
+ start: string;
3635
+ bring: string;
3636
+ ready: string;
3637
+ };
3638
+ };
3639
+ };
3096
3640
  };
3097
3641
  errors: {
3098
3642
  generic: string;
@@ -1,12 +1,16 @@
1
1
  import type React from 'react';
2
- import { type QuickReply, type ReplyPhraseListItem, type FixEnglishStatus } from '@ezychat/shared';
2
+ import { type GroupMember, type QuickReply, type ReplyPhraseListItem, type FixEnglishStatus } from '@ezychat/shared';
3
3
  /** Lets the conversation hand files dropped anywhere on it to the composer. */
4
4
  export interface ComposerHandle {
5
5
  addFiles(files: readonly File[]): void;
6
6
  }
7
7
  export interface ComposerProps {
8
8
  quickReplies: QuickReply[];
9
- onSend(text: string): void;
9
+ /**
10
+ * `mentions`: the tagged members' addresses (groups only; the text then carries `@<number>`);
11
+ * `shown`: the text as the box showed it (`@Name`), for the pending bubble.
12
+ */
13
+ onSend(text: string, mentions?: string[], shown?: string): void;
10
14
  /**
11
15
  * One file to send, with the caption (the typed text goes with the first file). Files picked,
12
16
  * pasted or dropped wait in the tray until Send; they are sent one after another, in order:
@@ -52,6 +56,15 @@ export interface ComposerProps {
52
56
  chatJid: string;
53
57
  name: string;
54
58
  } | null;
59
+ /**
60
+ * Tag group members with `@` (docs/features/group-mentions/design.md): a group whose connection
61
+ * can tag. `members` is null while loading; `onOpen` runs when the picker opens. Null: no picker.
62
+ */
63
+ mentions?: {
64
+ members: GroupMember[] | null;
65
+ error: boolean;
66
+ onOpen(): void;
67
+ } | null;
55
68
  /**
56
69
  * Fix English (docs/features/grammar-fix/design.md): spelling and grammar marks in this chat
57
70
  * (any chat type; null or a status with both checks off = nothing shown).
@@ -66,4 +79,4 @@ export interface ComposerProps {
66
79
  onAddWord(word: string): Promise<unknown>;
67
80
  } | null;
68
81
  }
69
- export declare function Composer({ quickReplies, onSend, onAttach, onVoiceNote, onTyping, confirmSend, disabled, placeholder, replyTo, onCancelReply, aiSuggest, askEzy, fixEnglish, ref, }: ComposerProps): React.JSX.Element;
82
+ export declare function Composer({ quickReplies, onSend, onAttach, onVoiceNote, onTyping, confirmSend, disabled, placeholder, replyTo, onCancelReply, aiSuggest, askEzy, fixEnglish, mentions, ref, }: ComposerProps): React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { GroupMember } from '@ezychat/shared';
2
+ export interface MentionPickerProps {
3
+ /** Members matching the query (already filtered by the Composer), or null while loading. */
4
+ members: GroupMember[] | null;
5
+ error: boolean;
6
+ /** Text typed after `@`. */
7
+ query: string;
8
+ activeIndex: number;
9
+ onPick(member: GroupMember): void;
10
+ onHover?(index: number): void;
11
+ }
12
+ /**
13
+ * The `@` member picker of a group chat (docs/features/group-mentions). Like the quick-reply picker,
14
+ * focus stays in the textarea and the Composer drives ↑/↓/Enter/Tab/Escape.
15
+ */
16
+ export declare function MentionPicker({ members, error, query, activeIndex, onPick, onHover, }: Readonly<MentionPickerProps>): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import type { Message, MessageSafety } from '@ezychat/shared';
2
+ /**
3
+ * WhatsApp Safety in the chat (docs/features/whatsapp-safety/design.md): a short banner on a flagged
4
+ * message, its file behind a check before download (locked for agents when the risk is high), and a
5
+ * bar on top of the chat for a reported, blocked or possibly hacked number.
6
+ */
7
+ /** The banner shows only while the finding matters (not after "Mark safe"). */
8
+ export declare function showsSafety(m: Message): m is Message & {
9
+ safety: MessageSafety;
10
+ };
11
+ export declare function SafetyNotice({ safety, hasFile }: {
12
+ safety: MessageSafety;
13
+ hasFile: boolean;
14
+ }): import("react").JSX.Element;
15
+ /** The flagged file: checked before download, locked for agents while the risk is high. */
16
+ export declare function SafetyFile({ message, safety }: {
17
+ message: Message;
18
+ safety: MessageSafety;
19
+ }): import("react").JSX.Element;
20
+ /** A bar on top of a direct chat: blocked, reported as scam, or a customer who may be hacked. */
21
+ export declare function SafetyChatBar({ jid }: {
22
+ jid: string;
23
+ }): import("react").JSX.Element | null;