-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmappingRelease.ts
More file actions
109 lines (99 loc) · 2.79 KB
/
Copy pathmappingRelease.ts
File metadata and controls
109 lines (99 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import type { MappingAuthoringEngine, MappingDraftEvidence } from './mappingDraft';
export type MappingReleaseStatus =
| 'draft_compiled'
| 'test_passed'
| 'test_failed'
| 'in_review'
| 'approved'
| 'published'
| 'deprecated'
| 'archived';
export type MappingAsyncJobStatus = 'queued' | 'running' | 'completed' | 'failed';
export type MappingGovernanceEnvironment = 'development' | 'validation' | 'production';
export interface MappingReleaseArtifact {
kind: string;
content: string;
hash: string;
generatedAt: string;
}
export interface MappingCompileDiagnostic {
ruleId: string;
severity: string;
message: string;
}
export interface MappingTestRunDivergence {
kind: string;
xpath: string;
expected: string | null;
actual: string | null;
ruleId: string | null;
sourceRefs: string[] | null;
evidence: MappingDraftEvidence[] | null;
}
export interface MappingTestRunSummary {
passed: number;
failed: number;
coveragePercent: number;
requiredGatesPassed: boolean;
xsdValid: boolean;
xsdErrors: string[];
divergences: MappingTestRunDivergence[];
}
export interface MappingRelease {
releaseId: string;
workspaceId: string;
draftId: string;
engine: MappingAuthoringEngine;
artifacts: MappingReleaseArtifact[];
sourceRuleIds: string[];
compileDiagnostics: MappingCompileDiagnostic[];
rulesSnapshotHash: string;
testRunSummary: MappingTestRunSummary | null;
status: MappingReleaseStatus;
correlationId: string;
createdAt: string;
eTag: string;
/** O GET do Slice 5 ainda omite estes campos; as mutações do Slice 7 os preenchem. */
environment: string | null;
approvedByUserId: string | null;
approvedAt: string | null;
approvalJustification: string | null;
publishedByUserId: string | null;
publishedAt: string | null;
previousPublishedReleaseId: string | null;
}
/** Resposta parcial e autoritativa devolvida por approve/publish/rollback. */
export interface MappingGovernanceSnapshot {
releaseId: string;
workspaceId: string;
draftId: string;
engine: MappingAuthoringEngine;
status: MappingReleaseStatus;
environment: string;
approvedByUserId: string | null;
approvedAt: string | null;
approvalJustification: string | null;
publishedByUserId: string | null;
publishedAt: string | null;
previousPublishedReleaseId: string | null;
correlationId: string;
eTag: string;
}
export interface MappingCompileJob {
jobId: string;
status: MappingAsyncJobStatus;
releaseId: string | null;
error: string | null;
durationMs: number | null;
}
export interface MappingTestRunJob extends MappingCompileJob {
requiredGatesPassed: boolean | null;
}
export interface CreateMappingTestRunInput {
workspaceId: string;
draftId: string;
releaseId: string;
inputXml: string;
expectedXml: string;
xsdVersion?: string;
}