@iblai/data-layer 0.0.5 → 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.
Files changed (140) hide show
  1. package/dist/index.d.ts +65009 -23
  2. package/dist/index.esm.js +29131 -16819
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +29475 -16817
  5. package/dist/index.js.map +1 -1
  6. package/dist/package.json +84 -0
  7. package/dist/src/config.d.ts +2 -0
  8. package/dist/src/constants.d.ts +2 -3
  9. package/dist/src/core/index.d.ts +2 -1
  10. package/dist/src/features/analytics/api-slice.d.ts +3357 -0
  11. package/dist/src/features/analytics/constants.d.ts +121 -0
  12. package/dist/src/features/analytics/types.d.ts +426 -0
  13. package/dist/src/features/api-keys/api-slice.d.ts +94 -34
  14. package/dist/{features/api-keys → src/features/apps}/api-slice.d.ts +156 -78
  15. package/dist/src/features/auth/api-slice.d.ts +639 -0
  16. package/dist/src/features/auth/constants.d.ts +20 -0
  17. package/dist/src/features/auth/types.d.ts +33 -0
  18. package/dist/src/features/billing/api-slice.d.ts +349 -0
  19. package/dist/src/features/career/api-slice.d.ts +2852 -0
  20. package/dist/src/features/catalog/api-slice.d.ts +8618 -1
  21. package/dist/src/features/chat/api-slice.d.ts +1567 -32
  22. package/dist/src/features/chat/chat-slice.d.ts +4 -7
  23. package/dist/{features/core → src/features/chat-files}/api-slice.d.ts +47 -26
  24. package/dist/src/features/chat-files/types.d.ts +32 -0
  25. package/dist/src/features/chat-history/api-slice.d.ts +518 -244
  26. package/dist/src/features/core/api-slice.d.ts +4261 -5
  27. package/dist/src/features/core/constants.d.ts +47 -0
  28. package/dist/src/features/core/custom-api-slice.d.ts +1458 -0
  29. package/dist/src/features/core/custom-public-image-asset-api-slice.d.ts +333 -0
  30. package/dist/src/features/core/types.d.ts +60 -0
  31. package/dist/src/features/credentials/api-slice.d.ts +2343 -84
  32. package/dist/src/features/credentials/constants.d.ts +28 -0
  33. package/dist/src/features/credentials/custom-api-slice.d.ts +1284 -0
  34. package/dist/src/features/credentials/types.d.ts +16 -0
  35. package/dist/src/features/custom-domain/api-slice.d.ts +602 -0
  36. package/dist/src/features/custom-domain/constants.d.ts +20 -0
  37. package/dist/src/features/custom-domain/types.d.ts +46 -0
  38. package/dist/src/features/datasets/api-slice.d.ts +352 -43
  39. package/dist/src/features/disclaimers/api-slice.d.ts +912 -0
  40. package/dist/src/features/disclaimers/constants.d.ts +27 -0
  41. package/dist/src/features/disclaimers/index.d.ts +3 -0
  42. package/dist/src/features/disclaimers/types.d.ts +67 -0
  43. package/dist/src/features/edx-proctoring/api-slice.d.ts +590 -0
  44. package/dist/src/features/edx-proctoring/constants.d.ts +15 -0
  45. package/dist/src/features/edx-proctoring/types.d.ts +61 -0
  46. package/dist/src/features/llms/api-slice.d.ts +89 -23
  47. package/dist/src/features/memory/api-slice.d.ts +2129 -0
  48. package/dist/src/features/memory/constants.d.ts +50 -0
  49. package/dist/src/features/memory/index.d.ts +3 -0
  50. package/dist/src/features/memory/types.d.ts +122 -0
  51. package/dist/src/features/mentor/api-slice.d.ts +4126 -146
  52. package/dist/src/features/mentor/constants.d.ts +39 -0
  53. package/dist/src/features/mentor/custom-api-slice.d.ts +796 -0
  54. package/dist/src/features/mentor/types.d.ts +77 -0
  55. package/dist/src/features/mentor-categories/api-slice.d.ts +463 -23
  56. package/dist/src/features/notifications/api-slice.d.ts +1600 -0
  57. package/dist/src/features/notifications/constants.d.ts +26 -0
  58. package/dist/src/features/notifications/custom-api-slice.d.ts +996 -0
  59. package/dist/src/features/notifications/types.d.ts +69 -0
  60. package/dist/src/features/per-learner/api-slice.d.ts +1213 -0
  61. package/dist/src/features/platform/api-slice.d.ts +944 -70
  62. package/dist/src/features/platform/constants.d.ts +17 -0
  63. package/dist/src/features/platform/custom-api-slice.d.ts +493 -0
  64. package/dist/src/features/platform/types.d.ts +48 -0
  65. package/dist/src/features/projects/api-slice.d.ts +2026 -0
  66. package/dist/src/features/projects/constants.d.ts +51 -0
  67. package/dist/src/features/projects/types.d.ts +79 -0
  68. package/dist/src/features/prompts/api-slice.d.ts +1357 -73
  69. package/dist/src/features/reports/api-slice.d.ts +814 -0
  70. package/dist/{features/prompts/api-slice.d.ts → src/features/search/ai-search-api-slice.d.ts} +161 -160
  71. package/dist/src/features/search/api-slice.d.ts +1939 -0
  72. package/dist/src/features/search/constants.d.ts +31 -0
  73. package/dist/src/features/search/types.d.ts +89 -0
  74. package/dist/src/features/sessions/api-slice.d.ts +705 -0
  75. package/dist/src/features/skills/api-slice.d.ts +505 -65
  76. package/dist/src/features/stripe/api-slice.d.ts +781 -0
  77. package/dist/src/features/stripe/constants.d.ts +19 -0
  78. package/dist/src/features/stripe/types.d.ts +19 -0
  79. package/dist/src/features/tenant/api-slice.d.ts +261 -47
  80. package/dist/src/features/tenant/constants.d.ts +1 -1
  81. package/dist/src/features/tenant/types.d.ts +1 -0
  82. package/dist/src/features/tenant-logo/api-slice.d.ts +349 -0
  83. package/dist/src/features/tenant-logo/constants.d.ts +24 -0
  84. package/dist/src/features/tools/api-slice.d.ts +133 -23
  85. package/dist/src/features/training-documents/api-slice.d.ts +731 -52
  86. package/dist/src/features/user/api-slice.d.ts +1457 -22
  87. package/dist/src/features/user/constants.d.ts +32 -1
  88. package/dist/src/features/user/types.d.ts +65 -2
  89. package/dist/src/features/user-invitations/api-slice.d.ts +346 -56
  90. package/dist/src/features/utils.d.ts +31 -8
  91. package/dist/src/index.d.ts +78 -23
  92. package/dist/src/reducers/index.d.ts +1 -0
  93. package/dist/src/reducers/mentor.d.ts +2 -120
  94. package/dist/src/reducers/skills.d.ts +2 -0
  95. package/dist/src/services/StorageService.d.ts +1 -1
  96. package/dist/src/utils/index.d.ts +2 -2
  97. package/dist/tests/features/analytics/api-slice.test.d.ts +1 -0
  98. package/dist/tests/features/analytics/constants.test.d.ts +1 -0
  99. package/dist/tests/features/user/api-slice.test.d.ts +1 -0
  100. package/dist/tests/features/user/constants.test.d.ts +1 -0
  101. package/dist/tests/setupTests.d.ts +1 -0
  102. package/package.json +26 -15
  103. package/dist/config.d.ts +0 -5
  104. package/dist/constants.d.ts +0 -31
  105. package/dist/core/index.d.ts +0 -4
  106. package/dist/features/chat/api-slice.d.ts +0 -1278
  107. package/dist/features/chat/chat-slice.d.ts +0 -15
  108. package/dist/features/chat-history/api-slice.d.ts +0 -956
  109. package/dist/features/chat-history/constants.d.ts +0 -3
  110. package/dist/features/credentials/api-slice.d.ts +0 -531
  111. package/dist/features/datasets/api-slice.d.ts +0 -267
  112. package/dist/features/index.d.ts +0 -1
  113. package/dist/features/llms/api-slice.d.ts +0 -267
  114. package/dist/features/mentor/api-slice.d.ts +0 -1816
  115. package/dist/features/mentor-categories/api-slice.d.ts +0 -267
  116. package/dist/features/platform/api-slice.d.ts +0 -735
  117. package/dist/features/skills/api-slice.d.ts +0 -795
  118. package/dist/features/tenant/api-slice.d.ts +0 -536
  119. package/dist/features/tenant/constants.d.ts +0 -11
  120. package/dist/features/tenant/types.d.ts +0 -18
  121. package/dist/features/tools/api-slice.d.ts +0 -267
  122. package/dist/features/training-documents/api-slice.d.ts +0 -750
  123. package/dist/features/user/api-slice.d.ts +0 -751
  124. package/dist/features/user/constants.d.ts +0 -19
  125. package/dist/features/user/types.d.ts +0 -64
  126. package/dist/features/user-invitations/api-slice.d.ts +0 -428
  127. package/dist/features/utils.d.ts +0 -46
  128. package/dist/node_modules/@iblai/iblai-api/src/core/ApiError.d.ts +0 -10
  129. package/dist/node_modules/@iblai/iblai-api/src/core/ApiRequestOptions.d.ts +0 -13
  130. package/dist/node_modules/@iblai/iblai-api/src/core/ApiResult.d.ts +0 -7
  131. package/dist/node_modules/@iblai/iblai-api/src/core/CancelablePromise.d.ts +0 -20
  132. package/dist/node_modules/@iblai/iblai-api/src/core/OpenAPI.d.ts +0 -16
  133. package/dist/node_modules/@iblai/iblai-api/src/core/request.d.ts +0 -30
  134. package/dist/reducers/index.d.ts +0 -1
  135. package/dist/reducers/mentor.d.ts +0 -135
  136. package/dist/services/StorageService.d.ts +0 -5
  137. package/dist/src/features/chat-history/constants.d.ts +0 -8
  138. package/dist/utils/index.d.ts +0 -2
  139. /package/dist/{features/catalog/api-slice.d.ts → src/__tests__/constants.test.d.ts} +0 -0
  140. /package/dist/{features → src/features}/constants.d.ts +0 -0
