academe-kit 0.15.0 → 0.16.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/index.d.ts CHANGED
@@ -9403,7 +9403,7 @@ interface paths {
9403
9403
  };
9404
9404
  requestBody?: never;
9405
9405
  responses: {
9406
- /** @description provider, embedUrl, videoExternalId, startTimeSeconds, durationSeconds, progress */
9406
+ /** @description provider, embedUrl, videoExternalId, startTimeSeconds, durationSeconds, progress e `ambient` (mídia do Ambient Glow — spriteUrlTemplate com placeholder `{n}`, thumbnailUrl e metadados da grade de seek; null quando o provider não é panda) */
9407
9407
  200: {
9408
9408
  headers: {
9409
9409
  [name: string]: unknown;
@@ -13987,6 +13987,407 @@ interface paths {
13987
13987
  };
13988
13988
  trace?: never;
13989
13989
  };
13990
+ "/studio/state": {
13991
+ parameters: {
13992
+ query?: never;
13993
+ header?: never;
13994
+ path?: never;
13995
+ cookie?: never;
13996
+ };
13997
+ /** Estado do Estúdio (publicado + MEUS rascunhos mesclados) */
13998
+ get: {
13999
+ parameters: {
14000
+ query?: {
14001
+ /** @description Escola do contexto (hero da escola + preview) */
14002
+ institutionId?: string;
14003
+ };
14004
+ header?: never;
14005
+ path?: never;
14006
+ cookie?: never;
14007
+ };
14008
+ requestBody?: never;
14009
+ responses: {
14010
+ /** @description hero{global,institution,myDrafts} + playlists[{id,draft,items,meta{state,hasMyDraft,stale,othersDrafts}}] + layout{order,hasMyDraft} + myDraftCount */
14011
+ 200: {
14012
+ headers: {
14013
+ [name: string]: unknown;
14014
+ };
14015
+ content?: never;
14016
+ };
14017
+ /** @description Não é staff */
14018
+ 403: {
14019
+ headers: {
14020
+ [name: string]: unknown;
14021
+ };
14022
+ content?: never;
14023
+ };
14024
+ };
14025
+ };
14026
+ put?: never;
14027
+ post?: never;
14028
+ delete?: never;
14029
+ options?: never;
14030
+ head?: never;
14031
+ patch?: never;
14032
+ trace?: never;
14033
+ };
14034
+ "/studio/drafts/playlist/{id}": {
14035
+ parameters: {
14036
+ query?: never;
14037
+ header?: never;
14038
+ path?: never;
14039
+ cookie?: never;
14040
+ };
14041
+ get?: never;
14042
+ /** Upsert do MEU rascunho de uma playlist (id pode ser de playlist nova — isNew) */
14043
+ put: {
14044
+ parameters: {
14045
+ query?: never;
14046
+ header?: never;
14047
+ path: {
14048
+ id: string;
14049
+ };
14050
+ cookie?: never;
14051
+ };
14052
+ requestBody: {
14053
+ content: {
14054
+ "application/json": {
14055
+ /** @enum {string} */
14056
+ op?: "upsert" | "delete";
14057
+ isNew?: boolean;
14058
+ playlist?: {
14059
+ title?: string;
14060
+ subtitle?: string | null;
14061
+ /** @enum {string} */
14062
+ status?: "draft" | "published";
14063
+ /** @enum {string} */
14064
+ source?: "curated" | "continue_watching" | "trending" | "watchlist" | "recent" | "continue_playlist";
14065
+ /** @enum {string} */
14066
+ variant?: "common" | "featured";
14067
+ /** @enum {string} */
14068
+ cardOrientation?: "horizontal" | "vertical" | "square" | "fullImage";
14069
+ itemsPerViewDesktop?: number;
14070
+ itemsPerViewMobile?: number;
14071
+ autoplay?: boolean;
14072
+ isGlobal?: boolean;
14073
+ };
14074
+ targets?: {
14075
+ institutionId?: string;
14076
+ organizationId?: string;
14077
+ }[];
14078
+ groupIds?: string[];
14079
+ /** @description ordem do array = position */
14080
+ items?: {
14081
+ courseId?: string;
14082
+ courseModuleId?: string;
14083
+ courseModuleLessonId?: string;
14084
+ }[];
14085
+ };
14086
+ };
14087
+ };
14088
+ responses: {
14089
+ /** @description Rascunho salvo (não altera o publicado) */
14090
+ 200: {
14091
+ headers: {
14092
+ [name: string]: unknown;
14093
+ };
14094
+ content?: never;
14095
+ };
14096
+ };
14097
+ };
14098
+ post?: never;
14099
+ delete?: never;
14100
+ options?: never;
14101
+ head?: never;
14102
+ patch?: never;
14103
+ trace?: never;
14104
+ };
14105
+ "/studio/drafts/hero": {
14106
+ parameters: {
14107
+ query?: never;
14108
+ header?: never;
14109
+ path?: never;
14110
+ cookie?: never;
14111
+ };
14112
+ get?: never;
14113
+ /** Upsert do MEU rascunho do hero (institutionId no body; ausente = global) */
14114
+ put: {
14115
+ parameters: {
14116
+ query?: never;
14117
+ header?: never;
14118
+ path?: never;
14119
+ cookie?: never;
14120
+ };
14121
+ requestBody: {
14122
+ content: {
14123
+ "application/json": {
14124
+ /** Format: uuid */
14125
+ institutionId?: string | null;
14126
+ /** @enum {string} */
14127
+ op?: "upsert" | "delete";
14128
+ hero?: {
14129
+ eyebrow?: string | null;
14130
+ title?: string;
14131
+ subtitle?: string | null;
14132
+ ctaLabel?: string | null;
14133
+ ctaUrl?: string | null;
14134
+ /** @enum {string} */
14135
+ mediaType?: "gradient" | "image" | "video";
14136
+ mediaUrl?: string | null;
14137
+ mediaLoop?: boolean;
14138
+ };
14139
+ };
14140
+ };
14141
+ };
14142
+ responses: {
14143
+ /** @description Rascunho salvo */
14144
+ 200: {
14145
+ headers: {
14146
+ [name: string]: unknown;
14147
+ };
14148
+ content?: never;
14149
+ };
14150
+ };
14151
+ };
14152
+ post?: never;
14153
+ delete?: never;
14154
+ options?: never;
14155
+ head?: never;
14156
+ patch?: never;
14157
+ trace?: never;
14158
+ };
14159
+ "/studio/drafts/layout": {
14160
+ parameters: {
14161
+ query?: never;
14162
+ header?: never;
14163
+ path?: never;
14164
+ cookie?: never;
14165
+ };
14166
+ get?: never;
14167
+ /** Upsert do MEU rascunho de ordem das rails (lista completa de ids) */
14168
+ put: {
14169
+ parameters: {
14170
+ query?: never;
14171
+ header?: never;
14172
+ path?: never;
14173
+ cookie?: never;
14174
+ };
14175
+ requestBody: {
14176
+ content: {
14177
+ "application/json": {
14178
+ order?: string[];
14179
+ };
14180
+ };
14181
+ };
14182
+ responses: {
14183
+ /** @description Rascunho salvo */
14184
+ 200: {
14185
+ headers: {
14186
+ [name: string]: unknown;
14187
+ };
14188
+ content?: never;
14189
+ };
14190
+ };
14191
+ };
14192
+ post?: never;
14193
+ delete?: never;
14194
+ options?: never;
14195
+ head?: never;
14196
+ patch?: never;
14197
+ trace?: never;
14198
+ };
14199
+ "/studio/drafts/{entityType}/{entityId}": {
14200
+ parameters: {
14201
+ query?: never;
14202
+ header?: never;
14203
+ path?: never;
14204
+ cookie?: never;
14205
+ };
14206
+ get?: never;
14207
+ put?: never;
14208
+ post?: never;
14209
+ /** Desfaz UM rascunho meu (playlist/hero por entidade) */
14210
+ delete: {
14211
+ parameters: {
14212
+ query?: never;
14213
+ header?: never;
14214
+ path: {
14215
+ entityType: "playlist" | "hero" | "layout";
14216
+ entityId: string;
14217
+ };
14218
+ cookie?: never;
14219
+ };
14220
+ requestBody?: never;
14221
+ responses: {
14222
+ /** @description { deleted: n } */
14223
+ 200: {
14224
+ headers: {
14225
+ [name: string]: unknown;
14226
+ };
14227
+ content?: never;
14228
+ };
14229
+ };
14230
+ };
14231
+ options?: never;
14232
+ head?: never;
14233
+ patch?: never;
14234
+ trace?: never;
14235
+ };
14236
+ "/studio/discard": {
14237
+ parameters: {
14238
+ query?: never;
14239
+ header?: never;
14240
+ path?: never;
14241
+ cookie?: never;
14242
+ };
14243
+ get?: never;
14244
+ put?: never;
14245
+ /** Descarta TODOS os meus rascunhos */
14246
+ post: {
14247
+ parameters: {
14248
+ query?: never;
14249
+ header?: never;
14250
+ path?: never;
14251
+ cookie?: never;
14252
+ };
14253
+ requestBody?: never;
14254
+ responses: {
14255
+ /** @description { discarded: n } */
14256
+ 200: {
14257
+ headers: {
14258
+ [name: string]: unknown;
14259
+ };
14260
+ content?: never;
14261
+ };
14262
+ };
14263
+ };
14264
+ delete?: never;
14265
+ options?: never;
14266
+ head?: never;
14267
+ patch?: never;
14268
+ trace?: never;
14269
+ };
14270
+ "/studio/publish": {
14271
+ parameters: {
14272
+ query?: never;
14273
+ header?: never;
14274
+ path?: never;
14275
+ cookie?: never;
14276
+ };
14277
+ get?: never;
14278
+ put?: never;
14279
+ /** Publica atomicamente os MEUS rascunhos (playlists+layout+heroes); nunca os de outro editor */
14280
+ post: {
14281
+ parameters: {
14282
+ query?: never;
14283
+ header?: never;
14284
+ path?: never;
14285
+ cookie?: never;
14286
+ };
14287
+ requestBody?: never;
14288
+ responses: {
14289
+ /** @description { applied{...}, warnings[] (staleness/missing) } */
14290
+ 200: {
14291
+ headers: {
14292
+ [name: string]: unknown;
14293
+ };
14294
+ content?: never;
14295
+ };
14296
+ /** @description Nenhuma alteração para publicar */
14297
+ 409: {
14298
+ headers: {
14299
+ [name: string]: unknown;
14300
+ };
14301
+ content?: never;
14302
+ };
14303
+ /** @description Falha (ex. conteúdo excluído) — nada foi aplicado */
14304
+ 422: {
14305
+ headers: {
14306
+ [name: string]: unknown;
14307
+ };
14308
+ content?: never;
14309
+ };
14310
+ };
14311
+ };
14312
+ delete?: never;
14313
+ options?: never;
14314
+ head?: never;
14315
+ patch?: never;
14316
+ trace?: never;
14317
+ };
14318
+ "/studio/catalog": {
14319
+ parameters: {
14320
+ query?: never;
14321
+ header?: never;
14322
+ path?: never;
14323
+ cookie?: never;
14324
+ };
14325
+ /** Busca de conteúdo p/ o picker (cursos/módulos/aulas, com flag published) */
14326
+ get: {
14327
+ parameters: {
14328
+ query?: {
14329
+ q?: string;
14330
+ kind?: "course" | "module" | "lesson";
14331
+ limit?: number;
14332
+ offset?: number;
14333
+ };
14334
+ header?: never;
14335
+ path?: never;
14336
+ cookie?: never;
14337
+ };
14338
+ requestBody?: never;
14339
+ responses: {
14340
+ /** @description { counts{courses,modules,lessons}, results[{kind,id,courseId,title,subtitle,coverUrl,published}] } */
14341
+ 200: {
14342
+ headers: {
14343
+ [name: string]: unknown;
14344
+ };
14345
+ content?: never;
14346
+ };
14347
+ };
14348
+ };
14349
+ put?: never;
14350
+ post?: never;
14351
+ delete?: never;
14352
+ options?: never;
14353
+ head?: never;
14354
+ patch?: never;
14355
+ trace?: never;
14356
+ };
14357
+ "/studio/audiences": {
14358
+ parameters: {
14359
+ query?: never;
14360
+ header?: never;
14361
+ path?: never;
14362
+ cookie?: never;
14363
+ };
14364
+ /** Chips de escopo do drawer (escolas, organizações e perfis) */
14365
+ get: {
14366
+ parameters: {
14367
+ query?: never;
14368
+ header?: never;
14369
+ path?: never;
14370
+ cookie?: never;
14371
+ };
14372
+ requestBody?: never;
14373
+ responses: {
14374
+ /** @description { institutions[], organizations[], groups[] } */
14375
+ 200: {
14376
+ headers: {
14377
+ [name: string]: unknown;
14378
+ };
14379
+ content?: never;
14380
+ };
14381
+ };
14382
+ };
14383
+ put?: never;
14384
+ post?: never;
14385
+ delete?: never;
14386
+ options?: never;
14387
+ head?: never;
14388
+ patch?: never;
14389
+ trace?: never;
14390
+ };
13990
14391
  "/submissions": {
13991
14392
  parameters: {
13992
14393
  query?: never;
@@ -16627,6 +17028,92 @@ interface paths {
16627
17028
  patch?: never;
16628
17029
  trace?: never;
16629
17030
  };
17031
+ "/users/{id}/courses/{courseId}/lessons": {
17032
+ parameters: {
17033
+ query?: never;
17034
+ header?: never;
17035
+ path?: never;
17036
+ cookie?: never;
17037
+ };
17038
+ /**
17039
+ * Drill-down por aula de um curso para um aluno (drawer do backoffice)
17040
+ * @description Lista as aulas publicadas do curso na ordem de módulo/aula, com o progresso consolidado (user_lesson_progress_v2) e o agregado de sessões por aula. watchedRanges são os intervalos do vídeo efetivamente assistidos (merged), para o heatmap de cobertura. Só leitura — nenhuma migration.
17041
+ */
17042
+ get: {
17043
+ parameters: {
17044
+ query?: never;
17045
+ header?: never;
17046
+ path: {
17047
+ /** @description id do aluno */
17048
+ id: string;
17049
+ courseId: string;
17050
+ };
17051
+ cookie?: never;
17052
+ };
17053
+ requestBody?: never;
17054
+ responses: {
17055
+ /** @description Aulas do curso com progresso do aluno */
17056
+ 200: {
17057
+ headers: {
17058
+ [name: string]: unknown;
17059
+ };
17060
+ content: {
17061
+ "application/json": {
17062
+ /** @example success */
17063
+ status?: string;
17064
+ data?: {
17065
+ /** Format: uuid */
17066
+ courseId?: string;
17067
+ courseTitle?: string;
17068
+ totalLessons?: number;
17069
+ completedLessons?: number;
17070
+ hoursWatched?: number;
17071
+ avgPlaybackRate?: number | null;
17072
+ modules?: {
17073
+ /** Format: uuid */
17074
+ moduleId?: string;
17075
+ title?: string;
17076
+ position?: number;
17077
+ lessons?: {
17078
+ /** Format: uuid */
17079
+ lessonId?: string;
17080
+ title?: string;
17081
+ position?: number;
17082
+ durationSeconds?: number;
17083
+ completed?: boolean;
17084
+ /** Format: date-time */
17085
+ completedAt?: string | null;
17086
+ positionSeconds?: number;
17087
+ watchedSeconds?: number;
17088
+ watchedPct?: number;
17089
+ /** Format: date-time */
17090
+ lastActivityAt?: string | null;
17091
+ sessions?: number;
17092
+ ranges?: number[][];
17093
+ }[];
17094
+ }[];
17095
+ };
17096
+ };
17097
+ };
17098
+ };
17099
+ /** @description Curso não encontrado */
17100
+ 404: {
17101
+ headers: {
17102
+ [name: string]: unknown;
17103
+ };
17104
+ content?: never;
17105
+ };
17106
+ 500: components["responses"]["ServerError"];
17107
+ };
17108
+ };
17109
+ put?: never;
17110
+ post?: never;
17111
+ delete?: never;
17112
+ options?: never;
17113
+ head?: never;
17114
+ patch?: never;
17115
+ trace?: never;
17116
+ };
16630
17117
  "/vitrine/home": {
16631
17118
  parameters: {
16632
17119
  query?: never;
@@ -16873,7 +17360,12 @@ interface components {
16873
17360
  * Format: email
16874
17361
  * @example john.doe@example.com
16875
17362
  */
16876
- email: string;
17363
+ email: string | null;
17364
+ /**
17365
+ * @description Login do usuário (gerado quando não informado)
17366
+ * @example johndoe
17367
+ */
17368
+ username?: string;
16877
17369
  /** @example +5511999999999 */
16878
17370
  phone?: string | null;
16879
17371
  /** @example 12345678901 */
@@ -17073,9 +17565,15 @@ interface components {
17073
17565
  lastName: string;
17074
17566
  /**
17075
17567
  * Format: email
17568
+ * @description Optional. When omitted, the user logs in with the generated username
17076
17569
  * @example john.doe@example.com
17077
17570
  */
17078
- email: string;
17571
+ email?: string | null;
17572
+ /**
17573
+ * @description Optional. Auto-generated from firstName + lastName when omitted
17574
+ * @example johndoe
17575
+ */
17576
+ username?: string | null;
17079
17577
  /**
17080
17578
  * @description Password for the user's Keycloak account
17081
17579
  * @example SecurePassword123!
@@ -17084,7 +17582,7 @@ interface components {
17084
17582
  /** @example +5511999999999 */
17085
17583
  phone?: string | null;
17086
17584
  /** @example 12345678901 */
17087
- document: string;
17585
+ document?: string | null;
17088
17586
  /**
17089
17587
  * @example male
17090
17588
  * @enum {string|null}
@@ -17107,6 +17605,18 @@ interface components {
17107
17605
  * @example 550e8400-e29b-41d4-a716-446655440001
17108
17606
  */
17109
17607
  institutionId?: string | null;
17608
+ /**
17609
+ * Format: uuid
17610
+ * @description Optional classroom ID to enroll the user (requires groupId)
17611
+ * @example 550e8400-e29b-41d4-a716-446655440003
17612
+ */
17613
+ institutionClassroomId?: string | null;
17614
+ /**
17615
+ * Format: uuid
17616
+ * @description Optional ID that groups this request with other creation requests
17617
+ * @example 550e8400-e29b-41d4-a716-446655440004
17618
+ */
17619
+ userCreationRequestsGroupId?: string | null;
17110
17620
  /**
17111
17621
  * Format: uuid
17112
17622
  * @description Seat code ID to register the user
@@ -17236,7 +17746,12 @@ interface components {
17236
17746
  * Format: email
17237
17747
  * @example john.doe@example.com
17238
17748
  */
17239
- email?: string;
17749
+ email?: string | null;
17750
+ /**
17751
+ * @description Login do usuário (gerado quando não informado)
17752
+ * @example johndoe
17753
+ */
17754
+ username?: string;
17240
17755
  /** @example +5511999999999 */
17241
17756
  phone?: string | null;
17242
17757
  /** @example 12345678901 */
@@ -19426,9 +19941,11 @@ interface components {
19426
19941
  requestId?: string;
19427
19942
  /**
19428
19943
  * Format: email
19429
- * @description Email of the user being created
19944
+ * @description Email of the user being created (optional)
19430
19945
  */
19431
- email?: string;
19946
+ email?: string | null;
19947
+ /** @description Login of the created user, generated by the worker when not provided (available after processing) */
19948
+ username?: string | null;
19432
19949
  /**
19433
19950
  * @description Current status of the creation request
19434
19951
  * @enum {string}
@@ -20432,14 +20949,17 @@ declare function createUserService(apiClient: AcademeApiClient): {
20432
20949
  body: {
20433
20950
  firstName: string;
20434
20951
  lastName: string;
20435
- email: string;
20952
+ email?: string | null;
20953
+ username?: string | null;
20436
20954
  password: string;
20437
20955
  phone?: string | null;
20438
- document: string;
20956
+ document?: string | null;
20439
20957
  gender?: "male" | "female" | "other" | null;
20440
20958
  birthdate?: string | null;
20441
20959
  groupId?: string | null;
20442
20960
  institutionId?: string | null;
20961
+ institutionClassroomId?: string | null;
20962
+ userCreationRequestsGroupId?: string | null;
20443
20963
  seatCodeId?: string | null;
20444
20964
  guardianId?: string | null;
20445
20965
  guardian?: components["schemas"]["CreateGuardianInlineDto"];
@@ -20477,20 +20997,61 @@ declare function createUserService(apiClient: AcademeApiClient): {
20477
20997
  body: {
20478
20998
  firstName: string;
20479
20999
  lastName: string;
20480
- email: string;
21000
+ email?: string | null;
21001
+ username?: string | null;
20481
21002
  password: string;
20482
21003
  phone?: string | null;
20483
- document: string;
21004
+ document?: string | null;
20484
21005
  gender?: "male" | "female" | "other" | null;
20485
21006
  birthdate?: string | null;
20486
21007
  groupId?: string | null;
20487
21008
  institutionId?: string | null;
21009
+ institutionClassroomId?: string | null;
21010
+ userCreationRequestsGroupId?: string | null;
20488
21011
  seatCodeId?: string | null;
20489
21012
  guardianId?: string | null;
20490
21013
  guardian?: components["schemas"]["CreateGuardianInlineDto"];
20491
21014
  avatarFileId?: string | null;
20492
21015
  };
20493
21016
  }, `${string}/${string}`>>;
21017
+ /**
21018
+ * Consulta o status de uma criação assíncrona de usuário, a partir do
21019
+ * requestId devolvido pelo POST /users. Traz o `username` (login) gerado
21020
+ * pelo worker — útil quando o usuário foi criado sem email.
21021
+ */
21022
+ getUserCreationRequest(requestId: string): Promise<openapi_fetch.FetchResponse<{
21023
+ parameters: {
21024
+ query?: never;
21025
+ header?: never;
21026
+ path: {
21027
+ requestId: string;
21028
+ };
21029
+ cookie?: never;
21030
+ };
21031
+ requestBody?: never;
21032
+ responses: {
21033
+ 200: {
21034
+ headers: {
21035
+ [name: string]: unknown;
21036
+ };
21037
+ content: {
21038
+ "application/json": {
21039
+ status?: string;
21040
+ data?: components["schemas"]["UserCreationRequest"];
21041
+ };
21042
+ };
21043
+ };
21044
+ 401: components["responses"]["Unauthorized"];
21045
+ 404: components["responses"]["NotFound"];
21046
+ 500: components["responses"]["ServerError"];
21047
+ };
21048
+ }, {
21049
+ params: {
21050
+ path: {
21051
+ requestId: string;
21052
+ };
21053
+ };
21054
+ }, `${string}/${string}`>>;
20494
21055
  /**
20495
21056
  * Update user information
20496
21057
  */
package/dist/index.esm.js CHANGED
@@ -4583,6 +4583,16 @@ function createUserService(apiClient) {
4583
4583
  body,
4584
4584
  });
4585
4585
  },
4586
+ /**
4587
+ * Consulta o status de uma criação assíncrona de usuário, a partir do
4588
+ * requestId devolvido pelo POST /users. Traz o `username` (login) gerado
4589
+ * pelo worker — útil quando o usuário foi criado sem email.
4590
+ */
4591
+ getUserCreationRequest(requestId) {
4592
+ return apiClient.GET("/user-creation-requests/{requestId}", {
4593
+ params: { path: { requestId } },
4594
+ });
4595
+ },
4586
4596
  /**
4587
4597
  * Update user information
4588
4598
  */