@supertst/api 0.1.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.
Files changed (3) hide show
  1. package/README.md +7 -38
  2. package/package.json +1 -1
  3. package/src/index.ts +140 -1
package/README.md CHANGED
@@ -5,48 +5,17 @@ SDK client generated from the Supertest API schema.
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun install
8
+ npm install @supertst/api
9
9
  ```
10
10
 
11
- ## Generate `src/index.ts`
11
+ ## Usage
12
12
 
13
- Regenerate the SDK from the remote OpenAPI schema:
13
+ See [`SDK_GUIDE.md`](./SDK_GUIDE.md).
14
14
 
15
- ```bash
16
- bun run generate
17
- ```
18
-
19
- This command runs `src/generate.ts` and overwrites `src/index.ts`.
20
-
21
- ## Publish flow
22
-
23
- Publishing is automated with GitHub Actions on every push to `main`.
15
+ ## Next.js 16
24
16
 
25
- Versioning is manual. Before pushing a new release to `main`, update `version` in `package.json`.
17
+ See [`NEXTJS_APP_ROUTER_GUIDE.md`](./NEXTJS_APP_ROUTER_GUIDE.md).
26
18
 
27
- Example:
19
+ ## Next.js Caching
28
20
 
29
- ```json
30
- {
31
- "version": "0.1.1"
32
- }
33
- ```
34
-
35
- Then push to `main` and GitHub Actions will run:
36
-
37
- ```bash
38
- bun publish --access public --tolerate-republish
39
- ```
40
-
41
- If that exact version already exists on npm, the workflow will not fail because it uses `--tolerate-republish`.
42
-
43
- ## Commits
44
-
45
- Commits no longer control versioning.
46
-
47
- Use any clear commit message you want, for example:
48
-
49
- ```bash
50
- git commit -m "update sdk generation workflow"
51
- git commit -m "fix publish action"
52
- ```
21
+ See [`NEXTJS_CACHE_COMPONENTS_GUIDE.md`](./NEXTJS_CACHE_COMPONENTS_GUIDE.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supertst/api",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "files": [
package/src/index.ts CHANGED
@@ -890,7 +890,7 @@ export interface ReviewItemDto {
890
890
  /** @example "Escriba un texto argumentativo sobre..." */
891
891
  enunciado: string;
892
892
  /** @example 0 */
893
- indice_respuesta: number;
893
+ indice_respuesta?: object | null;
894
894
  /** @example "uuid-clasificacion" */
895
895
  id_clasificacion?: string;
896
896
  /** Question metadata */
@@ -3252,6 +3252,64 @@ export namespace V1 {
3252
3252
 
3253
3253
  /**
3254
3254
  * No description
3255
+ * @tags student
3256
+ * @name GetMateriasWithComponentes
3257
+ * @summary Listar materias con sus selectores por tipo de institución
3258
+ * @request GET:/v1/student/materias-componentes
3259
+ * @secure
3260
+ * @response `200` `{
3261
+ ok?: boolean,
3262
+ data?: ({
3263
+ /** @format uuid *\/
3264
+ id_materia?: string,
3265
+ /** @example "Matemáticas" *\/
3266
+ nombre?: string,
3267
+ image_url?: string | null,
3268
+ institution_type?: "SCHOOL" | "UNIVERSITY",
3269
+ componentes?: ({
3270
+ /** @format uuid *\/
3271
+ id_componente?: string,
3272
+ /** @example "Interpretación y representación" *\/
3273
+ nombre?: string,
3274
+ selector_name?: string | null,
3275
+
3276
+ })[],
3277
+
3278
+ })[],
3279
+
3280
+ }` Lista de materias con selectores
3281
+ * @response `401` `void` Invalid API key
3282
+ */
3283
+ export namespace GetMateriasWithComponentes {
3284
+ export type RequestParams = {};
3285
+ export type RequestQuery = {
3286
+ /** Institution type */
3287
+ institution_type: "SCHOOL" | "UNIVERSITY";
3288
+ };
3289
+ export type RequestBody = never;
3290
+ export type RequestHeaders = {};
3291
+ export type ResponseBody = {
3292
+ ok?: boolean;
3293
+ data?: {
3294
+ /** @format uuid */
3295
+ id_materia?: string;
3296
+ /** @example "Matemáticas" */
3297
+ nombre?: string;
3298
+ image_url?: string | null;
3299
+ institution_type?: "SCHOOL" | "UNIVERSITY";
3300
+ componentes?: {
3301
+ /** @format uuid */
3302
+ id_componente?: string;
3303
+ /** @example "Interpretación y representación" */
3304
+ nombre?: string;
3305
+ selector_name?: string | null;
3306
+ }[];
3307
+ }[];
3308
+ };
3309
+ }
3310
+
3311
+ /**
3312
+ * No description
3255
3313
  * @tags trainer
3256
3314
  * @name CreateConfiguracion
3257
3315
  * @summary Crear configuración de simulacro
@@ -3640,14 +3698,21 @@ export namespace V1 {
3640
3698
  export type RequestQuery = {
3641
3699
  /**
3642
3700
  * Página (default 1)
3701
+ * @min 1
3702
+ * @default 1
3643
3703
  * @example 1
3644
3704
  */
3645
3705
  page?: number;
3646
3706
  /**
3647
3707
  * Resultados por página (default 50)
3708
+ * @min 1
3709
+ * @max 100
3710
+ * @default 50
3648
3711
  * @example 50
3649
3712
  */
3650
3713
  perPage?: number;
3714
+ /** Orden primario del leaderboard (default score) */
3715
+ sortBy?: "score" | "xp";
3651
3716
  };
3652
3717
  export type RequestBody = never;
3653
3718
  export type RequestHeaders = {};
@@ -9302,6 +9367,73 @@ export class Api<
9302
9367
  /**
9303
9368
  * No description
9304
9369
  *
9370
+ * @tags student
9371
+ * @name GetMateriasWithComponentes
9372
+ * @summary Listar materias con sus selectores por tipo de institución
9373
+ * @request GET:/v1/student/materias-componentes
9374
+ * @secure
9375
+ * @response `200` `{
9376
+ ok?: boolean,
9377
+ data?: ({
9378
+ /** @format uuid *\/
9379
+ id_materia?: string,
9380
+ /** @example "Matemáticas" *\/
9381
+ nombre?: string,
9382
+ image_url?: string | null,
9383
+ institution_type?: "SCHOOL" | "UNIVERSITY",
9384
+ componentes?: ({
9385
+ /** @format uuid *\/
9386
+ id_componente?: string,
9387
+ /** @example "Interpretación y representación" *\/
9388
+ nombre?: string,
9389
+ selector_name?: string | null,
9390
+
9391
+ })[],
9392
+
9393
+ })[],
9394
+
9395
+ }` Lista de materias con selectores
9396
+ * @response `401` `void` Invalid API key
9397
+ */
9398
+ getMateriasWithComponentes: (
9399
+ query: {
9400
+ /** Institution type */
9401
+ institution_type: "SCHOOL" | "UNIVERSITY";
9402
+ },
9403
+ params: RequestParams = {},
9404
+ ) =>
9405
+ this.request<
9406
+ {
9407
+ ok?: boolean;
9408
+ data?: {
9409
+ /** @format uuid */
9410
+ id_materia?: string;
9411
+ /** @example "Matemáticas" */
9412
+ nombre?: string;
9413
+ image_url?: string | null;
9414
+ institution_type?: "SCHOOL" | "UNIVERSITY";
9415
+ componentes?: {
9416
+ /** @format uuid */
9417
+ id_componente?: string;
9418
+ /** @example "Interpretación y representación" */
9419
+ nombre?: string;
9420
+ selector_name?: string | null;
9421
+ }[];
9422
+ }[];
9423
+ },
9424
+ void
9425
+ >({
9426
+ path: `/v1/student/materias-componentes`,
9427
+ method: "GET",
9428
+ query: query,
9429
+ secure: true,
9430
+ format: "json",
9431
+ ...params,
9432
+ }),
9433
+
9434
+ /**
9435
+ * No description
9436
+ *
9305
9437
  * @tags trainer
9306
9438
  * @name CreateConfiguracion
9307
9439
  * @summary Crear configuración de simulacro
@@ -9716,14 +9848,21 @@ export class Api<
9716
9848
  query?: {
9717
9849
  /**
9718
9850
  * Página (default 1)
9851
+ * @min 1
9852
+ * @default 1
9719
9853
  * @example 1
9720
9854
  */
9721
9855
  page?: number;
9722
9856
  /**
9723
9857
  * Resultados por página (default 50)
9858
+ * @min 1
9859
+ * @max 100
9860
+ * @default 50
9724
9861
  * @example 50
9725
9862
  */
9726
9863
  perPage?: number;
9864
+ /** Orden primario del leaderboard (default score) */
9865
+ sortBy?: "score" | "xp";
9727
9866
  },
9728
9867
  params: RequestParams = {},
9729
9868
  ) =>