@ezychat/web 0.1.66 → 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.
@@ -107,7 +107,7 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
107
107
  end?: string | undefined;
108
108
  } | undefined;
109
109
  group?: {
110
- kind: "paused" | "answered" | "handover";
110
+ kind: "paused" | "handover" | "answered";
111
111
  member: string | null;
112
112
  quoted?: boolean | undefined;
113
113
  } | undefined;
@@ -1,9 +1,25 @@
1
+ import type { DesktopUpgradeBridge, DesktopUpgradeState } from '@ezychat/shared';
1
2
  /**
2
3
  * The "Upgrade to Enterprise" address, or null when the product hides it: Lite links
3
4
  * ezychat.ai/#enterprise (with a campaign tag), another product passes `createInboxApp({ links: { upgrade: null } })`.
4
5
  */
5
6
  export declare function useUpgradeUrl(): string | null;
6
- /** An outline button that opens the Enterprise page in the browser; nothing when hidden. */
7
+ /**
8
+ * Lite's Upgrade dialog in the desktop window on the host PC: downloads the EzyChat Enterprise installer,
9
+ * checks it and starts it (the desktop does all of that; the page only asks and shows progress).
10
+ */
11
+ export declare function UpgradeDialog({ open, onOpenChange, bridge, state, onState, learnMoreUrl, }: {
12
+ open: boolean;
13
+ onOpenChange: (open: boolean) => void;
14
+ bridge: DesktopUpgradeBridge;
15
+ state: DesktopUpgradeState;
16
+ onState: (state: DesktopUpgradeState) => void;
17
+ learnMoreUrl: string;
18
+ }): import("react").JSX.Element;
19
+ /**
20
+ * The upgrade button: in the desktop window on the host PC it opens the Upgrade dialog (install
21
+ * EzyChat Enterprise); anywhere else it opens the Enterprise page in the browser. Nothing when hidden.
22
+ */
7
23
  export declare function UpgradeButton({ className }: {
8
24
  className?: string;
9
25
  }): import("react").JSX.Element | null;
@@ -84,6 +84,26 @@ 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
+ };
87
107
  };
88
108
  tips: {
89
109
  guide: string;
@@ -3444,6 +3464,179 @@ export declare const enResources: {
3444
3464
  };
3445
3465
  teamLocked: string;
3446
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
+ };
3447
3640
  };
