@nicefer/types 1.0.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 (2) hide show
  1. package/dist/index.d.ts +19 -0
  2. package/package.json +22 -0
@@ -0,0 +1,19 @@
1
+ /** ID único para un usuario */
2
+ export type UserId = string & {
3
+ __brand: 'UserId';
4
+ };
5
+ /** Roles posibles en el sistema */
6
+ export type Role = 'admin' | 'user';
7
+ /** Datos básicos de un usuario */
8
+ export interface User {
9
+ id: UserId;
10
+ email: string;
11
+ roles: Role[];
12
+ }
13
+ /** Datos de un producto en catálogo */
14
+ export interface Product {
15
+ id: string;
16
+ name: string;
17
+ price: number;
18
+ inStock: boolean;
19
+ }
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@nicefer/types",
3
+ "version": "1.0.0",
4
+ "description": "Tipos compartidos para Nicefer",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": ["dist"],
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "keywords": [],
13
+ "author": "Alejandro Villatoro",
14
+ "license": "ISC",
15
+ "type": "commonjs",
16
+ "devDependencies": {
17
+ "typescript": "^5.9.2"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ }
22
+ }