@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
@@ -52,6 +52,8 @@ export declare function useAiMember(): import("@tanstack/react-query").UseQueryR
52
52
  preset: "sales" | "custom" | "faq";
53
53
  inboxId: number | null;
54
54
  documentCount: number;
55
+ answerDirect: boolean;
56
+ groupCount: number;
55
57
  resolutionCheck?: boolean | undefined;
56
58
  }[];
57
59
  maxAgents: number;
@@ -111,6 +113,10 @@ export declare function useAiTry(): import("@tanstack/react-query").UseMutationR
111
113
  member: string | null;
112
114
  quoted?: boolean | undefined;
113
115
  } | undefined;
116
+ sheet?: {
117
+ action: "row_added";
118
+ tab: string;
119
+ } | undefined;
114
120
  notRun?: boolean | undefined;
115
121
  }[] | undefined;
116
122
  }, Error, {
@@ -221,6 +227,8 @@ export declare function useAiMemberAction(): import("@tanstack/react-query").Use
221
227
  preset: "sales" | "custom" | "faq";
222
228
  inboxId: number | null;
223
229
  documentCount: number;
230
+ answerDirect: boolean;
231
+ groupCount: number;
224
232
  resolutionCheck?: boolean | undefined;
225
233
  }[];
226
234
  maxAgents: number;
@@ -240,6 +248,8 @@ export declare const AiAgentList: z.ZodObject<{
240
248
  inboxId: z.ZodNullable<z.ZodNumber>;
241
249
  documentCount: z.ZodNumber;
242
250
  resolutionCheck: z.ZodOptional<z.ZodBoolean>;
251
+ answerDirect: z.ZodDefault<z.ZodBoolean>;
252
+ groupCount: z.ZodDefault<z.ZodNumber>;
243
253
  }, z.core.$strip>>;
244
254
  maxAgents: z.ZodNumber;
245
255
  }, z.core.$strip>;
@@ -257,6 +267,8 @@ export declare function useAiAgents(): import("@tanstack/react-query").UseQueryR
257
267
  preset: "sales" | "custom" | "faq";
258
268
  inboxId: number | null;
259
269
  documentCount: number;
270
+ answerDirect: boolean;
271
+ groupCount: number;
260
272
  resolutionCheck?: boolean | undefined;
261
273
  }[];
262
274
  maxAgents: number;
@@ -271,6 +283,8 @@ export declare function useAiAgent(agentId: number | null): import("@tanstack/re
271
283
  preset: "sales" | "custom" | "faq";
272
284
  inboxId: number | null;
273
285
  documentCount: number;
286
+ answerDirect: boolean;
287
+ groupCount: number;
274
288
  resolutionCheck?: boolean | undefined;
275
289
  };
