valtech-components 2.0.436 → 2.0.438

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.
@@ -92,7 +92,7 @@ export declare class ArticleComponent implements OnInit {
92
92
  shape?: "round";
93
93
  size?: "small" | "large" | "default";
94
94
  fill?: "default" | "clear" | "outline" | "solid";
95
- type: "submit" | "reset" | "button";
95
+ type: "reset" | "submit" | "button";
96
96
  token?: string;
97
97
  ref?: any;
98
98
  handler?: (value: any) => any;
@@ -1,6 +1,6 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { SigninRequest, SigninResponse, MFAVerifyResponse, RefreshResponse, GetPermissionsResponse, MFASetupResponse, MFAConfirmResponse, MFADisableResponse, MFAMethod, AuthError } from './types';
3
+ import { SigninRequest, SigninResponse, SignupRequest, SignupResponse, VerifyEmailRequest, VerifyEmailResponse, ResendCodeRequest, ResendCodeResponse, MFAVerifyResponse, RefreshResponse, GetPermissionsResponse, MFASetupResponse, MFAConfirmResponse, MFADisableResponse, MFAMethod, AuthError } from './types';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * Servicio principal de autenticación.
@@ -65,6 +65,20 @@ export declare class AuthService implements OnDestroy {
65
65
  * Inicia sesión con email y contraseña.
66
66
  */
67
67
  signin(request: SigninRequest): Observable<SigninResponse>;
68
+ /**
69
+ * Registra un nuevo usuario.
70
+ * El usuario queda en estado PENDING hasta verificar su email.
71
+ */
72
+ signup(request: SignupRequest): Observable<SignupResponse>;
73
+ /**
74
+ * Verifica email con código de 6 dígitos.
75
+ * Si es exitoso, hace auto-login y retorna tokens.
76
+ */
77
+ verifyEmail(request: VerifyEmailRequest): Observable<VerifyEmailResponse>;
78
+ /**
79
+ * Reenvía código de verificación al email.
80
+ */
81
+ resendCode(request: ResendCodeRequest): Observable<ResendCodeResponse>;
68
82
  /**
69
83
  * Verifica código MFA.
70
84
  */
@@ -102,6 +102,57 @@ export interface MFAStatus {
102
102
  enabled: boolean;
103
103
  method: MFAMethod | null;
104
104
  }
105
+ /**
106
+ * Request para signup (registro).
107
+ */
108
+ export interface SignupRequest {
109
+ email: string;
110
+ password: string;
111
+ name: string;
112
+ phone?: string;
113
+ }
114
+ /**
115
+ * Response de signup (registro).
116
+ */
117
+ export interface SignupResponse {
118
+ operationId: string;
119
+ userId: string;
120
+ message: string;
121
+ }
122
+ /**
123
+ * Request para verificar email.
124
+ */
125
+ export interface VerifyEmailRequest {
126
+ email: string;
127
+ code: string;
128
+ }
129
+ /**
130
+ * Response de verificación de email.
131
+ * Si es exitoso, incluye tokens para auto-login.
132
+ */
133
+ export interface VerifyEmailResponse {
134
+ operationId: string;
135
+ verified: boolean;
136
+ accessToken?: string;
137
+ refreshToken?: string;
138
+ firebaseToken?: string;
139
+ expiresIn?: number;
140
+ tokenType?: string;
141
+ }
142
+ /**
143
+ * Request para reenviar código de verificación.
144
+ */
145
+ export interface ResendCodeRequest {
146
+ email: string;
147
+ type: 'EMAIL_VERIFY' | 'PASSWORD_RESET';
148
+ }
149
+ /**
150
+ * Response de reenvío de código.
151
+ */
152
+ export interface ResendCodeResponse {
153
+ operationId: string;
154
+ sent: boolean;
155
+ }
105
156
  /**
106
157
  * Request para signin.
107
158
  */
@@ -9,8 +9,9 @@ import { EmulatorConfig, FirebaseConfig, ValtechFirebaseConfig } from './types';
9
9
  * Identificadores de las apps del monorepo.
10
10
  * Usados para namespacing de colecciones Firestore y paths de Storage.
11
11
  */
12
- export type AppId = 'showcase' | 'admin-portal' | 'app';
12
+ export type AppId = 'demo' | 'showcase' | 'admin-portal' | 'app';
13
13
  export declare const APP_IDS: {
14
+ readonly DEMO: AppId;
14
15
  readonly SHOWCASE: AppId;
15
16
  readonly ADMIN_PORTAL: AppId;
16
17
  readonly APP: AppId;
@@ -54,21 +55,28 @@ export declare const storagePaths: {
54
55
  demo: (...paths: string[]) => string;
55
56
  };
56
57
  /**
57
- * Genera nombres de colecciones con namespace por app.
58
+ * Genera paths de colecciones con namespace por app.
59
+ *
60
+ * IMPORTANTE: La estructura es /apps/{appId}/{collection}/{docId}
61
+ * Firestore requiere número impar de segmentos para paths de colección.
58
62
  *
59
63
  * @example
60
64
  * // Colección específica de la app
61
65
  * collections.forApp('showcase', 'items')
62
- * // => 'showcase-items'
66
+ * // => 'apps/showcase/items'
67
+ *
68
+ * // Colección de desarrollo
69
+ * collections.forApp('demo', 'items')
70
+ * // => 'apps/demo/items'
63
71
  *
64
72
  * // Colección compartida
65
73
  * collections.shared.users
66
74
  * // => 'users'
67
75
  */
68
76
  export declare const collections: {
69
- /** Colección específica de la app: {appId}-{collection} */
77
+ /** Colección específica de la app: apps/{appId}/{collection} */
70
78
  forApp: (appId: AppId, collectionName: string) => string;
71
- /** Colecciones compartidas (sin namespace) */
79
+ /** Colecciones compartidas (sin namespace, nivel raíz) */
72
80
  shared: {
73
81
  /** Usuarios del sistema */
74
82
  users: string;
@@ -77,8 +85,6 @@ export declare const collections: {
77
85
  /** Notificaciones de usuarios */
78
86
  notifications: string;
79
87
  };
80
- /** Colecciones de desarrollo (acceso libre en emuladores) */
81
- demo: (collectionName: string) => string;
82
88
  };
83
89
  /**
84
90
  * Opciones para crear la configuración de Firebase
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.436",
3
+ "version": "2.0.438",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",