academe-kit 0.1.8 → 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.
@@ -0,0 +1,575 @@
1
+ import type { AcademeApiClient } from './index';
2
+ type GetDashboardParams = {
3
+ institutionId?: string;
4
+ };
5
+ type GetRecentActivitiesParams = {
6
+ period?: '7days' | '30days' | 'all';
7
+ };
8
+ type GetTopStudentsParams = {
9
+ filterType: 'nota' | 'engajamento' | 'conclusao';
10
+ year?: number;
11
+ };
12
+ export declare function createReportService(apiClient: AcademeApiClient): {
13
+ /**
14
+ * Get dashboard data (global)
15
+ * Returns aggregated dashboard data for all institutions (requires admin permission)
16
+ */
17
+ getDashboard(params?: GetDashboardParams): Promise<import("openapi-fetch").FetchResponse<{
18
+ parameters: {
19
+ query?: {
20
+ institutionId?: string;
21
+ };
22
+ header?: never;
23
+ path?: never;
24
+ cookie?: never;
25
+ };
26
+ requestBody?: never;
27
+ responses: {
28
+ 200: {
29
+ headers: {
30
+ [name: string]: unknown;
31
+ };
32
+ content: {
33
+ "application/json": {
34
+ status?: string;
35
+ data?: import("../types/academe-api").components["schemas"]["DashboardResponse"];
36
+ };
37
+ };
38
+ };
39
+ 401: {
40
+ headers: {
41
+ [name: string]: unknown;
42
+ };
43
+ content?: never;
44
+ };
45
+ 500: {
46
+ headers: {
47
+ [name: string]: unknown;
48
+ };
49
+ content?: never;
50
+ };
51
+ };
52
+ }, {
53
+ params: {
54
+ query: GetDashboardParams | undefined;
55
+ };
56
+ }, `${string}/${string}`>>;
57
+ /**
58
+ * Get dashboard data for specific institution
59
+ * Returns aggregated dashboard data for a specific institution
60
+ */
61
+ getDashboardByInstitution(id: string): Promise<import("openapi-fetch").FetchResponse<{
62
+ parameters: {
63
+ query?: never;
64
+ header?: never;
65
+ path: {
66
+ id: string;
67
+ };
68
+ cookie?: never;
69
+ };
70
+ requestBody?: never;
71
+ responses: {
72
+ 200: {
73
+ headers: {
74
+ [name: string]: unknown;
75
+ };
76
+ content: {
77
+ "application/json": {
78
+ status?: string;
79
+ data?: import("../types/academe-api").components["schemas"]["DashboardResponse"];
80
+ };
81
+ };
82
+ };
83
+ 400: {
84
+ headers: {
85
+ [name: string]: unknown;
86
+ };
87
+ content?: never;
88
+ };
89
+ 401: {
90
+ headers: {
91
+ [name: string]: unknown;
92
+ };
93
+ content?: never;
94
+ };
95
+ 404: {
96
+ headers: {
97
+ [name: string]: unknown;
98
+ };
99
+ content?: never;
100
+ };
101
+ 500: {
102
+ headers: {
103
+ [name: string]: unknown;
104
+ };
105
+ content?: never;
106
+ };
107
+ };
108
+ }, {
109
+ params: {
110
+ path: {
111
+ id: string;
112
+ };
113
+ };
114
+ }, `${string}/${string}`>>;
115
+ /**
116
+ * Get courses distribution by area (global)
117
+ * Returns distribution of course completions by area/category
118
+ */
119
+ getCoursesByArea(): Promise<import("openapi-fetch").FetchResponse<{
120
+ parameters: {
121
+ query?: never;
122
+ header?: never;
123
+ path?: never;
124
+ cookie?: never;
125
+ };
126
+ requestBody?: never;
127
+ responses: {
128
+ 200: {
129
+ headers: {
130
+ [name: string]: unknown;
131
+ };
132
+ content: {
133
+ "application/json": {
134
+ status?: string;
135
+ data?: {
136
+ areas?: import("../types/academe-api").components["schemas"]["AreaData"][];
137
+ };
138
+ };
139
+ };
140
+ };
141
+ 401: {
142
+ headers: {
143
+ [name: string]: unknown;
144
+ };
145
+ content?: never;
146
+ };
147
+ 500: {
148
+ headers: {
149
+ [name: string]: unknown;
150
+ };
151
+ content?: never;
152
+ };
153
+ };
154
+ }, import("openapi-fetch").FetchOptions<{
155
+ parameters: {
156
+ query?: never;
157
+ header?: never;
158
+ path?: never;
159
+ cookie?: never;
160
+ };
161
+ requestBody?: never;
162
+ responses: {
163
+ 200: {
164
+ headers: {
165
+ [name: string]: unknown;
166
+ };
167
+ content: {
168
+ "application/json": {
169
+ status?: string;
170
+ data?: {
171
+ areas?: import("../types/academe-api").components["schemas"]["AreaData"][];
172
+ };
173
+ };
174
+ };
175
+ };
176
+ 401: {
177
+ headers: {
178
+ [name: string]: unknown;
179
+ };
180
+ content?: never;
181
+ };
182
+ 500: {
183
+ headers: {
184
+ [name: string]: unknown;
185
+ };
186
+ content?: never;
187
+ };
188
+ };
189
+ }> | undefined, `${string}/${string}`>>;
190
+ /**
191
+ * Get courses distribution by area for specific institution
192
+ * Returns distribution of course completions by area/category for an institution
193
+ */
194
+ getCoursesByAreaByInstitution(id: string): Promise<import("openapi-fetch").FetchResponse<{
195
+ parameters: {
196
+ query?: never;
197
+ header?: never;
198
+ path: {
199
+ id: string;
200
+ };
201
+ cookie?: never;
202
+ };
203
+ requestBody?: never;
204
+ responses: {
205
+ 200: {
206
+ headers: {
207
+ [name: string]: unknown;
208
+ };
209
+ content: {
210
+ "application/json": {
211
+ status?: string;
212
+ data?: {
213
+ areas?: import("../types/academe-api").components["schemas"]["AreaData"][];
214
+ };
215
+ };
216
+ };
217
+ };
218
+ 400: {
219
+ headers: {
220
+ [name: string]: unknown;
221
+ };
222
+ content?: never;
223
+ };
224
+ 401: {
225
+ headers: {
226
+ [name: string]: unknown;
227
+ };
228
+ content?: never;
229
+ };
230
+ 500: {
231
+ headers: {
232
+ [name: string]: unknown;
233
+ };
234
+ content?: never;
235
+ };
236
+ };
237
+ }, {
238
+ params: {
239
+ path: {
240
+ id: string;
241
+ };
242
+ };
243
+ }, `${string}/${string}`>>;
244
+ /**
245
+ * Get adhesion rate (global)
246
+ * Returns adhesion rate (unique students who accessed) per month for the last 6 months
247
+ */
248
+ getAdhesionRate(): Promise<import("openapi-fetch").FetchResponse<{
249
+ parameters: {
250
+ query?: never;
251
+ header?: never;
252
+ path?: never;
253
+ cookie?: never;
254
+ };
255
+ requestBody?: never;
256
+ responses: {
257
+ 200: {
258
+ headers: {
259
+ [name: string]: unknown;
260
+ };
261
+ content: {
262
+ "application/json": {
263
+ status?: string;
264
+ data?: import("../types/academe-api").components["schemas"]["AdhesionRateResponse"];
265
+ };
266
+ };
267
+ };
268
+ 401: {
269
+ headers: {
270
+ [name: string]: unknown;
271
+ };
272
+ content?: never;
273
+ };
274
+ 500: {
275
+ headers: {
276
+ [name: string]: unknown;
277
+ };
278
+ content?: never;
279
+ };
280
+ };
281
+ }, import("openapi-fetch").FetchOptions<{
282
+ parameters: {
283
+ query?: never;
284
+ header?: never;
285
+ path?: never;
286
+ cookie?: never;
287
+ };
288
+ requestBody?: never;
289
+ responses: {
290
+ 200: {
291
+ headers: {
292
+ [name: string]: unknown;
293
+ };
294
+ content: {
295
+ "application/json": {
296
+ status?: string;
297
+ data?: import("../types/academe-api").components["schemas"]["AdhesionRateResponse"];
298
+ };
299
+ };
300
+ };
301
+ 401: {
302
+ headers: {
303
+ [name: string]: unknown;
304
+ };
305
+ content?: never;
306
+ };
307
+ 500: {
308
+ headers: {
309
+ [name: string]: unknown;
310
+ };
311
+ content?: never;
312
+ };
313
+ };
314
+ }> | undefined, `${string}/${string}`>>;
315
+ /**
316
+ * Get adhesion rate for specific institution
317
+ * Returns adhesion rate for an institution for the last 6 months
318
+ */
319
+ getAdhesionRateByInstitution(id: string): Promise<import("openapi-fetch").FetchResponse<{
320
+ parameters: {
321
+ query?: never;
322
+ header?: never;
323
+ path: {
324
+ id: string;
325
+ };
326
+ cookie?: never;
327
+ };
328
+ requestBody?: never;
329
+ responses: {
330
+ 200: {
331
+ headers: {
332
+ [name: string]: unknown;
333
+ };
334
+ content: {
335
+ "application/json": {
336
+ status?: string;
337
+ data?: import("../types/academe-api").components["schemas"]["AdhesionRateResponse"];
338
+ };
339
+ };
340
+ };
341
+ 400: {
342
+ headers: {
343
+ [name: string]: unknown;
344
+ };
345
+ content?: never;
346
+ };
347
+ 401: {
348
+ headers: {
349
+ [name: string]: unknown;
350
+ };
351
+ content?: never;
352
+ };
353
+ 500: {
354
+ headers: {
355
+ [name: string]: unknown;
356
+ };
357
+ content?: never;
358
+ };
359
+ };
360
+ }, {
361
+ params: {
362
+ path: {
363
+ id: string;
364
+ };
365
+ };
366
+ }, `${string}/${string}`>>;
367
+ /**
368
+ * Get recent activities (global)
369
+ * Returns recent student activities (certificates issued and courses started)
370
+ */
371
+ getRecentActivities(params?: GetRecentActivitiesParams): Promise<import("openapi-fetch").FetchResponse<{
372
+ parameters: {
373
+ query?: {
374
+ period?: "7days" | "30days" | "all";
375
+ };
376
+ header?: never;
377
+ path?: never;
378
+ cookie?: never;
379
+ };
380
+ requestBody?: never;
381
+ responses: {
382
+ 200: {
383
+ headers: {
384
+ [name: string]: unknown;
385
+ };
386
+ content: {
387
+ "application/json": {
388
+ status?: string;
389
+ data?: import("../types/academe-api").components["schemas"]["RecentActivitiesResponse"];
390
+ };
391
+ };
392
+ };
393
+ 401: {
394
+ headers: {
395
+ [name: string]: unknown;
396
+ };
397
+ content?: never;
398
+ };
399
+ 500: {
400
+ headers: {
401
+ [name: string]: unknown;
402
+ };
403
+ content?: never;
404
+ };
405
+ };
406
+ }, {
407
+ params: {
408
+ query: GetRecentActivitiesParams | undefined;
409
+ };
410
+ }, `${string}/${string}`>>;
411
+ /**
412
+ * Get recent activities for specific institution
413
+ * Returns recent student activities for an institution
414
+ */
415
+ getRecentActivitiesByInstitution(id: string, params?: GetRecentActivitiesParams): Promise<import("openapi-fetch").FetchResponse<{
416
+ parameters: {
417
+ query?: {
418
+ period?: "7days" | "30days" | "all";
419
+ };
420
+ header?: never;
421
+ path: {
422
+ id: string;
423
+ };
424
+ cookie?: never;
425
+ };
426
+ requestBody?: never;
427
+ responses: {
428
+ 200: {
429
+ headers: {
430
+ [name: string]: unknown;
431
+ };
432
+ content: {
433
+ "application/json": {
434
+ status?: string;
435
+ data?: import("../types/academe-api").components["schemas"]["RecentActivitiesResponse"];
436
+ };
437
+ };
438
+ };
439
+ 400: {
440
+ headers: {
441
+ [name: string]: unknown;
442
+ };
443
+ content?: never;
444
+ };
445
+ 401: {
446
+ headers: {
447
+ [name: string]: unknown;
448
+ };
449
+ content?: never;
450
+ };
451
+ 500: {
452
+ headers: {
453
+ [name: string]: unknown;
454
+ };
455
+ content?: never;
456
+ };
457
+ };
458
+ }, {
459
+ params: {
460
+ path: {
461
+ id: string;
462
+ };
463
+ query: GetRecentActivitiesParams | undefined;
464
+ };
465
+ }, `${string}/${string}`>>;
466
+ /**
467
+ * Get top students (global)
468
+ * Returns top 10 students based on selected filter
469
+ */
470
+ getTopStudents(params: GetTopStudentsParams): Promise<import("openapi-fetch").FetchResponse<{
471
+ parameters: {
472
+ query: {
473
+ filterType: "nota" | "engajamento" | "conclusao";
474
+ year?: number;
475
+ };
476
+ header?: never;
477
+ path?: never;
478
+ cookie?: never;
479
+ };
480
+ requestBody?: never;
481
+ responses: {
482
+ 200: {
483
+ headers: {
484
+ [name: string]: unknown;
485
+ };
486
+ content: {
487
+ "application/json": {
488
+ status?: string;
489
+ data?: import("../types/academe-api").components["schemas"]["TopStudentsResponse"];
490
+ };
491
+ };
492
+ };
493
+ 400: {
494
+ headers: {
495
+ [name: string]: unknown;
496
+ };
497
+ content?: never;
498
+ };
499
+ 401: {
500
+ headers: {
501
+ [name: string]: unknown;
502
+ };
503
+ content?: never;
504
+ };
505
+ 500: {
506
+ headers: {
507
+ [name: string]: unknown;
508
+ };
509
+ content?: never;
510
+ };
511
+ };
512
+ }, {
513
+ params: {
514
+ query: GetTopStudentsParams;
515
+ };
516
+ }, `${string}/${string}`>>;
517
+ /**
518
+ * Get top students for specific institution
519
+ * Returns top 10 students for an institution based on selected filter
520
+ */
521
+ getTopStudentsByInstitution(id: string, params: GetTopStudentsParams): Promise<import("openapi-fetch").FetchResponse<{
522
+ parameters: {
523
+ query: {
524
+ filterType: "nota" | "engajamento" | "conclusao";
525
+ year?: number;
526
+ };
527
+ header?: never;
528
+ path: {
529
+ id: string;
530
+ };
531
+ cookie?: never;
532
+ };
533
+ requestBody?: never;
534
+ responses: {
535
+ 200: {
536
+ headers: {
537
+ [name: string]: unknown;
538
+ };
539
+ content: {
540
+ "application/json": {
541
+ status?: string;
542
+ data?: import("../types/academe-api").components["schemas"]["TopStudentsResponse"];
543
+ };
544
+ };
545
+ };
546
+ 400: {
547
+ headers: {
548
+ [name: string]: unknown;
549
+ };
550
+ content?: never;
551
+ };
552
+ 401: {
553
+ headers: {
554
+ [name: string]: unknown;
555
+ };
556
+ content?: never;
557
+ };
558
+ 500: {
559
+ headers: {
560
+ [name: string]: unknown;
561
+ };
562
+ content?: never;
563
+ };
564
+ };
565
+ }, {
566
+ params: {
567
+ path: {
568
+ id: string;
569
+ };
570
+ query: GetTopStudentsParams;
571
+ };
572
+ }, `${string}/${string}`>>;
573
+ };
574
+ export type ReportService = ReturnType<typeof createReportService>;
575
+ export {};