@iblai/web-utils 0.2.0 → 0.3.0
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/core/index.d.ts +2 -1
- package/dist/data-layer/src/features/analytics/api-slice.d.ts +1879 -122
- package/dist/data-layer/src/features/analytics/constants.d.ts +56 -1
- package/dist/data-layer/src/features/analytics/types.d.ts +327 -1
- package/dist/data-layer/src/features/api-keys/api-slice.d.ts +59 -70
- package/dist/data-layer/src/features/apps/api-slice.d.ts +73 -84
- package/dist/data-layer/src/features/auth/api-slice.d.ts +504 -2
- package/dist/data-layer/src/features/auth/constants.d.ts +13 -1
- package/dist/data-layer/src/features/auth/types.d.ts +20 -0
- package/dist/data-layer/src/features/billing/api-slice.d.ts +33 -33
- package/dist/data-layer/src/features/career/api-slice.d.ts +2345 -180
- package/dist/data-layer/src/features/catalog/api-slice.d.ts +2578 -562
- package/dist/data-layer/src/features/chat/api-slice.d.ts +150 -150
- package/dist/data-layer/src/features/chat-history/api-slice.d.ts +134 -134
- package/dist/data-layer/src/features/core/api-slice.d.ts +3484 -75
- package/dist/data-layer/src/features/core/constants.d.ts +40 -0
- package/dist/data-layer/src/features/core/custom-api-slice.d.ts +1458 -0
- package/dist/data-layer/src/features/core/types.d.ts +27 -0
- package/dist/data-layer/src/features/credentials/api-slice.d.ts +859 -221
- package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +602 -0
- package/dist/data-layer/src/features/custom-domain/constants.d.ts +20 -0
- package/dist/data-layer/src/features/custom-domain/types.d.ts +46 -0
- package/dist/data-layer/src/features/datasets/api-slice.d.ts +56 -56
- package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +912 -0
- package/dist/data-layer/src/features/disclaimers/constants.d.ts +27 -0
- package/dist/data-layer/src/features/disclaimers/types.d.ts +67 -0
- package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +590 -0
- package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +15 -0
- package/dist/data-layer/src/features/edx-proctoring/types.d.ts +61 -0
- package/dist/data-layer/src/features/llms/api-slice.d.ts +40 -40
- package/dist/data-layer/src/features/memory/api-slice.d.ts +2129 -0
- package/dist/data-layer/src/features/memory/constants.d.ts +50 -0
- package/dist/data-layer/src/features/memory/types.d.ts +122 -0
- package/dist/data-layer/src/features/mentor/api-slice.d.ts +1176 -470
- package/dist/data-layer/src/features/mentor/constants.d.ts +8 -0
- package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +529 -1
- package/dist/data-layer/src/features/mentor/types.d.ts +39 -0
- package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +436 -40
- package/dist/data-layer/src/features/notifications/api-slice.d.ts +750 -96
- package/dist/data-layer/src/features/notifications/constants.d.ts +20 -0
- package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +996 -0
- package/dist/data-layer/src/features/notifications/types.d.ts +46 -0
- package/dist/data-layer/src/features/per-learner/api-slice.d.ts +118 -118
- package/dist/data-layer/src/features/platform/api-slice.d.ts +345 -191
- package/dist/data-layer/src/features/platform/constants.d.ts +17 -0
- package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +493 -0
- package/dist/data-layer/src/features/platform/types.d.ts +48 -0
- package/dist/data-layer/src/features/projects/api-slice.d.ts +2026 -0
- package/dist/data-layer/src/features/projects/constants.d.ts +51 -0
- package/dist/data-layer/src/features/projects/types.d.ts +79 -0
- package/dist/data-layer/src/features/prompts/api-slice.d.ts +193 -171
- package/dist/data-layer/src/features/reports/api-slice.d.ts +814 -0
- package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +1015 -0
- package/dist/data-layer/src/features/search/api-slice.d.ts +59 -59
- package/dist/data-layer/src/features/search/constants.d.ts +31 -0
- package/dist/data-layer/src/features/search/types.d.ts +89 -0
- package/dist/data-layer/src/features/sessions/api-slice.d.ts +72 -72
- package/dist/data-layer/src/features/skills/api-slice.d.ts +157 -157
- package/dist/data-layer/src/features/stripe/api-slice.d.ts +201 -40
- package/dist/data-layer/src/features/stripe/constants.d.ts +5 -1
- package/dist/data-layer/src/features/stripe/types.d.ts +10 -0
- package/dist/data-layer/src/features/tenant/api-slice.d.ts +77 -86
- package/dist/data-layer/src/features/tenant/types.d.ts +1 -0
- package/dist/data-layer/src/features/tools/api-slice.d.ts +84 -40
- package/dist/data-layer/src/features/training-documents/api-slice.d.ts +582 -75
- package/dist/data-layer/src/features/user/api-slice.d.ts +124 -124
- package/dist/data-layer/src/features/user/constants.d.ts +3 -1
- package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +56 -56
- package/dist/data-layer/src/features/utils.d.ts +8 -5
- package/dist/data-layer/src/index.d.ts +75 -47
- package/dist/data-layer/src/reducers/skills.d.ts +2 -1148
- package/dist/data-layer/src/services/StorageService.d.ts +1 -1
- package/dist/index.d.ts +1021 -5
- package/dist/index.esm.js +3299 -453
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3305 -448
- package/dist/index.js.map +1 -1
- package/dist/package.json +34 -18
- package/dist/web-utils/src/features/chat/slice.d.ts +12 -0
- package/dist/web-utils/src/features/index.d.ts +1 -0
- package/dist/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
- package/dist/web-utils/src/features/tracking/examples.d.ts +4 -0
- package/dist/web-utils/src/features/tracking/index.d.ts +6 -0
- package/dist/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
- package/dist/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
- package/dist/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +2 -2
- package/dist/web-utils/src/hooks/chat/use-chat-v2.d.ts +9 -1
- package/dist/web-utils/src/hooks/chat/use-get-chat-details.d.ts +2 -1
- package/dist/web-utils/src/hooks/chat/use-mentor-tools.d.ts +3 -0
- package/dist/web-utils/src/hooks/index.d.ts +1 -0
- package/dist/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +6 -6
- package/dist/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +9 -8
- package/dist/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +1 -1
- package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +2 -1
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +1 -0
- package/dist/web-utils/src/index.mobile.d.ts +10 -0
- package/dist/web-utils/src/index.web.d.ts +12 -0
- package/dist/web-utils/src/providers/auth-provider.d.ts +55 -1
- package/dist/web-utils/src/providers/mentor-provider.d.ts +3 -1
- package/dist/web-utils/src/providers/tenant-provider.d.ts +10 -5
- package/dist/web-utils/src/types/index.d.ts +9 -0
- package/dist/web-utils/src/utils/constants.d.ts +4 -0
- package/dist/web-utils/src/utils/helpers.d.ts +1 -0
- package/dist/web-utils/src/utils/platform.d.ts +7 -0
- package/dist/web-utils/tests/hooks/subscription/class-subscription-flow.test.d.ts +1 -0
- package/dist/web-utils/tests/hooks/subscription/constants.test.d.ts +1 -0
- package/dist/web-utils/tests/hooks/subscription/use-subscription-handler.test.d.ts +1 -0
- package/dist/web-utils/tests/hooks/use-day-js.test.d.ts +1 -0
- package/dist/web-utils/tests/setupTests.d.ts +5 -0
- package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
- package/package.json +37 -22
- package/dist/features/chat/slice.d.ts +0 -59
- package/dist/features/index.d.ts +0 -1
- package/dist/hooks/chat/use-advanced-chat.d.ts +0 -41
- package/dist/hooks/chat/use-chat-v2.d.ts +0 -53
- package/dist/hooks/chat/use-chat.d.ts +0 -52
- package/dist/hooks/chat/use-get-chat-details.d.ts +0 -13
- package/dist/hooks/index.d.ts +0 -10
- package/dist/hooks/subscription/class-subscription-flow.d.ts +0 -70
- package/dist/hooks/subscription/constants.d.ts +0 -4
- package/dist/hooks/subscription/use-subscription-handler.d.ts +0 -11
- package/dist/hooks/subscription-v2/class-subscription-flow.d.ts +0 -62
- package/dist/hooks/subscription-v2/constants.d.ts +0 -5
- package/dist/hooks/subscription-v2/use-external-pricing-plan.d.ts +0 -7
- package/dist/hooks/subscription-v2/use-subscription-handler.d.ts +0 -12
- package/dist/hooks/use-day-js.d.ts +0 -7
- package/dist/providers/auth-provider.d.ts +0 -63
- package/dist/providers/index.d.ts +0 -3
- package/dist/providers/mentor-provider.d.ts +0 -40
- package/dist/providers/tenant-provider.d.ts +0 -60
- package/dist/types/chat.d.ts +0 -1
- package/dist/types/index.d.ts +0 -55
- package/dist/types/subscription.d.ts +0 -18
- package/dist/utils/constants.d.ts +0 -13
- package/dist/utils/data/advanced-tab.d.ts +0 -62
- package/dist/utils/helpers.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -3
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TenantProvider
|
|
3
|
-
*
|
|
4
|
-
* Provider that manages tenant-related state and access control.
|
|
5
|
-
* It handles:
|
|
6
|
-
* - Tenant validation and access control
|
|
7
|
-
* - Tenant switching logic
|
|
8
|
-
* - Tenant metadata retrieval
|
|
9
|
-
* - User-tenant relationship verification
|
|
10
|
-
*/
|
|
11
|
-
import React from "react";
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
import { tenantSchema } from "@web-utils/types";
|
|
14
|
-
/**
|
|
15
|
-
* Type definition for the tenant context
|
|
16
|
-
* Tracks whether the user's path needs to be determined and provides a setter
|
|
17
|
-
*/
|
|
18
|
-
export type TenantContextType = {
|
|
19
|
-
determineUserPath: boolean;
|
|
20
|
-
setDetermineUserPath: (value: boolean) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare const TenantContext: React.Context<TenantContextType | undefined>;
|
|
23
|
-
/**
|
|
24
|
-
* Context Provider component that wraps children with tenant context
|
|
25
|
-
*/
|
|
26
|
-
export declare const TenantContextProvider: React.FC<{
|
|
27
|
-
value: TenantContextType;
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
}>;
|
|
30
|
-
/**
|
|
31
|
-
* Hook to access the tenant context
|
|
32
|
-
* @returns TenantContextType
|
|
33
|
-
*/
|
|
34
|
-
export declare const useTenantContext: () => TenantContextType;
|
|
35
|
-
/**
|
|
36
|
-
* Props for the TenantProvider component
|
|
37
|
-
*/
|
|
38
|
-
type Props = {
|
|
39
|
-
children?: React.ReactNode;
|
|
40
|
-
fallback?: React.ReactNode;
|
|
41
|
-
onAuthSuccess?: () => void;
|
|
42
|
-
onAuthFailure?: (reason: string) => void;
|
|
43
|
-
currentTenant: string;
|
|
44
|
-
requestedTenant: string;
|
|
45
|
-
handleTenantSwitch: (tenant: string, saveRedirect: boolean) => void;
|
|
46
|
-
saveCurrentTenant: (tenant: z.infer<typeof tenantSchema>) => void;
|
|
47
|
-
saveUserTenants: (tenants: z.infer<typeof tenantSchema>[]) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* TenantProvider Component
|
|
51
|
-
*
|
|
52
|
-
* Main tenant provider that:
|
|
53
|
-
* 1. Validates user's access to requested tenant
|
|
54
|
-
* 2. Manages tenant switching
|
|
55
|
-
* 3. Retrieves and validates tenant metadata
|
|
56
|
-
* 4. Handles tenant-specific domain redirects
|
|
57
|
-
* 5. Maintains tenant access state
|
|
58
|
-
*/
|
|
59
|
-
export declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
60
|
-
export {};
|
package/dist/types/chat.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ChatMode = "advanced" | "default";
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const userDataSchema: z.ZodObject<{
|
|
3
|
-
user_display_name: z.ZodString;
|
|
4
|
-
user_email: z.ZodString;
|
|
5
|
-
user_fullname: z.ZodString;
|
|
6
|
-
user_id: z.ZodNumber;
|
|
7
|
-
user_nicename: z.ZodString;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
user_display_name: string;
|
|
10
|
-
user_email: string;
|
|
11
|
-
user_fullname: string;
|
|
12
|
-
user_id: number;
|
|
13
|
-
user_nicename: string;
|
|
14
|
-
}, {
|
|
15
|
-
user_display_name: string;
|
|
16
|
-
user_email: string;
|
|
17
|
-
user_fullname: string;
|
|
18
|
-
user_id: number;
|
|
19
|
-
user_nicename: string;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const tenantSchema: z.ZodObject<{
|
|
22
|
-
key: z.ZodString;
|
|
23
|
-
is_admin: z.ZodBoolean;
|
|
24
|
-
org: z.ZodString;
|
|
25
|
-
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
key: string;
|
|
27
|
-
is_admin: boolean;
|
|
28
|
-
org: string;
|
|
29
|
-
}, {
|
|
30
|
-
key: string;
|
|
31
|
-
is_admin: boolean;
|
|
32
|
-
org: string;
|
|
33
|
-
}>;
|
|
34
|
-
export declare const tenantKeySchema: z.ZodString;
|
|
35
|
-
export type TenantKeyMentorIdParams = {
|
|
36
|
-
tenantKey: string;
|
|
37
|
-
mentorId: string;
|
|
38
|
-
};
|
|
39
|
-
export interface TopTrialBannerProps {
|
|
40
|
-
parentContainer: string;
|
|
41
|
-
bannerText?: string;
|
|
42
|
-
onUpgrade?: string;
|
|
43
|
-
loading?: boolean;
|
|
44
|
-
tooltipText?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface Prompt {
|
|
47
|
-
type: "static" | "human" | "ai";
|
|
48
|
-
icon?: string;
|
|
49
|
-
summary?: string;
|
|
50
|
-
content?: string;
|
|
51
|
-
proactive?: boolean;
|
|
52
|
-
hide?: boolean;
|
|
53
|
-
tag?: string;
|
|
54
|
-
}
|
|
55
|
-
export * from "./chat";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StripeCustomerPortalRequest } from "@iblai/iblai-api";
|
|
2
|
-
export interface UseExternalPricingProps {
|
|
3
|
-
referenceId: string;
|
|
4
|
-
customerEmail: string;
|
|
5
|
-
publishableKey: string;
|
|
6
|
-
pricingId?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface PricingModalData {
|
|
9
|
-
referenceId: string;
|
|
10
|
-
customerEmail: string;
|
|
11
|
-
publishableKey: string;
|
|
12
|
-
pricingTableId: string;
|
|
13
|
-
}
|
|
14
|
-
export interface CreateStripeCustomerPortalRequest {
|
|
15
|
-
org: string;
|
|
16
|
-
userId: string;
|
|
17
|
-
requestBody: StripeCustomerPortalRequest;
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const MENTOR_CHAT_DOCUMENTS_EXTENSIONS: string[];
|
|
2
|
-
export declare const ANONYMOUS_USERNAME = "anonymous";
|
|
3
|
-
export declare const LOCAL_STORAGE_KEYS: {
|
|
4
|
-
CURRENT_TENANT: string;
|
|
5
|
-
TENANTS: string;
|
|
6
|
-
REDIRECT_TO: string;
|
|
7
|
-
AUTH_TOKEN: string;
|
|
8
|
-
TOKEN_EXPIRY: string;
|
|
9
|
-
USER_DATA: string;
|
|
10
|
-
USER_TENANTS: string;
|
|
11
|
-
EDX_TOKEN_KEY: string;
|
|
12
|
-
DM_TOKEN_KEY: string;
|
|
13
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
export declare const advancedTabsProperties: {
|
|
2
|
-
chat: {
|
|
3
|
-
display: string;
|
|
4
|
-
name: string;
|
|
5
|
-
tag: string;
|
|
6
|
-
showHeader: boolean;
|
|
7
|
-
prompts: {
|
|
8
|
-
type: string;
|
|
9
|
-
icon: string;
|
|
10
|
-
summary: string;
|
|
11
|
-
content: string;
|
|
12
|
-
}[];
|
|
13
|
-
};
|
|
14
|
-
summarize: {
|
|
15
|
-
display: string;
|
|
16
|
-
showHeader: boolean;
|
|
17
|
-
name: string;
|
|
18
|
-
tag: string;
|
|
19
|
-
prompts: {
|
|
20
|
-
type: string;
|
|
21
|
-
proactive: boolean;
|
|
22
|
-
hide: boolean;
|
|
23
|
-
content: string;
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
26
|
-
translate: {
|
|
27
|
-
display: string;
|
|
28
|
-
showHeader: boolean;
|
|
29
|
-
name: string;
|
|
30
|
-
tag: string;
|
|
31
|
-
description: string;
|
|
32
|
-
metaDescription: string;
|
|
33
|
-
prompts: ({
|
|
34
|
-
type: string;
|
|
35
|
-
hide: boolean;
|
|
36
|
-
tag: string;
|
|
37
|
-
summary: string;
|
|
38
|
-
content: string;
|
|
39
|
-
} | {
|
|
40
|
-
type: string;
|
|
41
|
-
summary: string;
|
|
42
|
-
content: string;
|
|
43
|
-
hide?: undefined;
|
|
44
|
-
tag?: undefined;
|
|
45
|
-
})[];
|
|
46
|
-
};
|
|
47
|
-
expand: {
|
|
48
|
-
display: string;
|
|
49
|
-
showHeader: boolean;
|
|
50
|
-
name: string;
|
|
51
|
-
tag: string;
|
|
52
|
-
prompts: {
|
|
53
|
-
type: string;
|
|
54
|
-
proactive: boolean;
|
|
55
|
-
hide: boolean;
|
|
56
|
-
content: string;
|
|
57
|
-
}[];
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
export declare const advancedTabs: ("chat" | "summarize" | "translate" | "expand")[];
|
|
61
|
-
export type AdvancedTab = keyof typeof advancedTabsProperties;
|
|
62
|
-
export declare const translatePrompt: (language: string) => string;
|
package/dist/utils/helpers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isJSON: (text: string) => boolean;
|
package/dist/utils/index.d.ts
DELETED