@ezychat/web 0.1.72 → 0.1.75

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 (36) hide show
  1. package/dist-lib/chunks/{admin-CFtHolDh.js → admin-CwS6ahLc.js} +30 -9
  2. package/dist-lib/chunks/{admin-B6UI7hY7.js → admin-p6QRa2DG.js} +30 -9
  3. package/dist-lib/chunks/app-CQ2bZhrf.js +225 -0
  4. package/dist-lib/chunks/{app-BXBt4xNx.js → app-DeH3RXhX.js} +137 -10
  5. package/dist-lib/chunks/{common-0sL8O9KV.js → common-CjI5LeVc.js} +4 -2
  6. package/dist-lib/chunks/{common-CIXHivlt.js → common-DYK9ZVMh.js} +4 -2
  7. package/dist-lib/chunks/{inbox-JiKiTquN.js → inbox-C9xTxE6Y.js} +145 -6
  8. package/dist-lib/chunks/{inbox-BHBl1foS.js → inbox-D-koJMyr.js} +145 -6
  9. package/dist-lib/ezychat-web.css +1 -1
  10. package/dist-lib/index.js +9133 -6502
  11. package/dist-lib/types/admin/AgentGroupsCard.d.ts +4 -4
  12. package/dist-lib/types/admin/BusinessTemplateCard.d.ts +11 -3
  13. package/dist-lib/types/admin/business-templates-data.d.ts +117 -0
  14. package/dist-lib/types/admin/business-templates.d.ts +48 -93
  15. package/dist-lib/types/admin/connectors/SheetsSettingsCard.d.ts +5 -3
  16. package/dist-lib/types/admin/connectors/sheets-tabs.d.ts +24 -0
  17. package/dist-lib/types/api/ai-groups.d.ts +70 -1
  18. package/dist-lib/types/api/ai-templates.d.ts +145 -0
  19. package/dist-lib/types/api/ai.d.ts +22 -0
  20. package/dist-lib/types/api/connectors.d.ts +34 -13
  21. package/dist-lib/types/api/group-admin.d.ts +77 -0
  22. package/dist-lib/types/components/app/FeedbackDialog.d.ts +35 -0
  23. package/dist-lib/types/create-app.d.ts +1 -1
  24. package/dist-lib/types/i18n/resources.d.ts +351 -21
  25. package/dist-lib/types/inbox/Composer.d.ts +2 -2
  26. package/dist-lib/types/inbox/FixEnglish.d.ts +27 -0
  27. package/dist-lib/types/inbox/GroupAdmin.d.ts +16 -0
  28. package/dist-lib/types/inbox/GroupAdminDialogs.d.ts +23 -0
  29. package/dist-lib/types/inbox/GroupAdminShared.d.ts +60 -0
  30. package/dist-lib/types/inbox/GroupAiRow.d.ts +5 -3
  31. package/dist-lib/types/inbox/PdfViewer.d.ts +9 -0
  32. package/dist-lib/types/lib/links.d.ts +2 -6
  33. package/dist-lib/types/lib/pdf.d.ts +33 -0
  34. package/package.json +3 -2
  35. package/dist-lib/chunks/app-Zoharwle.js +0 -98
  36. package/dist-lib/types/components/app/FeatureRequestAction.d.ts +0 -7
@@ -60,9 +60,9 @@ export declare const enResources: {
60
60
  adminSettings: string;
61
61
  changePassword: string;
62
62
  share: string;
63
- reportIssue: string;
64
63
  about: string;
65
64
  signOut: string;
65
+ sendFeedback: string;
66
66
  emailSupport: string;
67
67
  };
