@iblai/web-utils 0.2.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.
Files changed (127) hide show
  1. package/dist/data-layer/src/config.d.ts +7 -0
  2. package/dist/data-layer/src/constants.d.ts +30 -0
  3. package/dist/data-layer/src/core/index.d.ts +4 -0
  4. package/dist/data-layer/src/features/analytics/api-slice.d.ts +1600 -0
  5. package/dist/data-layer/src/features/analytics/constants.d.ts +66 -0
  6. package/dist/data-layer/src/features/analytics/types.d.ts +100 -0
  7. package/dist/data-layer/src/features/api-keys/api-slice.d.ts +665 -0
  8. package/dist/data-layer/src/features/apps/api-slice.d.ts +683 -0
  9. package/dist/data-layer/src/features/auth/api-slice.d.ts +137 -0
  10. package/dist/data-layer/src/features/auth/constants.d.ts +8 -0
  11. package/dist/data-layer/src/features/auth/types.d.ts +13 -0
  12. package/dist/data-layer/src/features/billing/api-slice.d.ts +349 -0
  13. package/dist/data-layer/src/features/career/api-slice.d.ts +687 -0
  14. package/dist/data-layer/src/features/catalog/api-slice.d.ts +6602 -0
  15. package/dist/data-layer/src/features/chat/api-slice.d.ts +1832 -0
  16. package/dist/data-layer/src/features/chat-history/api-slice.d.ts +1386 -0
  17. package/dist/data-layer/src/features/constants.d.ts +3 -0
  18. package/dist/data-layer/src/features/core/api-slice.d.ts +653 -0
  19. package/dist/data-layer/src/features/core/constants.d.ts +4 -0
  20. package/dist/data-layer/src/features/credentials/api-slice.d.ts +2129 -0
  21. package/dist/data-layer/src/features/credentials/constants.d.ts +28 -0
  22. package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +1284 -0
  23. package/dist/data-layer/src/features/credentials/types.d.ts +16 -0
  24. package/dist/data-layer/src/features/datasets/api-slice.d.ts +576 -0
  25. package/dist/data-layer/src/features/llms/api-slice.d.ts +333 -0
  26. package/dist/data-layer/src/features/mentor/api-slice.d.ts +4298 -0
  27. package/dist/data-layer/src/features/mentor/constants.d.ts +31 -0
  28. package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +268 -0
  29. package/dist/data-layer/src/features/mentor/types.d.ts +38 -0
  30. package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +311 -0
  31. package/dist/data-layer/src/features/notifications/api-slice.d.ts +946 -0
  32. package/dist/data-layer/src/features/per-learner/api-slice.d.ts +1213 -0
  33. package/dist/data-layer/src/features/platform/api-slice.d.ts +1124 -0
  34. package/dist/data-layer/src/features/prompts/api-slice.d.ts +2276 -0
  35. package/dist/data-layer/src/features/search/api-slice.d.ts +1939 -0
  36. package/dist/data-layer/src/features/sessions/api-slice.d.ts +705 -0
  37. package/dist/data-layer/src/features/skills/api-slice.d.ts +1235 -0
  38. package/dist/data-layer/src/features/stripe/api-slice.d.ts +620 -0
  39. package/dist/data-layer/src/features/stripe/constants.d.ts +15 -0
  40. package/dist/data-layer/src/features/stripe/types.d.ts +9 -0
  41. package/dist/data-layer/src/features/tenant/api-slice.d.ts +759 -0
  42. package/dist/data-layer/src/features/tenant/constants.d.ts +11 -0
  43. package/dist/data-layer/src/features/tenant/types.d.ts +18 -0
  44. package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +349 -0
  45. package/dist/data-layer/src/features/tenant-logo/constants.d.ts +24 -0
  46. package/dist/data-layer/src/features/tools/api-slice.d.ts +333 -0
  47. package/dist/data-layer/src/features/training-documents/api-slice.d.ts +922 -0
  48. package/dist/data-layer/src/features/user/api-slice.d.ts +1703 -0
  49. package/dist/data-layer/src/features/user/constants.d.ts +40 -0
  50. package/dist/data-layer/src/features/user/types.d.ts +107 -0
  51. package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +718 -0
  52. package/dist/data-layer/src/features/utils.d.ts +66 -0
  53. package/dist/data-layer/src/index.d.ts +47 -0
  54. package/dist/data-layer/src/reducers/index.d.ts +2 -0
  55. package/dist/data-layer/src/reducers/mentor.d.ts +2 -0
  56. package/dist/data-layer/src/reducers/skills.d.ts +1148 -0
  57. package/dist/data-layer/src/services/StorageService.d.ts +5 -0
  58. package/dist/data-layer/src/utils/index.d.ts +2 -0
  59. package/dist/features/chat/slice.d.ts +59 -0
  60. package/dist/features/index.d.ts +1 -0
  61. package/dist/hooks/chat/use-advanced-chat.d.ts +41 -0
  62. package/dist/hooks/chat/use-chat-v2.d.ts +53 -0
  63. package/dist/hooks/chat/use-chat.d.ts +52 -0
  64. package/dist/hooks/chat/use-get-chat-details.d.ts +13 -0
  65. package/dist/hooks/index.d.ts +10 -0
  66. package/dist/hooks/subscription/class-subscription-flow.d.ts +70 -0
  67. package/dist/hooks/subscription/constants.d.ts +4 -0
  68. package/dist/hooks/subscription/use-subscription-handler.d.ts +11 -0
  69. package/dist/hooks/subscription-v2/class-subscription-flow.d.ts +62 -0
  70. package/dist/hooks/subscription-v2/constants.d.ts +5 -0
  71. package/dist/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
  72. package/dist/hooks/subscription-v2/use-subscription-handler.d.ts +12 -0
  73. package/dist/hooks/use-day-js.d.ts +7 -0
  74. package/dist/index.d.ts +5 -0
  75. package/dist/index.esm.js +15076 -0
  76. package/dist/index.esm.js.map +1 -0
  77. package/dist/index.js +15160 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/package.json +53 -0
  80. package/dist/providers/auth-provider.d.ts +63 -0
  81. package/dist/providers/index.d.ts +3 -0
  82. package/dist/providers/mentor-provider.d.ts +40 -0
  83. package/dist/providers/tenant-provider.d.ts +60 -0
  84. package/dist/types/chat.d.ts +1 -0
  85. package/dist/types/index.d.ts +55 -0
  86. package/dist/types/subscription.d.ts +18 -0
  87. package/dist/utils/constants.d.ts +13 -0
  88. package/dist/utils/data/advanced-tab.d.ts +62 -0
  89. package/dist/utils/helpers.d.ts +1 -0
  90. package/dist/utils/index.d.ts +3 -0
  91. package/dist/web-utils/src/features/chat/slice.d.ts +91 -0
  92. package/dist/web-utils/src/features/index.d.ts +1 -0
  93. package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +48 -0
  94. package/dist/web-utils/src/hooks/chat/use-chat-v2.d.ts +56 -0
  95. package/dist/web-utils/src/hooks/chat/use-chat.d.ts +52 -0
  96. package/dist/web-utils/src/hooks/chat/use-get-chat-details.d.ts +13 -0
  97. package/dist/web-utils/src/hooks/chat/use-mentor-tools.d.ts +18 -0
  98. package/dist/web-utils/src/hooks/index.d.ts +15 -0
  99. package/dist/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
  100. package/dist/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
  101. package/dist/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
  102. package/dist/web-utils/src/hooks/subscription/constants.d.ts +4 -0
  103. package/dist/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
  104. package/dist/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +77 -0
  105. package/dist/web-utils/src/hooks/subscription-v2/constants.d.ts +51 -0
  106. package/dist/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
  107. package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +16 -0
  108. package/dist/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
  109. package/dist/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
  110. package/dist/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
  111. package/dist/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
  112. package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +24 -0
  113. package/dist/web-utils/src/hooks/use-day-js.d.ts +7 -0
  114. package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -0
  115. package/dist/web-utils/src/index.d.ts +5 -0
  116. package/dist/web-utils/src/providers/auth-provider.d.ts +64 -0
  117. package/dist/web-utils/src/providers/index.d.ts +3 -0
  118. package/dist/web-utils/src/providers/mentor-provider.d.ts +40 -0
  119. package/dist/web-utils/src/providers/tenant-provider.d.ts +63 -0
  120. package/dist/web-utils/src/types/chat.d.ts +1 -0
  121. package/dist/web-utils/src/types/index.d.ts +55 -0
  122. package/dist/web-utils/src/types/subscription.d.ts +18 -0
  123. package/dist/web-utils/src/utils/constants.d.ts +37 -0
  124. package/dist/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
  125. package/dist/web-utils/src/utils/helpers.d.ts +6 -0
  126. package/dist/web-utils/src/utils/index.d.ts +3 -0
  127. package/package.json +56 -0
