Skip to content

Commit 2179972

Browse files
committed
refactor: change Incident to better reflect vault conditions
1 parent 15b17e5 commit 2179972

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/lib/api-types.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,25 @@ export type Validity =
1616
| "invalid"
1717
| "valid";
1818

19-
export interface Incident {
19+
type IncidentVaultProperties = {
20+
secret_vaulted: false;
21+
} | {
22+
secret_vaulted: true;
23+
vault_type: string;
24+
vault_name: string;
25+
vault_path: string;
26+
vault_path_count: number;
27+
}
28+
29+
export type Incident = {
2030
type: string;
2131
occurrences: Occurrence[];
2232
validity: Validity;
2333
ignore_sha: string;
2434
known_secret: boolean;
2535
incident_url: string;
2636
total_occurrences: number;
27-
secret_vaulted: boolean;
28-
vault_type: string;
29-
vault_name: string;
30-
vault_path: string;
31-
vault_path_count: number;
32-
}
37+
} & IncidentVaultProperties
3338

3439
export interface EntityWithIncidents {
3540
incidents: Incident[];

0 commit comments

Comments
 (0)