@ezychat/web 0.1.82 → 0.1.83

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.
@@ -1,4 +1,4 @@
1
- import { type ReportPeriod, type SafetyAction, type SafetyActionBody } from '@ezychat/shared';
1
+ import { type ReportPeriod, type SafetyAction, type SafetyActionBody, type SafetyChatAction } from '@ezychat/shared';
2
2
  /**
3
3
  * WhatsApp Safety (docs/features/whatsapp-safety/design.md): Admin → Safety, the chat bar and
4
4
  * Admin → Reports → WhatsApp Safety. A message's own finding comes with the message (`safety`).
@@ -78,6 +78,7 @@ export declare function useSafetyChat(jid: string): import("@tanstack/react-quer
78
78
  } | null;
79
79
  maybeHacked: boolean;
80
80
  itemId: number | null;
81
+ canBlock: boolean;
81
82
  }, Error>;
82
83
  /** `inbox` null = every inbox together. */
83
84
  export declare function useSafetyReport(days: ReportPeriod, inbox?: number | null): import("@tanstack/react-query").UseQueryResult<{
@@ -203,3 +204,19 @@ export declare function useSafetyAction(): import("@tanstack/react-query").UseMu
203
204
  action: SafetyAction;
204
205
  body?: SafetyActionBody;
205
206
  }, unknown>;
207
+ /** Admins: block or unblock any direct chat's number (the Customer panel), flagged or not. */
208
+ export declare function useSafetyChatAction(jid: string): import("@tanstack/react-query").UseMutationResult<{
209
+ enabled: boolean;
210
+ scam: boolean;
211
+ blocked: {
212
+ by: string | null;
213
+ at: number;
214
+ auto: boolean;
215
+ } | null;
216
+ maybeHacked: boolean;
217
+ itemId: number | null;
218
+ canBlock: boolean;
219
+ }, Error, {
220
+ action: SafetyChatAction;
221
+ spam?: boolean;
222
+ }, unknown>;
@@ -1825,6 +1825,19 @@ export declare const enResources: {
1825
1825
  thisNumber: string;
1826
1826
  loadFailed: string;
1827
1827
  };
1828
+ block: {
1829
+ title: string;
1830
+ hint: string;
1831
+ button: string;
1832
+ cannot: string;
1833
+ confirmTitle: string;
1834
+ confirmBody: string;
1835
+ spam: string;
1836
+ spamHint: string;
1837
+ confirm: string;
1838
+ done: string;
1839
+ isBlocked: string;
1840
+ };
1828
1841
  };
1829
1842
  admin: {
1830
1843
  title: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Admins: block or unblock a direct chat's number on WhatsApp from the Customer panel, for any chat
3
+ * (spam, harassment), not only one WhatsApp Safety flagged. Blocking can also mark the number as spam.
4
+ */
5
+ export declare function BlockNumber({ jid }: {
6
+ jid: string;
7
+ }): import("react").JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezychat/web",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
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.82",
43
+ "@ezychat/shared": "0.1.83",
44
44
  "@fontsource-variable/inter": "^5.3.0",
45
45
  "@tanstack/react-query": "^5.105.0",
46
46
  "@types/react": "^19.3.0",