valtech-components 4.0.239 → 4.0.241

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.
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Contrato de metadatos de eventos de dominio (ADR-043) — espejo TS del
3
+ * registro Go `services/events/routes.go`. Mantener ambos en sync.
4
+ *
5
+ * El sobre `meta` viaja con una operación async para que el ruteo a flujos
6
+ * downstream (mailer, archiver...) se resuelva declarativamente en EventBridge.
7
+ */
8
+ export declare const META_SCHEMA_VERSION = 1;
9
+ /** Intención de ruteo: QUÉ hacer con la salida, no qué servicio lo hace. */
10
+ export type RouteIntent = 'email' | 'archive' | 'webhook';
11
+ /** Set de intents válidos. Sumar uno nuevo aquí y en el registro Go. */
12
+ export declare const KNOWN_ROUTES: readonly RouteIntent[];
13
+ export declare function isKnownRoute(r: string): r is RouteIntent;
14
+ /** Valida que todos los tags de `routes` estén registrados. Lanza si no. */
15
+ export declare function validateRoutes(routes: string[] | undefined): void;
16
+ /**
17
+ * Sobre opaco que el caller declara al encolar. El productor no lo interpreta:
18
+ * lo persiste y lo echa en el evento de completado. `params` chico e inline si
19
+ * no es sensible; grande/PII por puntero ({ ref: "directives/<id>" }).
20
+ */
21
+ export interface EventMeta {
22
+ schemaVersion?: number;
23
+ correlationId?: string;
24
+ origin?: string;
25
+ routes?: RouteIntent[];
26
+ params?: Record<string, unknown>;
27
+ }
@@ -1,6 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ValtechAuthConfig } from '../auth/types';
3
3
  import type { PdfGenerateRequest, PdfResult, PdfJob, PdfJobEnqueued } from './types';
4
+ import { EventMeta } from '../events/meta';
4
5
  import * as i0 from "@angular/core";
5
6
  /**
6
7
  * Servicio de PDF de plataforma (ADR-042). Reutilizable por cualquier app.
@@ -35,7 +36,7 @@ export declare class PdfService {
35
36
  * Lambda lo genera fuera de banda y, al completar, proyecta el estado a
36
37
  * Firestore. Usar watchJob(jobId) para observar el resultado en tiempo real.
37
38
  */
38
- createJob(req: PdfGenerateRequest): Observable<PdfJobEnqueued>;
39
+ createJob(req: PdfGenerateRequest, meta?: EventMeta): Observable<PdfJobEnqueued>;
39
40
  /**
40
41
  * Observa el estado de un job PDF async en tiempo real (onSnapshot del doc
41
42
  * `apps/{appId}/orgs/{orgId}/pdf-jobs/{jobId}`). Emite null si no hay org
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.239";
5
+ export declare const VERSION = "4.0.241";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.239",
3
+ "version": "4.0.241",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
package/public-api.d.ts CHANGED
@@ -354,6 +354,7 @@ export * from './lib/components/templates/auth-background/types';
354
354
  export * from './lib/services/download.service';
355
355
  export * from './lib/services/pdf/pdf.service';
356
356
  export * from './lib/services/pdf/types';
357
+ export * from './lib/services/events/meta';
357
358
  export * from './lib/services/icons.service';
358
359
  export * from './lib/services/in-app-browser.service';
359
360
  export * from './lib/services/link-processor.service';