@segha/catalog 0.0.1
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 +10 -0
- package/README.md +133 -0
- package/es/Clothing/Cares.ts +27 -0
- package/es/Clothing/Colors.ts +40 -0
- package/es/Clothing/Fit.ts +8 -0
- package/es/Clothing/Formality.ts +9 -0
- package/es/Clothing/Garment.ts +61 -0
- package/es/Clothing/index.ts +50 -0
- package/es/Clothing/layer.ts +8 -0
- package/es/Clothing/materials.ts +35 -0
- package/es/Clothing/measurements.ts +5 -0
- package/es/Clothing/season.ts +8 -0
- package/es/Clothing/size.ts +47 -0
- package/es/Clothing/slot.ts +10 -0
- package/es/Clothing/status.ts +9 -0
- package/es/Clothing/types.ts +9 -0
- package/es/Clothing/use_cases.ts +16 -0
- package/es/Clothing/variants.ts +50 -0
- package/es/index.ts +1 -0
- package/es/types.ts +2 -0
- package/index.ts +4 -0
- package/package.json +48 -0
package/CHANGELOG.md
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# @segha/catalog
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@segha/catalog) [](https://www.npmjs.com/package/@segha/catalog) [](https://github.com/aitorllj93/segha) [](https://www.typescriptlang.org/) [](https://zod.dev/)
|
|
4
|
+
|
|
5
|
+
Schemas for Petroglyph Catalog
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- `zod`
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm add @segha/catalog
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { CatalogClothingSchema, ClothingSchema, DetailedClothingSchema, ... } from '@segha/catalog';
|
|
22
|
+
|
|
23
|
+
// Validate data
|
|
24
|
+
const result = ClothingSchema.parse(data);
|
|
25
|
+
|
|
26
|
+
// Infer TypeScript types
|
|
27
|
+
type Clothing = z.infer<typeof ClothingSchema>;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You can also import specific submodules:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { CatalogClothingSchema, DetailedClothingSchema, MetaClothingSchema } from '@segha/catalog/es/clothing';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Schemas
|
|
37
|
+
|
|
38
|
+
- [CatalogClothing](#catalogclothing)
|
|
39
|
+
- [Clothing](#clothing)
|
|
40
|
+
- [DetailedClothing](#detailedclothing)
|
|
41
|
+
- [MetaClothing](#metaclothing)
|
|
42
|
+
|
|
43
|
+
## API Reference
|
|
44
|
+
|
|
45
|
+
## CatalogClothing
|
|
46
|
+
|
|
47
|
+
Prenda de ropa: Datos obtenibles de catalogación
|
|
48
|
+
|
|
49
|
+
_Object containing the following properties:_
|
|
50
|
+
|
|
51
|
+
| Property | Description | Type |
|
|
52
|
+
| :----------------------- | :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| **`garment`** (\*) | Tipo de Prenda | `'Camisetas' \| 'Polos' \| 'Camisas' \| 'Blusas' \| 'Tops' \| 'Jerseys' \| 'Sudaderas' \| 'Cárdigans' \| 'Chaquetas' \| 'Pantalones' \| 'Vaqueros' \| 'Chinos' \| 'Faldas' \| 'Shorts' \| 'Abrigos' \| 'Gabardinas' \| 'Parkas' \| 'Cazadoras' \| 'Chalecos' \| 'Vestidos' \| ...` |
|
|
54
|
+
| **`slot`** (\*) | Parte del outfit | `'Superior' \| 'Inferior' \| 'Cuerpo Completo' \| 'Exterior' \| 'Calzado' \| 'Accesorios'` |
|
|
55
|
+
| `variants` | Detalles Estructurales | `Array<'Sin Mangas' \| 'Mangas Cortas' \| 'Mangas Largas' \| 'Cuello Redondo' \| 'Cuello Pico' \| 'Cuello Alto' \| 'Cuello Camisa' \| 'Overshirt' \| 'Cropped' \| 'Larga' \| 'Pierna Recta' \| 'Pitillo' \| 'Ancha' \| 'Cargo' \| 'Trench' \| 'Plumífero' \| 'Doble botonadura'>` |
|
|
56
|
+
| `fit` | Ajuste | `'Entallado' \| 'Regular' \| 'Relajado' \| 'Oversize'` |
|
|
57
|
+
| **`primary_color`** (\*) | Color principal | `'Blanco' \| 'Negro' \| 'Gris' \| 'Beige' \| 'Marrón' \| 'Azul' \| 'Verde' \| 'Rojo' \| 'Burdeos' \| 'Rosa' \| 'Amarillo' \| 'Naranja' \| 'Morado' \| 'Camel' \| 'Caqui' \| 'Marino' \| 'Crema'` |
|
|
58
|
+
| `secondary_color` | Color secundario | `'Blanco' \| 'Negro' \| 'Gris' \| 'Beige' \| 'Marrón' \| 'Azul' \| 'Verde' \| 'Rojo' \| 'Burdeos' \| 'Rosa' \| 'Amarillo' \| 'Naranja' \| 'Morado' \| 'Camel' \| 'Caqui' \| 'Marino' \| 'Crema'` |
|
|
59
|
+
| `pattern` | Estampado | `'Liso' \| 'Rayas' \| 'Cuadros'` |
|
|
60
|
+
| `materials` | Materiales | `Array<'Algodón' \| 'Lino' \| 'Lana' \| 'Seda' \| 'Cuero' \| 'Poliéster' \| 'Nylon' \| 'Elastano' \| 'Viscosa' \| 'Denim' \| 'Punto' \| 'Felpa'>` |
|
|
61
|
+
| **`layer`** (\*) | Capa Térmica | `'Base' \| 'Intermedia' \| 'Exterior'` |
|
|
62
|
+
| `season` | Estaciones | `'Invierno' \| 'Verano' \| 'Entretiempo' \| 'Todo el año'` |
|
|
63
|
+
| `use_case` | Casos de uso | `Array<'Capsula' \| 'Favorita' \| 'Básico' \| 'Deporte' \| 'Trabajo' \| 'Evento' \| 'Viaje' \| 'Casa'>` |
|
|
64
|
+
| `formality` | Formalidad | `'Muy Informal' \| 'Casual' \| 'Arreglado' \| 'Formal' \| 'Etiqueta'` |
|
|
65
|
+
| `brand` | The brand of the clothing | `string` |
|
|
66
|
+
|
|
67
|
+
_(\*) Required._
|
|
68
|
+
|
|
69
|
+
## Clothing
|
|
70
|
+
|
|
71
|
+
Prenda de ropa
|
|
72
|
+
|
|
73
|
+
_Object containing the following properties:_
|
|
74
|
+
|
|
75
|
+
| Property | Description | Type | Default |
|
|
76
|
+
| :----------------------- | :------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
|
|
77
|
+
| **`garment`** (\*) | Tipo de Prenda | `'Camisetas' \| 'Polos' \| 'Camisas' \| 'Blusas' \| 'Tops' \| 'Jerseys' \| 'Sudaderas' \| 'Cárdigans' \| 'Chaquetas' \| 'Pantalones' \| 'Vaqueros' \| 'Chinos' \| 'Faldas' \| 'Shorts' \| 'Abrigos' \| 'Gabardinas' \| 'Parkas' \| 'Cazadoras' \| 'Chalecos' \| 'Vestidos' \| ...` | |
|
|
78
|
+
| **`slot`** (\*) | Parte del outfit | `'Superior' \| 'Inferior' \| 'Cuerpo Completo' \| 'Exterior' \| 'Calzado' \| 'Accesorios'` | |
|
|
79
|
+
| `variants` | Detalles Estructurales | `Array<'Sin Mangas' \| 'Mangas Cortas' \| 'Mangas Largas' \| 'Cuello Redondo' \| 'Cuello Pico' \| 'Cuello Alto' \| 'Cuello Camisa' \| 'Overshirt' \| 'Cropped' \| 'Larga' \| 'Pierna Recta' \| 'Pitillo' \| 'Ancha' \| 'Cargo' \| 'Trench' \| 'Plumífero' \| 'Doble botonadura'>` | |
|
|
80
|
+
| `fit` | Ajuste | `'Entallado' \| 'Regular' \| 'Relajado' \| 'Oversize'` | |
|
|
81
|
+
| **`primary_color`** (\*) | Color principal | `'Blanco' \| 'Negro' \| 'Gris' \| 'Beige' \| 'Marrón' \| 'Azul' \| 'Verde' \| 'Rojo' \| 'Burdeos' \| 'Rosa' \| 'Amarillo' \| 'Naranja' \| 'Morado' \| 'Camel' \| 'Caqui' \| 'Marino' \| 'Crema'` | |
|
|
82
|
+
| `secondary_color` | Color secundario | `'Blanco' \| 'Negro' \| 'Gris' \| 'Beige' \| 'Marrón' \| 'Azul' \| 'Verde' \| 'Rojo' \| 'Burdeos' \| 'Rosa' \| 'Amarillo' \| 'Naranja' \| 'Morado' \| 'Camel' \| 'Caqui' \| 'Marino' \| 'Crema'` | |
|
|
83
|
+
| `pattern` | Estampado | `'Liso' \| 'Rayas' \| 'Cuadros'` | |
|
|
84
|
+
| `materials` | Materiales | `Array<'Algodón' \| 'Lino' \| 'Lana' \| 'Seda' \| 'Cuero' \| 'Poliéster' \| 'Nylon' \| 'Elastano' \| 'Viscosa' \| 'Denim' \| 'Punto' \| 'Felpa'>` | |
|
|
85
|
+
| **`layer`** (\*) | Capa Térmica | `'Base' \| 'Intermedia' \| 'Exterior'` | |
|
|
86
|
+
| `season` | Estaciones | `'Invierno' \| 'Verano' \| 'Entretiempo' \| 'Todo el año'` | |
|
|
87
|
+
| `use_case` | Casos de uso | `Array<'Capsula' \| 'Favorita' \| 'Básico' \| 'Deporte' \| 'Trabajo' \| 'Evento' \| 'Viaje' \| 'Casa'>` | |
|
|
88
|
+
| `formality` | Formalidad | `'Muy Informal' \| 'Casual' \| 'Arreglado' \| 'Formal' \| 'Etiqueta'` | |
|
|
89
|
+
| `brand` | The brand of the clothing | `string` | |
|
|
90
|
+
| `cares` | Cuidados | `Array<'Lavado a mano' \| 'Lavado a máquina' \| 'Lavado en seco' \| 'Frio' \| 'Caliente' \| 'Planchado' \| 'Planchado a vapor'>` | |
|
|
91
|
+
| `status` | Estado | `'Nuevo' \| 'Bien' \| 'Gastado' \| 'Dañado' \| 'Retirar'` | `'Bien'` |
|
|
92
|
+
| **`size`** (\*) | | `'28' \| '30' \| '32' \| '34' \| '36' \| '37' \| '38' \| '39' \| '40' \| '41' \| '42' \| '43' \| '44' \| '45' \| '46' \| '48' \| 'XS' \| 'S' \| 'M' \| 'L' \| ...` | |
|
|
93
|
+
| `measurements` | Medidas | `Array<number>` | |
|
|
94
|
+
| **`type`** (\*) | | `'[[Recursos]]'` | |
|
|
95
|
+
| **`subtype`** (\*) | | `'[[Prendas]]'` | |
|
|
96
|
+
| **`areas`** (\*) | | `Array<'[[Hogar]]'>` | |
|
|
97
|
+
| **`color`** (\*) | | `'#CB6120'` | |
|
|
98
|
+
| **`icon`** (\*) | | `'shirt'` | |
|
|
99
|
+
| `cover` | | `string` | |
|
|
100
|
+
|
|
101
|
+
_(\*) Required._
|
|
102
|
+
|
|
103
|
+
## DetailedClothing
|
|
104
|
+
|
|
105
|
+
Prenda de ropa: Datos adicionales de dificil obtención
|
|
106
|
+
|
|
107
|
+
_Object containing the following properties:_
|
|
108
|
+
|
|
109
|
+
| Property | Description | Type | Default |
|
|
110
|
+
| :-------------- | :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
|
|
111
|
+
| `cares` | Cuidados | `Array<'Lavado a mano' \| 'Lavado a máquina' \| 'Lavado en seco' \| 'Frio' \| 'Caliente' \| 'Planchado' \| 'Planchado a vapor'>` | |
|
|
112
|
+
| `status` | Estado | `'Nuevo' \| 'Bien' \| 'Gastado' \| 'Dañado' \| 'Retirar'` | `'Bien'` |
|
|
113
|
+
| **`size`** (\*) | | `'28' \| '30' \| '32' \| '34' \| '36' \| '37' \| '38' \| '39' \| '40' \| '41' \| '42' \| '43' \| '44' \| '45' \| '46' \| '48' \| 'XS' \| 'S' \| 'M' \| 'L' \| ...` | |
|
|
114
|
+
| `measurements` | Medidas | `Array<number>` | |
|
|
115
|
+
|
|
116
|
+
_(\*) Required._
|
|
117
|
+
|
|
118
|
+
## MetaClothing
|
|
119
|
+
|
|
120
|
+
Prenda de ropa: Metadatos de Nota
|
|
121
|
+
|
|
122
|
+
_Object containing the following properties:_
|
|
123
|
+
|
|
124
|
+
| Property | Type |
|
|
125
|
+
| :----------------- | :------------------- |
|
|
126
|
+
| **`type`** (\*) | `'[[Recursos]]'` |
|
|
127
|
+
| **`subtype`** (\*) | `'[[Prendas]]'` |
|
|
128
|
+
| **`areas`** (\*) | `Array<'[[Hogar]]'>` |
|
|
129
|
+
| **`color`** (\*) | `'#CB6120'` |
|
|
130
|
+
| **`icon`** (\*) | `'shirt'` |
|
|
131
|
+
| `cover` | `string` |
|
|
132
|
+
|
|
133
|
+
_(\*) Required._
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const WashType = z.enum([
|
|
4
|
+
'Lavado a mano',
|
|
5
|
+
'Lavado a máquina',
|
|
6
|
+
'Lavado en seco',
|
|
7
|
+
]);
|
|
8
|
+
|
|
9
|
+
export const Temperature = z.enum([
|
|
10
|
+
'Frio',
|
|
11
|
+
'Caliente',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export const Ironing = z.enum([
|
|
15
|
+
'Planchado',
|
|
16
|
+
'Planchado a vapor',
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export const Care = z.enum([
|
|
20
|
+
...WashType.options,
|
|
21
|
+
...Temperature.options,
|
|
22
|
+
...Ironing.options,
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export const Cares = z.array(Care)
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('Cuidados');
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import z from "zod"
|
|
2
|
+
|
|
3
|
+
// Colores Base
|
|
4
|
+
export const BaseColor = z.enum([
|
|
5
|
+
'Blanco',
|
|
6
|
+
'Negro',
|
|
7
|
+
'Gris',
|
|
8
|
+
'Beige',
|
|
9
|
+
'Marrón',
|
|
10
|
+
'Azul',
|
|
11
|
+
'Verde',
|
|
12
|
+
'Rojo',
|
|
13
|
+
'Burdeos',
|
|
14
|
+
'Rosa',
|
|
15
|
+
'Amarillo',
|
|
16
|
+
'Naranja',
|
|
17
|
+
'Morado',
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
// Tonos especiales
|
|
21
|
+
export const SpecialColor = z.enum([
|
|
22
|
+
'Camel',
|
|
23
|
+
'Caqui',
|
|
24
|
+
'Marino',
|
|
25
|
+
'Crema'
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
export const Color = z.enum([
|
|
29
|
+
...BaseColor.options,
|
|
30
|
+
...SpecialColor.options,
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
export const PrimaryColor = Color.describe('Color principal');
|
|
34
|
+
export const SecondaryColor = Color.optional().describe('Color secundario');
|
|
35
|
+
|
|
36
|
+
export const Pattern = z.enum([
|
|
37
|
+
'Liso',
|
|
38
|
+
'Rayas',
|
|
39
|
+
'Cuadros',
|
|
40
|
+
]).optional().describe('Estampado');
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
// Superiores
|
|
4
|
+
export const Top = z.enum([
|
|
5
|
+
'Camisetas',
|
|
6
|
+
'Polos',
|
|
7
|
+
'Camisas',
|
|
8
|
+
'Blusas',
|
|
9
|
+
'Tops',
|
|
10
|
+
'Jerseys',
|
|
11
|
+
'Sudaderas',
|
|
12
|
+
'Cárdigans',
|
|
13
|
+
'Chaquetas',
|
|
14
|
+
]);
|
|
15
|
+
|
|
16
|
+
export const Bottom = z.enum([
|
|
17
|
+
'Pantalones',
|
|
18
|
+
'Vaqueros',
|
|
19
|
+
'Chinos',
|
|
20
|
+
'Faldas',
|
|
21
|
+
'Shorts',
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
export const Outerwear = z.enum([
|
|
25
|
+
'Abrigos',
|
|
26
|
+
'Gabardinas',
|
|
27
|
+
'Parkas',
|
|
28
|
+
'Cazadoras',
|
|
29
|
+
'Chalecos',
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
export const Dress = z.enum([
|
|
33
|
+
'Vestidos',
|
|
34
|
+
'Monos',
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
export const Shoes = z.enum([
|
|
38
|
+
'Zapatillas',
|
|
39
|
+
'Zapatos',
|
|
40
|
+
'Botas',
|
|
41
|
+
'Sandalias',
|
|
42
|
+
]);
|
|
43
|
+
|
|
44
|
+
export const Accessories = z.enum([
|
|
45
|
+
'Cinturones',
|
|
46
|
+
'Gorras',
|
|
47
|
+
'Sombreros',
|
|
48
|
+
'Bufandas',
|
|
49
|
+
'Guantes',
|
|
50
|
+
'Bolsos',
|
|
51
|
+
'Mochilas'
|
|
52
|
+
])
|
|
53
|
+
|
|
54
|
+
export const Garment = z.enum([
|
|
55
|
+
...Top.options,
|
|
56
|
+
...Bottom.options,
|
|
57
|
+
...Outerwear.options,
|
|
58
|
+
...Dress.options,
|
|
59
|
+
...Shoes.options,
|
|
60
|
+
...Accessories.options,
|
|
61
|
+
]).describe('Tipo de Prenda');
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
import { Cares } from "./Cares";
|
|
4
|
+
import { Pattern, PrimaryColor, SecondaryColor } from "./Colors";
|
|
5
|
+
import { Fit } from "./Fit";
|
|
6
|
+
import { Formality } from "./Formality";
|
|
7
|
+
import { Garment } from "./Garment";
|
|
8
|
+
import { Layer } from "./layer";
|
|
9
|
+
import { Materials } from "./materials";
|
|
10
|
+
import { Season } from "./season";
|
|
11
|
+
import { Size } from "./size";
|
|
12
|
+
import { Slot } from "./slot";
|
|
13
|
+
import { Status } from "./status";
|
|
14
|
+
import { UseCases } from "./use_cases";
|
|
15
|
+
import { Variants } from "./variants";
|
|
16
|
+
import { Measurements } from "./measurements";
|
|
17
|
+
|
|
18
|
+
export const CatalogClothingSchema = z.object({
|
|
19
|
+
garment: Garment,
|
|
20
|
+
slot: Slot,
|
|
21
|
+
variants: Variants,
|
|
22
|
+
fit: Fit,
|
|
23
|
+
primary_color: PrimaryColor,
|
|
24
|
+
secondary_color: SecondaryColor,
|
|
25
|
+
pattern: Pattern,
|
|
26
|
+
materials: Materials,
|
|
27
|
+
layer: Layer,
|
|
28
|
+
season: Season,
|
|
29
|
+
use_case: UseCases,
|
|
30
|
+
formality: Formality,
|
|
31
|
+
brand: z.string().optional().describe('The brand of the clothing'),
|
|
32
|
+
}).describe('Prenda de ropa: Datos obtenibles de catalogación');
|
|
33
|
+
|
|
34
|
+
export const DetailedClothingSchema = z.object({
|
|
35
|
+
cares: Cares,
|
|
36
|
+
status: Status,
|
|
37
|
+
size: Size,
|
|
38
|
+
measurements: Measurements,
|
|
39
|
+
}).describe('Prenda de ropa: Datos adicionales de dificil obtención');
|
|
40
|
+
|
|
41
|
+
export const MetaClothingSchema = z.object({
|
|
42
|
+
type: z.literal("[[Recursos]]"),
|
|
43
|
+
subtype: z.literal("[[Prendas]]"),
|
|
44
|
+
areas: z.array(z.literal("[[Hogar]]")),
|
|
45
|
+
color: z.literal("#CB6120"),
|
|
46
|
+
icon: z.literal("shirt"),
|
|
47
|
+
cover: z.string().optional(),
|
|
48
|
+
}).describe('Prenda de ropa: Metadatos de Nota');
|
|
49
|
+
|
|
50
|
+
export const ClothingSchema = CatalogClothingSchema.extend(DetailedClothingSchema.shape).extend(MetaClothingSchema.shape).describe('Prenda de ropa');
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import z from "zod"
|
|
2
|
+
|
|
3
|
+
// Naturales
|
|
4
|
+
export const NaturalMaterial = z.enum([
|
|
5
|
+
'Algodón',
|
|
6
|
+
'Lino',
|
|
7
|
+
'Lana',
|
|
8
|
+
'Seda',
|
|
9
|
+
'Cuero',
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
// Sintéticos
|
|
13
|
+
export const SyntheticMaterial = z.enum([
|
|
14
|
+
'Poliéster',
|
|
15
|
+
'Nylon',
|
|
16
|
+
'Elastano',
|
|
17
|
+
'Viscosa',
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
// Tejidos Comunes
|
|
21
|
+
export const CommonFabric = z.enum([
|
|
22
|
+
'Denim',
|
|
23
|
+
'Punto',
|
|
24
|
+
'Felpa',
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
export const Material = z.enum([
|
|
28
|
+
...NaturalMaterial.options,
|
|
29
|
+
...SyntheticMaterial.options,
|
|
30
|
+
...CommonFabric.options,
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
export const Materials = z.array(Material)
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('Materiales');
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
// Superiores
|
|
4
|
+
export const TopsSize = z.enum([
|
|
5
|
+
'XS',
|
|
6
|
+
'S',
|
|
7
|
+
'M',
|
|
8
|
+
'L',
|
|
9
|
+
'XL',
|
|
10
|
+
'XXL',
|
|
11
|
+
'XXXL',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
// Pantalones
|
|
15
|
+
export const PantsSize = z.enum([
|
|
16
|
+
'28',
|
|
17
|
+
'30',
|
|
18
|
+
'32',
|
|
19
|
+
'34',
|
|
20
|
+
'36',
|
|
21
|
+
'38',
|
|
22
|
+
'40',
|
|
23
|
+
'42',
|
|
24
|
+
'44',
|
|
25
|
+
'46',
|
|
26
|
+
'48',
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
// Calzado
|
|
30
|
+
export const ShoesSize = z.enum([
|
|
31
|
+
'36',
|
|
32
|
+
'37',
|
|
33
|
+
'38',
|
|
34
|
+
'39',
|
|
35
|
+
'40',
|
|
36
|
+
'41',
|
|
37
|
+
'42',
|
|
38
|
+
'43',
|
|
39
|
+
'44',
|
|
40
|
+
'45',
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
export const Size = z.enum([
|
|
44
|
+
...TopsSize.options,
|
|
45
|
+
...PantsSize.options,
|
|
46
|
+
...ShoesSize.options,
|
|
47
|
+
]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
import type { ClothingSchema, CatalogClothingSchema, DetailedClothingSchema, MetaClothingSchema } from ".";
|
|
5
|
+
|
|
6
|
+
export type Clothing = z.infer<typeof ClothingSchema>;
|
|
7
|
+
export type CatalogClothing = z.infer<typeof CatalogClothingSchema>;
|
|
8
|
+
export type DetailedClothing = z.infer<typeof DetailedClothingSchema>;
|
|
9
|
+
export type MetaClothing = z.infer<typeof MetaClothingSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const UseCase = z.enum([
|
|
4
|
+
'Capsula',
|
|
5
|
+
'Favorita',
|
|
6
|
+
'Básico',
|
|
7
|
+
'Deporte',
|
|
8
|
+
'Trabajo',
|
|
9
|
+
'Evento',
|
|
10
|
+
'Viaje',
|
|
11
|
+
'Casa',
|
|
12
|
+
])
|
|
13
|
+
|
|
14
|
+
export const UseCases = z.array(UseCase)
|
|
15
|
+
.optional()
|
|
16
|
+
.describe('Casos de uso');
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
// Mangas
|
|
4
|
+
export const Sleeves = z.enum([
|
|
5
|
+
'Sin Mangas',
|
|
6
|
+
'Mangas Cortas',
|
|
7
|
+
'Mangas Largas',
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
// Cuellos
|
|
11
|
+
export const Necks = z.enum([
|
|
12
|
+
'Cuello Redondo',
|
|
13
|
+
'Cuello Pico',
|
|
14
|
+
'Cuello Alto',
|
|
15
|
+
'Cuello Camisa'
|
|
16
|
+
]);
|
|
17
|
+
|
|
18
|
+
// Cortes especiales
|
|
19
|
+
export const SpecialCuts = z.enum([
|
|
20
|
+
'Overshirt',
|
|
21
|
+
'Cropped',
|
|
22
|
+
'Larga'
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
// Pantalones
|
|
26
|
+
export const Pants = z.enum([
|
|
27
|
+
'Pierna Recta',
|
|
28
|
+
'Pitillo',
|
|
29
|
+
'Ancha',
|
|
30
|
+
'Cargo'
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
// Abrigos
|
|
34
|
+
export const Outerwear = z.enum([
|
|
35
|
+
'Trench',
|
|
36
|
+
'Plumífero',
|
|
37
|
+
'Doble botonadura'
|
|
38
|
+
]);
|
|
39
|
+
|
|
40
|
+
export const Variant = z.enum([
|
|
41
|
+
...Sleeves.options,
|
|
42
|
+
...Necks.options,
|
|
43
|
+
...SpecialCuts.options,
|
|
44
|
+
...Pants.options,
|
|
45
|
+
...Outerwear.options,
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
export const Variants = z.array(Variant)
|
|
49
|
+
.optional()
|
|
50
|
+
.describe('Detalles Estructurales');
|
package/es/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Clothing';
|
package/es/types.ts
ADDED
package/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@segha/catalog",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "index.ts",
|
|
5
|
+
"description": "Schemas for Petroglyph Catalog",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"docs": "pnpx tsx ../../utils/generate-docs.ts --entry ./index.ts --cwd .",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"schemas",
|
|
12
|
+
"zod",
|
|
13
|
+
"obsidianmd"
|
|
14
|
+
],
|
|
15
|
+
"author": "Aitor Llamas Jiménez <aitorllj93@gmail.com>",
|
|
16
|
+
"homepage": "https://github.com/aitorllj93/segha",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/aitorllj93/segha.git",
|
|
20
|
+
"directory": "schemas/catalog"
|
|
21
|
+
},
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./index.ts",
|
|
26
|
+
"./es": "./es/index.ts",
|
|
27
|
+
"./es/clothing": "./es/Clothing/index.ts",
|
|
28
|
+
"./es/clothing/types": "./es/Clothing/types.ts",
|
|
29
|
+
"./types": "./types.ts"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"zod": "catalog:"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"zod": "catalog:",
|
|
36
|
+
"zod2md": "catalog:",
|
|
37
|
+
"tsx": "catalog:"
|
|
38
|
+
},
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"*.ts",
|
|
44
|
+
"es/**/*.ts",
|
|
45
|
+
"README.md",
|
|
46
|
+
"CHANGELOG.md"
|
|
47
|
+
]
|
|
48
|
+
}
|