3448
3641
  errors: {
3449
3642
  generic: string;
@@ -0,0 +1,4 @@
1
+ /** What a phone, another PC or the tunnel shows instead of the import. */
2
+ export declare function DesktopOnly(): import("react").JSX.Element;
3
+ export declare function LiteImportPage(): import("react").JSX.Element;
4
+ export default LiteImportPage;
@@ -0,0 +1,5 @@
1
+ import { type ReactNode } from 'react';
2
+ /** The setup wizard's entry: the Start step when Lite data is on this PC, else `startNew` as is. */
3
+ export declare function LiteSetupStart({ startNew }: {
4
+ startNew: ReactNode;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ export declare const liteNoticeKey: readonly ["liteImport", "notice"];
2
+ /**
3
+ * The after-import notice (admins): the team checklist and the "address changed" flag. Anything but a
4
+ * clean answer (no import ever ran, an older server) counts as no notice.
5
+ */
6
+ export declare function useLiteImportNotice(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
7
+ checklist: {
8
+ inboxId: number;
9
+ inboxName: string;
10
+ liteUsers: number;
11
+ tokens: {
12
+ name: string;
13
+ kind: "token" | "oauth";
14
+ }[];
15
+ items: Record<"mcp" | "share" | "signin" | "notifications", boolean>;
16
+ } | null;
17
+ mcp: {
18
+ reason: "quick" | "lan" | "merge" | "domain";
19
+ mcpUrl: string | null;
20
+ } | null;
21
+ }, Error>;
22
+ /** Ticks a checklist item or dismisses a card; the answer replaces the notice. */
23
+ export declare function useUpdateLiteImportNotice(): import("@tanstack/react-query").UseMutationResult<{
24
+ checklist: {
25
+ inboxId: number;
26
+ inboxName: string;
27
+ liteUsers: number;
28
+ tokens: {
29
+ name: string;
30
+ kind: "token" | "oauth";
31
+ }[];
32
+ items: Record<"mcp" | "share" | "signin" | "notifications", boolean>;
33
+ } | null;
34
+ mcp: {
35
+ reason: "quick" | "lan" | "merge" | "domain";
36
+ mcpUrl: string | null;
37
+ } | null;
38
+ }, Error, {
39
+ item?: "mcp" | "share" | "signin" | "notifications" | undefined;
40
+ done?: boolean | undefined;
41
+ dismiss?: "mcp" | "checklist" | undefined;
42
+ }, unknown>;
@@ -0,0 +1,27 @@
1
+ import type { DesktopLiteImportBridge, DesktopUpgradeBridge, DesktopUpgradeState, LiteImportState } from '@ezychat/shared';
2
+ declare global {
3
+ interface Window {
4
+ /** Lite → Enterprise import: only the desktop inbox window on the host PC has it. */
5
+ watiLiteImport?: DesktopLiteImportBridge;
6
+ /** Lite's "Install EzyChat Enterprise" download: only the desktop window on the host PC. */
7
+ watiUpgrade?: DesktopUpgradeBridge;
8
+ }
9
+ }
10
+ /** The desktop's import bridge, or null in a browser, on a phone or on another PC. */
11
+ export declare function liteImportBridge(): DesktopLiteImportBridge | null;
12
+ /** The desktop's Enterprise installer bridge, or null outside the desktop window on the host PC. */
13
+ export declare function upgradeBridge(): DesktopUpgradeBridge | null;
14
+ /**
15
+ * Follows the import state the desktop main process keeps. Scans once when nothing was scanned yet
16
+ * (`scan: true`). `act` runs one bridge call and keeps its result; a failed call shows a toast.
17
+ */
18
+ export declare function useLiteImport(bridge: DesktopLiteImportBridge | null, { scan }?: {
19
+ scan?: boolean;
20
+ }): {
21
+ state: LiteImportState | null;
22
+ error: boolean;
23
+ busy: boolean;
24
+ act: (call: () => Promise<LiteImportState>, failMessage: string) => Promise<boolean>;
25
+ };
26
+ /** Follows the Enterprise installer download; null until the desktop answers (or without a bridge). */
27
+ export declare function useDesktopUpgrade(bridge: DesktopUpgradeBridge | null): readonly [DesktopUpgradeState | null, import("react").Dispatch<import("react").SetStateAction<DesktopUpgradeState | null>>];
@@ -0,0 +1,8 @@
1
+ /** Admin → Inboxes: "Add a number from EzyChat Lite", only in the desktop window on the host PC. */
2
+ export declare function LiteImportEntry({ maxInboxes }: {
3
+ maxInboxes: number;
4
+ }): import("react").JSX.Element | null;
5
+ /** "Finish for Lite's team": share the address, sign in again, alerts, AI assistants. */
6
+ export declare function LiteChecklistCard(): import("react").JSX.Element | null;
7
+ /** Settings → Integrations: AI assistants connected to Lite must be connected again. */
8
+ export declare function LiteMcpNoticeCard(): import("react").JSX.Element | null;
@@ -0,0 +1,43 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { DesktopLiteImportBridge, LiteImportState, LiteTeamChoice, LiteUser, User } from '@ezychat/shared';
3
+ export type Act = (call: () => Promise<LiteImportState>, failMessage: string) => Promise<boolean>;
4
+ interface StepProps {
5
+ state: LiteImportState;
6
+ bridge: DesktopLiteImportBridge;
7
+ act: Act;
8
+ busy: boolean;
9
+ }
10
+ /** What was found: the figure, summary tiles, and that Lite's data stays. */
11
+ export declare function FoundStep({ state, onContinue, cancel, }: {
12
+ state: LiteImportState;
13
+ onContinue: () => void;
14
+ cancel: ReactNode;
15
+ }): import("react").JSX.Element | null;
16
+ /** The checks; each blocking one has one clear action. */
17
+ export declare function ChecksStep({ state, bridge, act, busy, continueLabel, onContinue, }: StepProps & {
18
+ continueLabel: string;
19
+ onContinue: () => void;
20
+ }): import("react").JSX.Element;
21
+ /** Default for each Lite user: the same username here → same person, else add with Lite's role. */
22
+ export declare function defaultTeam(liteUsers: LiteUser[], people: User[]): LiteTeamChoice[];
23
+ /** Merge review: what comes over, who is who, what stays Enterprise's, what to set up again. */
24
+ export declare function ReviewStep({ state, bridge, act, busy, people }: StepProps & {
25
+ people: User[];
26
+ }): import("react").JSX.Element;
27
+ export declare function RunningStep({ state }: {
28
+ state: LiteImportState;
29
+ }): import("react").JSX.Element;
30
+ /** Plain words for a failure code from the desktop (codes stay out of the screen). */
31
+ export declare function failureKey(code: string): "liteImport.fail.codes.other" | "liteImport.fail.codes.own_server_stop" | "liteImport.fail.codes.summary_failed" | "liteImport.fail.codes.no_lite_data";
32
+ /** Back to a fresh scan after a failure or a blocked check. */
33
+ export declare function rescan(bridge: DesktopLiteImportBridge): Promise<LiteImportState>;
34
+ export declare function FailedStep({ state, bridge, act, busy, onRetry, extra, }: StepProps & {
35
+ onRetry?: () => void;
36
+ extra?: ReactNode;
37
+ }): import("react").JSX.Element;
38
+ /** Sign in again: the server now runs on Lite's data, so Lite's accounts and passwords apply. */
39
+ export declare function SignInWithLite(): import("react").JSX.Element;
40
+ export declare function DoneStep({ state }: {
41
+ state: LiteImportState;
42
+ }): import("react").JSX.Element;
43
+ export {};
@@ -0,0 +1,38 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { LiteImportMode, LiteImportStep } from '@ezychat/shared';
3
+ export type Icon = ComponentType<{
4
+ className?: string;
5
+ 'aria-hidden'?: boolean;
6
+ }>;
7
+ type Tone = 'primary' | 'warning' | 'success';
8
+ export declare function IconBubble({ icon: I, tone }: {
9
+ icon: Icon;
10
+ tone?: Tone;
11
+ }): import("react").JSX.Element;
12
+ export interface Tile {
13
+ icon: Icon;
14
+ value: ReactNode;
15
+ label: string;
16
+ }
17
+ /** Icon tiles: one number or word each, with a short label under it. */
18
+ export declare function Tiles({ items }: {
19
+ items: Tile[];
20
+ }): import("react").JSX.Element;
21
+ /** One line with an icon in front. */
22
+ export declare function IconLine({ icon: I, tone, children, }: {
23
+ icon: Icon;
24
+ tone?: string;
25
+ children: ReactNode;
26
+ }): import("react").JSX.Element;
27
+ /** The figure: EzyChat Lite → this product, with what happens to the number. */
28
+ export declare function MoveFigure({ number, mode }: {
29
+ number: string | null;
30
+ mode: LiteImportMode;
31
+ }): import("react").JSX.Element;
32
+ /** The import steps the desktop reports, each with its state. */
33
+ export declare function StepList({ steps }: {
34
+ steps: LiteImportStep[];
35
+ }): import("react").JSX.Element;
36
+ /** 0..100 for the progress bar: finished steps plus the running copy's share. */
37
+ export declare function stepsPercent(steps: LiteImportStep[]): number;
38
+ export {};
@@ -1,3 +1,6 @@
1
- /** First-run wizard: account → link WhatsApp → AI assistant (skippable) → ready. */
1
+ /**
2
+ * The setup page. In the desktop app, when EzyChat Lite data is on this PC, a Start step offers to bring
3
+ * it over first (`lite-import/LiteSetupStart.tsx`); otherwise it is the wizard above, unchanged.
4
+ */
2
5
  export declare function SetupWizard(): import("react").JSX.Element;
3
6
  export default SetupWizard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezychat/web",
3
- "version": "0.1.66",
3
+ "version": "0.1.67",
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.66",
43
+ "@ezychat/shared": "0.1.67",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.105.0",
46
46
  "@types/react": "^19.3.0",