valtech-components 4.0.246 → 4.0.248

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,47 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ValtechAuthConfig } from '../auth/types';
3
+ import type { FirestoreDocument } from '../firebase/types';
4
+ import * as i0 from "@angular/core";
5
+ export type WorkflowStatus = 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'TIMED_OUT' | 'ABORTED';
6
+ /** Respuesta al arrancar un workflow (ADR-045). */
7
+ export interface WorkflowStartResult {
8
+ operationId: string;
9
+ workflow: string;
10
+ executionName: string;
11
+ executionArn: string;
12
+ status: 'RUNNING';
13
+ }
14
+ /**
15
+ * Estado de una ejecución de workflow proyectado a Firestore por el admin Lambda
16
+ * (apps/{appId}/orgs/{orgId}/workflows/{executionName}). Lo observa watch().
17
+ */
18
+ export interface WorkflowExecution extends FirestoreDocument {
19
+ name: string;
20
+ workflow: string;
21
+ executionArn: string;
22
+ status: WorkflowStatus;
23
+ appId: string;
24
+ orgId: string;
25
+ startedAt?: string;
26
+ stoppedAt?: string;
27
+ }
28
+ /**
29
+ * WorkflowService (ADR-045) — arranca state machines de Step Functions registradas
30
+ * y observa su ejecución en tiempo real (Firestore). Reusable por cualquier app.
31
+ *
32
+ * - start(name, input): dispara `POST /workflows/{name}/start` (el JWT lo inyecta
33
+ * el authInterceptor; orgId/appId se resuelven en el backend desde el contexto).
34
+ * - watch(executionName): onSnapshot del doc de estado, hasta SUCCEEDED/FAILED.
35
+ */
36
+ export declare class WorkflowService {
37
+ private config;
38
+ private http;
39
+ private auth;
40
+ private collections;
41
+ constructor(config: ValtechAuthConfig | null);
42
+ private get appIdHeader();
43
+ start(name: string, input?: Record<string, unknown>): Observable<WorkflowStartResult>;
44
+ watch(executionName: string): Observable<WorkflowExecution | null>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowService, [{ optional: true; }]>;
46
+ static ɵprov: i0.ɵɵInjectableDeclaration<WorkflowService>;
47
+ }
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.246";
5
+ export declare const VERSION = "4.0.248";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.246",
3
+ "version": "4.0.248",
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
@@ -356,6 +356,7 @@ export * from './lib/services/download.service';
356
356
  export * from './lib/services/pdf/pdf.service';
357
357
  export * from './lib/services/pdf/types';
358
358
  export * from './lib/services/events/meta';
359
+ export * from './lib/services/workflows/workflow.service';
359
360
  export * from './lib/services/icons.service';
360
361
  export * from './lib/services/in-app-browser.service';
361
362
  export * from './lib/services/link-processor.service';