@@ -0,0 +1,121 @@
1
+ import { SERVICES } from '../../constants';
2
+ import { DetailedFinancialStatsArgs, FinancialStatsArgs, TranscriptsConversationHeadlineArgs, TranscriptsMessagesArgs, TranscriptsMessagesDetailsArgs } from './types';
3
+ export declare const ANALYTICS_ENDPOINTS: {
4
+ GET_OVERVIEW_SUMMARY: {
5
+ service: SERVICES;
6
+ path: (org: string, userId: string) => string;
7
+ };
8
+ GET_CONVERSATION: {
9
+ service: SERVICES;
10
+ path: (org: string, userId: string) => string;
11
+ };
12
+ GET_MOST_DISCUSSED_TOPICS: {
13
+ service: SERVICES;
14
+ path: (org: string, userId: string) => string;
15
+ };
16
+ GET_AVERAGE_MESSAGES_PER_SESSION: {
17
+ service: SERVICES;
18
+ path: (org: string, userId: string) => string;
19
+ };
20
+ GET_REGISTERED_USERS_TREND: {
21
+ service: SERVICES;
22
+ path: (org: string, userId: string) => string;
23
+ };
24
+ GET_USER_METRICS: {
25
+ service: SERVICES;
26
+ path: (org: string, userId: string) => string;
27
+ };
28
+ GET_USER_METRICS_PIE_CHART: {
29
+ service: SERVICES;
30
+ path: (org: string, userId: string) => string;
31
+ };
32
+ GET_USER_COHORTS_OVER_TIME: {
33
+ service: SERVICES;
34
+ path: (org: string, userId: string) => string;
35
+ };
36
+ GET_TOP_STUDENTS_BY_CHAT_MESSAGES: {
37
+ service: SERVICES;
38
+ path: (org: string, userId: string) => string;
39
+ };
40
+ GET_TOPIC_OVERVIEW: {
41
+ service: SERVICES;
42
+ path: (org: string, userId: string) => string;
43
+ };
44
+ GET_TOPICS_SUMMARY: {
45
+ service: SERVICES;
46
+ path: (org: string, userId: string) => string;
47
+ };
48
+ GET_TOPIC_STATISTICS: {
49
+ service: SERVICES;
50
+ path: (org: string, userId: string) => string;
51
+ };
52
+ };
53
+ export declare const NON_AI_ANALYTICS_ENDPOINTS: {
54
+ GET_TOPICS_STATS: {
55
+ service: SERVICES;
56
+ path: (date_filter: string, platform_key: string, mentor_unique_id?: string) => string;
57
+ };
58
+ GET_USERS_STATS: {
59
+ service: SERVICES;
60
+ path: (date_filter: string, platform_key: string, mentor_unique_id?: string, metric?: string, start_date?: string, end_date?: string) => string;
61
+ };
62
+ GET_SESSION_STATS: {
63
+ service: SERVICES;
64
+ path: (platform_key: string, mentor_unique_id?: string, date_filter?: string, start_date?: string, end_date?: string, metric?: string) => string;
65
+ };
66
+ GET_TOPICS_DETAILS_STATS: {
67
+ service: SERVICES;
68
+ path: (date_filter: string, platform_key: string, mentor_unique_id?: string, start_date?: string, end_date?: string) => string;
69
+ };
70
+ GET_ACCESS_TIME_HEATMAP: {
71
+ service: SERVICES;
72
+ path: (date_filter: string, platform_key: string, mentor_unique_id?: string, start_date?: string, end_date?: string) => string;
73
+ };
74
+ GET_USER_DETAILS_STATS: {
75
+ service: SERVICES;
76
+ path: (date_filter: string, platform_key: string, mentor_unique_id?: string, start_date?: string, end_date?: string, page?: number, limit?: number, search?: string) => string;
77
+ };
78
+ GET_AVERAGE_RATING: {
79
+ service: SERVICES;
80
+ path: (platform_key: string, mentor_unique_id?: string, date_filter?: string, start_date?: string, end_date?: string) => string;
81
+ };
82
+ GET_FINANCIAL_STATS: {
83
+ service: SERVICES;
84
+ path: (args: FinancialStatsArgs) => string;
85
+ };
86
+ GET_DETAILED_FINANCIAL_STATS: {
87
+ service: SERVICES;
88
+ path: (args: DetailedFinancialStatsArgs) => string;
89
+ };
90
+ GET_TRANSCRIPTS_MESSAGES: {
91
+ service: SERVICES;
92
+ path: (args: TranscriptsMessagesArgs) => string;
93
+ };
94
+ GET_TRANSCRIPTS_MESSAGES_DETAILS: {
95
+ service: SERVICES;
96
+ path: (args: TranscriptsMessagesDetailsArgs) => string;
97
+ };
98
+ TIME_UPDATE: {
99
+ service: SERVICES;
100
+ path: (org: string) => string;
101
+ };
102
+ GET_TRANSCRIPTS_CONVERSATION_HEADLINE: {
103
+ service: SERVICES;
104
+ path: (args: TranscriptsConversationHeadlineArgs) => string;
105
+ };
106
+ };
107
+ export declare const ANALYTICS_QUERY_KEYS: {
108
+ GET_OVERVIEW_SUMMARY: () => string[];
109
+ GET_CONVERSATION: () => string[];
110
+ GET_MOST_DISCUSSED_TOPICS: () => string[];
111
+ GET_AVERAGE_MESSAGES_PER_SESSION: () => string[];
112
+ GET_REGISTERED_USERS_TREND: () => string[];
113
+ GET_USER_METRICS: () => string[];
114
+ GET_USER_METRICS_PIE_CHART: () => string[];
115
+ GET_USER_COHORTS_OVER_TIME: () => string[];
116
+ GET_TOP_STUDENTS_BY_CHAT_MESSAGES: () => string[];
117
+ GET_TOPIC_OVERVIEW: () => string[];
118
+ GET_TOPICS_SUMMARY: () => string[];
119
+ GET_TOPIC_STATISTICS: () => string[];
120
+ };
121
+ export declare const ANALYTICS_REDUCER_PATH = "analyticsApiSlice";
@@ -0,0 +1,426 @@
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 TranscriptsMessagesArgs {
50
+ mentor_unique_id?: string;
51
+ search?: string;
52
+ topic?: string;
53
+ platform_key: string;
54
+ page?: number;
55
+ limit?: number;
56
+ }
57
+ export interface TranscriptsMessagesDetailsArgs {
58
+ session_id: string;
59
+ platform_key: string;
60
+ mentor_unique_id?: string;
61
+ }
62
+ export interface TranscriptsMessagesDetailsResponse {
63
+ summary: {
64
+ platform_name: string;
65
+ platform_key: string;
66
+ mentor: string;
67
+ mentor_unique_id: string;
68
+ model: string;
69
+ username: string;
70
+ name: string;
71
+ first_user_message: string;
72
+ topics: string[];
73
+ message_count: number;
74
+ user_queries: number;
75
+ assistant_responses: number;
76
+ average_sentiment: number;
77
+ sentiment: string;
78
+ created_at: string;
79
+ platform: number;
80
+ session: string;
81
+ user: number;
82
+ };
83
+ messages: Array<{
84
+ human: string;
85
+ ai: string;
86
+ }>;
87
+ }
88
+ export interface TranscriptsMessagesResponse {
89
+ summary: {
90
+ total_conversations: number;
91
+ user_queries: number;
92
+ assistant_responses: number;
93
+ average_sentiment_score: number;
94
+ };
95
+ results: Array<{
96
+ platform_name: string;
97
+ platform_key: string;
98
+ mentor: string;
99
+ mentor_unique_id: string;
100
+ model: string;
101
+ cost: number;
102
+ username: string;
103
+ name: string;
104
+ first_user_message: string;
105
+ topics: string[];
106
+ message_count: number;
107
+ user_queries: number;
108
+ assistant_responses: number;
109
+ average_sentiment: number;
110
+ sentiment: string;
111
+ created_at: string;
112
+ platform: number;
113
+ session: string;
114
+ user: number;
115
+ }>;
116
+ pagination: {
117
+ page: number;
118
+ limit: number;
119
+ total_pages: number;
120
+ total_records: number;
121
+ has_next: boolean;
122
+ has_previous: boolean;
123
+ next_page: number | null;
124
+ previous_page: number | null;
125
+ };
126
+ }
127
+ export interface TopicOverviewResponse {
128
+ total_topics: number;
129
+ total_topics_change_percentage: number;
130
+ new_topics: number;
131
+ new_topics_change_percentage: number;
132
+ }
133
+ export interface UserMetricsResponse {
134
+ registered_users: {
135
+ total: number;
136
+ change_percentage: number;
137
+ };
138
+ new_users: {
139
+ total: number;
140
+ change_percentage: number;
141
+ };
142
+ unique_users: {
143
+ total: number;
144
+ change_percentage: number;
145
+ };
146
+ veteran_users: {
147
+ total: number;
148
+ change_percentage: number;
149
+ };
150
+ }
151
+ export interface UserMetricsPieChartResponse {
152
+ new_users: {
153
+ count: number;
154
+ percentage: number;
155
+ };
156
+ returning_users: {
157
+ count: number;
158
+ percentage: number;
159
+ };
160
+ }
161
+ export interface UserCohortsOverTimeResponse {
162
+ periods: string[];
163
+ new_users: number[];
164
+ veteran_users: number[];
165
+ }
166
+ export interface TopStudentsResponse {
167
+ username: string;
168
+ chat_message_count: number;
169
+ }
170
+ export interface TopicsSummaryResponse {
171
+ name: string;
172
+ conversation_count: number;
173
+ }
174
+ export interface AverageMessagesPerSessionResponse {
175
+ time: string;
176
+ avg_messages: number;
177
+ total_sessions: number;
178
+ }
179
+ export type DateFilter = 'today' | '30d' | '7d' | '90d' | 'all_time' | 'custom';
180
+ export interface TopicsStatsArgs {
181
+ date_filter: DateFilter;
182
+ platform_key: string;
183
+ mentor_unique_id?: string;
184
+ }
185
+ export interface TopicsStatsResponse {
186
+ topics: {
187
+ all_time_total: number;
188
+ this_month: number;
189
+ last_month: number;
190
+ percentage_change: number;
191
+ };
192
+ conversations: {
193
+ all_time_total: number;
194
+ this_month: number;
195
+ last_month: number;
196
+ percentage_change: number;
197
+ };
198
+ messages: {
199
+ all_time_total: number;
200
+ this_month: number;
201
+ last_month: number;
202
+ percentage_change: number;
203
+ };
204
+ }
205
+ export interface UsersStatsResponse {
206
+ points: Array<{
207
+ date: string;
208
+ value: number;
209
+ }>;
210
+ metric: string;
211
+ count: number;
212
+ change: number;
213
+ percentage_change: number;
214
+ }
215
+ export interface UsersStatsArgs {
216
+ date_filter: DateFilter;
217
+ platform_key: string;
218
+ metric?: string;
219
+ start_date?: string;
220
+ end_date?: string;
221
+ mentor_unique_id?: string;
222
+ }
223
+ export interface SessionStatsArgs {
224
+ platform_key: string;
225
+ mentor_unique_id?: string;
226
+ date_filter?: string;
227
+ start_date?: string;
228
+ end_date?: string;
229
+ metric?: string;
230
+ }
231
+ export interface SessionStatsResponse {
232
+ metric: string;
233
+ points: Array<{
234
+ date: string;
235
+ value: number;
236
+ }>;
237
+ avg_messages_per_session?: {
238
+ value: number;
239
+ prev_value: number;
240
+ percentage_change: number;
241
+ };
242
+ avg_rating?: {
243
+ value: number;
244
+ prev_value: number;
245
+ percentage_change: number;
246
+ };
247
+ avg_cost_per_session?: {
248
+ value: number;
249
+ prev_value: number;
250
+ percentage_change: number;
251
+ };
252
+ }
253
+ export interface TopicsDetailsStatsArgs {
254
+ date_filter: string;
255
+ platform_key: string;
256
+ start_date?: string;
257
+ end_date?: string;
258
+ mentor_unique_id?: string;
259
+ }
260
+ export interface TopicsDetailsStatsResponse {
261
+ results: Array<{
262
+ topic_id: number;
263
+ name: string;
264
+ messages: number;
265
+ conversations: number;
266
+ average_rating: string;
267
+ rating_count: number;
268
+ }>;
269
+ pagination: {
270
+ page: number;
271
+ limit: number;
272
+ total_pages: number;
273
+ total_records: number;
274
+ has_next: boolean;
275
+ has_previous: boolean;
276
+ next_page: number;
277
+ previous_page: number;
278
+ };
279
+ }
280
+ export interface AccessTimeHeatmapArgs {
281
+ date_filter: string;
282
+ platform_key: string;
283
+ start_date?: string;
284
+ end_date?: string;
285
+ mentor_unique_id?: string;
286
+ }
287
+ export interface AccessTimeHeatmapResponse {
288
+ metric: string;
289
+ data: Array<{
290
+ day_of_week: number;
291
+ hour: number;
292
+ value: number;
293
+ }>;
294
+ }
295
+ export interface UserDetailsStatsArgs {
296
+ date_filter: string;
297
+ platform_key: string;
298
+ start_date?: string;
299
+ end_date?: string;
300
+ page: number;
301
+ limit?: number;
302
+ mentor_unique_id?: string;
303
+ search?: string;
304
+ }
305
+ export interface UserDetailsStatsResponse {
306
+ results: Array<{
307
+ email: string;
308
+ full_name: string;
309
+ messages: number;
310
+ last_activity: string;
311
+ }>;
312
+ total: number;
313
+ pagination: {
314
+ page: number;
315
+ limit: number;
316
+ total_pages: number;
317
+ has_next: boolean;
318
+ has_previous: boolean;
319
+ start_index: number;
320
+ end_index: number;
321
+ };
322
+ }
323
+ export interface FinancialStatsArgs {
324
+ metric: 'total_costs' | 'weekly_costs' | 'monthly_costs';
325
+ date_filter?: DateFilter;
326
+ platform_key: string;
327
+ mentor_unique_id?: string;
328
+ start_date?: string;
329
+ end_date?: string;
330
+ all_time?: 'true';
331
+ }
332
+ export interface FinancialStatsFilters {
333
+ start_date: string;
334
+ end_date: string;
335
+ granularity: string;
336
+ all_time: boolean;
337
+ }
338
+ export interface FinancialStatsPeriodInfo {
339
+ start_date: string;
340
+ end_date: string;
341
+ period_days: number;
342
+ range_type: string;
343
+ }
344
+ export interface FinancialStatsResponse {
345
+ metric: string;
346
+ filters: FinancialStatsFilters;
347
+ value: number;
348
+ percentage_change: number | undefined;
349
+ overtime: Array<{
350
+ date: string;
351
+ value: number;
352
+ }>;
353
+ period_info: FinancialStatsPeriodInfo;
354
+ comparison_info: Record<string, any>;
355
+ }
356
+ export interface DetailedFinancialStatsArgs {
357
+ metric?: string;
358
+ metrics?: string;
359
+ group_by: 'llm_model' | 'provider' | 'username';
360
+ date_filter: DateFilter;
361
+ platform_key: string;
362
+ mentor_unique_id?: string;
363
+ start_date?: string;
364
+ end_date?: string;
365
+ page?: number;
366
+ limit?: number;
367
+ search?: string;
368
+ }
369
+ export interface DetailedFinancialStatsMetric {
370
+ name: string;
371
+ unit: string;
372
+ description: string;
373
+ }
374
+ export interface DetailedFinancialStatsResponse {
375
+ page: number;
376
+ limit: number;
377
+ total_pages: number;
378
+ total_records: number;
379
+ rows: Record<string, any>[];
380
+ total_cost: number;
381
+ metrics: DetailedFinancialStatsMetric[];
382
+ }
383
+ export interface TimeTrackingRequest {
384
+ timestamp: string;
385
+ url: string;
386
+ org: string;
387
+ count: number;
388
+ course_id?: number;
389
+ block_id?: number;
390
+ session_uuid?: string;
391
+ mentor_uuid?: string;
392
+ }
393
+ export interface TimeTrackingResponse {
394
+ message: string;
395
+ success: true;
396
+ }
397
+ export interface TranscriptsConversationHeadlineArgs {
398
+ platform_key: string;
399
+ metric: string;
400
+ mentor_unique_id?: string;
401
+ start_date?: string;
402
+ end_date?: string;
403
+ date_filter?: string;
404
+ }
405
+ export interface TranscriptsConversationHeadlineResponse {
406
+ metric: 'headline';
407
+ avg_messages_per_conversation: {
408
+ value: number;
409
+ prev_value: number;
410
+ percentage_change: number;
411
+ };
412
+ avg_rating: {
413
+ value: number;
414
+ prev_value: number;
415
+ percentage_change: number;
416
+ };
417
+ avg_cost_per_conversation: {
418
+ value: number;
419
+ prev_value: number;
420
+ percentage_change: number;
421
+ };
422
+ points?: Array<{
423
+ date: string;
424
+ value: number;
425
+ }>;
426
+ }