68
68
  errorBoundary: {
@@ -70,6 +70,8 @@ export declare const enResources: {
70
70
  body: string;
71
71
  reload: string;
72
72
  goHome: string;
73
+ report: string;
74
+ reportPrefix: string;
73
75
  };
74
76
  access: {
75
77
  pausedTitle: string;
@@ -219,10 +221,6 @@ export declare const enResources: {
219
221
  helpFeedback: string;
220
222
  emailSupport: string;
221
223
  };
222
- featureRequest: {
223
- label: string;
224
- opensWebsite: string;
225
- };
226
224
  search: {
227
225
  clear: string;
228
226
  };
@@ -297,6 +295,137 @@ export declare const enResources: {
297
295
  imageFailed: string;
298
296
  };
299
297
  };
298
+ feedback: {
299
+ menu: string;
300
+ title: string;
301
+ description: string;
302
+ type: {
303
+ label: string;
304
+ problem: string;
305
+ idea: string;
306
+ question: string;
307
+ other: string;
308
+ };
309
+ titleLabel: string;
310
+ titlePlaceholder: {
311
+ problem: string;
312
+ idea: string;
313
+ question: string;
314
+ other: string;
315
+ };
316
+ detailsLabel: string;
317
+ detailsPlaceholder: {
318
+ problem: string;
319
+ idea: string;
320
+ question: string;
321
+ other: string;
322
+ };
323
+ area: {
324
+ label: string;
325
+ inbox: string;
326
+ ai_agent: string;
327
+ whatsapp_link: string;
328
+ connectors: string;
329
+ reports: string;
330
+ settings: string;
331
+ install_update: string;
332
+ other: string;
333
+ };
334
+ frequency: {
335
+ label: string;
336
+ always: string;
337
+ sometimes: string;
338
+ once: string;
339
+ };
340
+ impact: {
341
+ label: string;
342
+ blocking: string;
343
+ slow: string;
344
+ minor: string;
345
+ };
346
+ files: {
347
+ label: string;
348
+ hint: string;
349
+ add: string;
350
+ screenshot: string;
351
+ remove: string;
352
+ tooMany: string;
353
+ badType: string;
354
+ tooBig: string;
355
+ screenshotFailed: string;
356
+ };
357
+ contact: {
358
+ legend: string;
359
+ name: string;
360
+ email: string;
361
+ company: string;
362
+ optional: string;
363
+ ok: string;
364
+ };
365
+ include: {
366
+ details: string;
367
+ detailsHint: string;
368
+ seeDetails: string;
369
+ log: string;
370
+ logHint: string;
371
+ seeLog: string;
372
+ };
373
+ diag: {
374
+ edition: string;
375
+ version: string;
376
+ os: string;
377
+ osVersion: string;
378
+ client: string;
379
+ mode: string;
380
+ language: string;
381
+ timeZone: string;
382
+ screen: string;
383
+ waConnected: string;
384
+ aiMode: string;
385
+ yes: string;
386
+ no: string;
387
+ };
388
+ privacy: string;
389
+ github: string;
390
+ send: string;
391
+ sending: string;
392
+ sent: {
393
+ title: string;
394
+ thanks: string;
395
+ reference: string;
396
+ reply: string;
397
+ noReply: string;
398
+ another: string;
399
+ };
400
+ errors: {
401
+ title: string;
402
+ details: string;
403
+ name: string;
404
+ emailRequired: string;
405
+ emailInvalid: string;
406
+ fix: string;
407
+ notSent: string;
408
+ unreachable: string;
409
+ rateLimited: string;
410
+ generic: string;
411
+ closed: string;
412
+ unavailable: string;
413
+ tooLarge: string;
414
+ fileType: string;
415
+ };
416
+ diagValue: {
417
+ edition: string;
418
+ desktop: string;
419
+ browser: string;
420
+ standalone: string;
421
+ service: string;
422
+ dev: string;
423
+ off: string;
424
+ api: string;
425
+ chatgpt: string;
426
+ claude: string;
427
+ };
428
+ };
300
429
  };
