@segha/catalog 2.0.0 → 2.1.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 +18 -0
- package/README.md +272 -4
- package/en/Areas.ts +24 -0
- package/en/Article/index.ts +29 -0
- package/en/Article/types.ts +9 -0
- package/en/Book/index.ts +33 -0
- package/en/Book/types.ts +9 -0
- package/en/Clothing/index.ts +9 -9
- package/en/Movie/index.ts +34 -0
- package/en/Movie/types.ts +9 -0
- package/en/Note.ts +13 -0
- package/en/index.ts +4 -1
- package/en/types.ts +7 -0
- package/es/Areas.ts +24 -0
- package/es/Article/index.ts +29 -0
- package/es/Article/types.ts +9 -0
- package/es/Book/index.ts +33 -0
- package/es/Book/types.ts +9 -0
- package/es/Clothing/index.ts +10 -10
- package/es/Movie/index.ts +34 -0
- package/es/Movie/types.ts +9 -0
- package/es/Note.ts +13 -0
- package/es/index.ts +4 -0
- package/es/types.ts +7 -0
- package/json-schemas/ArticleSchema.json +103 -0
- package/json-schemas/BookSchema.json +124 -0
- package/json-schemas/CatalogArticleSchema.json +35 -0
- package/json-schemas/CatalogBookSchema.json +44 -0
- package/json-schemas/CatalogMovieSchema.json +49 -0
- package/json-schemas/DetailedArticleSchema.json +42 -0
- package/json-schemas/DetailedBookSchema.json +49 -0
- package/json-schemas/DetailedMovieSchema.json +48 -0
- package/json-schemas/MetaArticleSchema.json +46 -0
- package/json-schemas/MetaBookSchema.json +51 -0
- package/json-schemas/MetaMovieSchema.json +51 -0
- package/json-schemas/MovieSchema.json +128 -0
- package/json-schemas/NoteSchema.json +745 -0
- package/json-schemas/en/Area.json +21 -0
- package/json-schemas/en/Areas.json +25 -0
- package/json-schemas/en/Article/ArticleSchema.json +103 -0
- package/json-schemas/en/Article/CatalogArticleSchema.json +35 -0
- package/json-schemas/en/Article/DetailedArticleSchema.json +42 -0
- package/json-schemas/en/Article/MetaArticleSchema.json +46 -0
- package/json-schemas/en/Article/index.json +233 -0
- package/json-schemas/en/ArticleSchema.json +103 -0
- package/json-schemas/en/Book/BookSchema.json +124 -0
- package/json-schemas/en/Book/CatalogBookSchema.json +44 -0
- package/json-schemas/en/Book/DetailedBookSchema.json +49 -0
- package/json-schemas/en/Book/MetaBookSchema.json +51 -0
- package/json-schemas/en/Book/index.json +275 -0
- package/json-schemas/en/BookSchema.json +124 -0
- package/json-schemas/en/CatalogArticleSchema.json +35 -0
- package/json-schemas/en/CatalogBookSchema.json +44 -0
- package/json-schemas/en/CatalogMovieSchema.json +49 -0
- package/json-schemas/en/DetailedArticleSchema.json +42 -0
- package/json-schemas/en/DetailedBookSchema.json +49 -0
- package/json-schemas/en/DetailedMovieSchema.json +48 -0
- package/json-schemas/en/FirstLevelArea.json +21 -0
- package/json-schemas/en/MetaArticleSchema.json +46 -0
- package/json-schemas/en/MetaBookSchema.json +51 -0
- package/json-schemas/en/MetaMovieSchema.json +51 -0
- package/json-schemas/en/Movie/CatalogMovieSchema.json +49 -0
- package/json-schemas/en/Movie/DetailedMovieSchema.json +48 -0
- package/json-schemas/en/Movie/MetaMovieSchema.json +51 -0
- package/json-schemas/en/Movie/MovieSchema.json +128 -0
- package/json-schemas/en/Movie/index.json +283 -0
- package/json-schemas/en/MovieSchema.json +128 -0
- package/json-schemas/en/NoteSchema.json +745 -0
- package/json-schemas/en/index.json +1582 -0
- package/json-schemas/es/Area.json +21 -0
- package/json-schemas/es/Areas.json +25 -0
- package/json-schemas/es/Article/ArticleSchema.json +103 -0
- package/json-schemas/es/Article/CatalogArticleSchema.json +35 -0
- package/json-schemas/es/Article/DetailedArticleSchema.json +42 -0
- package/json-schemas/es/Article/MetaArticleSchema.json +46 -0
- package/json-schemas/es/Article/index.json +233 -0
- package/json-schemas/es/ArticleSchema.json +103 -0
- package/json-schemas/es/Book/BookSchema.json +124 -0
- package/json-schemas/es/Book/CatalogBookSchema.json +44 -0
- package/json-schemas/es/Book/DetailedBookSchema.json +49 -0
- package/json-schemas/es/Book/MetaBookSchema.json +51 -0
- package/json-schemas/es/Book/index.json +275 -0
- package/json-schemas/es/BookSchema.json +124 -0
- package/json-schemas/es/CatalogArticleSchema.json +35 -0
- package/json-schemas/es/CatalogBookSchema.json +44 -0
- package/json-schemas/es/CatalogMovieSchema.json +49 -0
- package/json-schemas/es/Clothing/DetailedClothingSchema.json +1 -1
- package/json-schemas/es/Clothing/index.json +1 -1
- package/json-schemas/es/DetailedArticleSchema.json +42 -0
- package/json-schemas/es/DetailedBookSchema.json +49 -0
- package/json-schemas/es/DetailedClothingSchema.json +1 -1
- package/json-schemas/es/DetailedMovieSchema.json +48 -0
- package/json-schemas/es/FirstLevelArea.json +21 -0
- package/json-schemas/es/MetaArticleSchema.json +46 -0
- package/json-schemas/es/MetaBookSchema.json +51 -0
- package/json-schemas/es/MetaMovieSchema.json +51 -0
- package/json-schemas/es/Movie/CatalogMovieSchema.json +49 -0
- package/json-schemas/es/Movie/DetailedMovieSchema.json +48 -0
- package/json-schemas/es/Movie/MetaMovieSchema.json +51 -0
- package/json-schemas/es/Movie/MovieSchema.json +128 -0
- package/json-schemas/es/Movie/index.json +283 -0
- package/json-schemas/es/MovieSchema.json +128 -0
- package/json-schemas/es/NoteSchema.json +746 -0
- package/json-schemas/es/index.json +1584 -1
- package/json-schemas/index.json +1515 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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.1.0] - 2026-02-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Schema `ArticleSchema` was added
|
|
13
|
+
- Schema `BookSchema` was added
|
|
14
|
+
- Schema `CatalogArticleSchema` was added
|
|
15
|
+
- Schema `CatalogBookSchema` was added
|
|
16
|
+
- Schema `CatalogMovieSchema` was added
|
|
17
|
+
- Schema `DetailedArticleSchema` was added
|
|
18
|
+
- Schema `DetailedBookSchema` was added
|
|
19
|
+
- Schema `DetailedMovieSchema` was added
|
|
20
|
+
- Schema `MetaArticleSchema` was added
|
|
21
|
+
- Schema `MetaBookSchema` was added
|
|
22
|
+
- Schema `MetaMovieSchema` was added
|
|
23
|
+
- Schema `MovieSchema` was added
|
|
24
|
+
- Schema `NoteSchema` was added
|
|
25
|
+
|
|
8
26
|
## [2.0.0] - 2026-02-05
|
|
9
27
|
|
|
10
28
|
### Added
|
package/README.md
CHANGED
|
@@ -18,30 +18,134 @@ pnpm add @segha/catalog
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
|
-
import {
|
|
21
|
+
import { ArticleSchema, BookSchema, CatalogArticleSchema, ... } from '@segha/catalog';
|
|
22
22
|
|
|
23
23
|
// Validate data
|
|
24
|
-
const result =
|
|
24
|
+
const result = ArticleSchema.parse(data);
|
|
25
25
|
|
|
26
26
|
// Infer TypeScript types
|
|
27
|
-
type
|
|
27
|
+
type Article = z.infer<typeof ArticleSchema>;
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
You can also import specific submodules:
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
|
-
import { CatalogClothingSchema, DetailedClothingSchema
|
|
33
|
+
import { MetaClothingSchema, CatalogClothingSchema, DetailedClothingSchema } from '@segha/catalog/en/clothing';
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Schemas
|
|
37
37
|
|
|
38
|
+
- [Article](#article)
|
|
39
|
+
- [Book](#book)
|
|
40
|
+
- [CatalogArticle](#catalogarticle)
|
|
41
|
+
- [CatalogBook](#catalogbook)
|
|
38
42
|
- [CatalogClothing](#catalogclothing)
|
|
43
|
+
- [CatalogMovie](#catalogmovie)
|
|
39
44
|
- [Clothing](#clothing)
|
|
45
|
+
- [DetailedArticle](#detailedarticle)
|
|
46
|
+
- [DetailedBook](#detailedbook)
|
|
40
47
|
- [DetailedClothing](#detailedclothing)
|
|
48
|
+
- [DetailedMovie](#detailedmovie)
|
|
49
|
+
- [MetaArticle](#metaarticle)
|
|
50
|
+
- [MetaBook](#metabook)
|
|
41
51
|
- [MetaClothing](#metaclothing)
|
|
52
|
+
- [MetaMovie](#metamovie)
|
|
53
|
+
- [Movie](#movie)
|
|
54
|
+
- [Note](#note)
|
|
42
55
|
|
|
43
56
|
## API Reference
|
|
44
57
|
|
|
58
|
+
## Article
|
|
59
|
+
|
|
60
|
+
Article
|
|
61
|
+
|
|
62
|
+
_Object containing the following properties:_
|
|
63
|
+
|
|
64
|
+
| Property | Description | Type |
|
|
65
|
+
| :------------------ | :--------------------- | :------------------------------------------------------- |
|
|
66
|
+
| **`title`** (\*) | Title of the article | `string` |
|
|
67
|
+
| `description` | Description | `string` |
|
|
68
|
+
| `excerpt` | Extract of the article | `string` |
|
|
69
|
+
| **`author`** (\*) | Authors | `Array<string>` |
|
|
70
|
+
| `published` | Year of publication | `string` |
|
|
71
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` |
|
|
72
|
+
| **`projects`** (\*) | Projects | `Array<string>` |
|
|
73
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
74
|
+
| **`rating`** (\*) | Rating of the article | `number` |
|
|
75
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
76
|
+
| **`format`** (\*) | | `'[[Articles]]'` |
|
|
77
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` |
|
|
78
|
+
| **`color`** (\*) | | `'#3171B2'` |
|
|
79
|
+
| **`icon`** (\*) | | `'newspaper'` |
|
|
80
|
+
| `banner` | | `string` |
|
|
81
|
+
| **`url`** (\*) | URL of the article | `string` |
|
|
82
|
+
|
|
83
|
+
_(\*) Required._
|
|
84
|
+
|
|
85
|
+
## Book
|
|
86
|
+
|
|
87
|
+
Book
|
|
88
|
+
|
|
89
|
+
_Object containing the following properties:_
|
|
90
|
+
|
|
91
|
+
| Property | Description | Type |
|
|
92
|
+
| :------------------------ | :----------------------------------- | :------------------------------------------------------- |
|
|
93
|
+
| **`title`** (\*) | Title of the book | `string` |
|
|
94
|
+
| `subtitle` | Subtitle of the book | `string` |
|
|
95
|
+
| `description` | Description of the book | `string` |
|
|
96
|
+
| **`author`** (\*) | Authors | `Array<string>` |
|
|
97
|
+
| **`published`** (\*) | Year of publication | `string` |
|
|
98
|
+
| **`categories`** (\*) | Categories | `Array<string>` |
|
|
99
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` |
|
|
100
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
101
|
+
| **`rating`** (\*) | Rating of the book | `number` |
|
|
102
|
+
| **`online_rating`** (\*) | Online rating | `number` |
|
|
103
|
+
| **`last_time_read`** (\*) | Last time read | `string` |
|
|
104
|
+
| **`times_read`** (\*) | Times read | `number` |
|
|
105
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
106
|
+
| **`format`** (\*) | | `'[[Books]]'` |
|
|
107
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` |
|
|
108
|
+
| **`color`** (\*) | | `'#3171B2'` |
|
|
109
|
+
| **`icon`** (\*) | | `'book'` |
|
|
110
|
+
| `cover` | | `string` |
|
|
111
|
+
| **`url`** (\*) | URL of the book in Amazon or similar | `string` |
|
|
112
|
+
| **`read_url`** (\*) | URL of the reading of the book | `string` |
|
|
113
|
+
|
|
114
|
+
_(\*) Required._
|
|
115
|
+
|
|
116
|
+
## CatalogArticle
|
|
117
|
+
|
|
118
|
+
Article: Data obtained from catalogation
|
|
119
|
+
|
|
120
|
+
_Object containing the following properties:_
|
|
121
|
+
|
|
122
|
+
| Property | Description | Type |
|
|
123
|
+
| :---------------- | :--------------------- | :-------------- |
|
|
124
|
+
| **`title`** (\*) | Title of the article | `string` |
|
|
125
|
+
| `description` | Description | `string` |
|
|
126
|
+
| `excerpt` | Extract of the article | `string` |
|
|
127
|
+
| **`author`** (\*) | Authors | `Array<string>` |
|
|
128
|
+
| `published` | Year of publication | `string` |
|
|
129
|
+
|
|
130
|
+
_(\*) Required._
|
|
131
|
+
|
|
132
|
+
## CatalogBook
|
|
133
|
+
|
|
134
|
+
Book: Data obtained from catalogation
|
|
135
|
+
|
|
136
|
+
_Object containing the following properties:_
|
|
137
|
+
|
|
138
|
+
| Property | Description | Type |
|
|
139
|
+
| :-------------------- | :---------------------- | :-------------- |
|
|
140
|
+
| **`title`** (\*) | Title of the book | `string` |
|
|
141
|
+
| `subtitle` | Subtitle of the book | `string` |
|
|
142
|
+
| `description` | Description of the book | `string` |
|
|
143
|
+
| **`author`** (\*) | Authors | `Array<string>` |
|
|
144
|
+
| **`published`** (\*) | Year of publication | `string` |
|
|
145
|
+
| **`categories`** (\*) | Categories | `Array<string>` |
|
|
146
|
+
|
|
147
|
+
_(\*) Required._
|
|
148
|
+
|
|
45
149
|
## CatalogClothing
|
|
46
150
|
|
|
47
151
|
Clothing item: Catalogable data
|
|
@@ -67,6 +171,23 @@ _Object containing the following properties:_
|
|
|
67
171
|
|
|
68
172
|
_(\*) Required._
|
|
69
173
|
|
|
174
|
+
## CatalogMovie
|
|
175
|
+
|
|
176
|
+
Movie: Data obtained from catalogation
|
|
177
|
+
|
|
178
|
+
_Object containing the following properties:_
|
|
179
|
+
|
|
180
|
+
| Property | Description | Type |
|
|
181
|
+
| :--------------------- | :------------------------------------------- | :-------------- |
|
|
182
|
+
| **`title`** (\*) | Title of the movie | `string` |
|
|
183
|
+
| **`description`** (\*) | Description of the movie | `string` |
|
|
184
|
+
| **`author`** (\*) | Authors. Writers, directors, producers, etc. | `Array<string>` |
|
|
185
|
+
| **`actors`** (\*) | Actors | `Array<string>` |
|
|
186
|
+
| **`published`** (\*) | Year of publication | `string` |
|
|
187
|
+
| **`genres`** (\*) | Genres | `Array<string>` |
|
|
188
|
+
|
|
189
|
+
_(\*) Required._
|
|
190
|
+
|
|
70
191
|
## Clothing
|
|
71
192
|
|
|
72
193
|
Clothing item
|
|
@@ -102,6 +223,38 @@ _Object containing the following properties:_
|
|
|
102
223
|
|
|
103
224
|
_(\*) Required._
|
|
104
225
|
|
|
226
|
+
## DetailedArticle
|
|
227
|
+
|
|
228
|
+
Article: Additional data
|
|
229
|
+
|
|
230
|
+
_Object containing the following properties:_
|
|
231
|
+
|
|
232
|
+
| Property | Description | Type |
|
|
233
|
+
| :------------------ | :-------------------- | :------------------------------------------------------- |
|
|
234
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` |
|
|
235
|
+
| **`projects`** (\*) | Projects | `Array<string>` |
|
|
236
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
237
|
+
| **`rating`** (\*) | Rating of the article | `number` |
|
|
238
|
+
|
|
239
|
+
_(\*) Required._
|
|
240
|
+
|
|
241
|
+
## DetailedBook
|
|
242
|
+
|
|
243
|
+
Book: Additional data
|
|
244
|
+
|
|
245
|
+
_Object containing the following properties:_
|
|
246
|
+
|
|
247
|
+
| Property | Description | Type |
|
|
248
|
+
| :------------------------ | :----------------- | :------------------------------------------------------- |
|
|
249
|
+
| **`status`** (\*) | Reading status | `'Pending' \| 'In Progress' \| 'Read' \| 'Consolidated'` |
|
|
250
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
251
|
+
| **`rating`** (\*) | Rating of the book | `number` |
|
|
252
|
+
| **`online_rating`** (\*) | Online rating | `number` |
|
|
253
|
+
| **`last_time_read`** (\*) | Last time read | `string` |
|
|
254
|
+
| **`times_read`** (\*) | Times read | `number` |
|
|
255
|
+
|
|
256
|
+
_(\*) Required._
|
|
257
|
+
|
|
105
258
|
## DetailedClothing
|
|
106
259
|
|
|
107
260
|
Clothing item: Additional hard-to-obtain data
|
|
@@ -117,6 +270,60 @@ _Object containing the following properties:_
|
|
|
117
270
|
|
|
118
271
|
_(\*) Required._
|
|
119
272
|
|
|
273
|
+
## DetailedMovie
|
|
274
|
+
|
|
275
|
+
Movie: Additional data
|
|
276
|
+
|
|
277
|
+
_Object containing the following properties:_
|
|
278
|
+
|
|
279
|
+
| Property | Description | Type |
|
|
280
|
+
| :--------------------------- | :------------------ | :------------------------------------------ |
|
|
281
|
+
| **`status`** (\*) | Watching status | `'Pending' \| 'In Progress' \| 'Completed'` |
|
|
282
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
283
|
+
| **`rating`** (\*) | Rating of the movie | `number` |
|
|
284
|
+
| **`online_rating`** (\*) | Online rating | `number` |
|
|
285
|
+
| **`last_time_watched`** (\*) | Last time watched | `string` |
|
|
286
|
+
| **`times_watched`** (\*) | Times watched | `number` |
|
|
287
|
+
|
|
288
|
+
_(\*) Required._
|
|
289
|
+
|
|
290
|
+
## MetaArticle
|
|
291
|
+
|
|
292
|
+
Article: Metadata of Note
|
|
293
|
+
|
|
294
|
+
_Object containing the following properties:_
|
|
295
|
+
|
|
296
|
+
| Property | Description | Type |
|
|
297
|
+
| :---------------- | :----------------- | :----------------------- |
|
|
298
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
299
|
+
| **`format`** (\*) | | `'[[Articles]]'` |
|
|
300
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` |
|
|
301
|
+
| **`color`** (\*) | | `'#3171B2'` |
|
|
302
|
+
| **`icon`** (\*) | | `'newspaper'` |
|
|
303
|
+
| `banner` | | `string` |
|
|
304
|
+
| **`url`** (\*) | URL of the article | `string` |
|
|
305
|
+
|
|
306
|
+
_(\*) Required._
|
|
307
|
+
|
|
308
|
+
## MetaBook
|
|
309
|
+
|
|
310
|
+
Book: Metadata of Note
|
|
311
|
+
|
|
312
|
+
_Object containing the following properties:_
|
|
313
|
+
|
|
314
|
+
| Property | Description | Type |
|
|
315
|
+
| :------------------ | :----------------------------------- | :----------------------- |
|
|
316
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
317
|
+
| **`format`** (\*) | | `'[[Books]]'` |
|
|
318
|
+
| **`areas`** (\*) | | `Array<'[[Knowledge]]'>` |
|
|
319
|
+
| **`color`** (\*) | | `'#3171B2'` |
|
|
320
|
+
| **`icon`** (\*) | | `'book'` |
|
|
321
|
+
| `cover` | | `string` |
|
|
322
|
+
| **`url`** (\*) | URL of the book in Amazon or similar | `string` |
|
|
323
|
+
| **`read_url`** (\*) | URL of the reading of the book | `string` |
|
|
324
|
+
|
|
325
|
+
_(\*) Required._
|
|
326
|
+
|
|
120
327
|
## MetaClothing
|
|
121
328
|
|
|
122
329
|
Clothing item: Note metadata
|
|
@@ -133,3 +340,64 @@ _Object containing the following properties:_
|
|
|
133
340
|
| `cover` | `string` |
|
|
134
341
|
|
|
135
342
|
_(\*) Required._
|
|
343
|
+
|
|
344
|
+
## MetaMovie
|
|
345
|
+
|
|
346
|
+
Movie: Metadata of Note
|
|
347
|
+
|
|
348
|
+
_Object containing the following properties:_
|
|
349
|
+
|
|
350
|
+
| Property | Description | Type |
|
|
351
|
+
| :------------------- | :---------------------------------- | :------------------------ |
|
|
352
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
353
|
+
| **`format`** (\*) | | `'[[Movies]]'` |
|
|
354
|
+
| **`areas`** (\*) | | `Array<'[[Creativity]]'>` |
|
|
355
|
+
| **`color`** (\*) | | `'#BE9207'` |
|
|
356
|
+
| **`icon`** (\*) | | `'movie'` |
|
|
357
|
+
| `cover` | | `string` |
|
|
358
|
+
| **`url`** (\*) | URL of the movie in IMDB or similar | `string` |
|
|
359
|
+
| **`watch_url`** (\*) | URL of the movie in streaming | `string` |
|
|
360
|
+
|
|
361
|
+
_(\*) Required._
|
|
362
|
+
|
|
363
|
+
## Movie
|
|
364
|
+
|
|
365
|
+
Movie
|
|
366
|
+
|
|
367
|
+
_Object containing the following properties:_
|
|
368
|
+
|
|
369
|
+
| Property | Description | Type |
|
|
370
|
+
| :--------------------------- | :------------------------------------------- | :------------------------------------------ |
|
|
371
|
+
| **`title`** (\*) | Title of the movie | `string` |
|
|
372
|
+
| **`description`** (\*) | Description of the movie | `string` |
|
|
373
|
+
| **`author`** (\*) | Authors. Writers, directors, producers, etc. | `Array<string>` |
|
|
374
|
+
| **`actors`** (\*) | Actors | `Array<string>` |
|
|
375
|
+
| **`published`** (\*) | Year of publication | `string` |
|
|
376
|
+
| **`genres`** (\*) | Genres | `Array<string>` |
|
|
377
|
+
| **`status`** (\*) | Watching status | `'Pending' \| 'In Progress' \| 'Completed'` |
|
|
378
|
+
| **`topics`** (\*) | Topics | `Array<string>` |
|
|
379
|
+
| **`rating`** (\*) | Rating of the movie | `number` |
|
|
380
|
+
| **`online_rating`** (\*) | Online rating | `number` |
|
|
381
|
+
| **`last_time_watched`** (\*) | Last time watched | `string` |
|
|
382
|
+
| **`times_watched`** (\*) | Times watched | `number` |
|
|
383
|
+
| **`type`** (\*) | | `'[[Sources]]'` |
|
|
384
|
+
| **`format`** (\*) | | `'[[Movies]]'` |
|
|
385
|
+
| **`areas`** (\*) | | `Array<'[[Creativity]]'>` |
|
|
386
|
+
| **`color`** (\*) | | `'#BE9207'` |
|
|
387
|
+
| **`icon`** (\*) | | `'movie'` |
|
|
388
|
+
| `cover` | | `string` |
|
|
389
|
+
| **`url`** (\*) | URL of the movie in IMDB or similar | `string` |
|
|
390
|
+
| **`watch_url`** (\*) | URL of the movie in streaming | `string` |
|
|
391
|
+
|
|
392
|
+
_(\*) Required._
|
|
393
|
+
|
|
394
|
+
## Note
|
|
395
|
+
|
|
396
|
+
Note: Union of all note types
|
|
397
|
+
|
|
398
|
+
_Union of the following possible types:_
|
|
399
|
+
|
|
400
|
+
- [Article](#article)
|
|
401
|
+
- [Book](#book)
|
|
402
|
+
- [Clothing](#clothing)
|
|
403
|
+
- [Movie](#movie)
|
package/en/Areas.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const FirstLevelArea = z.enum([
|
|
4
|
+
"[[Food]]",
|
|
5
|
+
"[[Health]]",
|
|
6
|
+
"[[Knowledge]]",
|
|
7
|
+
"[[Structured Thinking]]",
|
|
8
|
+
"[[Home]]",
|
|
9
|
+
"[[Productivity]]",
|
|
10
|
+
"[[Exploration]]",
|
|
11
|
+
"[[Links]]",
|
|
12
|
+
"[[Exercise]]",
|
|
13
|
+
"[[Energy]]",
|
|
14
|
+
"[[Work]]",
|
|
15
|
+
"[[Finances]]",
|
|
16
|
+
"[[Mental Health]]",
|
|
17
|
+
"[[Creativity]]",
|
|
18
|
+
]).describe('First level area');
|
|
19
|
+
|
|
20
|
+
export const Area = z.enum([
|
|
21
|
+
...FirstLevelArea.options,
|
|
22
|
+
]).describe('Area');
|
|
23
|
+
|
|
24
|
+
export const Areas = z.array(Area).describe('Areas');
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
export const MetaArticleSchema = z.object({
|
|
5
|
+
type: z.literal("[[Sources]]"),
|
|
6
|
+
format: z.literal("[[Articles]]"),
|
|
7
|
+
areas: z.array(z.literal("[[Knowledge]]")),
|
|
8
|
+
color: z.literal("#3171B2"),
|
|
9
|
+
icon: z.literal("newspaper"),
|
|
10
|
+
banner: z.string().optional(),
|
|
11
|
+
url: z.string().describe('URL of the article'),
|
|
12
|
+
}).describe('Article: Metadata of Note');
|
|
13
|
+
|
|
14
|
+
export const CatalogArticleSchema = z.object({
|
|
15
|
+
title: z.string().describe('Title of the article'),
|
|
16
|
+
description: z.string().optional().describe('Description'),
|
|
17
|
+
excerpt: z.string().optional().describe('Extract of the article'),
|
|
18
|
+
author: z.array(z.string()).describe('Authors'),
|
|
19
|
+
published: z.string().optional().describe('Year of publication'),
|
|
20
|
+
}).describe('Article: Data obtained from catalogation');
|
|
21
|
+
|
|
22
|
+
export const DetailedArticleSchema = z.object({
|
|
23
|
+
status: z.enum(["Pending", "In Progress", "Read", "Consolidated"]).describe('Reading status'),
|
|
24
|
+
projects: z.array(z.string()).describe('Projects'),
|
|
25
|
+
topics: z.array(z.string()).describe('Topics'),
|
|
26
|
+
rating: z.number().describe('Rating of the article'),
|
|
27
|
+
}).describe('Article: Additional data');
|
|
28
|
+
|
|
29
|
+
export const ArticleSchema = CatalogArticleSchema.extend(DetailedArticleSchema.shape).extend(MetaArticleSchema.shape).describe('Article');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { ArticleSchema, CatalogArticleSchema, DetailedArticleSchema, MetaArticleSchema } from ".";
|
|
5
|
+
|
|
6
|
+
export type Article = z.infer<typeof ArticleSchema>;
|
|
7
|
+
export type CatalogArticle = z.infer<typeof CatalogArticleSchema>;
|
|
8
|
+
export type DetailedArticle = z.infer<typeof DetailedArticleSchema>;
|
|
9
|
+
export type MetaArticle = z.infer<typeof MetaArticleSchema>;
|
package/en/Book/index.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
export const MetaBookSchema= z.object({
|
|
5
|
+
type: z.literal("[[Sources]]"),
|
|
6
|
+
format: z.literal("[[Books]]"),
|
|
7
|
+
areas: z.array(z.literal("[[Knowledge]]")),
|
|
8
|
+
color: z.literal("#3171B2"),
|
|
9
|
+
icon: z.literal("book"),
|
|
10
|
+
cover: z.string().optional(),
|
|
11
|
+
url: z.string().describe('URL of the book in Amazon or similar'),
|
|
12
|
+
read_url: z.string().describe('URL of the reading of the book'),
|
|
13
|
+
}).describe('Book: Metadata of Note');
|
|
14
|
+
|
|
15
|
+
export const CatalogBookSchema = z.object({
|
|
16
|
+
title: z.string().describe('Title of the book'),
|
|
17
|
+
subtitle: z.string().optional().describe('Subtitle of the book'),
|
|
18
|
+
description: z.string().optional().describe('Description of the book'),
|
|
19
|
+
author: z.array(z.string()).describe('Authors'),
|
|
20
|
+
published: z.string().describe('Year of publication'),
|
|
21
|
+
categories: z.array(z.string()).describe('Categories'),
|
|
22
|
+
}).describe('Book: Data obtained from catalogation');
|
|
23
|
+
|
|
24
|
+
export const DetailedBookSchema = z.object({
|
|
25
|
+
status: z.enum(["Pending", "In Progress", "Read", "Consolidated"]).describe('Reading status'),
|
|
26
|
+
topics: z.array(z.string()).describe('Topics'),
|
|
27
|
+
rating: z.number().describe('Rating of the book'),
|
|
28
|
+
online_rating: z.number().describe('Online rating'),
|
|
29
|
+
last_time_read: z.string().describe('Last time read'),
|
|
30
|
+
times_read: z.number().describe('Times read'),
|
|
31
|
+
}).describe('Book: Additional data');
|
|
32
|
+
|
|
33
|
+
export const BookSchema = CatalogBookSchema.extend(DetailedBookSchema.shape).extend(MetaBookSchema.shape).describe('Book');
|
package/en/Book/types.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { BookSchema, CatalogBookSchema, DetailedBookSchema, MetaBookSchema } from ".";
|
|
5
|
+
|
|
6
|
+
export type Book = z.infer<typeof BookSchema>;
|
|
7
|
+
export type CatalogBook = z.infer<typeof CatalogBookSchema>;
|
|
8
|
+
export type DetailedBook = z.infer<typeof DetailedBookSchema>;
|
|
9
|
+
export type MetaBook = z.infer<typeof MetaBookSchema>;
|
package/en/Clothing/index.ts
CHANGED
|
@@ -15,6 +15,15 @@ import { Status } from "./Status";
|
|
|
15
15
|
import { UseCases } from "./UseCases";
|
|
16
16
|
import { Variants } from "./Variants";
|
|
17
17
|
|
|
18
|
+
export const MetaClothingSchema = z.object({
|
|
19
|
+
type: z.literal("[[Resources]]"),
|
|
20
|
+
subtype: z.literal("[[Clothes]]"),
|
|
21
|
+
areas: z.array(z.literal("[[Home]]")),
|
|
22
|
+
color: z.literal("#CB6120"),
|
|
23
|
+
icon: z.literal("shirt"),
|
|
24
|
+
cover: z.string().optional(),
|
|
25
|
+
}).describe('Clothing item: Note metadata');
|
|
26
|
+
|
|
18
27
|
export const CatalogClothingSchema = z.object({
|
|
19
28
|
name: z.string().describe('Descriptive name of the clothing item'),
|
|
20
29
|
garment: Garment,
|
|
@@ -39,13 +48,4 @@ export const DetailedClothingSchema = z.object({
|
|
|
39
48
|
measurements: Measurements,
|
|
40
49
|
}).describe('Clothing item: Additional hard-to-obtain data');
|
|
41
50
|
|
|
42
|
-
export const MetaClothingSchema = z.object({
|
|
43
|
-
type: z.literal("[[Resources]]"),
|
|
44
|
-
subtype: z.literal("[[Clothes]]"),
|
|
45
|
-
areas: z.array(z.literal("[[Home]]")),
|
|
46
|
-
color: z.literal("#CB6120"),
|
|
47
|
-
icon: z.literal("shirt"),
|
|
48
|
-
cover: z.string().optional(),
|
|
49
|
-
}).describe('Clothing item: Note metadata');
|
|
50
|
-
|
|
51
51
|
export const ClothingSchema = CatalogClothingSchema.extend(DetailedClothingSchema.shape).extend(MetaClothingSchema.shape).describe('Clothing item');
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
export const MetaMovieSchema = z.object({
|
|
5
|
+
type: z.literal("[[Sources]]"),
|
|
6
|
+
format: z.literal("[[Movies]]"),
|
|
7
|
+
areas: z.array(z.literal("[[Creativity]]")),
|
|
8
|
+
color: z.literal("#BE9207"),
|
|
9
|
+
icon: z.literal("movie"),
|
|
10
|
+
cover: z.string().optional(),
|
|
11
|
+
url: z.string().describe('URL of the movie in IMDB or similar'),
|
|
12
|
+
watch_url: z.string().describe('URL of the movie in streaming'),
|
|
13
|
+
}).describe('Movie: Metadata of Note');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export const CatalogMovieSchema = z.object({
|
|
17
|
+
title: z.string().describe('Title of the movie'),
|
|
18
|
+
description: z.string().describe('Description of the movie'),
|
|
19
|
+
author: z.array(z.string()).describe('Authors. Writers, directors, producers, etc.'),
|
|
20
|
+
actors: z.array(z.string()).describe('Actors'),
|
|
21
|
+
published: z.string().describe('Year of publication'),
|
|
22
|
+
genres: z.array(z.string()).describe('Genres'),
|
|
23
|
+
}).describe('Movie: Data obtained from catalogation');
|
|
24
|
+
|
|
25
|
+
export const DetailedMovieSchema = z.object({
|
|
26
|
+
status: z.enum(["Pending", "In Progress", "Completed"]).describe('Watching status'),
|
|
27
|
+
topics: z.array(z.string()).describe('Topics'),
|
|
28
|
+
rating: z.number().describe('Rating of the movie'),
|
|
29
|
+
online_rating: z.number().describe('Online rating'),
|
|
30
|
+
last_time_watched: z.string().describe('Last time watched'),
|
|
31
|
+
times_watched: z.number().describe('Times watched'),
|
|
32
|
+
}).describe('Movie: Additional data');
|
|
33
|
+
|
|
34
|
+
export const MovieSchema = CatalogMovieSchema.extend(DetailedMovieSchema.shape).extend(MetaMovieSchema.shape).describe('Movie');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { MovieSchema, CatalogMovieSchema, DetailedMovieSchema, MetaMovieSchema } from ".";
|
|
5
|
+
|
|
6
|
+
export type Movie = z.infer<typeof MovieSchema>;
|
|
7
|
+
export type CatalogMovie = z.infer<typeof CatalogMovieSchema>;
|
|
8
|
+
export type DetailedMovie = z.infer<typeof DetailedMovieSchema>;
|
|
9
|
+
export type MetaMovie = z.infer<typeof MetaMovieSchema>;
|
package/en/Note.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
import { ArticleSchema } from "./Article";
|
|
4
|
+
import { BookSchema } from "./Book";
|
|
5
|
+
import { ClothingSchema } from "./Clothing";
|
|
6
|
+
import { MovieSchema } from "./Movie";
|
|
7
|
+
|
|
8
|
+
export const NoteSchema = z.union([
|
|
9
|
+
ArticleSchema,
|
|
10
|
+
BookSchema,
|
|
11
|
+
ClothingSchema,
|
|
12
|
+
MovieSchema,
|
|
13
|
+
]).describe('Note: Union of all note types');
|
package/en/index.ts
CHANGED
package/en/types.ts
CHANGED
package/es/Areas.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const FirstLevelArea = z.enum([
|
|
4
|
+
"[[Alimentación]]",
|
|
5
|
+
"[[Salud]]",
|
|
6
|
+
"[[Conocimiento]]",
|
|
7
|
+
"[[Pensamiento Estructurado]]",
|
|
8
|
+
"[[Hogar]]",
|
|
9
|
+
"[[Productividad]]",
|
|
10
|
+
"[[Exploración]]",
|
|
11
|
+
"[[Vínculos]]",
|
|
12
|
+
"[[Ejercicio]]",
|
|
13
|
+
"[[Energía Vital]]",
|
|
14
|
+
"[[Trabajo]]",
|
|
15
|
+
"[[Finanzas]]",
|
|
16
|
+
"[[Salud Mental]]",
|
|
17
|
+
"[[Creatividad]]",
|
|
18
|
+
]).describe('Área de Primer Nivel');
|
|
19
|
+
|
|
20
|
+
export const Area = z.enum([
|
|
21
|
+
...FirstLevelArea.options,
|
|
22
|
+
]).describe('Área');
|
|
23
|
+
|
|
24
|
+
export const Areas = z.array(Area).describe('Áreas');
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
export const MetaArticleSchema = z.object({
|
|
5
|
+
type: z.literal("[[Fuentes]]"),
|
|
6
|
+
format: z.literal("[[Artículos]]"),
|
|
7
|
+
areas: z.array(z.literal("[[Conocimiento]]")),
|
|
8
|
+
color: z.literal("#3171B2"),
|
|
9
|
+
icon: z.literal("newspaper"),
|
|
10
|
+
banner: z.string().optional(),
|
|
11
|
+
url: z.string().describe('URL del artículo'),
|
|
12
|
+
}).describe('Artículo: Metadatos de Nota');
|
|
13
|
+
|
|
14
|
+
export const CatalogArticleSchema = z.object({
|
|
15
|
+
title: z.string().describe('Título del artículo'),
|
|
16
|
+
description: z.string().optional().describe('Descripción'),
|
|
17
|
+
excerpt: z.string().optional().describe('Extracto del artículo'),
|
|
18
|
+
author: z.array(z.string()).describe('Autores'),
|
|
19
|
+
published: z.string().optional().describe('Año de publicación'),
|
|
20
|
+
}).describe('Artículo: Datos obtenibles de catalogación');
|
|
21
|
+
|
|
22
|
+
export const DetailedArticleSchema = z.object({
|
|
23
|
+
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'),
|
|
27
|
+
}).describe('Artículo: Datos adicionales');
|
|
28
|
+
|
|
29
|
+
export const ArticleSchema = CatalogArticleSchema.extend(DetailedArticleSchema.shape).extend(MetaArticleSchema.shape).describe('Artículo');
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { ArticleSchema, CatalogArticleSchema, DetailedArticleSchema, MetaArticleSchema } from ".";
|
|
5
|
+
|
|
6
|
+
export type Article = z.infer<typeof ArticleSchema>;
|
|
7
|
+
export type CatalogArticle = z.infer<typeof CatalogArticleSchema>;
|
|
8
|
+
export type DetailedArticle = z.infer<typeof DetailedArticleSchema>;
|
|
9
|
+
export type MetaArticle = z.infer<typeof MetaArticleSchema>;
|