@segha/catalog 2.1.0 → 2.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.
- package/CHANGELOG.md +11 -0
- package/README.md +83 -0
- package/en/Note.ts +2 -0
- package/en/Wikipedia/index.ts +18 -0
- package/en/Wikipedia/types.ts +10 -0
- package/en/index.ts +1 -0
- package/es/Article/index.ts +16 -11
- package/es/Book/index.ts +16 -13
- package/es/Clothing/index.ts +5 -4
- package/es/Icon.ts +1673 -0
- package/es/Movie/index.ts +18 -16
- package/es/Note.ts +6 -0
- package/es/Painting/index.ts +30 -0
- package/es/Painting/types.ts +9 -0
- package/es/Wikipedia/index.ts +18 -0
- package/es/Wikipedia/types.ts +10 -0
- package/es/Youtube/index.ts +19 -0
- package/es/Youtube/types.ts +10 -0
- package/es/index.ts +3 -0
- package/es/types.ts +3 -0
- package/json-schemas/ArticleSchema.json +0 -1
- package/json-schemas/BookSchema.json +0 -1
- package/json-schemas/CatalogArticleSchema.json +0 -1
- package/json-schemas/CatalogBookSchema.json +0 -1
- package/json-schemas/CatalogClothingSchema.json +0 -1
- package/json-schemas/CatalogMovieSchema.json +0 -1
- package/json-schemas/CatalogWikipediaSchema.json +34 -0
- package/json-schemas/ClothingSchema.json +0 -2
- package/json-schemas/DetailedArticleSchema.json +0 -1
- package/json-schemas/DetailedBookSchema.json +0 -1
- package/json-schemas/DetailedClothingSchema.json +0 -2
- package/json-schemas/DetailedMovieSchema.json +0 -1
- package/json-schemas/DetailedWikipediaSchema.json +41 -0
- package/json-schemas/MetaArticleSchema.json +0 -1
- package/json-schemas/MetaBookSchema.json +0 -1
- package/json-schemas/MetaClothingSchema.json +0 -1
- package/json-schemas/MetaMovieSchema.json +0 -1
- package/json-schemas/MetaWikipediaSchema.json +50 -0
- package/json-schemas/MovieSchema.json +0 -1
- package/json-schemas/NoteSchema.json +106 -5
- package/json-schemas/WikipediaSchema.json +107 -0
- package/json-schemas/en/Article/ArticleSchema.json +0 -1
- package/json-schemas/en/Article/CatalogArticleSchema.json +0 -1
- package/json-schemas/en/Article/DetailedArticleSchema.json +0 -1
- package/json-schemas/en/Article/MetaArticleSchema.json +0 -1
- package/json-schemas/en/Article/index.json +0 -4
- package/json-schemas/en/ArticleSchema.json +0 -1
- package/json-schemas/en/Book/BookSchema.json +0 -1
- package/json-schemas/en/Book/CatalogBookSchema.json +0 -1
- package/json-schemas/en/Book/DetailedBookSchema.json +0 -1
- package/json-schemas/en/Book/MetaBookSchema.json +0 -1
- package/json-schemas/en/Book/index.json +0 -4
- package/json-schemas/en/BookSchema.json +0 -1
- package/json-schemas/en/CatalogArticleSchema.json +0 -1
- package/json-schemas/en/CatalogBookSchema.json +0 -1
- package/json-schemas/en/CatalogClothingSchema.json +0 -1
- package/json-schemas/en/CatalogMovieSchema.json +0 -1
- package/json-schemas/en/CatalogWikipediaSchema.json +34 -0
- package/json-schemas/en/Clothing/CatalogClothingSchema.json +0 -1
- package/json-schemas/en/Clothing/ClothingSchema.json +0 -2
- package/json-schemas/en/Clothing/DetailedClothingSchema.json +0 -2
- package/json-schemas/en/Clothing/MetaClothingSchema.json +0 -1
- package/json-schemas/en/Clothing/index.json +0 -6
- package/json-schemas/en/ClothingSchema.json +0 -2
- package/json-schemas/en/DetailedArticleSchema.json +0 -1
- package/json-schemas/en/DetailedBookSchema.json +0 -1
- package/json-schemas/en/DetailedClothingSchema.json +0 -2
- package/json-schemas/en/DetailedMovieSchema.json +0 -1
- package/json-schemas/en/DetailedWikipediaSchema.json +41 -0
- package/json-schemas/en/MetaArticleSchema.json +0 -1
- package/json-schemas/en/MetaBookSchema.json +0 -1
- package/json-schemas/en/MetaClothingSchema.json +0 -1
- package/json-schemas/en/MetaMovieSchema.json +0 -1
- package/json-schemas/en/MetaWikipediaSchema.json +50 -0
- package/json-schemas/en/Movie/CatalogMovieSchema.json +0 -1
- package/json-schemas/en/Movie/DetailedMovieSchema.json +0 -1
- package/json-schemas/en/Movie/MetaMovieSchema.json +0 -1
- package/json-schemas/en/Movie/MovieSchema.json +0 -1
- package/json-schemas/en/Movie/index.json +0 -4
- package/json-schemas/en/MovieSchema.json +0 -1
- package/json-schemas/en/NoteSchema.json +106 -5
- package/json-schemas/en/Wikipedia/CatalogWikipediaSchema.json +34 -0
- package/json-schemas/en/Wikipedia/DetailedWikipediaSchema.json +41 -0
- package/json-schemas/en/Wikipedia/MetaWikipediaSchema.json +50 -0
- package/json-schemas/en/Wikipedia/WikipediaSchema.json +107 -0
- package/json-schemas/en/Wikipedia/index.json +239 -0
- package/json-schemas/en/WikipediaSchema.json +107 -0
- package/json-schemas/en/index.json +338 -23
- package/json-schemas/es/Article/ArticleSchema.json +64 -29
- package/json-schemas/es/Article/CatalogArticleSchema.json +19 -7
- package/json-schemas/es/Article/DetailedArticleSchema.json +7 -11
- package/json-schemas/es/Article/MetaArticleSchema.json +40 -15
- package/json-schemas/es/Article/index.json +130 -62
- package/json-schemas/es/ArticleSchema.json +64 -29
- package/json-schemas/es/Book/BookSchema.json +55 -38
- package/json-schemas/es/Book/CatalogBookSchema.json +12 -8
- package/json-schemas/es/Book/DetailedBookSchema.json +11 -17
- package/json-schemas/es/Book/MetaBookSchema.json +34 -17
- package/json-schemas/es/Book/index.json +112 -80
- package/json-schemas/es/BookSchema.json +55 -38
- package/json-schemas/es/CatalogArticleSchema.json +19 -7
- package/json-schemas/es/CatalogBookSchema.json +12 -8
- package/json-schemas/es/CatalogClothingSchema.json +0 -1
- package/json-schemas/es/CatalogMovieSchema.json +18 -17
- package/json-schemas/es/CatalogPaintingSchema.json +26 -0
- package/json-schemas/es/CatalogWikipediaSchema.json +47 -0
- package/json-schemas/es/CatalogYoutubeSchema.json +47 -0
- package/json-schemas/es/Clothing/CatalogClothingSchema.json +0 -1
- package/json-schemas/es/Clothing/ClothingSchema.json +30 -12
- package/json-schemas/es/Clothing/DetailedClothingSchema.json +0 -2
- package/json-schemas/es/Clothing/MetaClothingSchema.json +30 -11
- package/json-schemas/es/Clothing/index.json +60 -26
- package/json-schemas/es/ClothingSchema.json +30 -12
- package/json-schemas/es/DetailedArticleSchema.json +7 -11
- package/json-schemas/es/DetailedBookSchema.json +11 -17
- package/json-schemas/es/DetailedClothingSchema.json +0 -2
- package/json-schemas/es/DetailedMovieSchema.json +22 -21
- package/json-schemas/es/DetailedPaintingSchema.json +33 -0
- package/json-schemas/es/DetailedWikipediaSchema.json +38 -0
- package/json-schemas/es/DetailedYoutubeSchema.json +37 -0
- package/json-schemas/es/Icon.json +1675 -0
- package/json-schemas/es/MetaArticleSchema.json +40 -15
- package/json-schemas/es/MetaBookSchema.json +34 -17
- package/json-schemas/es/MetaClothingSchema.json +30 -11
- package/json-schemas/es/MetaMovieSchema.json +32 -14
- package/json-schemas/es/MetaPaintingSchema.json +61 -0
- package/json-schemas/es/MetaWikipediaSchema.json +76 -0
- package/json-schemas/es/MetaYoutubeSchema.json +76 -0
- package/json-schemas/es/Movie/CatalogMovieSchema.json +18 -17
- package/json-schemas/es/Movie/DetailedMovieSchema.json +22 -21
- package/json-schemas/es/Movie/MetaMovieSchema.json +32 -14
- package/json-schemas/es/Movie/MovieSchema.json +70 -48
- package/json-schemas/es/Movie/index.json +142 -100
- package/json-schemas/es/MovieSchema.json +70 -48
- package/json-schemas/es/NoteSchema.json +607 -127
- package/json-schemas/es/Painting/CatalogPaintingSchema.json +26 -0
- package/json-schemas/es/Painting/DetailedPaintingSchema.json +33 -0
- package/json-schemas/es/Painting/MetaPaintingSchema.json +61 -0
- package/json-schemas/es/Painting/PaintingSchema.json +106 -0
- package/json-schemas/es/Painting/index.json +233 -0
- package/json-schemas/es/PaintingSchema.json +106 -0
- package/json-schemas/es/Wikipedia/CatalogWikipediaSchema.json +47 -0
- package/json-schemas/es/Wikipedia/DetailedWikipediaSchema.json +38 -0
- package/json-schemas/es/Wikipedia/MetaWikipediaSchema.json +76 -0
- package/json-schemas/es/Wikipedia/WikipediaSchema.json +143 -0
- package/json-schemas/es/Wikipedia/index.json +311 -0
- package/json-schemas/es/WikipediaSchema.json +143 -0
- package/json-schemas/es/Youtube/CatalogYoutubeSchema.json +47 -0
- package/json-schemas/es/Youtube/DetailedYoutubeSchema.json +37 -0
- package/json-schemas/es/Youtube/MetaYoutubeSchema.json +76 -0
- package/json-schemas/es/Youtube/YoutubeSchema.json +142 -0
- package/json-schemas/es/Youtube/index.json +309 -0
- package/json-schemas/es/YoutubeSchema.json +142 -0
- package/json-schemas/es/index.json +3821 -658
- package/json-schemas/index.json +338 -23
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to @segha/catalog will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.2.0] - 2026-02-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Schema `CatalogWikipediaSchema` was added
|
|
13
|
+
- Schema `DetailedWikipediaSchema` was added
|
|
14
|
+
- Schema `MetaWikipediaSchema` was added
|
|
15
|
+
- Schema `WikipediaSchema` was added
|
|
16
|
+
- **BREAKING** Property `status` in `ClothingSchema` changed from required to optional
|
|
17
|
+
- **BREAKING** Property `status` in `DetailedClothingSchema` changed from required to optional
|
|
18
|
+
|
|
8
19
|
## [2.1.0] - 2026-02-05
|
|
9
20
|
|
|
10
21
|
### Added
|
package/README.md
CHANGED
|
@@ -41,17 +41,21 @@ import { MetaClothingSchema, CatalogClothingSchema, DetailedClothingSchema } fro
|
|
|
41
41
|
- [CatalogBook](#catalogbook)
|
|
42
42
|
- [CatalogClothing](#catalogclothing)
|
|
43
43
|
- [CatalogMovie](#catalogmovie)
|
|
44
|
+
- [CatalogWikipedia](#catalogwikipedia)
|
|
44
45
|
- [Clothing](#clothing)
|
|
45
46
|
- [DetailedArticle](#detailedarticle)
|
|
46
47
|
- [DetailedBook](#detailedbook)
|
|
47
48
|
- [DetailedClothing](#detailedclothing)
|
|
48
49
|
- [DetailedMovie](#detailedmovie)
|
|
50
|
+
- [DetailedWikipedia](#detailedwikipedia)
|
|
49
51
|
- [MetaArticle](#metaarticle)
|
|
50
52
|
- [MetaBook](#metabook)
|
|
51
53
|
- [MetaClothing](#metaclothing)
|
|
52
54
|
- [MetaMovie](#metamovie)
|
|
55
|
+
- [MetaWikipedia](#metawikipedia)
|
|
53
56
|
- [Movie](#movie)
|
|
54
57
|
- [Note](#note)
|
|
58
|
+
- [Wikipedia](#wikipedia)
|
|
55
59
|
|
|
56
60
|
## API Reference
|
|
57
61
|
|
|
@@ -188,6 +192,22 @@ _Object containing the following properties:_
|
|
|
188
192
|
|
|
189
193
|
_(\*) Required._
|
|
190
194
|
|
|
195
|
+
## CatalogWikipedia
|
|
196
|
+
|
|
197
|
+
Wikipedia entry: Data obtainable from cataloging
|
|
198
|
+
|
|
199
|
+
_Object containing the following properties:_
|
|
200
|
+
|
|
201
|
+
| Property | Description | Type |
|
|
202
|
+
| :---------------- | :--------------------------- | :-------------- |
|
|
203
|
+
| **`title`** (\*) | Title of the Wikipedia entry | `string` |
|
|
204
|
+
| `description` | Description | `string` |
|
|
205
|
+
| `excerpt` | Extract of the article | `string` |
|
|
206
|
+
| **`author`** (\*) | Authors | `Array<string>` |
|
|
207
|
+
| `published` | Year of publication | `string` |
|
|
208
|
+
|
|
209
|
+
_(\*) Required._
|
|
210
|
+
|
|
191
211
|
## Clothing
|
|
192
212
|
|
|
193
213
|
Clothing item
|
|
@@ -287,6 +307,21 @@ _Object containing the following properties:_
|
|
|
287
307
|
|
|
288
308
|
_(\*) Required._
|
|
289
309
|
|
|
310
|
+
## DetailedWikipedia
|
|
311
|
+
|
|
312
|
+
Wikipedia entry: Additional data
|
|
313
|
+
|
|
314
|
+
_Object containing the following properties:_
|
|
315
|
+
|
|
316
|
+
| Property | Description | Type |
|
|
317
|
+
| :------------------ | :-------------------- | :------------------------------------------------------- |
|
|
318
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` |
|
|
319
|
+
| **`projects`** (\*) | Projects | `Array<string>` |
|
|
320
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
321
|
+
| **`rating`** (\*) | Rating of the article | `number` |
|
|
322
|
+
|
|
323
|
+
_(\*) Required._
|
|
324
|
+
|
|
290
325
|
## MetaArticle
|
|
291
326
|
|
|
292
327
|
Article: Metadata of Note
|
|
@@ -360,6 +395,25 @@ _Object containing the following properties:_
|
|
|
360
395
|
|
|
361
396
|
_(\*) Required._
|
|
362
397
|
|
|
398
|
+
## MetaWikipedia
|
|
399
|
+
|
|
400
|
+
Wikipedia entry: Metadata of Note
|
|
401
|
+
|
|
402
|
+
_Object containing the following properties:_
|
|
403
|
+
|
|
404
|
+
| Property | Description | Type | Default |
|
|
405
|
+
| :------------------ | :----------------- | :--------------------------- | :------------ |
|
|
406
|
+
| **`type`** (\*) | | `'[[Sources]]'` | |
|
|
407
|
+
| **`format`** (\*) | | `'[[Encyclopedia Entries]]'` | |
|
|
408
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` | |
|
|
409
|
+
| **`color`** (\*) | | `'#3171B2'` | |
|
|
410
|
+
| `icon` | Lucide icon. | `string` | `'wikipedia'` |
|
|
411
|
+
| `banner` | | `string` | |
|
|
412
|
+
| **`url`** (\*) | URL of the article | `string` | |
|
|
413
|
+
| **`platform`** (\*) | | `'Wikipedia'` | |
|
|
414
|
+
|
|
415
|
+
_(\*) Required._
|
|
416
|
+
|
|
363
417
|
## Movie
|
|
364
418
|
|
|
365
419
|
Movie
|
|
@@ -401,3 +455,32 @@ _Union of the following possible types:_
|
|
|
401
455
|
- [Book](#book)
|
|
402
456
|
- [Clothing](#clothing)
|
|
403
457
|
- [Movie](#movie)
|
|
458
|
+
- [Wikipedia](#wikipedia)
|
|
459
|
+
|
|
460
|
+
## Wikipedia
|
|
461
|
+
|
|
462
|
+
Wikipedia entry
|
|
463
|
+
|
|
464
|
+
_Object containing the following properties:_
|
|
465
|
+
|
|
466
|
+
| Property | Description | Type | Default |
|
|
467
|
+
| :------------------ | :--------------------------- | :------------------------------------------------------- | :------------ |
|
|
468
|
+
| **`title`** (\*) | Title of the Wikipedia entry | `string` | |
|
|
469
|
+
| `description` | Description | `string` | |
|
|
470
|
+
| `excerpt` | Extract of the article | `string` | |
|
|
471
|
+
| **`author`** (\*) | Authors | `Array<string>` | |
|
|
472
|
+
| `published` | Year of publication | `string` | |
|
|
473
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` | |
|
|
474
|
+
| **`projects`** (\*) | Projects | `Array<string>` | |
|
|
475
|
+
| **`topics`** (\*) | Topics | `Array<string>` | |
|
|
476
|
+
| **`rating`** (\*) | Rating of the article | `number` | |
|
|
477
|
+
| **`type`** (\*) | | `'[[Sources]]'` | |
|
|
478
|
+
| **`format`** (\*) | | `'[[Encyclopedia Entries]]'` | |
|
|
479
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` | |
|
|
480
|
+
| **`color`** (\*) | | `'#3171B2'` | |
|
|
481
|
+
| `icon` | Lucide icon. | `string` | `'wikipedia'` |
|
|
482
|
+
| `banner` | | `string` | |
|
|
483
|
+
| **`url`** (\*) | URL of the article | `string` | |
|
|
484
|
+
| **`platform`** (\*) | | `'Wikipedia'` | |
|
|
485
|
+
|
|
486
|
+
_(\*) Required._
|
package/en/Note.ts
CHANGED
|
@@ -4,10 +4,12 @@ import { ArticleSchema } from "./Article";
|
|
|
4
4
|
import { BookSchema } from "./Book";
|
|
5
5
|
import { ClothingSchema } from "./Clothing";
|
|
6
6
|
import { MovieSchema } from "./Movie";
|
|
7
|
+
import { WikipediaSchema } from "./Wikipedia";
|
|
7
8
|
|
|
8
9
|
export const NoteSchema = z.union([
|
|
9
10
|
ArticleSchema,
|
|
10
11
|
BookSchema,
|
|
11
12
|
ClothingSchema,
|
|
12
13
|
MovieSchema,
|
|
14
|
+
WikipediaSchema,
|
|
13
15
|
]).describe('Note: Union of all note types');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import z from "zod";
|
|
3
|
+
import { MetaArticleSchema, CatalogArticleSchema, DetailedArticleSchema } from "../Article";
|
|
4
|
+
|
|
5
|
+
export const MetaWikipediaSchema = MetaArticleSchema.extend({
|
|
6
|
+
icon: z.string().optional().default('wikipedia').describe('Lucide icon.'),
|
|
7
|
+
format: z.literal("[[Encyclopedia Entries]]"),
|
|
8
|
+
platform: z.literal("Wikipedia"),
|
|
9
|
+
}).describe('Wikipedia entry: Metadata of Note');
|
|
10
|
+
|
|
11
|
+
export const CatalogWikipediaSchema = CatalogArticleSchema.extend({
|
|
12
|
+
title: z.string().describe('Title of the Wikipedia entry'),
|
|
13
|
+
}).describe('Wikipedia entry: Data obtainable from cataloging');
|
|
14
|
+
|
|
15
|
+
export const DetailedWikipediaSchema = DetailedArticleSchema.extend({
|
|
16
|
+
}).describe('Wikipedia entry: Additional data');
|
|
17
|
+
|
|
18
|
+
export const WikipediaSchema = CatalogWikipediaSchema.extend(DetailedWikipediaSchema.shape).extend(MetaWikipediaSchema.shape).describe('Wikipedia entry');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import type { z } from 'zod';
|
|
4
|
+
|
|
5
|
+
import type { WikipediaSchema, CatalogWikipediaSchema, DetailedWikipediaSchema, MetaWikipediaSchema } from ".";
|
|
6
|
+
|
|
7
|
+
export type Wikipedia = z.infer<typeof WikipediaSchema>;
|
|
8
|
+
export type CatalogWikipedia = z.infer<typeof CatalogWikipediaSchema>;
|
|
9
|
+
export type DetailedWikipedia = z.infer<typeof DetailedWikipediaSchema>;
|
|
10
|
+
export type MetaWikipedia = z.infer<typeof MetaWikipediaSchema>;
|
package/en/index.ts
CHANGED
package/es/Article/index.ts
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
|
|
2
2
|
import z from "zod";
|
|
3
3
|
|
|
4
|
+
import { Areas } from '../Areas';
|
|
5
|
+
|
|
4
6
|
export const MetaArticleSchema = z.object({
|
|
5
7
|
type: z.literal("[[Fuentes]]"),
|
|
6
8
|
format: z.literal("[[Artículos]]"),
|
|
7
|
-
areas:
|
|
8
|
-
color: z.
|
|
9
|
-
icon: z.
|
|
10
|
-
banner: z.string().optional(),
|
|
11
|
-
url: z.string().describe('URL del artículo'),
|
|
9
|
+
areas: Areas.default(["[[Conocimiento]]"]),
|
|
10
|
+
color: z.string().optional().default("#3171B2").describe('Color de la nota.'),
|
|
11
|
+
icon: z.string().optional().default('newspaper').describe('Icono de Lucide.'),
|
|
12
|
+
banner: z.string().nullable().optional().describe('Banner de la nota.'),
|
|
13
|
+
url: z.string().optional().describe('URL del artículo'),
|
|
12
14
|
}).describe('Artículo: Metadatos de Nota');
|
|
13
15
|
|
|
14
16
|
export const CatalogArticleSchema = z.object({
|
|
15
17
|
title: z.string().describe('Título del artículo'),
|
|
16
|
-
description: z.string().optional().describe('Descripción'),
|
|
18
|
+
description: z.string().nullable().optional().describe('Descripción'),
|
|
17
19
|
excerpt: z.string().optional().describe('Extracto del artículo'),
|
|
18
|
-
author: z.array(z.string()).describe('Autores'),
|
|
19
|
-
published: z.
|
|
20
|
+
author: z.array(z.string()).optional().describe('Autores'),
|
|
21
|
+
published: z.union([z.string(), z.number()])
|
|
22
|
+
.transform((val) => String(val))
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Año de publicación'),
|
|
20
25
|
}).describe('Artículo: Datos obtenibles de catalogación');
|
|
21
26
|
|
|
22
27
|
export const DetailedArticleSchema = z.object({
|
|
23
28
|
status: z.enum(["Pendiente", "En Proceso", "Leído", "Consolidado"]).describe('Estado de lectura'),
|
|
24
|
-
projects: z.array(z.string()).describe('Proyectos'),
|
|
25
|
-
topics: z.array(z.string()).describe('Temas'),
|
|
26
|
-
rating: z.number().describe('Puntuación del artículo'),
|
|
29
|
+
projects: z.array(z.string()).optional().describe('Proyectos'),
|
|
30
|
+
topics: z.array(z.string()).optional().describe('Temas'),
|
|
31
|
+
rating: z.number().optional().describe('Puntuación del artículo'),
|
|
27
32
|
}).describe('Artículo: Datos adicionales');
|
|
28
33
|
|
|
29
34
|
export const ArticleSchema = CatalogArticleSchema.extend(DetailedArticleSchema.shape).extend(MetaArticleSchema.shape).describe('Artículo');
|
package/es/Book/index.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
import z from "zod";
|
|
3
|
+
import { Areas } from "../Areas";
|
|
3
4
|
|
|
4
5
|
export const MetaBookSchema= z.object({
|
|
5
6
|
type: z.literal("[[Fuentes]]"),
|
|
6
7
|
format: z.literal("[[Libros]]"),
|
|
7
|
-
areas:
|
|
8
|
-
color: z.
|
|
9
|
-
icon: z.
|
|
10
|
-
cover: z.string().optional(),
|
|
11
|
-
url: z.string().describe('URL del libro en Amazon o similar'),
|
|
12
|
-
read_url: z.string().describe('URL de la lectura del libro'),
|
|
8
|
+
areas: Areas.default(["[[Conocimiento]]"]),
|
|
9
|
+
color: z.string().optional().default("#3171B2").describe('Color de la nota.'),
|
|
10
|
+
icon: z.string().optional().default('book').describe('Icono de Lucide.'),
|
|
11
|
+
cover: z.string().optional().describe('Portada del libro.'),
|
|
12
|
+
url: z.string().optional().describe('URL del libro en Amazon o similar'),
|
|
13
|
+
read_url: z.string().optional().describe('URL de la lectura del libro'),
|
|
13
14
|
}).describe('Libro: Metadatos de Nota');
|
|
14
15
|
|
|
15
16
|
export const CatalogBookSchema = z.object({
|
|
@@ -17,17 +18,19 @@ export const CatalogBookSchema = z.object({
|
|
|
17
18
|
subtitle: z.string().optional().describe('Subtítulo del libro'),
|
|
18
19
|
description: z.string().optional().describe('Descripción del libro'),
|
|
19
20
|
author: z.array(z.string()).describe('Autores'),
|
|
20
|
-
published: z.string().
|
|
21
|
-
|
|
21
|
+
published: z.union([z.string(), z.number()])
|
|
22
|
+
.transform((val) => String(val))
|
|
23
|
+
.optional().describe('Año de publicación'),
|
|
24
|
+
categories: z.array(z.string()).optional().describe('Géneros'),
|
|
22
25
|
}).describe('Libro: Datos obtenibles de catalogación');
|
|
23
26
|
|
|
24
27
|
export const DetailedBookSchema = z.object({
|
|
25
28
|
status: z.enum(["Pendiente", "En Proceso", "Leído", "Consolidado"]).describe('Estado de lectura'),
|
|
26
|
-
topics: z.array(z.string()).describe('Temas'),
|
|
27
|
-
rating: z.number().describe('Puntuación del libro'),
|
|
28
|
-
online_rating: z.number().describe('Puntuación en línea'),
|
|
29
|
-
last_time_read: z.string().describe('Última vez leído'),
|
|
30
|
-
times_read: z.number().describe('Veces leído'),
|
|
29
|
+
topics: z.array(z.string()).optional().describe('Temas'),
|
|
30
|
+
rating: z.number().optional().describe('Puntuación del libro'),
|
|
31
|
+
online_rating: z.number().optional().describe('Puntuación en línea'),
|
|
32
|
+
last_time_read: z.string().optional().describe('Última vez leído'),
|
|
33
|
+
times_read: z.number().optional().describe('Veces leído'),
|
|
31
34
|
}).describe('Libro: Datos adicionales');
|
|
32
35
|
|
|
33
36
|
export const BookSchema = CatalogBookSchema.extend(DetailedBookSchema.shape).extend(MetaBookSchema.shape).describe('Libro');
|
package/es/Clothing/index.ts
CHANGED
|
@@ -14,14 +14,15 @@ import { Slot } from "./Slot";
|
|
|
14
14
|
import { Status } from "./Status";
|
|
15
15
|
import { UseCases } from "./UseCases";
|
|
16
16
|
import { Variants } from "./Variants";
|
|
17
|
+
import { Areas } from "../Areas";
|
|
17
18
|
|
|
18
19
|
export const MetaClothingSchema = z.object({
|
|
19
20
|
type: z.literal("[[Recursos]]"),
|
|
20
21
|
subtype: z.literal("[[Prendas]]"),
|
|
21
|
-
areas:
|
|
22
|
-
color: z.
|
|
23
|
-
icon: z.
|
|
24
|
-
cover: z.string().optional(),
|
|
22
|
+
areas: Areas.default(["[[Hogar]]"]),
|
|
23
|
+
color: z.string().optional().default("#CB6120").describe('Color de la nota.'),
|
|
24
|
+
icon: z.string().optional().default('shirt').describe('Icono de Lucide.'),
|
|
25
|
+
cover: z.string().optional().describe('Foto de la prenda de ropa.'),
|
|
25
26
|
}).describe('Prenda de ropa: Metadatos de Nota');
|
|
26
27
|
|
|
27
28
|
export const CatalogClothingSchema = z.object({
|