276
290
  settings: {
@@ -302,6 +316,8 @@ export declare function useSetResolutionCheck(agentId: number): import("@tanstac
302
316
  preset: "sales" | "custom" | "faq";
303
317
  inboxId: number | null;
304
318
  documentCount: number;
319
+ answerDirect: boolean;
320
+ groupCount: number;
305
321
  resolutionCheck?: boolean | undefined;
306
322
  };
307
323
  settings: {
@@ -379,6 +395,8 @@ export declare function useAiAgentAction(agentId: number | null): import("@tanst
379
395
  preset: "sales" | "custom" | "faq";
380
396
  inboxId: number | null;
381
397
  documentCount: number;
398
+ answerDirect: boolean;
399
+ groupCount: number;
382
400
  resolutionCheck?: boolean | undefined;
383
401
  }[];
384
402
  maxAgents: number;
@@ -391,6 +409,8 @@ export declare function useAiAgentAction(agentId: number | null): import("@tanst
391
409
  preset: "sales" | "custom" | "faq";
392
410
  inboxId: number | null;
393
411
  documentCount: number;
412
+ answerDirect: boolean;
413
+ groupCount: number;
394
414
  resolutionCheck?: boolean | undefined;
395
415
  };
396
416
  settings: {
@@ -425,6 +445,8 @@ export declare function useAddAgentText(): import("@tanstack/react-query").UseMu
425
445
  preset: "sales" | "custom" | "faq";
426
446
  inboxId: number | null;
427
447
  documentCount: number;
448
+ answerDirect: boolean;
449
+ groupCount: number;
428
450
  resolutionCheck?: boolean | undefined;
429
451
  };
430
452
  settings: {
@@ -132,42 +132,61 @@ export declare function useSpreadsheetLookup(): import("@tanstack/react-query").
132
132
  tabs: {
133
133
  title: string;
134
134
  rows: number;
135
+ columns: string[];
135
136
  }[];
137
+ checkedAt: number | null;
136
138
  url: string;
137
139
  }, Error, string, unknown>;
138
140
  /** One AI agent's Google Sheets settings (the defaults until an admin saves them). */
139
141
  export declare function useSheetsSettings(agentId: number | null, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
140
142
  spreadsheetId: string | null;
141
143
  spreadsheetName: string | null;
142
- lookupTab: string | null;
143
- lookup: boolean;
144
- leadsTab: string | null;
145
- addLeads: boolean;
144
+ tabs: {
145
+ title: string;
146
+ access: "off" | "read" | "add";
147
+ }[];
146
148
  }, Error>;
147
149
  export declare function useSaveSheetsSettings(agentId: number): import("@tanstack/react-query").UseMutationResult<{
148
150
  spreadsheetId: string | null;
149
151
  spreadsheetName: string | null;
150
- lookupTab: string | null;
151
- lookup: boolean;
152
- leadsTab: string | null;
153
- addLeads: boolean;
152
+ tabs: {
153
+ title: string;
154
+ access: "off" | "read" | "add";
155
+ }[];
154
156
  }, Error, {
155
157
  spreadsheetId: string | null;
156
158
  spreadsheetName: string | null;
157
- lookupTab: string | null;
158
- lookup: boolean;
159
- leadsTab: string | null;
160
- addLeads: boolean;
159
+ tabs: {
160
+ title: string;
161
+ access: "off" | "read" | "add";
162
+ }[];
161
163
  }, unknown>;
164
+ /**
165
+ * Reads the agent's spreadsheet again from Google (tab names and first rows) and clears the AI's
166
+ * column cache. One a 10 s per install (429 `rate_limited`).
167
+ */
168
+ export declare function useRefreshSheetTabs(agentId: number): import("@tanstack/react-query").UseMutationResult<{
169
+ id: string;
170
+ name: string;
171
+ tabs: {
172
+ title: string;
173
+ rows: number;
174
+ columns: string[];
175
+ }[];
176
+ checkedAt: number | null;
177
+ url: string;
178
+ }, Error, void, unknown>;
162
179
  export declare function useSheetsActivity(enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
163
180
  activity: {
164
181
  id: number;
165
182
  at: number;
166
- kind: "failed" | "looked_up" | "lead_added";
183
+ kind: "failed" | "row_added" | "looked_up" | "lead_added";
167
184
  agentId: number | null;
168
185
  agentName: string;
169
186
  chatJid: string | null;
170
187
  customer: string;
188
+ tab: string | null;
189
+ group: string | null;
171
190
  }[];
172
191
  }, Error>;
173
192
  /** Opens Google's file picker (a page on the computer that runs EzyChat). */
@@ -184,7 +203,9 @@ export declare function useSheetsPickerProgress(requestId: string | null): impor
184
203
  tabs: {
185
204
  title: string;
186
205
  rows: number;
206
+ columns: string[];
187
207
  }[];
208
+ checkedAt: number | null;
188
209
  url: string;
189
210
  } | null;
190
211
  }, Error>;
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Group management (design docs/features/group-management/design.md): what an EzyChat admin may
3
+ * change in a WhatsApp group from Group info. The answer carries the connection's `caps`; the UI
4
+ * shows only those actions, never by inbox type. Changes are never queued (offline → 503).
5
+ */
6
+ export declare const groupAdminKey: (jid: string) => readonly ["group-admin", string];
7
+ export declare function useGroupAdmin(jid: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<{
8
+ caps: {
9
+ editInfo: boolean;
10
+ addMembers: boolean;
11
+ inviteOnly: boolean;
12
+ removeMembers: boolean;
13
+ admins: boolean;
14
+ inviteLink: boolean;
15
+ resetInviteLink: boolean;
16
+ settings: ("locked" | "announce" | "memberAdd" | "approval")[];
17
+ joinRequests: boolean;
18
+ maxMembers: number | null;
19
+ nameMax: number;
20
+ descriptionMax: number;
21
+ };
22
+ canManage: boolean;
23
+ online: boolean;
24
+ myRole: "admin" | "member" | "superadmin" | null;
25
+ settings: {
26
+ announce?: boolean | undefined;
27
+ locked?: boolean | undefined;
28
+ memberAdd?: "all" | "admins" | undefined;
29
+ approval?: boolean | undefined;
30
+ };
31
+ inviteLink: string | null;
32
+ requests: {
33
+ jid: string;
34
+ phone: string | null;
35
+ name: string | null;
36
+ at: number | null;
37
+ }[];
38
+ changes: {
39
+ at: number;
40
+ byUserId: number | null;
41
+ byName: string | null;
42
+ action: "description" | "setting" | "rename" | "member_add" | "member_invite" | "member_remove" | "admin_promote" | "admin_demote" | "invite_reset" | "join_approve" | "join_reject";
43
+ memberJid: string | null;
44
+ memberName: string | null;
45
+ setting: "locked" | "announce" | "memberAdd" | "approval" | null;
46
+ value: boolean | "all" | "admins" | null;
47
+ }[];
48
+ size: number | null;
49
+ }, Error>;
50
+ export declare const useEditGroup: (jid: string) => import("@tanstack/react-query").UseMutationResult<unknown, Error, {
51
+ name?: string | undefined;
52
+ description?: string | undefined;
53
+ }, unknown>;
54
+ /** Exactly one number (digits with country code). `invite_needed`: offer Send invite. */
55
+ export declare const useAddGroupMember: (jid: string) => import("@tanstack/react-query").UseMutationResult<{
56
+ result: "added" | "invite_needed";
57
+ memberJid: string;
58
+ }, Error, string, unknown>;
59
+ export declare const useSendGroupInvite: (jid: string) => import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
60
+ export declare const useRemoveGroupMember: (jid: string) => import("@tanstack/react-query").UseMutationResult<unknown, Error, string, unknown>;
61
+ export declare const useSetGroupMemberAdmin: (jid: string) => import("@tanstack/react-query").UseMutationResult<unknown, Error, {
62
+ member: string;
63
+ admin: boolean;
64
+ }, unknown>;
65
+ export declare function useResetGroupInvite(jid: string): import("@tanstack/react-query").UseMutationResult<{
66
+ inviteLink: string;
67
+ }, Error, unknown, unknown>;
68
+ export declare function useGroupSettings(jid: string): import("@tanstack/react-query").UseMutationResult<unknown, Error, Partial<{
69
+ announce: boolean;
70
+ locked: boolean;
71
+ memberAdd: "all" | "admins";
72
+ approval: boolean;
73
+ }>, unknown>;
74
+ export declare const useGroupJoinRequest: (jid: string) => import("@tanstack/react-query").UseMutationResult<unknown, Error, {
75
+ member: string;
76
+ approve: boolean;
77
+ }, unknown>;
@@ -0,0 +1,35 @@
1
+ import { type FeedbackArea, type FeedbackType } from '@ezychat/shared';
2
+ /**
3
+ * Send feedback (docs/features/in-app-feedback/design.md). Anyone signed in can send a problem, an
4
+ * idea, a question or anything else, with up to 3 files. The local server adds the app details and
5
+ * forwards it to Anchor Sprint's licence portal; nothing is sent until the user presses Send. Opened
6
+ * from the account menu, Admin → Help & feedback, About and the error panel (`openFeedback`); the
7
+ * draft survives closing the dialog.
8
+ */
9
+ declare global {
10
+ interface Window {
11
+ /** Desktop app only (inbox-preload): a PNG of this window, or null. */
12
+ watiCapture?: {
13
+ captureWindow(): Promise<Uint8Array | null>;
14
+ };
15
+ }
16
+ }
17
+ export declare const OPEN_FEEDBACK_EVENT = "ezychat:feedback";
18
+ export interface FeedbackPrefill {
19
+ type?: FeedbackType;
20
+ details?: string;
21
+ }
22
+ /** Opens the Send feedback dialog from anywhere (menu, About, error panel). */
23
+ export declare function openFeedback(prefill?: FeedbackPrefill): void;
24
+ /** The part of the app a screen belongs to, so the report starts with the right one. */
25
+ /** "en" → "English" in the UI language; the code itself when the browser cannot name it. */
26
+ export declare function languageName(code: string, uiLanguage?: string): string;
27
+ export declare function areaForPath(path: string): FeedbackArea;
28
+ export declare function FeedbackHost(): import("react").JSX.Element | null;
29
+ export declare function FeedbackDialog({ open, onOpenChange, prefill, }: {
30
+ open: boolean;
31
+ onOpenChange: (open: boolean) => void;
32
+ prefill: FeedbackPrefill & {
33
+ n: number;
34
+ };
35
+ }): import("react").JSX.Element;
@@ -8,7 +8,7 @@ export interface CreateInboxAppOptions {
8
8
  /** Product name shown wherever the UI names the app; defaults to "EzyChat Lite". */
9
9
  productName?: string;
10
10
  /**
11
- * Outside links (About, Report an issue, release notes, feedback, support email). Missing
11
+ * Outside links (About, Report an issue, release notes, support email). Missing
12
12
  * entries keep Lite's links; an explicit `null` hides that link.
13
13
  */
14
14
  links?: Partial<AppLinks>;