301
430
  auth: {
302
431
  login: {
@@ -734,6 +863,7 @@ export declare const enResources: {
734
863
  reopened: string;
735
864
  aiToolUsed: string;
736
865
  internalNote: string;
866
+ sheetRowAdded: string;
737
867
  calendarChecked: string;
738
868
  calendarBooked: string;
739
869
  calendarBookedNoTime: string;
@@ -867,6 +997,16 @@ export declare const enResources: {
867
997
  document: string;
868
998
  file: string;
869
999
  fileDownload: string;
1000
+ pdfPreview: string;
1001
+ pdfLoading: string;
1002
+ pdfFailed: string;
1003
+ pdfTooLarge: string;
1004
+ pdfPage: string;
1005
+ zoomIn: string;
1006
+ zoomOut: string;
1007
+ openFile: string;
1008
+ fileOpen: string;
1009
+ downloadFile: string;
870
1010
  };
871
1011
  notes: {
872
1012
  title: string;
@@ -1122,7 +1262,15 @@ export declare const enResources: {
1122
1262
  on: string;
1123
1263
  off: string;
1124
1264
  paused: string;
1125
- };
1265
+ agent: string;
1266
+ chooseAgent: string;
1267
+ chooseAgentPlaceholder: string;
1268
+ listen: string;
1269
+ listenTipTitle: string;
1270
+ listenTip: string;
1271
+ listenHint: string;
1272
+ };
1273
+ badgeListen: string;
1126
1274
  };
1127
1275
  askEzy: {
1128
1276
  button: string;
@@ -1334,6 +1482,127 @@ export declare const enResources: {
1334
1482
  admin: string;
1335
1483
  noName: string;
1336
1484
  };
1485
+ groupAdmin: {
1486
+ title: string;
1487
+ agentOnly: string;
1488
+ notAdminTitle: string;
1489
+ notAdminBody: string;
1490
+ offline: string;
1491
+ inviteOnly: string;
1492
+ inviteOnlyNoMax: string;
1493
+ edit: string;
1494
+ add: string;
1495
+ link: string;
1496
+ invite: string;
1497
+ settings: string;
1498
+ full: string;
1499
+ requests_one: string;
1500
+ requests_other: string;
1501
+ approve: string;
1502
+ reject: string;
1503
+ approved: string;
1504
+ editTitle: string;
1505
+ editHint: string;
1506
+ name: string;
1507
+ description: string;
1508
+ descriptionPlaceholder: string;
1509
+ saved: string;
1510
+ cancel: string;
1511
+ save: string;
1512
+ done: string;
1513
+ addTitle: string;
1514
+ addHint: string;
1515
+ phone: string;
1516
+ banRisk: string;
1517
+ addButton: string;
1518
+ addedToast: string;
1519
+ privacyTitle: string;
1520
+ privacyBody: string;
1521
+ sendInvite: string;
1522
+ invitedTitle: string;
1523
+ invitedBody: string;
1524
+ linkTitle: string;
1525
+ linkHint: string;
1526
+ linkHintApi: string;
1527
+ linkApproval: string;
1528
+ copy: string;
1529
+ copied: string;
1530
+ reset: string;
1531
+ resetTitle: string;
1532
+ resetBody: string;
1533
+ resetConfirm: string;
1534
+ resetDone: string;
1535
+ settingsTitle: string;
1536
+ settingsHint: string;
1537
+ settingsApi: string;
1538
+ set: {
1539
+ announce: string;
1540
+ announceHint: string;
1541
+ locked: string;
1542
+ lockedHint: string;
1543
+ memberAdd: string;
1544
+ onlyAdmins: string;
1545
+ everyone: string;
1546
+ approval: string;
1547
+ approvalHint: string;
1548
+ };
1549
+ history: string;
1550
+ historyNote: string;
1551
+ log: {
1552
+ name: string;
1553
+ description: string;
1554
+ added: string;
1555
+ invited: string;
1556
+ removed: string;
1557
+ promoted: string;
1558
+ demoted: string;
1559
+ linkReset: string;
1560
+ approved: string;
1561
+ rejected: string;
1562
+ setting: {
1563
+ announce: string;
1564
+ locked: string;
1565
+ memberAdd: string;
1566
+ approval: string;
1567
+ };
1568
+ someone: string;
1569
+ someMember: string;
1570
+ };
1571
+ memberActions: string;
1572
+ ownerNote: string;
1573
+ makeAdmin: string;
1574
+ removeAdmin: string;
1575
+ remove: string;
1576
+ promoted: string;
1577
+ demoted: string;
1578
+ removed: string;
1579
+ removeTitle: string;
1580
+ removeBody: string;
1581
+ removeBodyApi: string;
1582
+ removeConfirm: string;
1583
+ demoteTitle: string;
1584
+ demoteBody: string;
1585
+ demoteConfirm: string;
1586
+ err: {
1587
+ offline: string;
1588
+ notAdmin: string;
1589
+ already: string;
1590
+ notOnWhatsApp: string;
1591
+ tooMany: string;
1592
+ owner: string;
1593
+ notSupported: string;
1594
+ notMember: string;
1595
+ full: string;
1596
+ inviteExpired: string;
1597
+ inboxRemoved: string;
1598
+ failed: string;
1599
+ };
1600
+ historyEmpty: string;
1601
+ settingsNone: string;
1602
+ linkUnavailable: string;
1603
+ tipTitle: string;
1604
+ tipBody: string;
1605
+ };
1337
1606
  };
1338
1607
  admin: {
1339
1608
  title: string;
@@ -2418,7 +2687,7 @@ export declare const enResources: {
2418
2687
  inboxHint: string;
2419
2688
  inboxNone: string;
2420
2689
  inboxHas: string;
2421
- inboxMove: string;
2690
+ inboxShared: string;
2422
2691
  roleTitle: string;
2423
2692
  roleLabel: string;
2424
2693
  roleHint: string;
@@ -2462,7 +2731,6 @@ export declare const enResources: {
2462
2731
  last_agent: string;
2463
2732
  agent_not_found: string;
2464
2733
  };
2465
- noFreeInbox: string;
2466
2734
  addInbox: string;
2467
2735
  createNext: string;
2468
2736
  typeTitle: string;
@@ -2542,6 +2810,7 @@ export declare const enResources: {
2542
2810
  services: string;
2543
2811
  shops: string;
2544
2812
  education: string;
2813
+ operations: string;
2545
2814
  };
2546
2815
  noMatch: string;
2547
2816
  dental: {
@@ -2684,6 +2953,28 @@ export declare const enResources: {
2684
2953
  contextName: string;
2685
2954
  contextText: string;
2686
2955
  };
2956
+ groupAgentTag: string;
2957
+ groupSetupNew: string;
2958
+ groupSetupExisting: string;
2959
+ groupSetupNext: string;
2960
+ groupSetupDone: string;
2961
+ groupSetupFailed: string;
2962
+ claims: {
2963
+ name: string;
2964
+ description: string;
2965
+ keywords: string;
2966
+ agentName: string;
2967
+ focus: string;
2968
+ handoffRules: string;
2969
+ contextName: string;
2970
+ contextText: string;
2971
+ };
2972
+ source: {
2973
+ loaded: string;
2974
+ builtin: string;
2975
+ offline: string;
2976
+ };
2977
+ worksWith: string;
2687
2978
  };
2688
2979
  resolution: {
2689
2980
  title: string;
@@ -2881,9 +3172,8 @@ export declare const enResources: {
2881
3172
  off: string;
2882
3173
  none: string;
2883
3174
  browse: string;
2884
- sheetsReadAndLeads: string;
2885
- sheetsRead: string;
2886
- sheetsLeads: string;
3175
+ sheetsReads: string;
3176
+ sheetsAdds: string;
2887
3177
  };
2888
3178
  settingsPointerTitle: string;
2889
3179
  settingsPointer: string;
@@ -3220,14 +3510,6 @@ export declare const enResources: {
3220
3510
  notConnected: string;
3221
3511
  spreadsheet: string;
3222
3512
  open: string;
3223
- chooseTab: string;
3224
- tabRequired: string;
3225
- readHint: string;
3226
- lookupTab: string;
3227
- leadsHint: string;
3228
- leadsTab: string;
3229
- leadsTabHint: string;
3230
- changesSheet: string;
3231
3513
  rulesTitle: string;
3232
3514
  rule1: string;
3233
3515
  rule2: string;
@@ -3243,7 +3525,6 @@ export declare const enResources: {
3243
3525
  choose: string;
3244
3526
  chooseAnother: string;
3245
3527
  chooseHint: string;
3246
- sheetRequired: string;
3247
3528
  picking: string;
3248
3529
  pickingHint: string;
3249
3530
  pickBlocked: string;
@@ -3254,12 +3535,40 @@ export declare const enResources: {
3254
3535
  expired: string;
3255
3536
  };
3256
3537
  pickSameComputer: string;
3538
+ tabsTitle: string;
3539
+ tabsHint: string;
3540
+ refresh: string;
3541
+ checked: string;
3542
+ noChanges: string;
3543
+ newTabs_one: string;
3544
+ newTabs_other: string;
3545
+ changedTabs_one: string;
3546
+ changedTabs_other: string;
3547
+ tabsUnknown: string;
3548
+ access: {
3549
+ off: string;
3550
+ read: string;
3551
+ add: string;
3552
+ };
3553
+ newTab: string;
3554
+ columnsChanged: string;
3555
+ newColumn: string;
3556
+ columnsOf: string;
3557
+ emptyFirstRow: string;
3558
+ goneBadge: string;
3559
+ goneHint: string;
3560
+ autoColumns: string;
3561
+ rule5: string;
3562
+ rule6: string;
3257
3563
  };
3258
3564
  sheetsAct: {
3259
3565
  hint: string;
3260
3566
  looked_up: string;
3261
3567
  lead_added: string;
3262
3568
  failed: string;
3569
+ row_added: string;
3570
+ row_addedGroup: string;
3571
+ looked_upTab: string;
3263
3572
  };
3264
3573
  };
3265
3574
  reports: {
@@ -3371,6 +3680,8 @@ export declare const enResources: {
3371
3680
  confirmBody_other: string;
3372
3681
  confirmAction: string;
3373
3682
  saveFailed: string;
3683
+ taken: string;
3684
+ takenUnknown: string;
3374
3685
  };
3375
3686
  aiGroups: {
3376
3687
  title: string;
@@ -3391,7 +3702,6 @@ export declare const enResources: {
3391
3702
  answers: string;
3392
3703
  off: string;
3393
3704
  paused: string;
3394
- answerIn: string;
3395
3705
  openGroup: string;
3396
3706
  saveFailed: string;
3397
3707
  try: {
@@ -3401,6 +3711,26 @@ export declare const enResources: {
3401
3711
  lookupsOnly: string;
3402
3712
  notSent: string;
3403
3713
  };
3714
+ listens: string;
3715
+ listenTitle: string;
3716
+ listenInfo: string;
3717
+ listenIn: string;
3718
+ remove: string;
3719
+ removeFrom: string;
3720
+ add: {
3721
+ button: string;
3722
+ title: string;
3723
+ description: string;
3724
+ search: string;
3725
+ noMatch: string;
3726
+ none: string;
3727
+ listen: string;
3728
+ held: string;
3729
+ otherAgent: string;
3730
+ cancel: string;
3731
+ save: string;
3732
+ taken: string;
3733
+ };
3404
3734
  };
3405
3735
  safety: {
3406
3736
  title: string;
@@ -39,7 +39,7 @@ export interface ComposerProps {
39
39
  } | null;
40
40
  onCancelReply?(): void;
41
41
  /**
42
- * AI reply suggestions in this chat (direct chats only; null = off). `unavailable` shows the
42
+ * AI reply suggestions in this chat (direct chats and groups; null = off). `unavailable` shows the
43
43
  * button disabled. The chips clear when `lastCustomerMessageId` changes (a new customer message).
44
44
  */
45
45
  ref?: React.Ref<ComposerHandle>;
@@ -51,7 +51,7 @@ export interface ComposerProps {
51
51
  /** The team's phrase list, matched on every key (docs/features/ai-phrase-dictionary). */
52
52
  phrases?: readonly ReplyPhraseListItem[];
53
53
  } | null;
54
- /** Ask Ezy (docs/features/ask-ezy/design.md): direct chats only; opens Ezy scoped to this chat. */
54
+ /** Ask Ezy (docs/features/ask-ezy/design.md): direct chats and groups; opens Ezy scoped to this chat. */
55
55
  askEzy?: {
56
56
  chatJid: string;
57
57
  name: string;
@@ -28,6 +28,27 @@ export declare function shiftIssues<T extends {
28
28
  }>(issues: T[], before: string, after: string): T[];
29
29
  /** Applies the marks that have a fix (they never overlap); a mark whose text changed is skipped. */
30
30
  export declare function applyFixes(text: string, issues: readonly FixIssue[], pick?: string): string;
31
+ /**
32
+ * What a fix adds when it only inserts text ("email" → "email." adds "."; "email" → "your email"
33
+ * adds "your "), else ''.
34
+ */
35
+ export declare function insertedText(original: string, replacement: string): string;
36
+ /** A fix applied in this draft: where its text now stands, and what it inserted. */
37
+ interface AppliedFix {
38
+ start: number;
39
+ end: number;
40
+ inserted: string;
41
+ }
42
+ /**
43
+ * The grammar marks of one answer: in order, never two on the same text (the first wins), and
44
+ * never the same insertion again where this draft already got it ("email." + "." → "email..").
45
+ */
46
+ export declare function grammarMarks(issues: readonly {
47
+ start: number;
48
+ end: number;
49
+ original: string;
50
+ replacement: string;
51
+ }[], applied: readonly AppliedFix[]): FixIssue[];
31
52
  export declare function useFixEnglish(text: string, { jid, status, chatName, teamWords, disabled, }: {
32
53
  jid: string | null;
33
54
  status: FixEnglishStatus | undefined;
@@ -39,6 +60,11 @@ export declare function useFixEnglish(text: string, { jid, status, chatName, tea
39
60
  issues: FixIssue[];
40
61
  fixable: FixIssue[];
41
62
  grammarStatus: GrammarStatus;
63
+ /**
64
+ * The text with these fixes applied (`pick` for a choice in the card), remembered for this
65
+ * draft so a later check never offers the same insertion at the same place again.
66
+ */
67
+ apply(current: string, list: readonly FixIssue[], pick?: string): string;
42
68
  ignore(issue: FixIssue): void;
43
69
  };
44
70
  /**
@@ -86,3 +112,4 @@ export declare function FixEnglishButton({ count, marks, grammarStatus, grammar,
86
112
  onFixAll(): void;
87
113
  onUndo(): void;
88
114
  }): import("react").JSX.Element;
115
+ export {};
@@ -0,0 +1,16 @@
1
+ import type { GroupInfoResponse, GroupMember } from '@ezychat/shared';
2
+ /**
3
+ * Manage group (design docs/features/group-management/design.md): EzyChat admins change a WhatsApp
4
+ * group from Group info, with only the actions this connection supports (`caps`, never a type
5
+ * name) while the linked number is a group admin; agents and non-admin numbers see why they can't.
6
+ */
7
+ export declare function GroupAdminBar({ data }: Readonly<{
8
+ data: GroupInfoResponse;
9
+ }>): import("react").JSX.Element | null;
10
+ /** Member details: make / remove group admin and remove from the group. Never for me. */
11
+ export declare function MemberAdminActions({ groupJid, member, label, onRemoved, }: Readonly<{
12
+ groupJid: string;
13
+ member: GroupMember;
14
+ label: string;
15
+ onRemoved(): void;
16
+ }>): import("react").JSX.Element | null;
@@ -0,0 +1,23 @@
1
+ import { type GroupAdminResponse, type GroupChange, type GroupInfoResponse } from '@ezychat/shared';
2
+ import { type T } from './GroupAdminShared';
3
+ export declare function EditGroupDialog({ jid, data, view, onClose, }: Readonly<{
4
+ jid: string;
5
+ data: GroupInfoResponse;
6
+ view: GroupAdminResponse;
7
+ onClose(): void;
8
+ }>): import("react").JSX.Element;
9
+ export declare function AddMemberDialog({ jid, onClose }: Readonly<{
10
+ jid: string;
11
+ onClose(): void;
12
+ }>): import("react").JSX.Element;
13
+ export declare function InviteLinkDialog({ jid, view, onClose, }: Readonly<{
14
+ jid: string;
15
+ view: GroupAdminResponse;
16
+ onClose(): void;
17
+ }>): import("react").JSX.Element;
18
+ export declare function changeLine(c: GroupChange, t: T): string;
19
+ export declare function GroupSettingsDialog({ jid, view, onClose, }: Readonly<{
20
+ jid: string;
21
+ view: GroupAdminResponse;
22
+ onClose(): void;
23
+ }>): import("react").JSX.Element;
@@ -0,0 +1,60 @@
1
+ import type { useTranslation } from 'react-i18next';
2
+ import type { GroupAdminCaps, GroupAdminResponse } from '@ezychat/shared';
3
+ export type T = ReturnType<typeof useTranslation<'inbox'>>['t'];
4
+ export declare function groupAdminErrorText(err: unknown, t: T): string;
5
+ /** Whether the connection lets EzyChat change anything in this group. */
6
+ export declare function hasAnyGroupCap(caps: GroupAdminCaps): boolean;
7
+ /** Why nothing can be changed right now: one reason, in this order. */
8
+ export type GroupAdminBlock = 'agent' | 'notAdmin' | 'offline' | null;
9
+ export declare function groupAdminBlock(view: GroupAdminResponse): GroupAdminBlock;
10
+ /** The admin view of a group, and whether this user may change it now. */
11
+ export declare function useGroupAdminState(jid: string): {
12
+ view: {
13
+ caps: {
14
+ editInfo: boolean;
15
+ addMembers: boolean;
16
+ inviteOnly: boolean;
17
+ removeMembers: boolean;
18
+ admins: boolean;
19
+ inviteLink: boolean;
20
+ resetInviteLink: boolean;
21
+ settings: ("locked" | "announce" | "memberAdd" | "approval")[];
22
+ joinRequests: boolean;
23
+ maxMembers: number | null;
24
+ nameMax: number;
25
+ descriptionMax: number;
26
+ };
27
+ canManage: boolean;
28
+ online: boolean;
29
+ myRole: "admin" | "member" | "superadmin" | null;
30
+ settings: {
31
+ announce?: boolean | undefined;
32
+ locked?: boolean | undefined;
33
+ memberAdd?: "all" | "admins" | undefined;
34
+ approval?: boolean | undefined;
35
+ };
36
+ inviteLink: string | null;
37
+ requests: {
38
+ jid: string;
39
+ phone: string | null;
40
+ name: string | null;
41
+ at: number | null;
42
+ }[];
43
+ changes: {
44
+ at: number;
45
+ byUserId: number | null;
46
+ byName: string | null;
47
+ action: "description" | "setting" | "rename" | "member_add" | "member_invite" | "member_remove" | "admin_promote" | "admin_demote" | "invite_reset" | "join_approve" | "join_reject";
48
+ memberJid: string | null;
49
+ memberName: string | null;
50
+ setting: "locked" | "announce" | "memberAdd" | "approval" | null;
51
+ value: boolean | "all" | "admins" | null;
52
+ }[];
53
+ size: number | null;
54
+ } | undefined;
55
+ anyCap: boolean;
56
+ block: GroupAdminBlock;
57
+ can: boolean;
58
+ };
59
+ /** Members besides the business number (the count the Business API limit uses). */
60
+ export declare function othersCount(view: GroupAdminResponse, fallbackSize: number): number;
@@ -2,9 +2,11 @@ import type { AiGroupChat } from '@ezychat/shared';
2
2
  /** The AI answers tags and quotes in this group now (its switch and the agent's are both on). */
3
3
  export declare const groupAiActive: (ai: AiGroupChat | null | undefined) => boolean;
4
4
  /**
5
- * Group info → "AI agent answers when tagged or quoted". Admins switch it; agents see the state.
6
- * Disabled with a hint while the agent's "Answer in groups" is off. Hidden when the server does not
7
- * answer (an older server, or no access).
5
+ * Group info → "AI agent in this group" (designs docs/features/ai-groups/ and
6
+ * docs/features/group-agents/). Admins switch it, choose the agent when the inbox has 2+ agents
7
+ * that answer in groups, and switch "Reads every message"; agents see the state. Disabled with a
8
+ * hint while no agent can answer here. Hidden when the server does not answer (an older server, or
9
+ * no access).
8
10
  */
9
11
  export declare function GroupAiRow({ jid, isAdmin }: Readonly<{
10
12
  jid: string;
@@ -0,0 +1,9 @@
1
+ export interface PdfViewerProps {
2
+ url: string;
3
+ name: string;
4
+ downloadName: string;
5
+ open: boolean;
6
+ onOpenChange(open: boolean): void;
7
+ }
8
+ /** Full-screen in-app PDF reader: the same frame as the image preview, with zoom and Download. */
9
+ export declare function PdfViewer({ url, name, downloadName, open, onOpenChange }: PdfViewerProps): import("react").JSX.Element;