@iblai/web-utils 1.6.7 → 1.6.9
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.
- package/dist/data-layer/src/features/mentor/privacy.d.ts +61 -0
- package/dist/data-layer/src/index.d.ts +1 -0
- package/dist/index.d.ts +676 -128
- package/dist/index.esm.js +14558 -21745
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14648 -21750
- package/dist/index.js.map +1 -1
- package/dist/package.json +11 -2
- package/dist/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
- package/dist/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
- package/dist/web-utils/src/features/files/filesSlice.d.ts +3 -0
- package/dist/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
- package/dist/web-utils/src/features/host-chat/slice.d.ts +17 -0
- package/dist/web-utils/src/features/index.d.ts +5 -0
- package/dist/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
- package/dist/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
- package/dist/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
- package/dist/web-utils/src/features/subscription/constants.d.ts +12 -0
- package/dist/web-utils/src/features/subscription/slice.d.ts +29 -0
- package/dist/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
- package/dist/web-utils/src/features/top-banner/slice.d.ts +24 -0
- package/dist/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +1 -1
- package/dist/web-utils/src/hooks/chat/use-chat-v2.d.ts +1 -1
- package/dist/web-utils/src/hooks/index.d.ts +23 -0
- package/dist/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
- package/dist/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
- package/dist/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
- package/dist/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
- package/dist/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
- package/dist/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
- package/dist/web-utils/src/hooks/use-event-callback.d.ts +2 -0
- package/dist/web-utils/src/hooks/use-event-listener.d.ts +6 -0
- package/dist/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
- package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/web-utils/src/hooks/use-local-storage.d.ts +13 -0
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +39 -19
- package/dist/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
- package/dist/web-utils/src/hooks/use-os.d.ts +8 -0
- package/dist/web-utils/src/hooks/use-responsive.d.ts +13 -0
- package/dist/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
- package/dist/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
- package/dist/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
- package/dist/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
- package/dist/web-utils/src/hooks/use-timer.d.ts +7 -0
- package/dist/web-utils/src/hooks/use-tokens.d.ts +2 -0
- package/dist/web-utils/src/hooks/use-user-agreement.d.ts +21 -0
- package/dist/web-utils/src/hooks/use-user.d.ts +23 -0
- package/dist/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
- package/dist/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
- package/dist/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
- package/dist/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
- package/dist/web-utils/src/providers/auth-provider.d.ts +1 -1
- package/dist/web-utils/src/providers/index.d.ts +1 -0
- package/dist/web-utils/src/providers/service-worker-provider.d.ts +21 -0
- package/dist/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
- package/dist/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
- package/dist/web-utils/src/services/event-bus.d.ts +6 -0
- package/dist/web-utils/src/services/index.d.ts +2 -0
- package/dist/web-utils/src/services/register-sw.d.ts +71 -0
- package/dist/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
- package/dist/web-utils/src/utils/constants.d.ts +18 -0
- package/dist/web-utils/src/utils/helpers.d.ts +20 -0
- package/dist/web-utils/src/utils/index.d.ts +1 -0
- package/dist/web-utils/src/utils/platform.d.ts +1 -0
- package/dist/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
- package/package.json +11 -2
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Router types and constants.
|
|
3
|
+
*
|
|
4
|
+
* The backend's privacy router optionally detects and filters PII from chat
|
|
5
|
+
* messages before they reach the LLM. It is configured per-mentor through the
|
|
6
|
+
* existing mentor-settings endpoints (no new endpoints required):
|
|
7
|
+
*
|
|
8
|
+
* - GET /api/ai-mentor/orgs/{org}/users/{user_id}/mentors/{name}/settings/
|
|
9
|
+
* - PUT /api/ai-mentor/orgs/{org}/users/{user_id}/mentors/{name}/settings/
|
|
10
|
+
* - GET /api/ai-mentor/orgs/{org}/users/{user_id}/mentors/{name}/public-settings/
|
|
11
|
+
*
|
|
12
|
+
* These are already wired in `mentorApiSlice`
|
|
13
|
+
* (`useGetMentorSettingsQuery`, `useEditMentorMutation`,
|
|
14
|
+
* `useGetMentorPublicSettingsQuery`) — this file just adds the typed
|
|
15
|
+
* surface for the new fields.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PRIVACY_ACTIONS: readonly ["redact", "mask", "block"];
|
|
18
|
+
export type PrivacyAction = (typeof PRIVACY_ACTIONS)[number];
|
|
19
|
+
export declare const PRIVACY_ENTITY_TYPES: readonly ["PERSON", "EMAIL_ADDRESS", "PHONE_NUMBER", "US_SSN", "CREDIT_CARD", "LOCATION", "DATE_TIME", "US_PASSPORT", "US_DRIVER_LICENSE", "IP_ADDRESS", "IBAN_CODE", "MEDICAL_LICENSE", "US_BANK_NUMBER"];
|
|
20
|
+
export type PrivacyEntityType = (typeof PRIVACY_ENTITY_TYPES)[number];
|
|
21
|
+
/**
|
|
22
|
+
* Entities suggested in the simple/default view of the privacy settings UI.
|
|
23
|
+
* The remaining entities are surfaced under an "Advanced" disclosure.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SUGGESTED_PRIVACY_ENTITIES: readonly PrivacyEntityType[];
|
|
26
|
+
export declare const DEFAULT_PRIVACY_RESPONSE = "Your message contains sensitive personal information and cannot be processed. Please remove any personal data and try again.";
|
|
27
|
+
export declare const DEFAULT_PRIVACY_ACTION: PrivacyAction;
|
|
28
|
+
export interface MentorPrivacySettings {
|
|
29
|
+
enable_privacy_router: boolean;
|
|
30
|
+
privacy_action: PrivacyAction;
|
|
31
|
+
privacy_entities: PrivacyEntityType[];
|
|
32
|
+
privacy_response: string;
|
|
33
|
+
enable_privacy_output_filter: boolean;
|
|
34
|
+
}
|
|
35
|
+
export type MentorPrivacySettingsUpdate = Partial<MentorPrivacySettings>;
|
|
36
|
+
/** Subset of mentor public-settings that exposes the privacy toggle anonymously. */
|
|
37
|
+
export interface MentorPrivacyPublicSettings {
|
|
38
|
+
enable_privacy_router: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* `kind` value the backend returns on chat WS / SSE messages when a request
|
|
42
|
+
* is rejected by the privacy router (action = "block"). Sits alongside the
|
|
43
|
+
* existing `innappropriate_prompt` moderation/safety kind.
|
|
44
|
+
*/
|
|
45
|
+
export declare const PRIVACY_BLOCKED_ERROR_KIND: "privacy_blocked";
|
|
46
|
+
export declare const PRIVACY_TARGET_SYSTEM: "privacy";
|
|
47
|
+
export interface PrivacyBlockedErrorPayload {
|
|
48
|
+
error: string;
|
|
49
|
+
reason?: string;
|
|
50
|
+
appropriate?: boolean;
|
|
51
|
+
kind: typeof PRIVACY_BLOCKED_ERROR_KIND;
|
|
52
|
+
target_system: typeof PRIVACY_TARGET_SYSTEM;
|
|
53
|
+
status_code?: number;
|
|
54
|
+
session_id?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Type guard for the privacy-block error returned over the chat WS / SSE
|
|
58
|
+
* channel. Use this in chat error handlers to give privacy blocks a distinct
|
|
59
|
+
* visual treatment from moderation/safety blocks.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isPrivacyBlockedError(payload: unknown): payload is PrivacyBlockedErrorPayload;
|
|
@@ -63,6 +63,7 @@ export * from './features/mentor/custom-api-slice';
|
|
|
63
63
|
export * from './features/moderation-logs/api-slice';
|
|
64
64
|
export * from './features/mentor/constants';
|
|
65
65
|
export * from './features/mentor/types';
|
|
66
|
+
export * from './features/mentor/privacy';
|
|
66
67
|
export * from './features/memory/api-slice';
|
|
67
68
|
export * from './features/memory/constants';
|
|
68
69
|
export * from './features/memory/types';
|