@@ -0,0 +1,66 @@
1
+ import { SERVICES } from "@data-layer/constants";
2
+ export declare const ANALYTICS_ENDPOINTS: {
3
+ GET_OVERVIEW_SUMMARY: {
4
+ service: SERVICES;
5
+ path: (org: string, userId: string) => string;
6
+ };
7
+ GET_CONVERSATION: {
8
+ service: SERVICES;
9
+ path: (org: string, userId: string) => string;
10
+ };
11
+ GET_MOST_DISCUSSED_TOPICS: {
12
+ service: SERVICES;
13
+ path: (org: string, userId: string) => string;
14
+ };
15
+ GET_AVERAGE_MESSAGES_PER_SESSION: {
16
+ service: SERVICES;
17
+ path: (org: string, userId: string) => string;
18
+ };
19
+ GET_REGISTERED_USERS_TREND: {
20
+ service: SERVICES;
21
+ path: (org: string, userId: string) => string;
22
+ };
23
+ GET_USER_METRICS: {
24
+ service: SERVICES;
25
+ path: (org: string, userId: string) => string;
26
+ };
27
+ GET_USER_METRICS_PIE_CHART: {
28
+ service: SERVICES;
29
+ path: (org: string, userId: string) => string;
30
+ };
31
+ GET_USER_COHORTS_OVER_TIME: {
32
+ service: SERVICES;
33
+ path: (org: string, userId: string) => string;
34
+ };
35
+ GET_TOP_STUDENTS_BY_CHAT_MESSAGES: {
36
+ service: SERVICES;
37
+ path: (org: string, userId: string) => string;
38
+ };
39
+ GET_TOPIC_OVERVIEW: {
40
+ service: SERVICES;
41
+ path: (org: string, userId: string) => string;
42
+ };
43
+ GET_TOPICS_SUMMARY: {
44
+ service: SERVICES;
45
+ path: (org: string, userId: string) => string;
46
+ };
47
+ GET_TOPIC_STATISTICS: {
48
+ service: SERVICES;
49
+ path: (org: string, userId: string) => string;
50
+ };
51
+ };
52
+ export declare const ANALYTICS_QUERY_KEYS: {
53
+ GET_OVERVIEW_SUMMARY: () => string[];
54
+ GET_CONVERSATION: () => string[];
55
+ GET_MOST_DISCUSSED_TOPICS: () => string[];
56
+ GET_AVERAGE_MESSAGES_PER_SESSION: () => string[];
57
+ GET_REGISTERED_USERS_TREND: () => string[];
58
+ GET_USER_METRICS: () => string[];
59
+ GET_USER_METRICS_PIE_CHART: () => string[];
60
+ GET_USER_COHORTS_OVER_TIME: () => string[];
61
+ GET_TOP_STUDENTS_BY_CHAT_MESSAGES: () => string[];
62
+ GET_TOPIC_OVERVIEW: () => string[];
63
+ GET_TOPICS_SUMMARY: () => string[];
64
+ GET_TOPIC_STATISTICS: () => string[];
65
+ };
66
+ export declare const ANALYTICS_REDUCER_PATH = "analyticsApiSlice";
@@ -0,0 +1,100 @@
1
+ export type AggregationType = "daily" | "hourly" | "weekly" | "monthly";
2
+ export interface AnalyticsBaseParams {
3
+ org: string;
4
+ userId: string;
5
+ mentorId: string;
6
+ }
7
+ export interface AnalyticsDateParams extends AnalyticsBaseParams {
8
+ startDate: string;
9
+ endDate: string;
10
+ aggregation: AggregationType;
11
+ }
12
+ export interface AnalyticsPaginationParams extends AnalyticsDateParams {
13
+ page: number;
14
+ pageSize: number;
15
+ }
16
+ export interface OverviewSummaryResponse {
17
+ conversation_volume: {
18
+ total: number;
19
+ change: number;
20
+ };
21
+ users: {
22
+ total: number;
23
+ change: number;
24
+ };
25
+ topics: {
26
+ total: number;
27
+ change: number;
28
+ };
29
+ user_rating: {
30
+ total: number;
31
+ change: number;
32
+ };
33
+ }
34
+ export interface ConversationSummaryResponse {
35
+ date: string;
36
+ conversation_count: number;
37
+ }
38
+ export interface TopicStatisticsResponse {
39
+ count: number;
40
+ next: string | null;
41
+ previous: string | null;
42
+ results: Array<{
43
+ name: string;
44
+ conversations: number;
45
+ messages: number;
46
+ avg_rating: string;
47
+ }>;
48
+ }
49
+ export interface TopicOverviewResponse {
50
+ total_topics: number;
51
+ total_topics_change_percentage: number;
52
+ new_topics: number;
53
+ new_topics_change_percentage: number;
54
+ }
55
+ export interface UserMetricsResponse {
56
+ registered_users: {
57
+ total: number;
58
+ change_percentage: number;
59
+ };
60
+ new_users: {
61
+ total: number;
62
+ change_percentage: number;
63
+ };
64
+ unique_users: {
65
+ total: number;
66
+ change_percentage: number;
67
+ };
68
+ veteran_users: {
69
+ total: number;
70
+ change_percentage: number;
71
+ };
72
+ }
73
+ export interface UserMetricsPieChartResponse {
74
+ new_users: {
75
+ count: number;
76
+ percentage: number;
77
+ };
78
+ returning_users: {
79
+ count: number;
80
+ percentage: number;
81
+ };
82
+ }
83
+ export interface UserCohortsOverTimeResponse {
84
+ periods: string[];
85
+ new_users: number[];
86
+ veteran_users: number[];
87
+ }
88
+ export interface TopStudentsResponse {
89
+ username: string;
90
+ chat_message_count: number;
91
+ }
92
+ export interface TopicsSummaryResponse {
93
+ name: string;
94
+ conversation_count: number;
95
+ }
96
+ export interface AverageMessagesPerSessionResponse {
97
+ time: string;
98
+ avg_messages: number;
99
+ total_sessions: number;
100
+ }