-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3b664d
commit 26664f2
Showing
12 changed files
with
88 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import { Vessel } from '@features/Vessel/Vessel.types' | ||
import { z } from 'zod' | ||
|
||
import { numberOrUndefined, stringOrUndefined } from '../../types' | ||
import { stringOrUndefined } from '../../types' | ||
|
||
// TODO Check which of these types are nullable or not | ||
export const RiskFactorSchema = z.strictObject({ | ||
controlPriorityLevel: z.number(), | ||
controlRateRiskFactor: z.number(), | ||
detectabilityRiskFactor: z.number(), | ||
gearOnboard: z.array(Vessel.DeclaredLogbookGearSchema).optional(), | ||
gearOnboard: z.array(Vessel.DeclaredLogbookGearSchema), | ||
impactRiskFactor: z.number(), | ||
lastControlDatetime: stringOrUndefined, | ||
numberControlsLastFiveYears: numberOrUndefined, | ||
numberControlsLastThreeYears: numberOrUndefined, | ||
numberGearSeizuresLastFiveYears: numberOrUndefined, | ||
numberInfractionsLastFiveYears: numberOrUndefined, | ||
numberSpeciesSeizuresLastFiveYears: numberOrUndefined, | ||
numberVesselSeizuresLastFiveYears: numberOrUndefined, | ||
numberControlsLastFiveYears: z.number(), | ||
numberControlsLastThreeYears: z.number(), | ||
numberGearSeizuresLastFiveYears: z.number(), | ||
numberInfractionsLastFiveYears: z.number(), | ||
numberSpeciesSeizuresLastFiveYears: z.number(), | ||
numberVesselSeizuresLastFiveYears: z.number(), | ||
probabilityRiskFactor: z.number(), | ||
riskFactor: z.number(), | ||
segmentHighestImpact: stringOrUndefined, | ||
segmentHighestPriority: stringOrUndefined, | ||
segments: z.array(z.string()), | ||
speciesOnboard: z.array(Vessel.DeclaredLogbookSpeciesSchema).optional() | ||
speciesOnboard: z.array(Vessel.DeclaredLogbookSpeciesSchema) | ||
}) | ||
|
||
export type RiskFactor = z.infer<typeof RiskFactorSchema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters