@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,4 +1,5 @@
|
|
|
1
|
-
import { SERVICES } from
|
|
1
|
+
import { SERVICES } from '../../constants';
|
|
2
|
+
import { DetailedFinancialStatsArgs, FinancialStatsArgs, TranscriptsConversationHeadlineArgs, TranscriptsMessagesArgs, TranscriptsMessagesDetailsArgs } from './types';
|
|
2
3
|
export declare const ANALYTICS_ENDPOINTS: {
|
|
3
4
|
GET_OVERVIEW_SUMMARY: {
|
|
4
5
|
service: SERVICES;
|
|
@@ -49,6 +50,60 @@ export declare const ANALYTICS_ENDPOINTS: {
|
|
|
49
50
|
path: (org: string, userId: string) => string;
|
|
50
51
|
};
|
|
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
|
+
};
|
|
52
107
|
export declare const ANALYTICS_QUERY_KEYS: {
|
|
53
108
|
GET_OVERVIEW_SUMMARY: () => string[];
|
|
54
109
|
GET_CONVERSATION: () => string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type AggregationType =
|
|
1
|
+
export type AggregationType = 'daily' | 'hourly' | 'weekly' | 'monthly';
|
|
2
2
|
export interface AnalyticsBaseParams {
|
|
3
3
|
org: string;
|
|
4
4
|
userId: string;
|
|
@@ -46,6 +46,84 @@ export interface TopicStatisticsResponse {
|
|
|
46
46
|
avg_rating: string;
|
|
47
47
|
}>;
|
|
48
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
|
+
}
|
|
49
127
|
export interface TopicOverviewResponse {
|
|
50
128
|
total_topics: number;
|
|
51
129
|
total_topics_change_percentage: number;
|
|
@@ -98,3 +176,251 @@ export interface AverageMessagesPerSessionResponse {
|
|
|
98
176
|
avg_messages: number;
|
|
99
177
|
total_sessions: number;
|
|
100
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
|
+
}
|