From 3ba078b01d2948dc0ce4eb53ce6c3de3786f4e28 Mon Sep 17 00:00:00 2001 From: Dave A <168838504+daveawc@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:10:46 +0000 Subject: [PATCH] CAS1 Generated model types These are the changes to the model that are pulled from the auto-generated swagger docs --- script/generate-types | 4 +- server/@types/shared/index.d.ts | 39 +++-------- server/@types/shared/models/ActiveOffence.ts | 4 +- server/@types/shared/models/Adjudication.ts | 8 +-- server/@types/shared/models/AnyValue.ts | 8 --- server/@types/shared/models/Appeal.ts | 13 ++-- server/@types/shared/models/Application.ts | 10 +-- .../shared/models/ApplicationSummary.ts | 10 +-- .../shared/models/ApplicationTimeline.ts | 7 +- .../shared/models/ApplicationTimelineNote.ts | 10 ++- .../models/ApprovedPremisesApplication.ts | 65 +++++++++++-------- .../ApprovedPremisesApplicationSummary.ts | 19 ++++-- .../models/ApprovedPremisesAssessment.ts | 5 +- .../ApprovedPremisesAssessmentSummary.ts | 5 +- .../ApprovedPremisesBedSearchParameters.ts | 12 +++- .../models/ApprovedPremisesBedSearchResult.ts | 5 ++ .../shared/models/ApprovedPremisesSummary.ts | 4 +- .../shared/models/ApprovedPremisesUser.ts | 23 +++---- .../ArrayOfOASysOffenceDetailsQuestions.ts | 6 -- .../ArrayOfOASysRiskContributorsQuestions.ts | 6 -- ...ArrayOfOASysRiskManagementPlanQuestions.ts | 6 -- .../ArrayOfOASysRiskManagementQuestions.ts | 6 -- ...fOASysRiskOfSeriousHarmSummaryQuestions.ts | 6 -- .../models/ArrayOfOASysRiskToSelfQuestions.ts | 6 -- .../ArrayOfOASysRisksToOthersQuestions.ts | 6 -- ...rayOfOASysRisksToTheIndividualQuestions.ts | 6 -- ...ayOfOASysSupportingInformationQuestions.ts | 6 -- server/@types/shared/models/Arrival.ts | 6 +- server/@types/shared/models/Assessment.ts | 26 ++++---- .../shared/models/AssessmentAcceptance.ts | 13 ++-- .../shared/models/AssessmentRejection.ts | 15 +++-- .../@types/shared/models/AssessmentSummary.ts | 10 +-- server/@types/shared/models/AssessmentTask.ts | 4 +- server/@types/shared/models/Bed.ts | 6 +- server/@types/shared/models/BedDetail.ts | 10 ++- .../shared/models/BedSearchAttributes.ts | 3 + .../shared/models/BedSearchParameters.ts | 8 +-- .../@types/shared/models/BedSearchResult.ts | 4 +- .../models/BedSearchResultPremisesSummary.ts | 14 ++-- .../models/BedSearchResultRoomSummary.ts | 2 +- .../@types/shared/models/BedSearchResults.ts | 13 ++-- server/@types/shared/models/Booking.ts | 60 +++++++++-------- server/@types/shared/models/BookingBody.ts | 25 ------- server/@types/shared/models/BookingNotMade.ts | 4 +- .../shared/models/BookingSearchResult.ts | 4 +- .../BookingSearchResultBookingSummary.ts | 6 +- .../BookingSearchResultPersonSummary.ts | 2 +- .../BookingSearchResultPremisesSummary.ts | 6 +- .../shared/models/BookingSearchResults.ts | 2 +- server/@types/shared/models/BookingSummary.ts | 9 +-- server/@types/shared/models/CacheType.ts | 5 -- server/@types/shared/models/Cancellation.ts | 11 ++-- .../shared/models/CancellationReason.ts | 2 +- .../models/Cas1ApplicationUserDetails.ts | 2 +- .../shared/models/Cas1KeyWorkerAllocation.ts | 2 +- server/@types/shared/models/Cas1NewArrival.ts | 3 +- .../@types/shared/models/Cas1NewDeparture.ts | 4 +- .../shared/models/Cas1NewOutOfServiceBed.ts | 9 ++- .../Cas1NewOutOfServiceBedCancellation.ts | 3 + .../shared/models/Cas1NewSpaceBooking.ts | 3 + .../models/Cas1NewSpaceBookingCancellation.ts | 3 + server/@types/shared/models/Cas1NonArrival.ts | 2 +- .../shared/models/Cas1OutOfServiceBed.ts | 20 +++--- .../models/Cas1OutOfServiceBedCancellation.ts | 2 +- .../models/Cas1OutOfServiceBedReason.ts | 2 +- .../models/Cas1OutOfServiceBedRevision.ts | 15 +++-- .../models/Cas1OutOfServiceBedSummary.ts | 6 +- .../shared/models/Cas1OverbookingRange.ts | 5 +- .../shared/models/Cas1PremiseCapacity.ts | 6 +- .../models/Cas1PremiseCapacityForDay.ts | 13 ++-- .../Cas1PremiseCharacteristicAvailability.ts | 5 +- .../shared/models/Cas1PremiseDaySummary.ts | 6 +- .../shared/models/Cas1PremisesBasicSummary.ts | 6 +- .../models/Cas1PremisesSearchResultSummary.ts | 14 ++-- .../shared/models/Cas1PremisesSummary.ts | 20 +++--- server/@types/shared/models/Cas1ReportName.ts | 5 -- .../shared/models/Cas1SpaceAvailability.ts | 2 +- .../@types/shared/models/Cas1SpaceBooking.ts | 41 ++++++------ .../models/Cas1SpaceBookingCancellation.ts | 2 +- .../models/Cas1SpaceBookingCharacteristic.ts | 3 - .../shared/models/Cas1SpaceBookingDates.ts | 2 +- .../models/Cas1SpaceBookingDaySummary.ts | 12 ++-- .../Cas1SpaceBookingDaySummarySortField.ts | 5 -- .../models/Cas1SpaceBookingDeparture.ts | 4 +- .../models/Cas1SpaceBookingNonArrival.ts | 2 +- .../shared/models/Cas1SpaceBookingSummary.ts | 12 ++-- .../@types/shared/models/Cas1SpaceCategory.ts | 8 --- .../shared/models/Cas1SpaceCharacteristic.ts | 3 - .../models/Cas1SpaceSearchParameters.ts | 10 +-- .../models/Cas1SpaceSearchRequirements.ts | 3 +- .../shared/models/Cas1SpaceSearchResult.ts | 2 +- .../shared/models/Cas1SpaceSearchResults.ts | 4 +- server/@types/shared/models/Cas1UpdateUser.ts | 4 +- .../@types/shared/models/Cas2Application.ts | 26 +++++--- .../shared/models/Cas2ApplicationNote.ts | 15 ----- .../shared/models/Cas2ApplicationStatus.ts | 13 ---- .../shared/models/Cas2ApplicationSummary.ts | 23 ------- server/@types/shared/models/Cas2Assessment.ts | 2 +- .../models/Cas2AssessmentStatusUpdate.ts | 12 ---- server/@types/shared/models/Cas2ReportName.ts | 5 -- .../@types/shared/models/Cas2StatusUpdate.ts | 8 +-- .../shared/models/Cas2StatusUpdateDetail.ts | 2 +- .../shared/models/Cas2SubmittedApplication.ts | 23 ------- .../models/Cas2SubmittedApplicationSummary.ts | 14 ---- .../@types/shared/models/Cas2TimelineEvent.ts | 6 +- server/@types/shared/models/Cas3ReportType.ts | 5 -- ...ApplicationStatusDetail.ts => Category.ts} | 7 +- server/@types/shared/models/Characteristic.ts | 6 +- .../shared/models/CharacteristicPair.ts | 2 +- .../@types/shared/models/ClarificationNote.ts | 4 +- .../@types/shared/models/ClassesToInclude.ts | 33 ++++++++++ server/@types/shared/models/Confirmation.ts | 4 +- server/@types/shared/models/DateCapacity.ts | 2 +- server/@types/shared/models/DateChange.ts | 8 +-- server/@types/shared/models/DatePeriod.ts | 5 +- server/@types/shared/models/Departure.ts | 13 ++-- .../@types/shared/models/DepartureReason.ts | 4 +- .../shared/models/DestinationProvider.ts | 2 +- server/@types/shared/models/Document.ts | 9 +-- server/@types/shared/models/DocumentLevel.ts | 3 - server/@types/shared/models/ErrorResponse.ts | 12 ++++ .../shared/models/ExtendedPremisesSummary.ts | 8 +-- server/@types/shared/models/Extension.ts | 6 +- server/@types/shared/models/ExternalUser.ts | 4 +- server/@types/shared/models/FullPerson.ts | 19 ++++-- .../@types/shared/models/FullPersonSummary.ts | 5 +- .../HmppsSubjectAccessRequestContent.ts | 11 ++++ server/@types/shared/models/InvalidParam.ts | 2 +- ...ApprovedPremisesGender.ts => LoadError.ts} | 2 +- server/@types/shared/models/LostBed.ts | 12 ++-- .../shared/models/LostBedCancellation.ts | 2 +- server/@types/shared/models/LostBedReason.ts | 2 +- server/@types/shared/models/Mappa.ts | 2 +- .../models/{NewBedMove.ts => ModelScope.ts} | 6 +- server/@types/shared/models/MoveOnCategory.ts | 2 +- server/@types/shared/models/NamedId.ts | 2 +- server/@types/shared/models/NewAppeal.ts | 3 + server/@types/shared/models/NewApplication.ts | 5 +- .../models/NewApplicationTimelineNote.ts | 2 +- server/@types/shared/models/NewArrival.ts | 4 +- server/@types/shared/models/NewBooking.ts | 8 +-- .../@types/shared/models/NewBookingNotMade.ts | 3 + .../@types/shared/models/NewCancellation.ts | 5 +- .../shared/models/NewCas2ApplicationNote.ts | 11 ---- server/@types/shared/models/NewCas2Arrival.ts | 2 + server/@types/shared/models/NewCas3Arrival.ts | 2 + .../shared/models/NewClarificationNote.ts | 3 + .../@types/shared/models/NewConfirmation.ts | 3 + server/@types/shared/models/NewDateChange.ts | 3 + server/@types/shared/models/NewDeparture.ts | 9 ++- server/@types/shared/models/NewExtension.ts | 3 + server/@types/shared/models/NewLostBed.ts | 9 ++- .../shared/models/NewLostBedCancellation.ts | 3 + .../shared/models/NewPlacementApplication.ts | 3 + .../models/NewPlacementRequestBooking.ts | 5 +- .../NewPlacementRequestBookingConfirmation.ts | 2 +- server/@types/shared/models/NewPremises.ts | 14 ++-- .../models/NewReferralHistoryUserNote.ts | 3 + server/@types/shared/models/NewRoom.ts | 9 ++- server/@types/shared/models/NewTurnaround.ts | 3 + server/@types/shared/models/NewWithdrawal.ts | 5 +- server/@types/shared/models/NomisUser.ts | 4 +- .../@types/shared/models/NonArrivalReason.ts | 2 +- server/@types/shared/models/Nonarrival.ts | 6 +- .../@types/shared/models/OASysAssessmentId.ts | 8 --- server/@types/shared/models/OASysQuestion.ts | 2 +- .../shared/models/OASysRiskOfSeriousHarm.ts | 12 ++-- .../@types/shared/models/OASysRiskToSelf.ts | 12 ++-- server/@types/shared/models/OASysSection.ts | 4 +- server/@types/shared/models/OASysSections.ts | 25 ++++--- .../OASysSupportingInformationQuestion.ts | 6 +- .../@types/shared/models/PersonAcctAlert.ts | 2 +- server/@types/shared/models/PersonRisks.ts | 4 +- .../@types/shared/models/PersonalTimeline.ts | 6 +- .../shared/models/PlacementApplication.ts | 43 ++++++------ .../PlacementApplicationDecisionEnvelope.ts | 5 +- .../shared/models/PlacementApplicationTask.ts | 12 ++-- .../shared/models/PlacementApplicationType.ts | 6 -- server/@types/shared/models/PlacementDates.ts | 2 +- .../@types/shared/models/PlacementRequest.ts | 41 +++++++----- .../shared/models/PlacementRequestDetail.ts | 52 +++++++++++++-- .../shared/models/PlacementRequestTask.ts | 17 +++-- .../shared/models/PlacementRequirements.ts | 6 +- server/@types/shared/models/Premises.ts | 18 ++--- .../@types/shared/models/PremisesBooking.ts | 10 +-- .../@types/shared/models/PremisesSummary.ts | 8 +-- server/@types/shared/models/PrisonCaseNote.ts | 10 +-- server/@types/shared/models/Problem.ts | 6 +- .../@types/shared/models/ProfileResponse.ts | 8 ++- server/@types/shared/models/Reallocation.ts | 2 +- .../shared/models/ReferralHistoryNote.ts | 4 +- .../ReferralHistoryNoteMessageDetails.ts | 8 ++- .../models/ReferralHistorySystemNote.ts | 5 +- .../shared/models/ReferralRejectionReason.ts | 2 +- .../shared/models/RequestForPlacement.ts | 32 ++++----- server/@types/shared/models/RiskTier.ts | 2 +- server/@types/shared/models/Room.ts | 6 +- server/@types/shared/models/RoshRisks.ts | 4 +- server/@types/shared/models/SeedRequest.ts | 2 +- ...estCas2StatusUpdate.ts => ServiceScope.ts} | 6 +- server/@types/shared/models/StaffMember.ts | 3 + .../@types/shared/models/SubmitApplication.ts | 6 +- .../SubmitApprovedPremisesApplication.ts | 37 ++++++----- .../shared/models/SubmitCas2Application.ts | 20 ------ .../models/SubmitPlacementApplication.ts | 11 +++- ...SubmitTemporaryAccommodationApplication.ts | 38 ++++++----- .../shared/models/SupervisingOfficer.ts | 2 +- .../shared/models/SupervisingProvider.ts | 2 +- .../@types/shared/models/SupervisingTeam.ts | 2 +- server/@types/shared/models/Task.ts | 30 ++++----- server/@types/shared/models/TaskWrapper.ts | 7 +- .../TemporaryAccommodationApplication.ts | 33 ++++++---- ...emporaryAccommodationApplicationSummary.ts | 5 +- .../TemporaryAccommodationAssessment.ts | 18 +++-- ...TemporaryAccommodationAssessmentSummary.ts | 4 +- ...mporaryAccommodationBedSearchParameters.ts | 11 +++- .../TemporaryAccommodationBedSearchResult.ts | 2 + ...raryAccommodationBedSearchResultOverlap.ts | 10 +-- .../TemporaryAccommodationPremisesSummary.ts | 2 +- .../models/TemporaryAccommodationUser.ts | 2 + server/@types/shared/models/TimelineEvent.ts | 11 ++-- server/@types/shared/models/Turnaround.ts | 7 +- .../{UpdateCas2Assessment.ts => Type.ts} | 6 +- server/@types/shared/models/Unit.ts | 3 - .../@types/shared/models/UpdateApplication.ts | 3 +- .../UpdateApprovedPremisesApplication.ts | 23 +++---- .../@types/shared/models/UpdateAssessment.ts | 8 ++- .../models/UpdateCas1OutOfServiceBed.ts | 7 +- server/@types/shared/models/UpdateLostBed.ts | 7 +- .../models/UpdatePlacementApplication.ts | 6 +- server/@types/shared/models/UpdatePremises.ts | 17 +++-- server/@types/shared/models/UpdateRoom.ts | 9 ++- .../shared/models/UpdatedClarificationNote.ts | 3 + server/@types/shared/models/User.ts | 10 +-- .../models/UserRolesAndQualifications.ts | 2 +- .../@types/shared/models/UserWithWorkload.ts | 31 +++++---- .../@types/shared/models/ValidationError.ts | 10 ++- .../models/WithdrawPlacementApplication.ts | 3 + .../shared/models/WithdrawPlacementRequest.ts | 3 + server/@types/shared/models/Withdrawable.ts | 4 +- 240 files changed, 1116 insertions(+), 1037 deletions(-) delete mode 100644 server/@types/shared/models/AnyValue.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysOffenceDetailsQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRiskContributorsQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRiskManagementPlanQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRiskManagementQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRiskOfSeriousHarmSummaryQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRisksToOthersQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRisksToTheIndividualQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysSupportingInformationQuestions.ts delete mode 100644 server/@types/shared/models/BookingBody.ts delete mode 100644 server/@types/shared/models/CacheType.ts delete mode 100644 server/@types/shared/models/Cas1ReportName.ts delete mode 100644 server/@types/shared/models/Cas1SpaceBookingDaySummarySortField.ts delete mode 100644 server/@types/shared/models/Cas1SpaceCategory.ts delete mode 100644 server/@types/shared/models/Cas2ApplicationNote.ts delete mode 100644 server/@types/shared/models/Cas2ApplicationStatus.ts delete mode 100644 server/@types/shared/models/Cas2ApplicationSummary.ts delete mode 100644 server/@types/shared/models/Cas2AssessmentStatusUpdate.ts delete mode 100644 server/@types/shared/models/Cas2ReportName.ts delete mode 100644 server/@types/shared/models/Cas2SubmittedApplication.ts delete mode 100644 server/@types/shared/models/Cas2SubmittedApplicationSummary.ts delete mode 100644 server/@types/shared/models/Cas3ReportType.ts rename server/@types/shared/models/{Cas2ApplicationStatusDetail.ts => Category.ts} (54%) create mode 100644 server/@types/shared/models/ClassesToInclude.ts create mode 100644 server/@types/shared/models/ErrorResponse.ts create mode 100644 server/@types/shared/models/HmppsSubjectAccessRequestContent.ts rename server/@types/shared/models/{Cas1ApprovedPremisesGender.ts => LoadError.ts} (69%) rename server/@types/shared/models/{NewBedMove.ts => ModelScope.ts} (65%) delete mode 100644 server/@types/shared/models/NewCas2ApplicationNote.ts delete mode 100644 server/@types/shared/models/OASysAssessmentId.ts rename server/@types/shared/models/{LatestCas2StatusUpdate.ts => ServiceScope.ts} (61%) delete mode 100644 server/@types/shared/models/SubmitCas2Application.ts rename server/@types/shared/models/{UpdateCas2Assessment.ts => Type.ts} (57%) diff --git a/script/generate-types b/script/generate-types index 6e2a2f89ed..5c3b827ee0 100755 --- a/script/generate-types +++ b/script/generate-types @@ -14,9 +14,7 @@ fi echo "==> Generating types for $branch branch..." -npx openapi-typescript-codegen -i "https://raw.githubusercontent.com/ministryofjustice/hmpps-approved-premises-api/$branch/src/main/resources/static/codegen/built-api-spec.yml" -o ./server/@types/shared -c axios --exportServices false --exportCore false --useUnionTypes true -npx openapi-typescript-codegen -i "https://raw.githubusercontent.com/ministryofjustice/hmpps-approved-premises-api/$branch/src/main/resources/static/codegen/built-cas1-api-spec.yml" -o ./server/@types/shared -c axios --exportServices false --exportCore false --useUnionTypes true - +npx openapi-typescript-codegen -i "https://approved-premises-api-dev.hmpps.service.justice.gov.uk/v3/api-docs/CAS1Shared" -o ./server/@types/shared -c axios --exportServices false --exportCore false --useUnionTypes true echo "==> Renaming the declaration file..." mv ./server/@types/shared/index.ts ./server/@types/shared/index.d.ts diff --git a/server/@types/shared/index.d.ts b/server/@types/shared/index.d.ts index 31e9bb9075..618ba8859b 100644 --- a/server/@types/shared/index.d.ts +++ b/server/@types/shared/index.d.ts @@ -6,7 +6,6 @@ export type { ActiveOffence } from './models/ActiveOffence'; export type { Adjudication } from './models/Adjudication'; export type { AllocatedFilter } from './models/AllocatedFilter'; -export type { AnyValue } from './models/AnyValue'; export type { ApArea } from './models/ApArea'; export type { Appeal } from './models/Appeal'; export type { AppealDecision } from './models/AppealDecision'; @@ -30,15 +29,6 @@ export type { ApprovedPremisesUser } from './models/ApprovedPremisesUser'; export type { ApprovedPremisesUserPermission } from './models/ApprovedPremisesUserPermission'; export type { ApprovedPremisesUserRole } from './models/ApprovedPremisesUserRole'; export type { ApType } from './models/ApType'; -export type { ArrayOfOASysOffenceDetailsQuestions } from './models/ArrayOfOASysOffenceDetailsQuestions'; -export type { ArrayOfOASysRiskContributorsQuestions } from './models/ArrayOfOASysRiskContributorsQuestions'; -export type { ArrayOfOASysRiskManagementPlanQuestions } from './models/ArrayOfOASysRiskManagementPlanQuestions'; -export type { ArrayOfOASysRiskManagementQuestions } from './models/ArrayOfOASysRiskManagementQuestions'; -export type { ArrayOfOASysRiskOfSeriousHarmSummaryQuestions } from './models/ArrayOfOASysRiskOfSeriousHarmSummaryQuestions'; -export type { ArrayOfOASysRisksToOthersQuestions } from './models/ArrayOfOASysRisksToOthersQuestions'; -export type { ArrayOfOASysRisksToTheIndividualQuestions } from './models/ArrayOfOASysRisksToTheIndividualQuestions'; -export type { ArrayOfOASysRiskToSelfQuestions } from './models/ArrayOfOASysRiskToSelfQuestions'; -export type { ArrayOfOASysSupportingInformationQuestions } from './models/ArrayOfOASysSupportingInformationQuestions'; export type { Arrival } from './models/Arrival'; export type { Assessment } from './models/Assessment'; export type { AssessmentAcceptance } from './models/AssessmentAcceptance'; @@ -61,7 +51,6 @@ export type { BedStatus } from './models/BedStatus'; export type { BedSummary } from './models/BedSummary'; export type { Booking } from './models/Booking'; export type { BookingAppealTask } from './models/BookingAppealTask'; -export type { BookingBody } from './models/BookingBody'; export type { BookingNotMade } from './models/BookingNotMade'; export type { BookingPremisesSummary } from './models/BookingPremisesSummary'; export type { BookingSearchResult } from './models/BookingSearchResult'; @@ -74,12 +63,10 @@ export type { BookingSearchResults } from './models/BookingSearchResults'; export type { BookingSearchSortField } from './models/BookingSearchSortField'; export type { BookingStatus } from './models/BookingStatus'; export type { BookingSummary } from './models/BookingSummary'; -export type { CacheType } from './models/CacheType'; export type { Cancellation } from './models/Cancellation'; export type { CancellationReason } from './models/CancellationReason'; export type { Cas1ApplicationTimelinessCategory } from './models/Cas1ApplicationTimelinessCategory'; export type { Cas1ApplicationUserDetails } from './models/Cas1ApplicationUserDetails'; -export type { Cas1ApprovedPremisesGender } from './models/Cas1ApprovedPremisesGender'; export type { Cas1AssignKeyWorker } from './models/Cas1AssignKeyWorker'; export type { Cas1CruManagementArea } from './models/Cas1CruManagementArea'; export type { Cas1KeyWorkerAllocation } from './models/Cas1KeyWorkerAllocation'; @@ -106,14 +93,12 @@ export type { Cas1PremiseDaySummary } from './models/Cas1PremiseDaySummary'; export type { Cas1PremisesBasicSummary } from './models/Cas1PremisesBasicSummary'; export type { Cas1PremisesSearchResultSummary } from './models/Cas1PremisesSearchResultSummary'; export type { Cas1PremisesSummary } from './models/Cas1PremisesSummary'; -export type { Cas1ReportName } from './models/Cas1ReportName'; export type { Cas1SpaceAvailability } from './models/Cas1SpaceAvailability'; export type { Cas1SpaceBooking } from './models/Cas1SpaceBooking'; export type { Cas1SpaceBookingCancellation } from './models/Cas1SpaceBookingCancellation'; export type { Cas1SpaceBookingCharacteristic } from './models/Cas1SpaceBookingCharacteristic'; export type { Cas1SpaceBookingDates } from './models/Cas1SpaceBookingDates'; export type { Cas1SpaceBookingDaySummary } from './models/Cas1SpaceBookingDaySummary'; -export type { Cas1SpaceBookingDaySummarySortField } from './models/Cas1SpaceBookingDaySummarySortField'; export type { Cas1SpaceBookingDeparture } from './models/Cas1SpaceBookingDeparture'; export type { Cas1SpaceBookingNonArrival } from './models/Cas1SpaceBookingNonArrival'; export type { Cas1SpaceBookingRequirements } from './models/Cas1SpaceBookingRequirements'; @@ -121,7 +106,6 @@ export type { Cas1SpaceBookingResidency } from './models/Cas1SpaceBookingResiden export type { Cas1SpaceBookingSummary } from './models/Cas1SpaceBookingSummary'; export type { Cas1SpaceBookingSummarySortField } from './models/Cas1SpaceBookingSummarySortField'; export type { Cas1SpaceBookingSummaryStatus } from './models/Cas1SpaceBookingSummaryStatus'; -export type { Cas1SpaceCategory } from './models/Cas1SpaceCategory'; export type { Cas1SpaceCharacteristic } from './models/Cas1SpaceCharacteristic'; export type { Cas1SpaceSearchParameters } from './models/Cas1SpaceSearchParameters'; export type { Cas1SpaceSearchRequirements } from './models/Cas1SpaceSearchRequirements'; @@ -129,22 +113,15 @@ export type { Cas1SpaceSearchResult } from './models/Cas1SpaceSearchResult'; export type { Cas1SpaceSearchResults } from './models/Cas1SpaceSearchResults'; export type { Cas1UpdateUser } from './models/Cas1UpdateUser'; export type { Cas2Application } from './models/Cas2Application'; -export type { Cas2ApplicationNote } from './models/Cas2ApplicationNote'; -export type { Cas2ApplicationStatus } from './models/Cas2ApplicationStatus'; -export type { Cas2ApplicationStatusDetail } from './models/Cas2ApplicationStatusDetail'; -export type { Cas2ApplicationSummary } from './models/Cas2ApplicationSummary'; export type { Cas2Assessment } from './models/Cas2Assessment'; -export type { Cas2AssessmentStatusUpdate } from './models/Cas2AssessmentStatusUpdate'; -export type { Cas2ReportName } from './models/Cas2ReportName'; export type { Cas2StatusUpdate } from './models/Cas2StatusUpdate'; export type { Cas2StatusUpdateDetail } from './models/Cas2StatusUpdateDetail'; -export type { Cas2SubmittedApplication } from './models/Cas2SubmittedApplication'; -export type { Cas2SubmittedApplicationSummary } from './models/Cas2SubmittedApplicationSummary'; export type { Cas2TimelineEvent } from './models/Cas2TimelineEvent'; -export type { Cas3ReportType } from './models/Cas3ReportType'; +export type { Category } from './models/Category'; export type { Characteristic } from './models/Characteristic'; export type { CharacteristicPair } from './models/CharacteristicPair'; export type { ClarificationNote } from './models/ClarificationNote'; +export type { ClassesToInclude } from './models/ClassesToInclude'; export type { Confirmation } from './models/Confirmation'; export type { DateCapacity } from './models/DateCapacity'; export type { DateChange } from './models/DateChange'; @@ -154,6 +131,7 @@ export type { DepartureReason } from './models/DepartureReason'; export type { DestinationProvider } from './models/DestinationProvider'; export type { Document } from './models/Document'; export type { DocumentLevel } from './models/DocumentLevel'; +export type { ErrorResponse } from './models/ErrorResponse'; export type { ExtendedPremisesSummary } from './models/ExtendedPremisesSummary'; export type { Extension } from './models/Extension'; export type { ExternalUser } from './models/ExternalUser'; @@ -161,8 +139,9 @@ export type { FlagsEnvelope } from './models/FlagsEnvelope'; export type { FullPerson } from './models/FullPerson'; export type { FullPersonSummary } from './models/FullPersonSummary'; export type { Gender } from './models/Gender'; +export type { HmppsSubjectAccessRequestContent } from './models/HmppsSubjectAccessRequestContent'; export type { InvalidParam } from './models/InvalidParam'; -export type { LatestCas2StatusUpdate } from './models/LatestCas2StatusUpdate'; +export type { LoadError } from './models/LoadError'; export type { LocalAuthorityArea } from './models/LocalAuthorityArea'; export type { LostBed } from './models/LostBed'; export type { LostBedCancellation } from './models/LostBedCancellation'; @@ -172,17 +151,16 @@ export type { Mappa } from './models/Mappa'; export type { MappaEnvelope } from './models/MappaEnvelope'; export type { MigrationJobRequest } from './models/MigrationJobRequest'; export type { MigrationJobType } from './models/MigrationJobType'; +export type { ModelScope } from './models/ModelScope'; export type { MoveOnCategory } from './models/MoveOnCategory'; export type { NamedId } from './models/NamedId'; export type { NewAppeal } from './models/NewAppeal'; export type { NewApplication } from './models/NewApplication'; export type { NewApplicationTimelineNote } from './models/NewApplicationTimelineNote'; export type { NewArrival } from './models/NewArrival'; -export type { NewBedMove } from './models/NewBedMove'; export type { NewBooking } from './models/NewBooking'; export type { NewBookingNotMade } from './models/NewBookingNotMade'; export type { NewCancellation } from './models/NewCancellation'; -export type { NewCas2ApplicationNote } from './models/NewCas2ApplicationNote'; export type { NewCas2Arrival } from './models/NewCas2Arrival'; export type { NewCas3Arrival } from './models/NewCas3Arrival'; export type { NewClarificationNote } from './models/NewClarificationNote'; @@ -204,7 +182,6 @@ export type { NewWithdrawal } from './models/NewWithdrawal'; export type { NomisUser } from './models/NomisUser'; export type { Nonarrival } from './models/Nonarrival'; export type { NonArrivalReason } from './models/NonArrivalReason'; -export type { OASysAssessmentId } from './models/OASysAssessmentId'; export type { OASysAssessmentState } from './models/OASysAssessmentState'; export type { OASysQuestion } from './models/OASysQuestion'; export type { OASysRiskOfSeriousHarm } from './models/OASysRiskOfSeriousHarm'; @@ -271,13 +248,13 @@ export type { SeedFileType } from './models/SeedFileType'; export type { SeedRequest } from './models/SeedRequest'; export type { SentenceTypeOption } from './models/SentenceTypeOption'; export type { ServiceName } from './models/ServiceName'; +export type { ServiceScope } from './models/ServiceScope'; export type { SituationOption } from './models/SituationOption'; export type { SortDirection } from './models/SortDirection'; export type { SortOrder } from './models/SortOrder'; export type { StaffMember } from './models/StaffMember'; export type { SubmitApplication } from './models/SubmitApplication'; export type { SubmitApprovedPremisesApplication } from './models/SubmitApprovedPremisesApplication'; -export type { SubmitCas2Application } from './models/SubmitCas2Application'; export type { SubmitPlacementApplication } from './models/SubmitPlacementApplication'; export type { SubmitTemporaryAccommodationApplication } from './models/SubmitTemporaryAccommodationApplication'; export type { SupervisingOfficer } from './models/SupervisingOfficer'; @@ -307,6 +284,7 @@ export type { TimelineEventType } from './models/TimelineEventType'; export type { TimelineEventUrlType } from './models/TimelineEventUrlType'; export type { TriggerSourceType } from './models/TriggerSourceType'; export type { Turnaround } from './models/Turnaround'; +export type { Type } from './models/Type'; export type { Unit } from './models/Unit'; export type { UnknownPerson } from './models/UnknownPerson'; export type { UnknownPersonSummary } from './models/UnknownPersonSummary'; @@ -316,7 +294,6 @@ export type { UpdateApprovedPremisesApplication } from './models/UpdateApprovedP export type { UpdateAssessment } from './models/UpdateAssessment'; export type { UpdateCas1OutOfServiceBed } from './models/UpdateCas1OutOfServiceBed'; export type { UpdateCas2Application } from './models/UpdateCas2Application'; -export type { UpdateCas2Assessment } from './models/UpdateCas2Assessment'; export type { UpdatedClarificationNote } from './models/UpdatedClarificationNote'; export type { UpdateLostBed } from './models/UpdateLostBed'; export type { UpdatePlacementApplication } from './models/UpdatePlacementApplication'; diff --git a/server/@types/shared/models/ActiveOffence.ts b/server/@types/shared/models/ActiveOffence.ts index 3a6770531b..6aa40b40e6 100644 --- a/server/@types/shared/models/ActiveOffence.ts +++ b/server/@types/shared/models/ActiveOffence.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type ActiveOffence = { + convictionId: number; deliusEventNumber: string; + offenceDate?: string; offenceDescription: string; offenceId: string; - convictionId: number; - offenceDate?: string; }; diff --git a/server/@types/shared/models/Adjudication.ts b/server/@types/shared/models/Adjudication.ts index 7388b19505..b225d64c5e 100644 --- a/server/@types/shared/models/Adjudication.ts +++ b/server/@types/shared/models/Adjudication.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type Adjudication = { - id: number; - reportedAt: string; establishment: string; - offenceDescription: string; - hearingHeld: boolean; finding?: string; + hearingHeld: boolean; + id: number; + offenceDescription: string; + reportedAt: string; }; diff --git a/server/@types/shared/models/AnyValue.ts b/server/@types/shared/models/AnyValue.ts deleted file mode 100644 index 294694a24b..0000000000 --- a/server/@types/shared/models/AnyValue.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Any object that conforms to the current JSON schema for an application - */ -export type AnyValue = Record; diff --git a/server/@types/shared/models/Appeal.ts b/server/@types/shared/models/Appeal.ts index 54690f8139..2a1379f037 100644 --- a/server/@types/shared/models/Appeal.ts +++ b/server/@types/shared/models/Appeal.ts @@ -3,16 +3,17 @@ /* tslint:disable */ /* eslint-disable */ import type { AppealDecision } from './AppealDecision'; -import type { User } from './User'; +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; export type Appeal = { - id: string; appealDate: string; appealDetail: string; - decision: AppealDecision; - decisionDetail: string; - createdAt: string; applicationId: string; assessmentId?: string; - createdByUser: User; + createdAt: string; + createdByUser: (ApprovedPremisesUser | TemporaryAccommodationUser); + decision: AppealDecision; + decisionDetail: string; + id: string; }; diff --git a/server/@types/shared/models/Application.ts b/server/@types/shared/models/Application.ts index 97e3aa22a3..15fd50a8f0 100644 --- a/server/@types/shared/models/Application.ts +++ b/server/@types/shared/models/Application.ts @@ -2,11 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; export type Application = { - type: string; - id: string; - person: Person; createdAt: string; + id: string; + person: (FullPerson | RestrictedPerson | UnknownPerson); + type: string; }; diff --git a/server/@types/shared/models/ApplicationSummary.ts b/server/@types/shared/models/ApplicationSummary.ts index 8cf8b2d1f6..f50cd3ba3a 100644 --- a/server/@types/shared/models/ApplicationSummary.ts +++ b/server/@types/shared/models/ApplicationSummary.ts @@ -2,12 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; export type ApplicationSummary = { - type: string; - id: string; - person: Person; createdAt: string; + id: string; + person: (FullPerson | RestrictedPerson | UnknownPerson); submittedAt?: string; + type: string; }; diff --git a/server/@types/shared/models/ApplicationTimeline.ts b/server/@types/shared/models/ApplicationTimeline.ts index cf858a30c5..cd53ad135e 100644 --- a/server/@types/shared/models/ApplicationTimeline.ts +++ b/server/@types/shared/models/ApplicationTimeline.ts @@ -3,14 +3,15 @@ /* tslint:disable */ /* eslint-disable */ import type { ApprovedPremisesApplicationStatus } from './ApprovedPremisesApplicationStatus'; +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; import type { TimelineEvent } from './TimelineEvent'; -import type { User } from './User'; export type ApplicationTimeline = { - id: string; createdAt: string; + createdBy?: (ApprovedPremisesUser | TemporaryAccommodationUser); + id: string; isOfflineApplication: boolean; status?: ApprovedPremisesApplicationStatus; - createdBy?: User; timelineEvents: Array; }; diff --git a/server/@types/shared/models/ApplicationTimelineNote.ts b/server/@types/shared/models/ApplicationTimelineNote.ts index 77c079a7ee..12b947b8a4 100644 --- a/server/@types/shared/models/ApplicationTimelineNote.ts +++ b/server/@types/shared/models/ApplicationTimelineNote.ts @@ -2,14 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { User } from './User'; -/** - * Notes added to an application - */ +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; export type ApplicationTimelineNote = { + createdAt?: string; + createdByUser?: (ApprovedPremisesUser | TemporaryAccommodationUser); id?: string; - createdByUser?: User; note: string; - createdAt?: string; }; diff --git a/server/@types/shared/models/ApprovedPremisesApplication.ts b/server/@types/shared/models/ApprovedPremisesApplication.ts index ec7bae9535..a2c36f24ef 100644 --- a/server/@types/shared/models/ApprovedPremisesApplication.ts +++ b/server/@types/shared/models/ApprovedPremisesApplication.ts @@ -2,51 +2,60 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { ApArea } from './ApArea'; -import type { Application } from './Application'; import type { ApprovedPremisesApplicationStatus } from './ApprovedPremisesApplicationStatus'; import type { ApType } from './ApType'; import type { AssessmentDecision } from './AssessmentDecision'; import type { Cas1ApplicationUserDetails } from './Cas1ApplicationUserDetails'; import type { Cas1CruManagementArea } from './Cas1CruManagementArea'; +import type { FullPerson } from './FullPerson'; import type { PersonRisks } from './PersonRisks'; import type { PersonStatus } from './PersonStatus'; -export type ApprovedPremisesApplication = (Application & { - isWomensApplication?: boolean; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; +export type ApprovedPremisesApplication = { + apArea?: ApArea; + apType?: ApType; + applicantUserDetails?: Cas1ApplicationUserDetails; + arrivalDate?: string; + assessmentDecision?: AssessmentDecision; + assessmentDecisionDate?: string; + assessmentId?: string; /** - * Use apType - * @deprecated + * If true, caseManagerUserDetails will provide case manager details. Otherwise, applicantUserDetails can be used for case manager details */ - isPipeApplication?: boolean; + caseManagerIsNotApplicant?: boolean; + caseManagerUserDetails?: Cas1ApplicationUserDetails; + createdAt: string; + createdByUserId: string; + cruManagementArea?: Cas1CruManagementArea; + /** + * Any object that conforms to the current JSON schema for an application + */ + data?: Record; + /** + * Any object that conforms to the current JSON schema for an application + */ + document?: Record; + id: string; isEmergencyApplication?: boolean; /** * Use apType - * @deprecated */ isEsapApplication?: boolean; - apType?: ApType; - arrivalDate?: string; + /** + * Use apType + */ + isPipeApplication?: boolean; + isWomensApplication?: boolean; + licenceExpiryDate?: string; + outdatedSchema: boolean; + person: (FullPerson | RestrictedPerson | UnknownPerson); + personStatusOnSubmission?: PersonStatus; risks?: PersonRisks; - createdByUserId: string; schemaVersion: string; - outdatedSchema: boolean; - data?: AnyValue; - document?: AnyValue; status: ApprovedPremisesApplicationStatus; - assessmentId?: string; - assessmentDecision?: AssessmentDecision; - assessmentDecisionDate?: string; submittedAt?: string; - personStatusOnSubmission?: PersonStatus; - apArea?: ApArea; - cruManagementArea?: Cas1CruManagementArea; - applicantUserDetails?: Cas1ApplicationUserDetails; - /** - * If true, caseManagerUserDetails will provide case manager details. Otherwise, applicantUserDetails can be used for case manager details - */ - caseManagerIsNotApplicant?: boolean; - caseManagerUserDetails?: Cas1ApplicationUserDetails; - licenceExpiryDate?: string; -}); + type: string; +}; diff --git a/server/@types/shared/models/ApprovedPremisesApplicationSummary.ts b/server/@types/shared/models/ApprovedPremisesApplicationSummary.ts index cffd5fcd36..fbcaa4f33f 100644 --- a/server/@types/shared/models/ApprovedPremisesApplicationSummary.ts +++ b/server/@types/shared/models/ApprovedPremisesApplicationSummary.ts @@ -7,17 +7,22 @@ import type { ApprovedPremisesApplicationStatus } from './ApprovedPremisesApplic import type { PersonRisks } from './PersonRisks'; import type { ReleaseTypeOption } from './ReleaseTypeOption'; export type ApprovedPremisesApplicationSummary = (ApplicationSummary & { - isWomensApplication?: boolean; - isPipeApplication?: boolean; + arrivalDate?: string; + createdByUserId?: string; + hasRequestsForPlacement?: boolean; isEmergencyApplication?: boolean; isEsapApplication?: boolean; - arrivalDate?: string; + isPipeApplication?: boolean; + isWithdrawn?: boolean; + isWomensApplication?: boolean; + releaseType?: ReleaseTypeOption; risks?: PersonRisks; - createdByUserId: string; - status: ApprovedPremisesApplicationStatus; + status?: ApprovedPremisesApplicationStatus; tier?: string; - isWithdrawn: boolean; - releaseType?: ReleaseTypeOption; +} & { + createdByUserId: string; hasRequestsForPlacement: boolean; + isWithdrawn: boolean; + status: ApprovedPremisesApplicationStatus; }); diff --git a/server/@types/shared/models/ApprovedPremisesAssessment.ts b/server/@types/shared/models/ApprovedPremisesAssessment.ts index 30a495765f..697c396b00 100644 --- a/server/@types/shared/models/ApprovedPremisesAssessment.ts +++ b/server/@types/shared/models/ApprovedPremisesAssessment.ts @@ -7,9 +7,12 @@ import type { ApprovedPremisesAssessmentStatus } from './ApprovedPremisesAssessm import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; import type { Assessment } from './Assessment'; export type ApprovedPremisesAssessment = (Assessment & { - application: ApprovedPremisesApplication; allocatedToStaffMember?: ApprovedPremisesUser; + application?: ApprovedPremisesApplication; + createdFromAppeal?: boolean; status?: ApprovedPremisesAssessmentStatus; +} & { + application: ApprovedPremisesApplication; createdFromAppeal: boolean; }); diff --git a/server/@types/shared/models/ApprovedPremisesAssessmentSummary.ts b/server/@types/shared/models/ApprovedPremisesAssessmentSummary.ts index 33b3d2cb78..843160f35c 100644 --- a/server/@types/shared/models/ApprovedPremisesAssessmentSummary.ts +++ b/server/@types/shared/models/ApprovedPremisesAssessmentSummary.ts @@ -5,7 +5,10 @@ import type { ApprovedPremisesAssessmentStatus } from './ApprovedPremisesAssessmentStatus'; import type { AssessmentSummary } from './AssessmentSummary'; export type ApprovedPremisesAssessmentSummary = (AssessmentSummary & { - status: ApprovedPremisesAssessmentStatus; + dueAt?: string; + status?: ApprovedPremisesAssessmentStatus; +} & { dueAt: string; + status: ApprovedPremisesAssessmentStatus; }); diff --git a/server/@types/shared/models/ApprovedPremisesBedSearchParameters.ts b/server/@types/shared/models/ApprovedPremisesBedSearchParameters.ts index e19fb8d65c..72f4a7902b 100644 --- a/server/@types/shared/models/ApprovedPremisesBedSearchParameters.ts +++ b/server/@types/shared/models/ApprovedPremisesBedSearchParameters.ts @@ -5,14 +5,24 @@ import type { BedSearchParameters } from './BedSearchParameters'; import type { PlacementCriteria } from './PlacementCriteria'; export type ApprovedPremisesBedSearchParameters = (BedSearchParameters & { + /** + * Maximum number of miles from the postcode district to search, only required if more than 50 miles which is the default + */ + maxDistanceMiles?: number; /** * The postcode district to search outwards from */ - postcodeDistrict: string; + postcodeDistrict?: string; + requiredCharacteristics?: Array; +} & { /** * Maximum number of miles from the postcode district to search, only required if more than 50 miles which is the default */ maxDistanceMiles: number; + /** + * The postcode district to search outwards from + */ + postcodeDistrict: string; requiredCharacteristics: Array; }); diff --git a/server/@types/shared/models/ApprovedPremisesBedSearchResult.ts b/server/@types/shared/models/ApprovedPremisesBedSearchResult.ts index 35fb045987..d5c3e24688 100644 --- a/server/@types/shared/models/ApprovedPremisesBedSearchResult.ts +++ b/server/@types/shared/models/ApprovedPremisesBedSearchResult.ts @@ -4,6 +4,11 @@ /* eslint-disable */ import type { BedSearchResult } from './BedSearchResult'; export type ApprovedPremisesBedSearchResult = (BedSearchResult & { + /** + * how many miles away from the postcode district the Premises this Bed belongs to is + */ + distanceMiles?: number; +} & { /** * how many miles away from the postcode district the Premises this Bed belongs to is */ diff --git a/server/@types/shared/models/ApprovedPremisesSummary.ts b/server/@types/shared/models/ApprovedPremisesSummary.ts index 744afa9419..1c6d3f2da5 100644 --- a/server/@types/shared/models/ApprovedPremisesSummary.ts +++ b/server/@types/shared/models/ApprovedPremisesSummary.ts @@ -4,12 +4,12 @@ /* eslint-disable */ import type { PremisesSummary } from './PremisesSummary'; export type ApprovedPremisesSummary = (PremisesSummary & { + apArea?: string; apCode?: string; probationRegion?: string; - apArea?: string; } & { + apArea: string; apCode: string; probationRegion: string; - apArea: string; }); diff --git a/server/@types/shared/models/ApprovedPremisesUser.ts b/server/@types/shared/models/ApprovedPremisesUser.ts index 81c3d1890f..3eb46d425b 100644 --- a/server/@types/shared/models/ApprovedPremisesUser.ts +++ b/server/@types/shared/models/ApprovedPremisesUser.ts @@ -9,22 +9,19 @@ import type { NamedId } from './NamedId'; import type { User } from './User'; import type { UserQualification } from './UserQualification'; export type ApprovedPremisesUser = (User & { - qualifications: Array; - roles: Array; + apArea?: ApArea; + cruManagementArea?: NamedId; + cruManagementAreaDefault?: NamedId; + cruManagementAreaOverride?: NamedId; permissions?: Array; + qualifications?: Array; + roles?: Array; + version?: number; +} & { apArea: ApArea; - /** - * CRU Management Area to use. This will be the same as cruManagementAreaDefault unless cruManagementAreaOverride is defined - */ cruManagementArea: NamedId; - /** - * The CRU Management Area used if no override is defined. This is provided to support the user configuration page. - */ cruManagementAreaDefault: NamedId; - /** - * The CRU Management Area manually set on this user. This is provided to support the user configuration page. - */ - cruManagementAreaOverride?: NamedId; - version?: number; + qualifications: Array; + roles: Array; }); diff --git a/server/@types/shared/models/ArrayOfOASysOffenceDetailsQuestions.ts b/server/@types/shared/models/ArrayOfOASysOffenceDetailsQuestions.ts deleted file mode 100644 index ed18592437..0000000000 --- a/server/@types/shared/models/ArrayOfOASysOffenceDetailsQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysOffenceDetailsQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRiskContributorsQuestions.ts b/server/@types/shared/models/ArrayOfOASysRiskContributorsQuestions.ts deleted file mode 100644 index 78a8f48ff2..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRiskContributorsQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskContributorsQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRiskManagementPlanQuestions.ts b/server/@types/shared/models/ArrayOfOASysRiskManagementPlanQuestions.ts deleted file mode 100644 index 0625161733..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRiskManagementPlanQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskManagementPlanQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRiskManagementQuestions.ts b/server/@types/shared/models/ArrayOfOASysRiskManagementQuestions.ts deleted file mode 100644 index a836466703..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRiskManagementQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskManagementQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRiskOfSeriousHarmSummaryQuestions.ts b/server/@types/shared/models/ArrayOfOASysRiskOfSeriousHarmSummaryQuestions.ts deleted file mode 100644 index c9e81f401d..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRiskOfSeriousHarmSummaryQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskOfSeriousHarmSummaryQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts b/server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts deleted file mode 100644 index 85e1675ff1..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskToSelfQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRisksToOthersQuestions.ts b/server/@types/shared/models/ArrayOfOASysRisksToOthersQuestions.ts deleted file mode 100644 index 6c25705c5c..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRisksToOthersQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRisksToOthersQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysRisksToTheIndividualQuestions.ts b/server/@types/shared/models/ArrayOfOASysRisksToTheIndividualQuestions.ts deleted file mode 100644 index 4eccfb0de3..0000000000 --- a/server/@types/shared/models/ArrayOfOASysRisksToTheIndividualQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRisksToTheIndividualQuestions = Array; diff --git a/server/@types/shared/models/ArrayOfOASysSupportingInformationQuestions.ts b/server/@types/shared/models/ArrayOfOASysSupportingInformationQuestions.ts deleted file mode 100644 index d1a1ab7f9b..0000000000 --- a/server/@types/shared/models/ArrayOfOASysSupportingInformationQuestions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { OASysSupportingInformationQuestion } from './OASysSupportingInformationQuestion'; -export type ArrayOfOASysSupportingInformationQuestions = Array; diff --git a/server/@types/shared/models/Arrival.ts b/server/@types/shared/models/Arrival.ts index cce95cdec8..8e23b496f7 100644 --- a/server/@types/shared/models/Arrival.ts +++ b/server/@types/shared/models/Arrival.ts @@ -3,12 +3,12 @@ /* tslint:disable */ /* eslint-disable */ export type Arrival = { - expectedDepartureDate: string; arrivalDate: string; arrivalTime: string; - notes?: string; - keyWorkerStaffCode?: string; bookingId: string; createdAt: string; + expectedDepartureDate: string; + keyWorkerStaffCode?: string; + notes?: string; }; diff --git a/server/@types/shared/models/Assessment.ts b/server/@types/shared/models/Assessment.ts index cdcfba21b6..55fe8aae7e 100644 --- a/server/@types/shared/models/Assessment.ts +++ b/server/@types/shared/models/Assessment.ts @@ -2,22 +2,26 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { AssessmentDecision } from './AssessmentDecision'; import type { ClarificationNote } from './ClarificationNote'; -import type { ReferralHistoryNote } from './ReferralHistoryNote'; +import type { ReferralHistoryDomainEventNote } from './ReferralHistoryDomainEventNote'; +import type { ReferralHistorySystemNote } from './ReferralHistorySystemNote'; +import type { ReferralHistoryUserNote } from './ReferralHistoryUserNote'; export type Assessment = { - service: string; - id: string; - schemaVersion: string; - outdatedSchema: boolean; - createdAt: string; allocatedAt?: string; - submittedAt?: string; + clarificationNotes: Array; + createdAt: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + data?: Record; decision?: AssessmentDecision; + id: string; + outdatedSchema: boolean; + referralHistoryNotes?: Array<(ReferralHistoryDomainEventNote | ReferralHistorySystemNote | ReferralHistoryUserNote)>; rejectionRationale?: string; - data?: AnyValue; - clarificationNotes: Array; - referralHistoryNotes?: Array; + schemaVersion: string; + service: string; + submittedAt?: string; }; diff --git a/server/@types/shared/models/AssessmentAcceptance.ts b/server/@types/shared/models/AssessmentAcceptance.ts index aa7f604b8c..00c95b63ea 100644 --- a/server/@types/shared/models/AssessmentAcceptance.ts +++ b/server/@types/shared/models/AssessmentAcceptance.ts @@ -2,15 +2,20 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { ApType } from './ApType'; import type { PlacementDates } from './PlacementDates'; import type { PlacementRequirements } from './PlacementRequirements'; +/** + * Information needed to accept an assessment + */ export type AssessmentAcceptance = { - document: AnyValue; - requirements?: PlacementRequirements; - placementDates?: PlacementDates; apType?: ApType; + /** + * Any object that conforms to the current JSON schema for an application + */ + document: Record; notes?: string; + placementDates?: PlacementDates; + requirements?: PlacementRequirements; }; diff --git a/server/@types/shared/models/AssessmentRejection.ts b/server/@types/shared/models/AssessmentRejection.ts index 1529c026d6..505f98c123 100644 --- a/server/@types/shared/models/AssessmentRejection.ts +++ b/server/@types/shared/models/AssessmentRejection.ts @@ -2,12 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; +/** + * Rejection info + */ export type AssessmentRejection = { - document: AnyValue; - rejectionRationale: string; - referralRejectionReasonId?: string; - referralRejectionReasonDetail?: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + document: Record; isWithdrawn?: boolean; + referralRejectionReasonDetail?: string; + referralRejectionReasonId?: string; + rejectionRationale: string; }; diff --git a/server/@types/shared/models/AssessmentSummary.ts b/server/@types/shared/models/AssessmentSummary.ts index 26f0fd4e37..37abb62087 100644 --- a/server/@types/shared/models/AssessmentSummary.ts +++ b/server/@types/shared/models/AssessmentSummary.ts @@ -3,17 +3,19 @@ /* tslint:disable */ /* eslint-disable */ import type { AssessmentDecision } from './AssessmentDecision'; -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; import type { PersonRisks } from './PersonRisks'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; export type AssessmentSummary = { - type: string; - id: string; applicationId: string; arrivalDate?: string; createdAt: string; dateOfInfoRequest?: string; decision?: AssessmentDecision; + id: string; + person: (FullPerson | RestrictedPerson | UnknownPerson); risks?: PersonRisks; - person: Person; + type: string; }; diff --git a/server/@types/shared/models/AssessmentTask.ts b/server/@types/shared/models/AssessmentTask.ts index e969c7536a..50da60650c 100644 --- a/server/@types/shared/models/AssessmentTask.ts +++ b/server/@types/shared/models/AssessmentTask.ts @@ -5,7 +5,9 @@ import type { AssessmentDecision } from './AssessmentDecision'; import type { Task } from './Task'; export type AssessmentTask = (Task & { - createdFromAppeal: boolean; + createdFromAppeal?: boolean; outcome?: AssessmentDecision; +} & { + createdFromAppeal: boolean; }); diff --git a/server/@types/shared/models/Bed.ts b/server/@types/shared/models/Bed.ts index d49f6af20c..8642ab4755 100644 --- a/server/@types/shared/models/Bed.ts +++ b/server/@types/shared/models/Bed.ts @@ -3,12 +3,12 @@ /* tslint:disable */ /* eslint-disable */ export type Bed = { - id: string; - name: string; - code?: string; /** * End date of the bed availability, open for availability if not specified */ bedEndDate?: string; + code?: string; + id: string; + name: string; }; diff --git a/server/@types/shared/models/BedDetail.ts b/server/@types/shared/models/BedDetail.ts index 6fb14a0d6d..73ea30176d 100644 --- a/server/@types/shared/models/BedDetail.ts +++ b/server/@types/shared/models/BedDetail.ts @@ -2,9 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BedSummary } from './BedSummary'; +import type { BedStatus } from './BedStatus'; import type { CharacteristicPair } from './CharacteristicPair'; -export type BedDetail = (BedSummary & { +export type BedDetail = { characteristics: Array; -}); + id: string; + name: string; + roomName: string; + status: BedStatus; +}; diff --git a/server/@types/shared/models/BedSearchAttributes.ts b/server/@types/shared/models/BedSearchAttributes.ts index 08df6f35f1..eba6d84f2b 100644 --- a/server/@types/shared/models/BedSearchAttributes.ts +++ b/server/@types/shared/models/BedSearchAttributes.ts @@ -2,4 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Bedspace and property attributes to filter on + */ export type BedSearchAttributes = 'isSharedProperty' | 'isSingleOccupancy' | 'isWheelchairAccessible'; diff --git a/server/@types/shared/models/BedSearchParameters.ts b/server/@types/shared/models/BedSearchParameters.ts index f4fe068177..343bfa782a 100644 --- a/server/@types/shared/models/BedSearchParameters.ts +++ b/server/@types/shared/models/BedSearchParameters.ts @@ -3,14 +3,14 @@ /* tslint:disable */ /* eslint-disable */ export type BedSearchParameters = { + /** + * The number of days the Bed will need to be free from the start_date until + */ + durationDays: number; serviceName: string; /** * The date the Bed will need to be free from */ startDate: string; - /** - * The number of days the Bed will need to be free from the start_date until - */ - durationDays: number; }; diff --git a/server/@types/shared/models/BedSearchResult.ts b/server/@types/shared/models/BedSearchResult.ts index c361ebe4b4..ae7593ac20 100644 --- a/server/@types/shared/models/BedSearchResult.ts +++ b/server/@types/shared/models/BedSearchResult.ts @@ -7,9 +7,9 @@ import type { BedSearchResultPremisesSummary } from './BedSearchResultPremisesSu import type { BedSearchResultRoomSummary } from './BedSearchResultRoomSummary'; import type { ServiceName } from './ServiceName'; export type BedSearchResult = { - serviceName: ServiceName; + bed: BedSearchResultBedSummary; premises: BedSearchResultPremisesSummary; room: BedSearchResultRoomSummary; - bed: BedSearchResultBedSummary; + serviceName: ServiceName; }; diff --git a/server/@types/shared/models/BedSearchResultPremisesSummary.ts b/server/@types/shared/models/BedSearchResultPremisesSummary.ts index 2bc393de2c..d59213b45d 100644 --- a/server/@types/shared/models/BedSearchResultPremisesSummary.ts +++ b/server/@types/shared/models/BedSearchResultPremisesSummary.ts @@ -4,15 +4,8 @@ /* eslint-disable */ import type { CharacteristicPair } from './CharacteristicPair'; export type BedSearchResultPremisesSummary = { - id: string; - name: string; addressLine1: string; addressLine2?: string; - town?: string; - postcode: string; - probationDeliveryUnitName?: string; - notes?: string; - characteristics: Array; /** * the total number of Beds in the Premises */ @@ -21,5 +14,12 @@ export type BedSearchResultPremisesSummary = { * the total number of booked Beds in the Premises */ bookedBedCount?: number; + characteristics: Array; + id: string; + name: string; + notes?: string; + postcode: string; + probationDeliveryUnitName?: string; + town?: string; }; diff --git a/server/@types/shared/models/BedSearchResultRoomSummary.ts b/server/@types/shared/models/BedSearchResultRoomSummary.ts index d5d9c50c78..5d30a89190 100644 --- a/server/@types/shared/models/BedSearchResultRoomSummary.ts +++ b/server/@types/shared/models/BedSearchResultRoomSummary.ts @@ -4,8 +4,8 @@ /* eslint-disable */ import type { CharacteristicPair } from './CharacteristicPair'; export type BedSearchResultRoomSummary = { + characteristics: Array; id: string; name: string; - characteristics: Array; }; diff --git a/server/@types/shared/models/BedSearchResults.ts b/server/@types/shared/models/BedSearchResults.ts index 14dcd00e52..686f28e723 100644 --- a/server/@types/shared/models/BedSearchResults.ts +++ b/server/@types/shared/models/BedSearchResults.ts @@ -2,20 +2,21 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BedSearchResult } from './BedSearchResult'; +import type { ApprovedPremisesBedSearchResult } from './ApprovedPremisesBedSearchResult'; +import type { TemporaryAccommodationBedSearchResult } from './TemporaryAccommodationBedSearchResult'; export type BedSearchResults = { + results: Array<(ApprovedPremisesBedSearchResult | TemporaryAccommodationBedSearchResult)>; /** - * How many distinct Rooms the Beds in the results belong to + * How many Beds are in the results */ - resultsRoomCount: number; + resultsBedCount: number; /** * How many distinct Premises the Beds in the results belong to */ resultsPremisesCount: number; /** - * How many Beds are in the results + * How many distinct Rooms the Beds in the results belong to */ - resultsBedCount: number; - results: Array; + resultsRoomCount: number; }; diff --git a/server/@types/shared/models/Booking.ts b/server/@types/shared/models/Booking.ts index b484f2b797..afd0e4a38b 100644 --- a/server/@types/shared/models/Booking.ts +++ b/server/@types/shared/models/Booking.ts @@ -3,49 +3,55 @@ /* tslint:disable */ /* eslint-disable */ import type { Arrival } from './Arrival'; -import type { BookingBody } from './BookingBody'; +import type { Bed } from './Bed'; import type { BookingPremisesSummary } from './BookingPremisesSummary'; import type { BookingStatus } from './BookingStatus'; import type { Cancellation } from './Cancellation'; import type { Confirmation } from './Confirmation'; import type { Departure } from './Departure'; import type { Extension } from './Extension'; +import type { FullPerson } from './FullPerson'; import type { Nonarrival } from './Nonarrival'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { ServiceName } from './ServiceName'; +import type { StaffMember } from './StaffMember'; import type { Turnaround } from './Turnaround'; -export type Booking = (BookingBody & { - status: BookingStatus; - extensions: Array; - arrival?: Arrival | null; - /** - * The latest version of the departure, if it exists - */ - departure?: Departure | null; - /** - * The full history of the departure - */ - departures: Array; - nonArrival?: Nonarrival | null; - /** - * The latest version of the cancellation, if it exists - */ - cancellation?: Cancellation | null; +import type { UnknownPerson } from './UnknownPerson'; +export type Booking = { + applicationId?: string; + arrival?: Arrival; + arrivalDate: string; + assessmentId?: string; + bed?: Bed; + cancellation?: Cancellation; /** * The full history of the cancellation */ cancellations: Array; - confirmation?: Confirmation | null; + confirmation?: Confirmation; + createdAt: string; + departure?: Departure; + departureDate: string; /** - * The latest version of the turnaround, if it exists + * The full history of the departure */ - turnaround?: Turnaround | null; + departures: Array; + effectiveEndDate?: string; + extensions: Array; + id: string; + keyWorker?: StaffMember; + nonArrival?: Nonarrival; + originalArrivalDate: string; + originalDepartureDate: string; + person: (FullPerson | RestrictedPerson | UnknownPerson); + premises: BookingPremisesSummary; + serviceName: ServiceName; + status: BookingStatus; + turnaround?: Turnaround; + turnaroundStartDate?: string; /** * The full history of turnarounds */ turnarounds?: Array; - turnaroundStartDate?: string; - effectiveEndDate?: string; - applicationId?: string; - assessmentId?: string; - premises: BookingPremisesSummary; -}); +}; diff --git a/server/@types/shared/models/BookingBody.ts b/server/@types/shared/models/BookingBody.ts deleted file mode 100644 index 916320053e..0000000000 --- a/server/@types/shared/models/BookingBody.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Bed } from './Bed'; -import type { Person } from './Person'; -import type { ServiceName } from './ServiceName'; -import type { StaffMember } from './StaffMember'; -export type BookingBody = { - id: string; - person: Person; - arrivalDate: string; - originalArrivalDate: string; - departureDate: string; - originalDepartureDate: string; - createdAt: string; - /** - * KeyWorker is a legacy field only used by CAS1. It is not longer being captured or populated - * @deprecated - */ - keyWorker?: StaffMember; - serviceName: ServiceName; - bed?: Bed; -}; - diff --git a/server/@types/shared/models/BookingNotMade.ts b/server/@types/shared/models/BookingNotMade.ts index dbdc54a934..43e785e33b 100644 --- a/server/@types/shared/models/BookingNotMade.ts +++ b/server/@types/shared/models/BookingNotMade.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type BookingNotMade = { - id: string; - placementRequestId: string; createdAt: string; + id: string; notes?: string; + placementRequestId: string; }; diff --git a/server/@types/shared/models/BookingSearchResult.ts b/server/@types/shared/models/BookingSearchResult.ts index 9eb32d3e0e..b9c9f5c47e 100644 --- a/server/@types/shared/models/BookingSearchResult.ts +++ b/server/@types/shared/models/BookingSearchResult.ts @@ -8,10 +8,10 @@ import type { BookingSearchResultPersonSummary } from './BookingSearchResultPers import type { BookingSearchResultPremisesSummary } from './BookingSearchResultPremisesSummary'; import type { BookingSearchResultRoomSummary } from './BookingSearchResultRoomSummary'; export type BookingSearchResult = { - person: BookingSearchResultPersonSummary; + bed: BookingSearchResultBedSummary; booking: BookingSearchResultBookingSummary; + person: BookingSearchResultPersonSummary; premises: BookingSearchResultPremisesSummary; room: BookingSearchResultRoomSummary; - bed: BookingSearchResultBedSummary; }; diff --git a/server/@types/shared/models/BookingSearchResultBookingSummary.ts b/server/@types/shared/models/BookingSearchResultBookingSummary.ts index edda821fc2..3d5b22cbeb 100644 --- a/server/@types/shared/models/BookingSearchResultBookingSummary.ts +++ b/server/@types/shared/models/BookingSearchResultBookingSummary.ts @@ -4,10 +4,10 @@ /* eslint-disable */ import type { BookingStatus } from './BookingStatus'; export type BookingSearchResultBookingSummary = { + createdAt: string; + endDate: string; id: string; - status: BookingStatus; startDate: string; - endDate: string; - createdAt: string; + status: BookingStatus; }; diff --git a/server/@types/shared/models/BookingSearchResultPersonSummary.ts b/server/@types/shared/models/BookingSearchResultPersonSummary.ts index 339d3c06e1..c6938c1261 100644 --- a/server/@types/shared/models/BookingSearchResultPersonSummary.ts +++ b/server/@types/shared/models/BookingSearchResultPersonSummary.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type BookingSearchResultPersonSummary = { - name?: string; crn: string; + name?: string; }; diff --git a/server/@types/shared/models/BookingSearchResultPremisesSummary.ts b/server/@types/shared/models/BookingSearchResultPremisesSummary.ts index c3860d832f..25d1dfea6f 100644 --- a/server/@types/shared/models/BookingSearchResultPremisesSummary.ts +++ b/server/@types/shared/models/BookingSearchResultPremisesSummary.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type BookingSearchResultPremisesSummary = { - id: string; - name: string; addressLine1: string; addressLine2?: string; - town?: string; + id: string; + name: string; postcode: string; + town?: string; }; diff --git a/server/@types/shared/models/BookingSearchResults.ts b/server/@types/shared/models/BookingSearchResults.ts index 15ceeb4b2c..be3060334f 100644 --- a/server/@types/shared/models/BookingSearchResults.ts +++ b/server/@types/shared/models/BookingSearchResults.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { BookingSearchResult } from './BookingSearchResult'; export type BookingSearchResults = { - resultsCount: number; results: Array; + resultsCount: number; }; diff --git a/server/@types/shared/models/BookingSummary.ts b/server/@types/shared/models/BookingSummary.ts index 61007bd51e..36af356d62 100644 --- a/server/@types/shared/models/BookingSummary.ts +++ b/server/@types/shared/models/BookingSummary.ts @@ -2,13 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { Type } from './Type'; export type BookingSummary = { + arrivalDate: string; + createdAt: string; + departureDate: string; id: string; premisesId: string; premisesName: string; - arrivalDate: string; - departureDate: string; - createdAt: string; - type: 'space' | 'legacy'; + type: Type; }; diff --git a/server/@types/shared/models/CacheType.ts b/server/@types/shared/models/CacheType.ts deleted file mode 100644 index 63add29f0a..0000000000 --- a/server/@types/shared/models/CacheType.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type CacheType = 'qCodeStaffMembers' | 'userAccess' | 'staffDetails' | 'teamsManagingCase' | 'ukBankHolidays' | 'inmateDetails'; diff --git a/server/@types/shared/models/Cancellation.ts b/server/@types/shared/models/Cancellation.ts index 1aa4d8627e..2624e71938 100644 --- a/server/@types/shared/models/Cancellation.ts +++ b/server/@types/shared/models/Cancellation.ts @@ -3,14 +3,17 @@ /* tslint:disable */ /* eslint-disable */ import type { CancellationReason } from './CancellationReason'; +/** + * The full history of the cancellation + */ export type Cancellation = { - id?: string; bookingId: string; + createdAt: string; date: string; - reason: CancellationReason; + id?: string; notes?: string; - createdAt: string; - premisesName: string; otherReason?: string; + premisesName: string; + reason: CancellationReason; }; diff --git a/server/@types/shared/models/CancellationReason.ts b/server/@types/shared/models/CancellationReason.ts index 9c21f24e55..804e7fdd42 100644 --- a/server/@types/shared/models/CancellationReason.ts +++ b/server/@types/shared/models/CancellationReason.ts @@ -4,8 +4,8 @@ /* eslint-disable */ export type CancellationReason = { id: string; - name: string; isActive: boolean; + name: string; serviceScope: string; }; diff --git a/server/@types/shared/models/Cas1ApplicationUserDetails.ts b/server/@types/shared/models/Cas1ApplicationUserDetails.ts index 7076ca0251..8168090a81 100644 --- a/server/@types/shared/models/Cas1ApplicationUserDetails.ts +++ b/server/@types/shared/models/Cas1ApplicationUserDetails.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1ApplicationUserDetails = { - name: string; email?: string; + name: string; telephoneNumber?: string; }; diff --git a/server/@types/shared/models/Cas1KeyWorkerAllocation.ts b/server/@types/shared/models/Cas1KeyWorkerAllocation.ts index 82a57d1aa5..b5d3afd8d3 100644 --- a/server/@types/shared/models/Cas1KeyWorkerAllocation.ts +++ b/server/@types/shared/models/Cas1KeyWorkerAllocation.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { StaffMember } from './StaffMember'; export type Cas1KeyWorkerAllocation = { - keyWorker: StaffMember; allocatedAt?: string; + keyWorker: StaffMember; }; diff --git a/server/@types/shared/models/Cas1NewArrival.ts b/server/@types/shared/models/Cas1NewArrival.ts index 1b00005cb7..c5b0975ca3 100644 --- a/server/@types/shared/models/Cas1NewArrival.ts +++ b/server/@types/shared/models/Cas1NewArrival.ts @@ -3,12 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1NewArrival = { + arrivalDate?: string; /** * This is deprecated. Instead use arrivalDate and arrivalTime - * @deprecated */ arrivalDateTime?: string; - arrivalDate?: string; arrivalTime?: string; }; diff --git a/server/@types/shared/models/Cas1NewDeparture.ts b/server/@types/shared/models/Cas1NewDeparture.ts index 935e0de0e0..9a7573b640 100644 --- a/server/@types/shared/models/Cas1NewDeparture.ts +++ b/server/@types/shared/models/Cas1NewDeparture.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1NewDeparture = { - departureDateTime?: string; departureDate?: string; + departureDateTime?: string; departureTime?: string; - reasonId: string; moveOnCategoryId?: string; notes?: string; + reasonId: string; }; diff --git a/server/@types/shared/models/Cas1NewOutOfServiceBed.ts b/server/@types/shared/models/Cas1NewOutOfServiceBed.ts index a78118af46..44293329aa 100644 --- a/server/@types/shared/models/Cas1NewOutOfServiceBed.ts +++ b/server/@types/shared/models/Cas1NewOutOfServiceBed.ts @@ -2,12 +2,15 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the out-of-service bed + */ export type Cas1NewOutOfServiceBed = { - startDate: string; + bedId: string; endDate: string; + notes?: string; reason: string; referenceNumber?: string; - notes?: string; - bedId: string; + startDate: string; }; diff --git a/server/@types/shared/models/Cas1NewOutOfServiceBedCancellation.ts b/server/@types/shared/models/Cas1NewOutOfServiceBedCancellation.ts index 253c79a166..e2785d8476 100644 --- a/server/@types/shared/models/Cas1NewOutOfServiceBedCancellation.ts +++ b/server/@types/shared/models/Cas1NewOutOfServiceBedCancellation.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the cancellation + */ export type Cas1NewOutOfServiceBedCancellation = { notes?: string; }; diff --git a/server/@types/shared/models/Cas1NewSpaceBooking.ts b/server/@types/shared/models/Cas1NewSpaceBooking.ts index 9bd32e9eb7..8af0773538 100644 --- a/server/@types/shared/models/Cas1NewSpaceBooking.ts +++ b/server/@types/shared/models/Cas1NewSpaceBooking.ts @@ -3,6 +3,9 @@ /* tslint:disable */ /* eslint-disable */ import type { Cas1SpaceBookingRequirements } from './Cas1SpaceBookingRequirements'; +/** + * details of the space booking to be created + */ export type Cas1NewSpaceBooking = { arrivalDate: string; departureDate: string; diff --git a/server/@types/shared/models/Cas1NewSpaceBookingCancellation.ts b/server/@types/shared/models/Cas1NewSpaceBookingCancellation.ts index d88fcc9b7d..84c21ce12c 100644 --- a/server/@types/shared/models/Cas1NewSpaceBookingCancellation.ts +++ b/server/@types/shared/models/Cas1NewSpaceBookingCancellation.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the cancellation + */ export type Cas1NewSpaceBookingCancellation = { occurredAt: string; reasonId: string; diff --git a/server/@types/shared/models/Cas1NonArrival.ts b/server/@types/shared/models/Cas1NonArrival.ts index 66b01be69b..442e14bdfa 100644 --- a/server/@types/shared/models/Cas1NonArrival.ts +++ b/server/@types/shared/models/Cas1NonArrival.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1NonArrival = { - reason: string; notes?: string; + reason: string; }; diff --git a/server/@types/shared/models/Cas1OutOfServiceBed.ts b/server/@types/shared/models/Cas1OutOfServiceBed.ts index 26cb033aaf..686fc13c2f 100644 --- a/server/@types/shared/models/Cas1OutOfServiceBed.ts +++ b/server/@types/shared/models/Cas1OutOfServiceBed.ts @@ -9,21 +9,21 @@ import type { Cas1OutOfServiceBedStatus } from './Cas1OutOfServiceBedStatus'; import type { NamedId } from './NamedId'; import type { Temporality } from './Temporality'; export type Cas1OutOfServiceBed = { - id: string; + apArea: NamedId; + bed: NamedId; + cancellation?: Cas1OutOfServiceBedCancellation; createdAt: string; - startDate: string; + daysLostCount: number; endDate: string; - bed: NamedId; - room: NamedId; + id: string; + notes?: string; premises: NamedId; - apArea: NamedId; reason: Cas1OutOfServiceBedReason; referenceNumber?: string; - notes?: string; - daysLostCount: number; - temporality: Temporality; - status: Cas1OutOfServiceBedStatus; - cancellation?: Cas1OutOfServiceBedCancellation | null; revisionHistory: Array; + room: NamedId; + startDate: string; + status: Cas1OutOfServiceBedStatus; + temporality: Temporality; }; diff --git a/server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts b/server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts index 4823df5a75..d60e247962 100644 --- a/server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts +++ b/server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1OutOfServiceBedCancellation = { - id: string; createdAt: string; + id: string; notes?: string; }; diff --git a/server/@types/shared/models/Cas1OutOfServiceBedReason.ts b/server/@types/shared/models/Cas1OutOfServiceBedReason.ts index 4aa5fccfb9..8dc6e65163 100644 --- a/server/@types/shared/models/Cas1OutOfServiceBedReason.ts +++ b/server/@types/shared/models/Cas1OutOfServiceBedReason.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type Cas1OutOfServiceBedReason = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/Cas1OutOfServiceBedRevision.ts b/server/@types/shared/models/Cas1OutOfServiceBedRevision.ts index b92b954c3e..96a2b9a670 100644 --- a/server/@types/shared/models/Cas1OutOfServiceBedRevision.ts +++ b/server/@types/shared/models/Cas1OutOfServiceBedRevision.ts @@ -2,18 +2,19 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; import type { Cas1OutOfServiceBedReason } from './Cas1OutOfServiceBedReason'; import type { Cas1OutOfServiceBedRevisionType } from './Cas1OutOfServiceBedRevisionType'; -import type { User } from './User'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; export type Cas1OutOfServiceBedRevision = { - id: string; - updatedAt: string; - updatedBy?: User; - revisionType: Array; - startDate?: string; endDate?: string; + id: string; + notes?: string; reason?: Cas1OutOfServiceBedReason; referenceNumber?: string; - notes?: string; + revisionType: Array; + startDate?: string; + updatedAt: string; + updatedBy?: (ApprovedPremisesUser | TemporaryAccommodationUser); }; diff --git a/server/@types/shared/models/Cas1OutOfServiceBedSummary.ts b/server/@types/shared/models/Cas1OutOfServiceBedSummary.ts index 5307151f53..b55c04d55d 100644 --- a/server/@types/shared/models/Cas1OutOfServiceBedSummary.ts +++ b/server/@types/shared/models/Cas1OutOfServiceBedSummary.ts @@ -5,10 +5,10 @@ import type { Cas1OutOfServiceBedReason } from './Cas1OutOfServiceBedReason'; import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic'; export type Cas1OutOfServiceBedSummary = { - id: string; - startDate: string; + characteristics: Array; endDate: string; + id: string; reason: Cas1OutOfServiceBedReason; - characteristics: Array; + startDate: string; }; diff --git a/server/@types/shared/models/Cas1OverbookingRange.ts b/server/@types/shared/models/Cas1OverbookingRange.ts index a65c840518..0bbec9756e 100644 --- a/server/@types/shared/models/Cas1OverbookingRange.ts +++ b/server/@types/shared/models/Cas1OverbookingRange.ts @@ -2,11 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * over-bookings for the next 12 weeks + */ export type Cas1OverbookingRange = { - startInclusive: string; /** * This can be the same as the start date if overbooked for one night */ endInclusive: string; + startInclusive: string; }; diff --git a/server/@types/shared/models/Cas1PremiseCapacity.ts b/server/@types/shared/models/Cas1PremiseCapacity.ts index 68c41ec615..9dda2331a4 100644 --- a/server/@types/shared/models/Cas1PremiseCapacity.ts +++ b/server/@types/shared/models/Cas1PremiseCapacity.ts @@ -5,12 +5,12 @@ import type { Cas1PremiseCapacityForDay } from './Cas1PremiseCapacityForDay'; import type { Cas1PremisesSummary } from './Cas1PremisesSummary'; export type Cas1PremiseCapacity = { - premise: Cas1PremisesSummary; - startDate: string; - endDate: string; /** * Capacity for each day, returning chronologically (oldest first) */ capacity: Array; + endDate: string; + premise: Cas1PremisesSummary; + startDate: string; }; diff --git a/server/@types/shared/models/Cas1PremiseCapacityForDay.ts b/server/@types/shared/models/Cas1PremiseCapacityForDay.ts index a4fa011a49..8c83a03158 100644 --- a/server/@types/shared/models/Cas1PremiseCapacityForDay.ts +++ b/server/@types/shared/models/Cas1PremiseCapacityForDay.ts @@ -3,12 +3,10 @@ /* tslint:disable */ /* eslint-disable */ import type { Cas1PremiseCharacteristicAvailability } from './Cas1PremiseCharacteristicAvailability'; +/** + * Capacity for each day, returning chronologically (oldest first) + */ export type Cas1PremiseCapacityForDay = { - date: string; - /** - * total bed count including temporarily unavailable beds (e.g. out of service beds). this does not consider bookings. - */ - totalBedCount: number; /** * total bed count excluding temporarily unavailable beds (e.g. out of service beds). this does not consider bookings. */ @@ -18,5 +16,10 @@ export type Cas1PremiseCapacityForDay = { */ bookingCount: number; characteristicAvailability: Array; + date: string; + /** + * total bed count including temporarily unavailable beds (e.g. out of service beds). this does not consider bookings. + */ + totalBedCount: number; }; diff --git a/server/@types/shared/models/Cas1PremiseCharacteristicAvailability.ts b/server/@types/shared/models/Cas1PremiseCharacteristicAvailability.ts index b7b120e3ee..96075d775d 100644 --- a/server/@types/shared/models/Cas1PremiseCharacteristicAvailability.ts +++ b/server/@types/shared/models/Cas1PremiseCharacteristicAvailability.ts @@ -3,11 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic'; -/** - * Will only ever be returned for the following characteristics: 'isArsonSuitable', 'hasEnSuite', 'isSingle', 'isStepFreeDesignated', 'isSuitedForSexOffenders' or 'isWheelchairDesignated' - */ export type Cas1PremiseCharacteristicAvailability = { - characteristic: Cas1SpaceCharacteristic; /** * the number of available beds with this characteristic */ @@ -16,5 +12,6 @@ export type Cas1PremiseCharacteristicAvailability = { * the number of bookings requiring this characteristic */ bookingsCount: number; + characteristic: Cas1SpaceCharacteristic; }; diff --git a/server/@types/shared/models/Cas1PremiseDaySummary.ts b/server/@types/shared/models/Cas1PremiseDaySummary.ts index 6e59c9cab6..8da18d1f5d 100644 --- a/server/@types/shared/models/Cas1PremiseDaySummary.ts +++ b/server/@types/shared/models/Cas1PremiseDaySummary.ts @@ -6,11 +6,11 @@ import type { Cas1OutOfServiceBedSummary } from './Cas1OutOfServiceBedSummary'; import type { Cas1PremiseCapacityForDay } from './Cas1PremiseCapacityForDay'; import type { Cas1SpaceBookingDaySummary } from './Cas1SpaceBookingDaySummary'; export type Cas1PremiseDaySummary = { + capacity: Cas1PremiseCapacityForDay; forDate: string; - previousDate: string; nextDate: string; - capacity: Cas1PremiseCapacityForDay; - spaceBookings: Array; outOfServiceBeds: Array; + previousDate: string; + spaceBookings: Array; }; diff --git a/server/@types/shared/models/Cas1PremisesBasicSummary.ts b/server/@types/shared/models/Cas1PremisesBasicSummary.ts index cdcc6f0035..5233efff5c 100644 --- a/server/@types/shared/models/Cas1PremisesBasicSummary.ts +++ b/server/@types/shared/models/Cas1PremisesBasicSummary.ts @@ -4,11 +4,11 @@ /* eslint-disable */ import type { NamedId } from './NamedId'; export type Cas1PremisesBasicSummary = { - id: string; - name: string; - apCode?: string; apArea: NamedId; + apCode?: string; bedCount: number; + id: string; + name: string; supportsSpaceBookings: boolean; }; diff --git a/server/@types/shared/models/Cas1PremisesSearchResultSummary.ts b/server/@types/shared/models/Cas1PremisesSearchResultSummary.ts index 21383ddc63..2040e06bd6 100644 --- a/server/@types/shared/models/Cas1PremisesSearchResultSummary.ts +++ b/server/@types/shared/models/Cas1PremisesSearchResultSummary.ts @@ -6,20 +6,20 @@ import type { ApType } from './ApType'; import type { CharacteristicPair } from './CharacteristicPair'; import type { NamedId } from './NamedId'; export type Cas1PremisesSearchResultSummary = { - id?: string; + addressLine1?: string; + addressLine2?: string; + apArea?: NamedId; apCode?: string; - deliusQCode?: string; apType?: ApType; + deliusQCode?: string; + id?: string; name?: string; - addressLine1?: string; - addressLine2?: string; - town?: string; postcode?: string; - apArea?: NamedId; + premisesCharacteristics?: Array; /** * The total number of spaces in this premises */ totalSpaceCount?: number; - premisesCharacteristics?: Array; + town?: string; }; diff --git a/server/@types/shared/models/Cas1PremisesSummary.ts b/server/@types/shared/models/Cas1PremisesSummary.ts index 5465426bed..d8867f6056 100644 --- a/server/@types/shared/models/Cas1PremisesSummary.ts +++ b/server/@types/shared/models/Cas1PremisesSummary.ts @@ -5,28 +5,28 @@ import type { ApArea } from './ApArea'; import type { Cas1OverbookingRange } from './Cas1OverbookingRange'; export type Cas1PremisesSummary = { - id: string; - name: string; - apCode: string; - postcode: string; apArea: ApArea; - /** - * The total number of beds in this premises - */ - bedCount: number; + apCode: string; /** * The total number of beds available at this moment in time */ availableBeds: number; + /** + * The total number of beds in this premises + */ + bedCount: number; + id: string; + managerDetails?: string; + name: string; /** * The total number of out of service beds at this moment in time */ outOfServiceBeds: number; - supportsSpaceBookings: boolean; - managerDetails?: string; /** * over-bookings for the next 12 weeks */ overbookingSummary: Array; + postcode: string; + supportsSpaceBookings: boolean; }; diff --git a/server/@types/shared/models/Cas1ReportName.ts b/server/@types/shared/models/Cas1ReportName.ts deleted file mode 100644 index c8fc3e1c6f..0000000000 --- a/server/@types/shared/models/Cas1ReportName.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas1ReportName = 'applications' | 'applicationsV2' | 'dailyMetrics' | 'lostBeds' | 'outOfServiceBeds' | 'placementApplications' | 'placementMatchingOutcomes' | 'placementMatchingOutcomesV2' | 'requestsForPlacement'; diff --git a/server/@types/shared/models/Cas1SpaceAvailability.ts b/server/@types/shared/models/Cas1SpaceAvailability.ts index bed5064c06..87a9df9843 100644 --- a/server/@types/shared/models/Cas1SpaceAvailability.ts +++ b/server/@types/shared/models/Cas1SpaceAvailability.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic'; export type Cas1SpaceAvailability = { - spaceCharacteristics?: Array; durationInDays?: number; + spaceCharacteristics?: Array; }; diff --git a/server/@types/shared/models/Cas1SpaceBooking.ts b/server/@types/shared/models/Cas1SpaceBooking.ts index a7f4c87aae..7d7f45ba7f 100644 --- a/server/@types/shared/models/Cas1SpaceBooking.ts +++ b/server/@types/shared/models/Cas1SpaceBooking.ts @@ -2,6 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; import type { Cas1KeyWorkerAllocation } from './Cas1KeyWorkerAllocation'; import type { Cas1SpaceBookingCancellation } from './Cas1SpaceBookingCancellation'; import type { Cas1SpaceBookingDates } from './Cas1SpaceBookingDates'; @@ -9,25 +10,14 @@ import type { Cas1SpaceBookingDeparture } from './Cas1SpaceBookingDeparture'; import type { Cas1SpaceBookingNonArrival } from './Cas1SpaceBookingNonArrival'; import type { Cas1SpaceBookingRequirements } from './Cas1SpaceBookingRequirements'; import type { Cas1SpaceBookingSummaryStatus } from './Cas1SpaceBookingSummaryStatus'; +import type { FullPerson } from './FullPerson'; import type { NamedId } from './NamedId'; -import type { Person } from './Person'; -import type { User } from './User'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; +import type { UnknownPerson } from './UnknownPerson'; export type Cas1SpaceBooking = { - id: string; - applicationId: string; - assessmentId?: string; - person: Person; - tier?: string; - requirements: Cas1SpaceBookingRequirements; - premises: NamedId; - apArea: NamedId; - bookedBy?: User; - requestForPlacementId?: string; - expectedArrivalDate: string; - expectedDepartureDate: string; /** * Use actualArrivalDateOnly and actualArrivalTime - * @deprecated */ actualArrivalDate?: string; actualArrivalDateOnly?: string; @@ -37,7 +27,6 @@ export type Cas1SpaceBooking = { actualArrivalTime?: string; /** * Use actualDepartureDateOnly and actualDepartureTime - * @deprecated */ actualDepartureDate?: string; actualDepartureDateOnly?: string; @@ -45,6 +34,11 @@ export type Cas1SpaceBooking = { * This value may not be defined even if a departure date is */ actualDepartureTime?: string; + apArea: NamedId; + applicationId: string; + assessmentId?: string; + bookedBy?: (ApprovedPremisesUser | TemporaryAccommodationUser); + cancellation?: Cas1SpaceBookingCancellation; /** * actual arrival date or, if not known, the expected arrival date */ @@ -53,13 +47,20 @@ export type Cas1SpaceBooking = { * actual departure date or, if not known, the expected departure date */ canonicalDepartureDate: string; - departure?: Cas1SpaceBookingDeparture; createdAt: string; + deliusEventNumber?: string; + departure?: Cas1SpaceBookingDeparture; + expectedArrivalDate: string; + expectedDepartureDate: string; + id: string; keyWorkerAllocation?: Cas1KeyWorkerAllocation; - otherBookingsInPremisesForCrn: Array; - cancellation?: Cas1SpaceBookingCancellation; nonArrival?: Cas1SpaceBookingNonArrival; - deliusEventNumber?: string; + otherBookingsInPremisesForCrn: Array; + person: (FullPerson | RestrictedPerson | UnknownPerson); + premises: NamedId; + requestForPlacementId?: string; + requirements: Cas1SpaceBookingRequirements; status?: Cas1SpaceBookingSummaryStatus; + tier?: string; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingCancellation.ts b/server/@types/shared/models/Cas1SpaceBookingCancellation.ts index 127ad6a578..eb6ff03d76 100644 --- a/server/@types/shared/models/Cas1SpaceBookingCancellation.ts +++ b/server/@types/shared/models/Cas1SpaceBookingCancellation.ts @@ -5,8 +5,8 @@ import type { CancellationReason } from './CancellationReason'; export type Cas1SpaceBookingCancellation = { occurredAt: string; - recordedAt: string; reason: CancellationReason; reason_notes?: string; + recordedAt: string; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingCharacteristic.ts b/server/@types/shared/models/Cas1SpaceBookingCharacteristic.ts index 150320b2b8..f49b855d59 100644 --- a/server/@types/shared/models/Cas1SpaceBookingCharacteristic.ts +++ b/server/@types/shared/models/Cas1SpaceBookingCharacteristic.ts @@ -2,7 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * All of the characteristics applicable to a space booking - */ export type Cas1SpaceBookingCharacteristic = 'hasEnSuite' | 'isArsonSuitable' | 'isSingle' | 'isStepFreeDesignated' | 'isSuitedForSexOffenders' | 'isWheelchairDesignated'; diff --git a/server/@types/shared/models/Cas1SpaceBookingDates.ts b/server/@types/shared/models/Cas1SpaceBookingDates.ts index 3ee1089f72..acba205a2b 100644 --- a/server/@types/shared/models/Cas1SpaceBookingDates.ts +++ b/server/@types/shared/models/Cas1SpaceBookingDates.ts @@ -3,7 +3,6 @@ /* tslint:disable */ /* eslint-disable */ export type Cas1SpaceBookingDates = { - id: string; /** * actual arrival date or, if not known, the expected arrival date */ @@ -12,5 +11,6 @@ export type Cas1SpaceBookingDates = { * actual departure date or, if not known, the expected departure date */ canonicalDepartureDate: string; + id: string; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingDaySummary.ts b/server/@types/shared/models/Cas1SpaceBookingDaySummary.ts index 08bcebf22d..65507bcac9 100644 --- a/server/@types/shared/models/Cas1SpaceBookingDaySummary.ts +++ b/server/@types/shared/models/Cas1SpaceBookingDaySummary.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ import type { Cas1SpaceBookingCharacteristic } from './Cas1SpaceBookingCharacteristic'; -import type { PersonSummary } from './PersonSummary'; +import type { FullPersonSummary } from './FullPersonSummary'; +import type { RestrictedPersonSummary } from './RestrictedPersonSummary'; +import type { UnknownPersonSummary } from './UnknownPersonSummary'; export type Cas1SpaceBookingDaySummary = { - id: string; - person: PersonSummary; /** * actual arrival date or, if not known, the expected arrival date */ @@ -15,11 +15,13 @@ export type Cas1SpaceBookingDaySummary = { * actual departure date or, if not known, the expected departure date */ canonicalDepartureDate: string; + essentialCharacteristics: Array; + id: string; + person: (FullPersonSummary | RestrictedPersonSummary | UnknownPersonSummary); + releaseType: string; /** * Risk rating tier level of corresponding application */ tier: string; - releaseType: string; - essentialCharacteristics: Array; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingDaySummarySortField.ts b/server/@types/shared/models/Cas1SpaceBookingDaySummarySortField.ts deleted file mode 100644 index a7d63f12ad..0000000000 --- a/server/@types/shared/models/Cas1SpaceBookingDaySummarySortField.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas1SpaceBookingDaySummarySortField = 'personName' | 'tier' | 'canonicalArrivalDate' | 'canonicalDepartureDate' | 'releaseType' | 'spaceType'; diff --git a/server/@types/shared/models/Cas1SpaceBookingDeparture.ts b/server/@types/shared/models/Cas1SpaceBookingDeparture.ts index 8278608124..533b84b925 100644 --- a/server/@types/shared/models/Cas1SpaceBookingDeparture.ts +++ b/server/@types/shared/models/Cas1SpaceBookingDeparture.ts @@ -4,9 +4,9 @@ /* eslint-disable */ import type { NamedId } from './NamedId'; export type Cas1SpaceBookingDeparture = { - reason: NamedId; - parentReason?: NamedId; moveOnCategory?: NamedId; notes?: string; + parentReason?: NamedId; + reason: NamedId; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingNonArrival.ts b/server/@types/shared/models/Cas1SpaceBookingNonArrival.ts index 0bd4198f1e..b5fa40ed3f 100644 --- a/server/@types/shared/models/Cas1SpaceBookingNonArrival.ts +++ b/server/@types/shared/models/Cas1SpaceBookingNonArrival.ts @@ -5,7 +5,7 @@ import type { NamedId } from './NamedId'; export type Cas1SpaceBookingNonArrival = { confirmedAt?: string; - reason?: NamedId; notes?: string; + reason?: NamedId; }; diff --git a/server/@types/shared/models/Cas1SpaceBookingSummary.ts b/server/@types/shared/models/Cas1SpaceBookingSummary.ts index 9d8e668404..2b9957a42d 100644 --- a/server/@types/shared/models/Cas1SpaceBookingSummary.ts +++ b/server/@types/shared/models/Cas1SpaceBookingSummary.ts @@ -4,10 +4,10 @@ /* eslint-disable */ import type { Cas1KeyWorkerAllocation } from './Cas1KeyWorkerAllocation'; import type { Cas1SpaceBookingSummaryStatus } from './Cas1SpaceBookingSummaryStatus'; -import type { PersonSummary } from './PersonSummary'; +import type { FullPersonSummary } from './FullPersonSummary'; +import type { RestrictedPersonSummary } from './RestrictedPersonSummary'; +import type { UnknownPersonSummary } from './UnknownPersonSummary'; export type Cas1SpaceBookingSummary = { - id: string; - person: PersonSummary; /** * actual arrival date or, if not known, the expected arrival date */ @@ -16,11 +16,13 @@ export type Cas1SpaceBookingSummary = { * actual departure date or, if not known, the expected departure date */ canonicalDepartureDate: string; + id: string; + keyWorkerAllocation?: Cas1KeyWorkerAllocation; + person: (FullPersonSummary | RestrictedPersonSummary | UnknownPersonSummary); + status?: Cas1SpaceBookingSummaryStatus; /** * Risk rating tier level of corresponding application */ tier?: string; - keyWorkerAllocation?: Cas1KeyWorkerAllocation; - status?: Cas1SpaceBookingSummaryStatus; }; diff --git a/server/@types/shared/models/Cas1SpaceCategory.ts b/server/@types/shared/models/Cas1SpaceCategory.ts deleted file mode 100644 index b1e516586a..0000000000 --- a/server/@types/shared/models/Cas1SpaceCategory.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Spaces are categorised by these traits - 'standard' plus selected physcial and risk characteristics - */ -export type Cas1SpaceCategory = 'standard' | 'arson' | 'wheelchair' | 'sexOffender' | 'enSuite' | 'single'; diff --git a/server/@types/shared/models/Cas1SpaceCharacteristic.ts b/server/@types/shared/models/Cas1SpaceCharacteristic.ts index 874257a8f1..3a1098912f 100644 --- a/server/@types/shared/models/Cas1SpaceCharacteristic.ts +++ b/server/@types/shared/models/Cas1SpaceCharacteristic.ts @@ -2,7 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * All of the characteristics of both premises and rooms - */ export type Cas1SpaceCharacteristic = 'acceptsChildSexOffenders' | 'acceptsHateCrimeOffenders' | 'acceptsNonSexualChildOffenders' | 'acceptsSexOffenders' | 'hasArsonInsuranceConditions' | 'hasBrailleSignage' | 'hasCallForAssistance' | 'hasCrib7Bedding' | 'hasEnSuite' | 'hasFixedMobilityAids' | 'hasHearingLoop' | 'hasLift' | 'hasNearbySprinkler' | 'hasSmokeDetector' | 'hasStepFreeAccess' | 'hasStepFreeAccessToCommunalAreas' | 'hasTactileFlooring' | 'hasTurningSpace' | 'hasWheelChairAccessibleBathrooms' | 'hasWideAccessToCommunalAreas' | 'hasWideDoor' | 'hasWideStepFreeAccess' | 'isArsonDesignated' | 'isArsonSuitable' | 'isCatered' | 'isFullyFm' | 'isGroundFloor' | 'isGroundFloorNrOffice' | 'isIAP' | 'isSingle' | 'isStepFreeDesignated' | 'isSuitableForVulnerable' | 'isSuitedForSexOffenders' | 'isTopFloorVulnerable' | 'isWheelchairAccessible' | 'isWheelchairDesignated'; diff --git a/server/@types/shared/models/Cas1SpaceSearchParameters.ts b/server/@types/shared/models/Cas1SpaceSearchParameters.ts index cd91813e97..42de601dc8 100644 --- a/server/@types/shared/models/Cas1SpaceSearchParameters.ts +++ b/server/@types/shared/models/Cas1SpaceSearchParameters.ts @@ -8,18 +8,18 @@ export type Cas1SpaceSearchParameters = { * The id of the application the space search is for */ applicationId: string; - /** - * The date the space is required from - */ - startDate: string; /** * The number of days the space is needed, from the start date */ durationInDays: number; + requirements: Cas1SpaceSearchRequirements; + /** + * The date the space is required from + */ + startDate: string; /** * The 'target' location, in the form of a postcode district */ targetPostcodeDistrict: string; - requirements: Cas1SpaceSearchRequirements; }; diff --git a/server/@types/shared/models/Cas1SpaceSearchRequirements.ts b/server/@types/shared/models/Cas1SpaceSearchRequirements.ts index 13f9a687da..2fe2a0e614 100644 --- a/server/@types/shared/models/Cas1SpaceSearchRequirements.ts +++ b/server/@types/shared/models/Cas1SpaceSearchRequirements.ts @@ -7,11 +7,10 @@ import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic'; import type { Gender } from './Gender'; export type Cas1SpaceSearchRequirements = { apTypes?: Array; - spaceCharacteristics?: Array; /** * gender is obtained from application's associated gender - * @deprecated */ genders?: Array; + spaceCharacteristics?: Array; }; diff --git a/server/@types/shared/models/Cas1SpaceSearchResult.ts b/server/@types/shared/models/Cas1SpaceSearchResult.ts index a687a5117f..916799b696 100644 --- a/server/@types/shared/models/Cas1SpaceSearchResult.ts +++ b/server/@types/shared/models/Cas1SpaceSearchResult.ts @@ -5,8 +5,8 @@ import type { Cas1PremisesSearchResultSummary } from './Cas1PremisesSearchResultSummary'; import type { Cas1SpaceAvailability } from './Cas1SpaceAvailability'; export type Cas1SpaceSearchResult = { - premises?: Cas1PremisesSearchResultSummary; distanceInMiles?: number; + premises?: Cas1PremisesSearchResultSummary; spacesAvailable?: Array; }; diff --git a/server/@types/shared/models/Cas1SpaceSearchResults.ts b/server/@types/shared/models/Cas1SpaceSearchResults.ts index 32770b335f..b03df2760a 100644 --- a/server/@types/shared/models/Cas1SpaceSearchResults.ts +++ b/server/@types/shared/models/Cas1SpaceSearchResults.ts @@ -5,8 +5,8 @@ import type { Cas1SpaceSearchParameters } from './Cas1SpaceSearchParameters'; import type { Cas1SpaceSearchResult } from './Cas1SpaceSearchResult'; export type Cas1SpaceSearchResults = { - searchCriteria?: Cas1SpaceSearchParameters; - resultsCount: number; results: Array; + resultsCount: number; + searchCriteria?: Cas1SpaceSearchParameters; }; diff --git a/server/@types/shared/models/Cas1UpdateUser.ts b/server/@types/shared/models/Cas1UpdateUser.ts index 709717c6c7..ec06e7c905 100644 --- a/server/@types/shared/models/Cas1UpdateUser.ts +++ b/server/@types/shared/models/Cas1UpdateUser.ts @@ -5,8 +5,8 @@ import type { ApprovedPremisesUserRole } from './ApprovedPremisesUserRole'; import type { UserQualification } from './UserQualification'; export type Cas1UpdateUser = { - roles: Array; - qualifications: Array; cruManagementAreaOverrideId?: string; + qualifications: Array; + roles: Array; }; diff --git a/server/@types/shared/models/Cas2Application.ts b/server/@types/shared/models/Cas2Application.ts index 999177bd9d..b18ce898ef 100644 --- a/server/@types/shared/models/Cas2Application.ts +++ b/server/@types/shared/models/Cas2Application.ts @@ -2,22 +2,32 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { Application } from './Application'; import type { ApplicationStatus } from './ApplicationStatus'; import type { Cas2Assessment } from './Cas2Assessment'; import type { Cas2TimelineEvent } from './Cas2TimelineEvent'; import type { NomisUser } from './NomisUser'; export type Cas2Application = (Application & { - createdBy: NomisUser; - schemaVersion: string; - outdatedSchema: boolean; - data?: AnyValue; - document?: AnyValue; - status: ApplicationStatus; + assessment?: Cas2Assessment; + createdBy?: NomisUser; + /** + * Any object that conforms to the current JSON schema for an application + */ + data?: Record; + /** + * Any object that conforms to the current JSON schema for an application + */ + document?: Record; + outdatedSchema?: boolean; + schemaVersion?: string; + status?: ApplicationStatus; submittedAt?: string; telephoneNumber?: string; - assessment?: Cas2Assessment; timelineEvents?: Array; +} & { + createdBy: NomisUser; + outdatedSchema: boolean; + schemaVersion: string; + status: ApplicationStatus; }); diff --git a/server/@types/shared/models/Cas2ApplicationNote.ts b/server/@types/shared/models/Cas2ApplicationNote.ts deleted file mode 100644 index 12ba539603..0000000000 --- a/server/@types/shared/models/Cas2ApplicationNote.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * Notes added to an application - */ -export type Cas2ApplicationNote = { - id?: string; - email: string; - name: string; - body: string; - createdAt: string; -}; - diff --git a/server/@types/shared/models/Cas2ApplicationStatus.ts b/server/@types/shared/models/Cas2ApplicationStatus.ts deleted file mode 100644 index 4bbf45fee7..0000000000 --- a/server/@types/shared/models/Cas2ApplicationStatus.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Cas2ApplicationStatusDetail } from './Cas2ApplicationStatusDetail'; -export type Cas2ApplicationStatus = { - id: string; - name: string; - label: string; - description: string; - statusDetails: Array; -}; - diff --git a/server/@types/shared/models/Cas2ApplicationSummary.ts b/server/@types/shared/models/Cas2ApplicationSummary.ts deleted file mode 100644 index 170c821ea2..0000000000 --- a/server/@types/shared/models/Cas2ApplicationSummary.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { ApplicationStatus } from './ApplicationStatus'; -import type { LatestCas2StatusUpdate } from './LatestCas2StatusUpdate'; -import type { PersonRisks } from './PersonRisks'; -export type Cas2ApplicationSummary = { - type: string; - id: string; - createdAt: string; - submittedAt?: string; - createdByUserId: string; - createdByUserName?: string; - status: ApplicationStatus; - latestStatusUpdate?: LatestCas2StatusUpdate; - risks?: PersonRisks; - hdcEligibilityDate?: string; - personName: string; - crn: string; - nomsNumber: string; -}; - diff --git a/server/@types/shared/models/Cas2Assessment.ts b/server/@types/shared/models/Cas2Assessment.ts index ca4697730f..b9d1e6d45c 100644 --- a/server/@types/shared/models/Cas2Assessment.ts +++ b/server/@types/shared/models/Cas2Assessment.ts @@ -4,9 +4,9 @@ /* eslint-disable */ import type { Cas2StatusUpdate } from './Cas2StatusUpdate'; export type Cas2Assessment = { + assessorName?: string; id: string; nacroReferralId?: string; - assessorName?: string; statusUpdates?: Array; }; diff --git a/server/@types/shared/models/Cas2AssessmentStatusUpdate.ts b/server/@types/shared/models/Cas2AssessmentStatusUpdate.ts deleted file mode 100644 index 1899230b7f..0000000000 --- a/server/@types/shared/models/Cas2AssessmentStatusUpdate.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas2AssessmentStatusUpdate = { - /** - * The "name" of the new status to be applied - */ - newStatus: string; - newStatusDetails?: Array; -}; - diff --git a/server/@types/shared/models/Cas2ReportName.ts b/server/@types/shared/models/Cas2ReportName.ts deleted file mode 100644 index 61993f85fd..0000000000 --- a/server/@types/shared/models/Cas2ReportName.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas2ReportName = 'submitted-applications' | 'application-status-updates' | 'unsubmitted-applications'; diff --git a/server/@types/shared/models/Cas2StatusUpdate.ts b/server/@types/shared/models/Cas2StatusUpdate.ts index 17c67b0641..dc35dab23c 100644 --- a/server/@types/shared/models/Cas2StatusUpdate.ts +++ b/server/@types/shared/models/Cas2StatusUpdate.ts @@ -5,12 +5,12 @@ import type { Cas2StatusUpdateDetail } from './Cas2StatusUpdateDetail'; import type { ExternalUser } from './ExternalUser'; export type Cas2StatusUpdate = { + description: string; id: string; - name: string; label: string; - description: string; - updatedBy?: ExternalUser; - updatedAt?: string; + name: string; statusUpdateDetails?: Array; + updatedAt?: string; + updatedBy?: ExternalUser; }; diff --git a/server/@types/shared/models/Cas2StatusUpdateDetail.ts b/server/@types/shared/models/Cas2StatusUpdateDetail.ts index d607758b71..95db6b1c4f 100644 --- a/server/@types/shared/models/Cas2StatusUpdateDetail.ts +++ b/server/@types/shared/models/Cas2StatusUpdateDetail.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type Cas2StatusUpdateDetail = { id: string; - name: string; label: string; + name: string; }; diff --git a/server/@types/shared/models/Cas2SubmittedApplication.ts b/server/@types/shared/models/Cas2SubmittedApplication.ts deleted file mode 100644 index b8793a7f02..0000000000 --- a/server/@types/shared/models/Cas2SubmittedApplication.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AnyValue } from './AnyValue'; -import type { Cas2Assessment } from './Cas2Assessment'; -import type { Cas2TimelineEvent } from './Cas2TimelineEvent'; -import type { NomisUser } from './NomisUser'; -import type { Person } from './Person'; -export type Cas2SubmittedApplication = { - id: string; - person: Person; - createdAt: string; - submittedBy?: NomisUser; - schemaVersion: string; - outdatedSchema: boolean; - document?: AnyValue; - submittedAt?: string; - telephoneNumber?: string; - timelineEvents: Array; - assessment: Cas2Assessment; -}; - diff --git a/server/@types/shared/models/Cas2SubmittedApplicationSummary.ts b/server/@types/shared/models/Cas2SubmittedApplicationSummary.ts deleted file mode 100644 index 47da64dc96..0000000000 --- a/server/@types/shared/models/Cas2SubmittedApplicationSummary.ts +++ /dev/null @@ -1,14 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas2SubmittedApplicationSummary = { - id: string; - createdByUserId: string; - crn: string; - nomsNumber: string; - personName: string; - createdAt: string; - submittedAt?: string; -}; - diff --git a/server/@types/shared/models/Cas2TimelineEvent.ts b/server/@types/shared/models/Cas2TimelineEvent.ts index d784c8eccf..1eb192f5ef 100644 --- a/server/@types/shared/models/Cas2TimelineEvent.ts +++ b/server/@types/shared/models/Cas2TimelineEvent.ts @@ -4,10 +4,10 @@ /* eslint-disable */ import type { TimelineEventType } from './TimelineEventType'; export type Cas2TimelineEvent = { - type: TimelineEventType; - occurredAt: string; - label: string; body?: string; createdByName: string; + label: string; + occurredAt: string; + type: TimelineEventType; }; diff --git a/server/@types/shared/models/Cas3ReportType.ts b/server/@types/shared/models/Cas3ReportType.ts deleted file mode 100644 index 06381539d2..0000000000 --- a/server/@types/shared/models/Cas3ReportType.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -export type Cas3ReportType = 'referral' | 'booking' | 'bedUsage' | 'bedOccupancy' | 'futureBookings' | 'futureBookingsCsv' | 'bookingGap'; diff --git a/server/@types/shared/models/Cas2ApplicationStatusDetail.ts b/server/@types/shared/models/Category.ts similarity index 54% rename from server/@types/shared/models/Cas2ApplicationStatusDetail.ts rename to server/@types/shared/models/Category.ts index 5e68387141..619ccc8567 100644 --- a/server/@types/shared/models/Cas2ApplicationStatusDetail.ts +++ b/server/@types/shared/models/Category.ts @@ -2,9 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type Cas2ApplicationStatusDetail = { - id: string; - name: string; - label: string; -}; - +export type Category = 'submitted' | 'unallocated' | 'in_review' | 'ready_to_place' | 'rejected' | 'completed'; diff --git a/server/@types/shared/models/Characteristic.ts b/server/@types/shared/models/Characteristic.ts index e37ef2dfcb..96dd43e7fe 100644 --- a/server/@types/shared/models/Characteristic.ts +++ b/server/@types/shared/models/Characteristic.ts @@ -2,11 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ModelScope } from './ModelScope'; +import type { ServiceScope } from './ServiceScope'; export type Characteristic = { id: string; + modelScope: ModelScope; name: string; propertyName?: string; - serviceScope: 'approved-premises' | 'temporary-accommodation' | '*'; - modelScope: 'premises' | 'room' | '*'; + serviceScope: ServiceScope; }; diff --git a/server/@types/shared/models/CharacteristicPair.ts b/server/@types/shared/models/CharacteristicPair.ts index d1e2a1c548..225baefa9d 100644 --- a/server/@types/shared/models/CharacteristicPair.ts +++ b/server/@types/shared/models/CharacteristicPair.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type CharacteristicPair = { - propertyName?: string; name: string; + propertyName?: string; }; diff --git a/server/@types/shared/models/ClarificationNote.ts b/server/@types/shared/models/ClarificationNote.ts index 271a88005f..a3b51917b7 100644 --- a/server/@types/shared/models/ClarificationNote.ts +++ b/server/@types/shared/models/ClarificationNote.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type ClarificationNote = { - id: string; createdAt: string; - responseReceivedOn?: string; createdByStaffMemberId: string; + id: string; query: string; response?: string; + responseReceivedOn?: string; }; diff --git a/server/@types/shared/models/ClassesToInclude.ts b/server/@types/shared/models/ClassesToInclude.ts new file mode 100644 index 0000000000..3918bc2e5a --- /dev/null +++ b/server/@types/shared/models/ClassesToInclude.ts @@ -0,0 +1,33 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { AllocatedFilter } from './AllocatedFilter'; +import type { ApplicationSortField } from './ApplicationSortField'; +import type { AssessmentSortField } from './AssessmentSortField'; +import type { BookingSearchSortField } from './BookingSearchSortField'; +import type { Cas1OutOfServiceBedSortField } from './Cas1OutOfServiceBedSortField'; +import type { Cas1SpaceBookingResidency } from './Cas1SpaceBookingResidency'; +import type { Cas1SpaceBookingSummarySortField } from './Cas1SpaceBookingSummarySortField'; +import type { PlacementRequestSortField } from './PlacementRequestSortField'; +import type { RiskTierLevel } from './RiskTierLevel'; +import type { SortDirection } from './SortDirection'; +import type { SortOrder } from './SortOrder'; +import type { TaskSortField } from './TaskSortField'; +import type { UserSortField } from './UserSortField'; +export type ClassesToInclude = { + allocatedFilter: AllocatedFilter; + applicationSortField: ApplicationSortField; + assessmentSortField: AssessmentSortField; + bookingSearchSortField: BookingSearchSortField; + cas1OutOfServiceBedSortField: Cas1OutOfServiceBedSortField; + cas1SpaceBookingResidency: Cas1SpaceBookingResidency; + cas1SpaceBookingSummarySortField: Cas1SpaceBookingSummarySortField; + placementRequestSortField: PlacementRequestSortField; + riskTierLevel: RiskTierLevel; + sortDirection: SortDirection; + sortOrder: SortOrder; + taskSortField: TaskSortField; + userSortField: UserSortField; +}; + diff --git a/server/@types/shared/models/Confirmation.ts b/server/@types/shared/models/Confirmation.ts index ad0009ce7b..d894f8dea7 100644 --- a/server/@types/shared/models/Confirmation.ts +++ b/server/@types/shared/models/Confirmation.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type Confirmation = { - id: string; bookingId: string; + createdAt: string; dateTime: string; + id: string; notes?: string; - createdAt: string; }; diff --git a/server/@types/shared/models/DateCapacity.ts b/server/@types/shared/models/DateCapacity.ts index 201f4586bf..136102c5bd 100644 --- a/server/@types/shared/models/DateCapacity.ts +++ b/server/@types/shared/models/DateCapacity.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type DateCapacity = { - date: string; availableBeds: number; + date: string; }; diff --git a/server/@types/shared/models/DateChange.ts b/server/@types/shared/models/DateChange.ts index 2d7288d1f1..9c8f38fbde 100644 --- a/server/@types/shared/models/DateChange.ts +++ b/server/@types/shared/models/DateChange.ts @@ -3,12 +3,12 @@ /* tslint:disable */ /* eslint-disable */ export type DateChange = { - id: string; bookingId: string; - previousArrivalDate: string; + createdAt: string; + id: string; newArrivalDate: string; - previousDepartureDate: string; newDepartureDate: string; - createdAt: string; + previousArrivalDate: string; + previousDepartureDate: string; }; diff --git a/server/@types/shared/models/DatePeriod.ts b/server/@types/shared/models/DatePeriod.ts index 96306c3b34..1bc135323f 100644 --- a/server/@types/shared/models/DatePeriod.ts +++ b/server/@types/shared/models/DatePeriod.ts @@ -2,8 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * 0, 1 or more dates can be specified depending upon the WithdrawableType + */ export type DatePeriod = { - startDate: string; endDate: string; + startDate: string; }; diff --git a/server/@types/shared/models/Departure.ts b/server/@types/shared/models/Departure.ts index 8712867387..5199b5f4e5 100644 --- a/server/@types/shared/models/Departure.ts +++ b/server/@types/shared/models/Departure.ts @@ -5,14 +5,17 @@ import type { DepartureReason } from './DepartureReason'; import type { DestinationProvider } from './DestinationProvider'; import type { MoveOnCategory } from './MoveOnCategory'; +/** + * The full history of the departure + */ export type Departure = { - id: string; bookingId: string; + createdAt: string; dateTime: string; - reason: DepartureReason; - notes?: string; - moveOnCategory: MoveOnCategory; destinationProvider?: DestinationProvider; - createdAt: string; + id: string; + moveOnCategory: MoveOnCategory; + notes?: string; + reason: DepartureReason; }; diff --git a/server/@types/shared/models/DepartureReason.ts b/server/@types/shared/models/DepartureReason.ts index bad22bd7c3..0abf7632fc 100644 --- a/server/@types/shared/models/DepartureReason.ts +++ b/server/@types/shared/models/DepartureReason.ts @@ -4,9 +4,9 @@ /* eslint-disable */ export type DepartureReason = { id: string; + isActive: boolean; name: string; - serviceScope: string; parentReasonId?: string; - isActive: boolean; + serviceScope: string; }; diff --git a/server/@types/shared/models/DestinationProvider.ts b/server/@types/shared/models/DestinationProvider.ts index 35420a5f7c..6c94a7d22a 100644 --- a/server/@types/shared/models/DestinationProvider.ts +++ b/server/@types/shared/models/DestinationProvider.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type DestinationProvider = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/Document.ts b/server/@types/shared/models/Document.ts index 08cce72f17..28e8d01f47 100644 --- a/server/@types/shared/models/Document.ts +++ b/server/@types/shared/models/Document.ts @@ -3,16 +3,13 @@ /* tslint:disable */ /* eslint-disable */ import type { DocumentLevel } from './DocumentLevel'; -/** - * Meta Info about a file relating to an Offender - */ export type Document = { + createdAt: string; + description?: string; + fileName: string; id: string; level: DocumentLevel; - fileName: string; - createdAt: string; typeCode: string; typeDescription: string; - description?: string; }; diff --git a/server/@types/shared/models/DocumentLevel.ts b/server/@types/shared/models/DocumentLevel.ts index 432b865689..c792221f96 100644 --- a/server/@types/shared/models/DocumentLevel.ts +++ b/server/@types/shared/models/DocumentLevel.ts @@ -2,7 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * The level at which a Document is associated - i.e. to the Offender or to a specific Conviction - */ export type DocumentLevel = 'Offender' | 'Conviction'; diff --git a/server/@types/shared/models/ErrorResponse.ts b/server/@types/shared/models/ErrorResponse.ts new file mode 100644 index 0000000000..68f22ce510 --- /dev/null +++ b/server/@types/shared/models/ErrorResponse.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ErrorResponse = { + developerMessage?: string; + errorCode?: string; + moreInfo?: string; + status: number; + userMessage?: string; +}; + diff --git a/server/@types/shared/models/ExtendedPremisesSummary.ts b/server/@types/shared/models/ExtendedPremisesSummary.ts index 2fbd9ca292..06503047b6 100644 --- a/server/@types/shared/models/ExtendedPremisesSummary.ts +++ b/server/@types/shared/models/ExtendedPremisesSummary.ts @@ -5,13 +5,13 @@ import type { DateCapacity } from './DateCapacity'; import type { PremisesBooking } from './PremisesBooking'; export type ExtendedPremisesSummary = { - id?: string; - name?: string; apCode?: string; - postcode?: string; - bedCount?: number; availableBedsForToday?: number; + bedCount?: number; bookings?: Array; dateCapacities?: Array; + id?: string; + name?: string; + postcode?: string; }; diff --git a/server/@types/shared/models/Extension.ts b/server/@types/shared/models/Extension.ts index 91bc5f6920..5c44fa49b3 100644 --- a/server/@types/shared/models/Extension.ts +++ b/server/@types/shared/models/Extension.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type Extension = { - id: string; bookingId: string; - previousDepartureDate: string; + createdAt: string; + id: string; newDepartureDate: string; notes?: string; - createdAt: string; + previousDepartureDate: string; }; diff --git a/server/@types/shared/models/ExternalUser.ts b/server/@types/shared/models/ExternalUser.ts index ff7d96defc..601c3df486 100644 --- a/server/@types/shared/models/ExternalUser.ts +++ b/server/@types/shared/models/ExternalUser.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type ExternalUser = { + email: string; id: string; - username: string; name: string; - email: string; origin?: string; + username: string; }; diff --git a/server/@types/shared/models/FullPerson.ts b/server/@types/shared/models/FullPerson.ts index 3371bc36ae..5d5f4d9cc9 100644 --- a/server/@types/shared/models/FullPerson.ts +++ b/server/@types/shared/models/FullPerson.ts @@ -5,17 +5,22 @@ import type { Person } from './Person'; import type { PersonStatus } from './PersonStatus'; export type FullPerson = (Person & { - name: string; - dateOfBirth: string; - nomsNumber?: string; - pncNumber?: string; + dateOfBirth?: string; ethnicity?: string; + genderIdentity?: string; + isRestricted?: boolean; + name?: string; nationality?: string; + nomsNumber?: string; + pncNumber?: string; + prisonName?: string; religionOrBelief?: string; + sex?: string; + status?: PersonStatus; +} & { + dateOfBirth: string; + name: string; sex: string; - genderIdentity?: string; status: PersonStatus; - prisonName?: string; - isRestricted?: boolean; }); diff --git a/server/@types/shared/models/FullPersonSummary.ts b/server/@types/shared/models/FullPersonSummary.ts index 1d14526d28..18acd74133 100644 --- a/server/@types/shared/models/FullPersonSummary.ts +++ b/server/@types/shared/models/FullPersonSummary.ts @@ -4,7 +4,10 @@ /* eslint-disable */ import type { PersonSummary } from './PersonSummary'; export type FullPersonSummary = (PersonSummary & { - name: string; + isRestricted?: boolean; + name?: string; +} & { isRestricted: boolean; + name: string; }); diff --git a/server/@types/shared/models/HmppsSubjectAccessRequestContent.ts b/server/@types/shared/models/HmppsSubjectAccessRequestContent.ts new file mode 100644 index 0000000000..2283247443 --- /dev/null +++ b/server/@types/shared/models/HmppsSubjectAccessRequestContent.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type HmppsSubjectAccessRequestContent = { + /** + * The content of the subject access request response + */ + content: Record; +}; + diff --git a/server/@types/shared/models/InvalidParam.ts b/server/@types/shared/models/InvalidParam.ts index ddac872679..985af20c6b 100644 --- a/server/@types/shared/models/InvalidParam.ts +++ b/server/@types/shared/models/InvalidParam.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type InvalidParam = { - propertyName?: string; errorType?: string; + propertyName?: string; }; diff --git a/server/@types/shared/models/Cas1ApprovedPremisesGender.ts b/server/@types/shared/models/LoadError.ts similarity index 69% rename from server/@types/shared/models/Cas1ApprovedPremisesGender.ts rename to server/@types/shared/models/LoadError.ts index 51252920bf..f11ad76978 100644 --- a/server/@types/shared/models/Cas1ApprovedPremisesGender.ts +++ b/server/@types/shared/models/LoadError.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type Cas1ApprovedPremisesGender = 'man' | 'woman'; +export type LoadError = 'staff_record_not_found'; diff --git a/server/@types/shared/models/LostBed.ts b/server/@types/shared/models/LostBed.ts index 51c8f64a81..6ae2ade754 100644 --- a/server/@types/shared/models/LostBed.ts +++ b/server/@types/shared/models/LostBed.ts @@ -6,16 +6,16 @@ import type { LostBedCancellation } from './LostBedCancellation'; import type { LostBedReason } from './LostBedReason'; import type { LostBedStatus } from './LostBedStatus'; export type LostBed = { - id: string; - startDate: string; - endDate: string; bedId: string; bedName: string; - roomName: string; + cancellation?: LostBedCancellation; + endDate: string; + id: string; + notes?: string; reason: LostBedReason; referenceNumber?: string; - notes?: string; + roomName: string; + startDate: string; status: LostBedStatus; - cancellation?: LostBedCancellation | null; }; diff --git a/server/@types/shared/models/LostBedCancellation.ts b/server/@types/shared/models/LostBedCancellation.ts index 0d06fba550..5878a87de2 100644 --- a/server/@types/shared/models/LostBedCancellation.ts +++ b/server/@types/shared/models/LostBedCancellation.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type LostBedCancellation = { - id: string; createdAt: string; + id: string; notes?: string; }; diff --git a/server/@types/shared/models/LostBedReason.ts b/server/@types/shared/models/LostBedReason.ts index 0bf8f9bc00..778b6a15cf 100644 --- a/server/@types/shared/models/LostBedReason.ts +++ b/server/@types/shared/models/LostBedReason.ts @@ -4,8 +4,8 @@ /* eslint-disable */ export type LostBedReason = { id: string; - name: string; isActive: boolean; + name: string; serviceScope: string; }; diff --git a/server/@types/shared/models/Mappa.ts b/server/@types/shared/models/Mappa.ts index 5cfe2cedb3..dd84b7ce4d 100644 --- a/server/@types/shared/models/Mappa.ts +++ b/server/@types/shared/models/Mappa.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type Mappa = { - level: string; lastUpdated: string; + level: string; }; diff --git a/server/@types/shared/models/NewBedMove.ts b/server/@types/shared/models/ModelScope.ts similarity index 65% rename from server/@types/shared/models/NewBedMove.ts rename to server/@types/shared/models/ModelScope.ts index 1cb5bf6411..ecd373aea5 100644 --- a/server/@types/shared/models/NewBedMove.ts +++ b/server/@types/shared/models/ModelScope.ts @@ -2,8 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type NewBedMove = { - bedId: string; - notes?: string; -}; - +export type ModelScope = 'premises' | 'room' | '*'; diff --git a/server/@types/shared/models/MoveOnCategory.ts b/server/@types/shared/models/MoveOnCategory.ts index 327b1ee9b1..9a0e3474bd 100644 --- a/server/@types/shared/models/MoveOnCategory.ts +++ b/server/@types/shared/models/MoveOnCategory.ts @@ -4,8 +4,8 @@ /* eslint-disable */ export type MoveOnCategory = { id: string; + isActive: boolean; name: string; serviceScope: string; - isActive: boolean; }; diff --git a/server/@types/shared/models/NamedId.ts b/server/@types/shared/models/NamedId.ts index e4c69f8a4e..fc188a428f 100644 --- a/server/@types/shared/models/NamedId.ts +++ b/server/@types/shared/models/NamedId.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ /** - * A generic stub for an object with a name and an ID. + * The CRU Management Area manually set on this user. This is provided to support the user configuration page. */ export type NamedId = { id: string; diff --git a/server/@types/shared/models/NewAppeal.ts b/server/@types/shared/models/NewAppeal.ts index da0034bb4e..44d9dd4c76 100644 --- a/server/@types/shared/models/NewAppeal.ts +++ b/server/@types/shared/models/NewAppeal.ts @@ -3,6 +3,9 @@ /* tslint:disable */ /* eslint-disable */ import type { AppealDecision } from './AppealDecision'; +/** + * the appeal to add + */ export type NewAppeal = { appealDate: string; appealDetail: string; diff --git a/server/@types/shared/models/NewApplication.ts b/server/@types/shared/models/NewApplication.ts index e814559615..5a6affd5d2 100644 --- a/server/@types/shared/models/NewApplication.ts +++ b/server/@types/shared/models/NewApplication.ts @@ -2,9 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Information to create a blank application with + */ export type NewApplication = { - crn: string; convictionId?: number; + crn: string; deliusEventNumber?: string; offenceId?: string; }; diff --git a/server/@types/shared/models/NewApplicationTimelineNote.ts b/server/@types/shared/models/NewApplicationTimelineNote.ts index 5ab372e3de..0260bafc17 100644 --- a/server/@types/shared/models/NewApplicationTimelineNote.ts +++ b/server/@types/shared/models/NewApplicationTimelineNote.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ /** - * A note to add to an application + * the note to add */ export type NewApplicationTimelineNote = { note: string; diff --git a/server/@types/shared/models/NewArrival.ts b/server/@types/shared/models/NewArrival.ts index 2a53419226..0136118073 100644 --- a/server/@types/shared/models/NewArrival.ts +++ b/server/@types/shared/models/NewArrival.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type NewArrival = { - type: string; expectedDepartureDate: string; - notes?: string; keyWorkerStaffCode?: string; + notes?: string; + type: string; }; diff --git a/server/@types/shared/models/NewBooking.ts b/server/@types/shared/models/NewBooking.ts index c59c32ed72..a153ac7c3c 100644 --- a/server/@types/shared/models/NewBooking.ts +++ b/server/@types/shared/models/NewBooking.ts @@ -4,13 +4,13 @@ /* eslint-disable */ import type { ServiceName } from './ServiceName'; export type NewBooking = { - crn: string; arrivalDate: string; - departureDate: string; + assessmentId?: string; bedId?: string; - serviceName: ServiceName; + crn: string; + departureDate: string; enableTurnarounds?: boolean; - assessmentId?: string; eventNumber?: string; + serviceName: ServiceName; }; diff --git a/server/@types/shared/models/NewBookingNotMade.ts b/server/@types/shared/models/NewBookingNotMade.ts index 087893a130..960d88c732 100644 --- a/server/@types/shared/models/NewBookingNotMade.ts +++ b/server/@types/shared/models/NewBookingNotMade.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Details about the failure to match + */ export type NewBookingNotMade = { notes?: string; }; diff --git a/server/@types/shared/models/NewCancellation.ts b/server/@types/shared/models/NewCancellation.ts index b706b9c8bc..c469a13fb7 100644 --- a/server/@types/shared/models/NewCancellation.ts +++ b/server/@types/shared/models/NewCancellation.ts @@ -2,10 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the cancellation + */ export type NewCancellation = { date: string; - reason: string; notes?: string; otherReason?: string; + reason: string; }; diff --git a/server/@types/shared/models/NewCas2ApplicationNote.ts b/server/@types/shared/models/NewCas2ApplicationNote.ts deleted file mode 100644 index 9d96dca39e..0000000000 --- a/server/@types/shared/models/NewCas2ApplicationNote.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * A note to add to an application - */ -export type NewCas2ApplicationNote = { - note: string; -}; - diff --git a/server/@types/shared/models/NewCas2Arrival.ts b/server/@types/shared/models/NewCas2Arrival.ts index 36862eb341..d9300dfebd 100644 --- a/server/@types/shared/models/NewCas2Arrival.ts +++ b/server/@types/shared/models/NewCas2Arrival.ts @@ -4,6 +4,8 @@ /* eslint-disable */ import type { NewArrival } from './NewArrival'; export type NewCas2Arrival = (NewArrival & { + arrivalDate?: string; +} & { arrivalDate: string; }); diff --git a/server/@types/shared/models/NewCas3Arrival.ts b/server/@types/shared/models/NewCas3Arrival.ts index c92e393e81..ac2d4dbcff 100644 --- a/server/@types/shared/models/NewCas3Arrival.ts +++ b/server/@types/shared/models/NewCas3Arrival.ts @@ -4,6 +4,8 @@ /* eslint-disable */ import type { NewArrival } from './NewArrival'; export type NewCas3Arrival = (NewArrival & { + arrivalDate?: string; +} & { arrivalDate: string; }); diff --git a/server/@types/shared/models/NewClarificationNote.ts b/server/@types/shared/models/NewClarificationNote.ts index e0e437200f..ab54d77277 100644 --- a/server/@types/shared/models/NewClarificationNote.ts +++ b/server/@types/shared/models/NewClarificationNote.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Clarification note + */ export type NewClarificationNote = { query: string; }; diff --git a/server/@types/shared/models/NewConfirmation.ts b/server/@types/shared/models/NewConfirmation.ts index b44e1423c5..455c40aea4 100644 --- a/server/@types/shared/models/NewConfirmation.ts +++ b/server/@types/shared/models/NewConfirmation.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the confirmation + */ export type NewConfirmation = { notes?: string; }; diff --git a/server/@types/shared/models/NewDateChange.ts b/server/@types/shared/models/NewDateChange.ts index 388a2a6d38..c5b1a4e4d7 100644 --- a/server/@types/shared/models/NewDateChange.ts +++ b/server/@types/shared/models/NewDateChange.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the extension + */ export type NewDateChange = { newArrivalDate?: string; newDepartureDate?: string; diff --git a/server/@types/shared/models/NewDeparture.ts b/server/@types/shared/models/NewDeparture.ts index 9b083a77ce..1e81808509 100644 --- a/server/@types/shared/models/NewDeparture.ts +++ b/server/@types/shared/models/NewDeparture.ts @@ -2,11 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the departure + */ export type NewDeparture = { dateTime: string; - reasonId: string; - notes?: string; - moveOnCategoryId: string; destinationProviderId?: string; + moveOnCategoryId: string; + notes?: string; + reasonId: string; }; diff --git a/server/@types/shared/models/NewExtension.ts b/server/@types/shared/models/NewExtension.ts index 8bb5f01745..b5b8a9c316 100644 --- a/server/@types/shared/models/NewExtension.ts +++ b/server/@types/shared/models/NewExtension.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the extension + */ export type NewExtension = { newDepartureDate: string; notes?: string; diff --git a/server/@types/shared/models/NewLostBed.ts b/server/@types/shared/models/NewLostBed.ts index f7e3e3adc4..b8e5548a70 100644 --- a/server/@types/shared/models/NewLostBed.ts +++ b/server/@types/shared/models/NewLostBed.ts @@ -2,12 +2,15 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the lost bed + */ export type NewLostBed = { - startDate: string; + bedId: string; endDate: string; + notes?: string; reason: string; referenceNumber?: string; - notes?: string; - bedId: string; + startDate: string; }; diff --git a/server/@types/shared/models/NewLostBedCancellation.ts b/server/@types/shared/models/NewLostBedCancellation.ts index ff866e7dd3..b993ffa250 100644 --- a/server/@types/shared/models/NewLostBedCancellation.ts +++ b/server/@types/shared/models/NewLostBedCancellation.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the cancellation + */ export type NewLostBedCancellation = { notes?: string; }; diff --git a/server/@types/shared/models/NewPlacementApplication.ts b/server/@types/shared/models/NewPlacementApplication.ts index a5ce7b043b..6ebbdacf39 100644 --- a/server/@types/shared/models/NewPlacementApplication.ts +++ b/server/@types/shared/models/NewPlacementApplication.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Details about the application + */ export type NewPlacementApplication = { applicationId: string; }; diff --git a/server/@types/shared/models/NewPlacementRequestBooking.ts b/server/@types/shared/models/NewPlacementRequestBooking.ts index 63ba57780a..38a9580508 100644 --- a/server/@types/shared/models/NewPlacementRequestBooking.ts +++ b/server/@types/shared/models/NewPlacementRequestBooking.ts @@ -2,10 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Booking details + */ export type NewPlacementRequestBooking = { arrivalDate: string; - departureDate: string; bedId?: string; + departureDate: string; premisesId?: string; }; diff --git a/server/@types/shared/models/NewPlacementRequestBookingConfirmation.ts b/server/@types/shared/models/NewPlacementRequestBookingConfirmation.ts index bad5f605b6..e846aadc67 100644 --- a/server/@types/shared/models/NewPlacementRequestBookingConfirmation.ts +++ b/server/@types/shared/models/NewPlacementRequestBookingConfirmation.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type NewPlacementRequestBookingConfirmation = { - premisesName: string; arrivalDate: string; departureDate: string; + premisesName: string; }; diff --git a/server/@types/shared/models/NewPremises.ts b/server/@types/shared/models/NewPremises.ts index 217e0a227e..376d773b34 100644 --- a/server/@types/shared/models/NewPremises.ts +++ b/server/@types/shared/models/NewPremises.ts @@ -4,18 +4,18 @@ /* eslint-disable */ import type { PropertyStatus } from './PropertyStatus'; export type NewPremises = { - name: string; addressLine1: string; addressLine2?: string; - town?: string; - postcode: string; - notes?: string; - localAuthorityAreaId?: string; - probationRegionId: string; characteristicIds: Array; - status: PropertyStatus; + localAuthorityAreaId?: string; + name: string; + notes?: string; pdu?: string; + postcode: string; probationDeliveryUnitId?: string; + probationRegionId: string; + status: PropertyStatus; + town?: string; turnaroundWorkingDayCount?: number; }; diff --git a/server/@types/shared/models/NewReferralHistoryUserNote.ts b/server/@types/shared/models/NewReferralHistoryUserNote.ts index 29fb0d4603..62f38df64d 100644 --- a/server/@types/shared/models/NewReferralHistoryUserNote.ts +++ b/server/@types/shared/models/NewReferralHistoryUserNote.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * User note + */ export type NewReferralHistoryUserNote = { message: string; }; diff --git a/server/@types/shared/models/NewRoom.ts b/server/@types/shared/models/NewRoom.ts index 0adbbdf7ef..8a58b53188 100644 --- a/server/@types/shared/models/NewRoom.ts +++ b/server/@types/shared/models/NewRoom.ts @@ -2,13 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the new room + */ export type NewRoom = { - name: string; - notes?: string; - characteristicIds: Array; /** * End date of the bed availability, open for availability if not specified. */ bedEndDate?: string; + characteristicIds: Array; + name: string; + notes?: string; }; diff --git a/server/@types/shared/models/NewTurnaround.ts b/server/@types/shared/models/NewTurnaround.ts index 75dce50a8e..f2579a06b9 100644 --- a/server/@types/shared/models/NewTurnaround.ts +++ b/server/@types/shared/models/NewTurnaround.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the turnaround + */ export type NewTurnaround = { workingDays: number; }; diff --git a/server/@types/shared/models/NewWithdrawal.ts b/server/@types/shared/models/NewWithdrawal.ts index 31c6de0781..fa9f9ac6fb 100644 --- a/server/@types/shared/models/NewWithdrawal.ts +++ b/server/@types/shared/models/NewWithdrawal.ts @@ -3,8 +3,11 @@ /* tslint:disable */ /* eslint-disable */ import type { WithdrawalReason } from './WithdrawalReason'; +/** + * details of the withdrawal + */ export type NewWithdrawal = { - reason: WithdrawalReason; otherReason?: string; + reason: WithdrawalReason; }; diff --git a/server/@types/shared/models/NomisUser.ts b/server/@types/shared/models/NomisUser.ts index 7a5a4cd847..cc9daea42d 100644 --- a/server/@types/shared/models/NomisUser.ts +++ b/server/@types/shared/models/NomisUser.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type NomisUser = { + email?: string; id: string; + isActive: boolean; name: string; nomisUsername: string; - email?: string; - isActive: boolean; }; diff --git a/server/@types/shared/models/NonArrivalReason.ts b/server/@types/shared/models/NonArrivalReason.ts index 0402ea965b..9174ec558e 100644 --- a/server/@types/shared/models/NonArrivalReason.ts +++ b/server/@types/shared/models/NonArrivalReason.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type NonArrivalReason = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/Nonarrival.ts b/server/@types/shared/models/Nonarrival.ts index 48096ed4cf..416c8d9def 100644 --- a/server/@types/shared/models/Nonarrival.ts +++ b/server/@types/shared/models/Nonarrival.ts @@ -4,11 +4,11 @@ /* eslint-disable */ import type { NonArrivalReason } from './NonArrivalReason'; export type Nonarrival = { - id: string; bookingId: string; + createdAt: string; date: string; - reason: NonArrivalReason; + id: string; notes?: string; - createdAt: string; + reason: NonArrivalReason; }; diff --git a/server/@types/shared/models/OASysAssessmentId.ts b/server/@types/shared/models/OASysAssessmentId.ts deleted file mode 100644 index 35bf1e20b4..0000000000 --- a/server/@types/shared/models/OASysAssessmentId.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -/** - * The ID of assessment being used. This should always be the latest Layer 3 assessment, regardless of state. - */ -export type OASysAssessmentId = number; diff --git a/server/@types/shared/models/OASysQuestion.ts b/server/@types/shared/models/OASysQuestion.ts index e1c9de7aa8..ae6b68a2b5 100644 --- a/server/@types/shared/models/OASysQuestion.ts +++ b/server/@types/shared/models/OASysQuestion.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ export type OASysQuestion = { + answer?: string; label: string; questionNumber: string; - answer?: string; }; diff --git a/server/@types/shared/models/OASysRiskOfSeriousHarm.ts b/server/@types/shared/models/OASysRiskOfSeriousHarm.ts index 1922b6a09d..78e671429f 100644 --- a/server/@types/shared/models/OASysRiskOfSeriousHarm.ts +++ b/server/@types/shared/models/OASysRiskOfSeriousHarm.ts @@ -2,14 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ArrayOfOASysRiskOfSeriousHarmSummaryQuestions } from './ArrayOfOASysRiskOfSeriousHarmSummaryQuestions'; -import type { OASysAssessmentId } from './OASysAssessmentId'; import type { OASysAssessmentState } from './OASysAssessmentState'; +import type { OASysQuestion } from './OASysQuestion'; export type OASysRiskOfSeriousHarm = { - assessmentId: OASysAssessmentId; + /** + * The ID of assessment being used. This should always be the latest Layer 3 assessment, regardless of state. + */ + assessmentId: number; assessmentState: OASysAssessmentState; - dateStarted: string; dateCompleted?: string; - rosh: ArrayOfOASysRiskOfSeriousHarmSummaryQuestions; + dateStarted: string; + rosh: Array; }; diff --git a/server/@types/shared/models/OASysRiskToSelf.ts b/server/@types/shared/models/OASysRiskToSelf.ts index b85b8fa0b3..4559d3e005 100644 --- a/server/@types/shared/models/OASysRiskToSelf.ts +++ b/server/@types/shared/models/OASysRiskToSelf.ts @@ -2,14 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ArrayOfOASysRiskToSelfQuestions } from './ArrayOfOASysRiskToSelfQuestions'; -import type { OASysAssessmentId } from './OASysAssessmentId'; import type { OASysAssessmentState } from './OASysAssessmentState'; +import type { OASysQuestion } from './OASysQuestion'; export type OASysRiskToSelf = { - assessmentId: OASysAssessmentId; + /** + * The ID of assessment being used. This should always be the latest Layer 3 assessment, regardless of state. + */ + assessmentId: number; assessmentState: OASysAssessmentState; - dateStarted: string; dateCompleted?: string; - riskToSelf: ArrayOfOASysRiskToSelfQuestions; + dateStarted: string; + riskToSelf: Array; }; diff --git a/server/@types/shared/models/OASysSection.ts b/server/@types/shared/models/OASysSection.ts index abc69fa293..cf64ca3631 100644 --- a/server/@types/shared/models/OASysSection.ts +++ b/server/@types/shared/models/OASysSection.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type OASysSection = { - section: number; - name: string; linkedToHarm?: boolean; linkedToReOffending?: boolean; + name: string; + section: number; }; diff --git a/server/@types/shared/models/OASysSections.ts b/server/@types/shared/models/OASysSections.ts index 2cbdffad5a..9fd5766e84 100644 --- a/server/@types/shared/models/OASysSections.ts +++ b/server/@types/shared/models/OASysSections.ts @@ -2,22 +2,21 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ArrayOfOASysOffenceDetailsQuestions } from './ArrayOfOASysOffenceDetailsQuestions'; -import type { ArrayOfOASysRiskManagementPlanQuestions } from './ArrayOfOASysRiskManagementPlanQuestions'; -import type { ArrayOfOASysRiskOfSeriousHarmSummaryQuestions } from './ArrayOfOASysRiskOfSeriousHarmSummaryQuestions'; -import type { ArrayOfOASysRiskToSelfQuestions } from './ArrayOfOASysRiskToSelfQuestions'; -import type { ArrayOfOASysSupportingInformationQuestions } from './ArrayOfOASysSupportingInformationQuestions'; -import type { OASysAssessmentId } from './OASysAssessmentId'; import type { OASysAssessmentState } from './OASysAssessmentState'; +import type { OASysQuestion } from './OASysQuestion'; +import type { OASysSupportingInformationQuestion } from './OASysSupportingInformationQuestion'; export type OASysSections = { - assessmentId: OASysAssessmentId; + /** + * The ID of assessment being used. This should always be the latest Layer 3 assessment, regardless of state. + */ + assessmentId: number; assessmentState: OASysAssessmentState; - dateStarted: string; dateCompleted?: string; - offenceDetails: ArrayOfOASysOffenceDetailsQuestions; - roshSummary: ArrayOfOASysRiskOfSeriousHarmSummaryQuestions; - supportingInformation: ArrayOfOASysSupportingInformationQuestions; - riskToSelf: ArrayOfOASysRiskToSelfQuestions; - riskManagementPlan: ArrayOfOASysRiskManagementPlanQuestions; + dateStarted: string; + offenceDetails: Array; + riskManagementPlan: Array; + riskToSelf: Array; + roshSummary: Array; + supportingInformation: Array; }; diff --git a/server/@types/shared/models/OASysSupportingInformationQuestion.ts b/server/@types/shared/models/OASysSupportingInformationQuestion.ts index 74d82c29f6..916c8832d1 100644 --- a/server/@types/shared/models/OASysSupportingInformationQuestion.ts +++ b/server/@types/shared/models/OASysSupportingInformationQuestion.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type OASysSupportingInformationQuestion = { + answer?: string; label: string; - sectionNumber?: number; - questionNumber: string; linkedToHarm?: boolean; linkedToReOffending?: boolean; - answer?: string; + questionNumber: string; + sectionNumber?: number; }; diff --git a/server/@types/shared/models/PersonAcctAlert.ts b/server/@types/shared/models/PersonAcctAlert.ts index 6d64c1f8e1..f7bc843b12 100644 --- a/server/@types/shared/models/PersonAcctAlert.ts +++ b/server/@types/shared/models/PersonAcctAlert.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type PersonAcctAlert = { + active: boolean; alertId: number; comment?: string; dateCreated: string; dateExpires?: string; expired: boolean; - active: boolean; }; diff --git a/server/@types/shared/models/PersonRisks.ts b/server/@types/shared/models/PersonRisks.ts index 524590f8d7..bfbe500b06 100644 --- a/server/@types/shared/models/PersonRisks.ts +++ b/server/@types/shared/models/PersonRisks.ts @@ -8,9 +8,9 @@ import type { RiskTierEnvelope } from './RiskTierEnvelope'; import type { RoshRisksEnvelope } from './RoshRisksEnvelope'; export type PersonRisks = { crn: string; - roshRisks: RoshRisksEnvelope; + flags: FlagsEnvelope; mappa?: MappaEnvelope; + roshRisks: RoshRisksEnvelope; tier: RiskTierEnvelope; - flags: FlagsEnvelope; }; diff --git a/server/@types/shared/models/PersonalTimeline.ts b/server/@types/shared/models/PersonalTimeline.ts index 8782eb1105..de065f35a2 100644 --- a/server/@types/shared/models/PersonalTimeline.ts +++ b/server/@types/shared/models/PersonalTimeline.ts @@ -3,9 +3,11 @@ /* tslint:disable */ /* eslint-disable */ import type { ApplicationTimeline } from './ApplicationTimeline'; -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; export type PersonalTimeline = { - person: Person; applications: Array; + person: (FullPerson | RestrictedPerson | UnknownPerson); }; diff --git a/server/@types/shared/models/PlacementApplication.ts b/server/@types/shared/models/PlacementApplication.ts index 0e5809e15c..ed6de483f1 100644 --- a/server/@types/shared/models/PlacementApplication.ts +++ b/server/@types/shared/models/PlacementApplication.ts @@ -2,33 +2,38 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; -import type { NewPlacementApplication } from './NewPlacementApplication'; import type { PlacementApplicationType } from './PlacementApplicationType'; import type { PlacementDates } from './PlacementDates'; import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; -export type PlacementApplication = (NewPlacementApplication & { - /** - * If type is 'Additional', provides the PlacementApplication ID. If type is 'Initial' this field provides a PlacementRequest ID. - */ - id: string; - createdByUserId: string; - schemaVersion: string; - outdatedSchema?: boolean; - createdAt: string; - submittedAt?: string; +export type PlacementApplication = { + applicationCompletedAt: string; + applicationId: string; + assessmentCompletedAt: string; /** * If type is 'Additional', provides the PlacementApplication ID. If type is 'Initial' this field shouldn't be used. */ assessmentId: string; - assessmentCompletedAt: string; - applicationCompletedAt: string; - data?: AnyValue; - document?: AnyValue; canBeWithdrawn: boolean; + createdAt: string; + createdByUserId: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + data?: Record; + /** + * Any object that conforms to the current JSON schema for an application + */ + document?: Record; + /** + * If type is 'Additional', provides the PlacementApplication ID. If type is 'Initial' this field provides a PlacementRequest ID. + */ + id: string; isWithdrawn: boolean; - withdrawalReason?: WithdrawPlacementRequestReason; - type: PlacementApplicationType; + outdatedSchema?: boolean; placementDates: Array; -}); + schemaVersion: string; + submittedAt?: string; + type: PlacementApplicationType; + withdrawalReason?: WithdrawPlacementRequestReason; +}; diff --git a/server/@types/shared/models/PlacementApplicationDecisionEnvelope.ts b/server/@types/shared/models/PlacementApplicationDecisionEnvelope.ts index 4d542411f9..8536481029 100644 --- a/server/@types/shared/models/PlacementApplicationDecisionEnvelope.ts +++ b/server/@types/shared/models/PlacementApplicationDecisionEnvelope.ts @@ -3,9 +3,12 @@ /* tslint:disable */ /* eslint-disable */ import type { PlacementApplicationDecision } from './PlacementApplicationDecision'; +/** + * Information needed to submit a placement application + */ export type PlacementApplicationDecisionEnvelope = { decision: PlacementApplicationDecision; - summaryOfChanges: string; decisionSummary: string; + summaryOfChanges: string; }; diff --git a/server/@types/shared/models/PlacementApplicationTask.ts b/server/@types/shared/models/PlacementApplicationTask.ts index c299dffeee..95a3985578 100644 --- a/server/@types/shared/models/PlacementApplicationTask.ts +++ b/server/@types/shared/models/PlacementApplicationTask.ts @@ -9,10 +9,14 @@ import type { ReleaseTypeOption } from './ReleaseTypeOption'; import type { RiskTierEnvelope } from './RiskTierEnvelope'; import type { Task } from './Task'; export type PlacementApplicationTask = (Task & { - tier: RiskTierEnvelope; - releaseType: ReleaseTypeOption; - placementType: PlacementType; - placementDates?: Array; outcome?: PlacementApplicationDecision; + placementDates?: Array; + placementType?: PlacementType; + releaseType?: ReleaseTypeOption; + tier?: RiskTierEnvelope; +} & { + placementType: PlacementType; + releaseType: ReleaseTypeOption; + tier: RiskTierEnvelope; }); diff --git a/server/@types/shared/models/PlacementApplicationType.ts b/server/@types/shared/models/PlacementApplicationType.ts index 0456e4687c..d958ce6ead 100644 --- a/server/@types/shared/models/PlacementApplicationType.ts +++ b/server/@types/shared/models/PlacementApplicationType.ts @@ -2,10 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * 'Initial' means that the request for placement was created for the arrival date included on the original application. - * 'Additional' means the request for placement was created after the application had been assessed as suitable. - * A given application should only have, at most, one request for placement of type 'Initial'. - * - */ export type PlacementApplicationType = 'Initial' | 'Additional'; diff --git a/server/@types/shared/models/PlacementDates.ts b/server/@types/shared/models/PlacementDates.ts index 137aa23903..16f7702a00 100644 --- a/server/@types/shared/models/PlacementDates.ts +++ b/server/@types/shared/models/PlacementDates.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type PlacementDates = { - expectedArrival: string; duration: number; + expectedArrival: string; }; diff --git a/server/@types/shared/models/PlacementRequest.ts b/server/@types/shared/models/PlacementRequest.ts index 7cf65e5029..bd4dff43d7 100644 --- a/server/@types/shared/models/PlacementRequest.ts +++ b/server/@types/shared/models/PlacementRequest.ts @@ -3,33 +3,44 @@ /* tslint:disable */ /* eslint-disable */ import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { ApType } from './ApType'; import type { AssessmentDecision } from './AssessmentDecision'; import type { BookingSummary } from './BookingSummary'; -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; +import type { Gender } from './Gender'; import type { PersonRisks } from './PersonRisks'; -import type { PlacementDates } from './PlacementDates'; +import type { PlacementCriteria } from './PlacementCriteria'; import type { PlacementRequestRequestType } from './PlacementRequestRequestType'; import type { PlacementRequestStatus } from './PlacementRequestStatus'; -import type { PlacementRequirements } from './PlacementRequirements'; import type { ReleaseTypeOption } from './ReleaseTypeOption'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; -export type PlacementRequest = (PlacementRequirements & PlacementDates & { - id: string; - person: Person; - risks: PersonRisks; +export type PlacementRequest = { + applicationDate: string; applicationId: string; - assessmentId: string; - releaseType: ReleaseTypeOption; - status: PlacementRequestStatus; - assessmentDecision: AssessmentDecision; assessmentDate: string; - applicationDate: string; + assessmentDecision: AssessmentDecision; + assessmentId: string; assessor: ApprovedPremisesUser; + booking?: BookingSummary; + desirableCriteria: Array; + duration: number; + essentialCriteria: Array; + expectedArrival: string; + gender: Gender; + id: string; isParole: boolean; + isWithdrawn: boolean; + location: string; notes?: string; - booking?: BookingSummary; + person: (FullPerson | RestrictedPerson | UnknownPerson); + radius: number; + releaseType: ReleaseTypeOption; requestType?: PlacementRequestRequestType; - isWithdrawn: boolean; + risks: PersonRisks; + status: PlacementRequestStatus; + type: ApType; withdrawalReason?: WithdrawPlacementRequestReason; -}); +}; diff --git a/server/@types/shared/models/PlacementRequestDetail.ts b/server/@types/shared/models/PlacementRequestDetail.ts index aa94830e42..0a77fccdd3 100644 --- a/server/@types/shared/models/PlacementRequestDetail.ts +++ b/server/@types/shared/models/PlacementRequestDetail.ts @@ -2,15 +2,55 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Application } from './Application'; +import type { ApprovedPremisesApplication } from './ApprovedPremisesApplication'; +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { ApType } from './ApType'; +import type { AssessmentDecision } from './AssessmentDecision'; +import type { BookingSummary } from './BookingSummary'; import type { Cancellation } from './Cancellation'; -import type { PlacementRequest } from './PlacementRequest'; -export type PlacementRequestDetail = (PlacementRequest & { +import type { Cas2Application } from './Cas2Application'; +import type { FullPerson } from './FullPerson'; +import type { Gender } from './Gender'; +import type { OfflineApplication } from './OfflineApplication'; +import type { PersonRisks } from './PersonRisks'; +import type { PlacementCriteria } from './PlacementCriteria'; +import type { PlacementRequestRequestType } from './PlacementRequestRequestType'; +import type { PlacementRequestStatus } from './PlacementRequestStatus'; +import type { ReleaseTypeOption } from './ReleaseTypeOption'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { TemporaryAccommodationApplication } from './TemporaryAccommodationApplication'; +import type { UnknownPerson } from './UnknownPerson'; +import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; +export type PlacementRequestDetail = { + application: (ApprovedPremisesApplication | Cas2Application | OfflineApplication | TemporaryAccommodationApplication); + applicationDate: string; + applicationId: string; + assessmentDate: string; + assessmentDecision: AssessmentDecision; + assessmentId: string; + assessor: ApprovedPremisesUser; + booking?: BookingSummary; /** * Not used by UI. Space Booking cancellations to be provided if cancellations are required in future. - * @deprecated */ cancellations: Array; - application: Application; -}); + desirableCriteria: Array; + duration: number; + essentialCriteria: Array; + expectedArrival: string; + gender: Gender; + id: string; + isParole: boolean; + isWithdrawn: boolean; + location: string; + notes?: string; + person: (FullPerson | RestrictedPerson | UnknownPerson); + radius: number; + releaseType: ReleaseTypeOption; + requestType?: PlacementRequestRequestType; + risks: PersonRisks; + status: PlacementRequestStatus; + type: ApType; + withdrawalReason?: WithdrawPlacementRequestReason; +}; diff --git a/server/@types/shared/models/PlacementRequestTask.ts b/server/@types/shared/models/PlacementRequestTask.ts index 7cce95050a..6ee6f6c932 100644 --- a/server/@types/shared/models/PlacementRequestTask.ts +++ b/server/@types/shared/models/PlacementRequestTask.ts @@ -2,16 +2,23 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { PlacementDates } from './PlacementDates'; import type { PlacementRequestStatus } from './PlacementRequestStatus'; import type { PlacementRequestTaskOutcome } from './PlacementRequestTaskOutcome'; import type { ReleaseTypeOption } from './ReleaseTypeOption'; import type { RiskTierEnvelope } from './RiskTierEnvelope'; import type { Task } from './Task'; -export type PlacementRequestTask = (Task & PlacementDates & { - tier: RiskTierEnvelope; - releaseType: ReleaseTypeOption; - placementRequestStatus: PlacementRequestStatus; +export type PlacementRequestTask = (Task & { + duration?: number; + expectedArrival?: string; outcome?: PlacementRequestTaskOutcome; + placementRequestStatus?: PlacementRequestStatus; + releaseType?: ReleaseTypeOption; + tier?: RiskTierEnvelope; +} & { + duration: number; + expectedArrival: string; + placementRequestStatus: PlacementRequestStatus; + releaseType: ReleaseTypeOption; + tier: RiskTierEnvelope; }); diff --git a/server/@types/shared/models/PlacementRequirements.ts b/server/@types/shared/models/PlacementRequirements.ts index 5f1762675f..846c3a93c1 100644 --- a/server/@types/shared/models/PlacementRequirements.ts +++ b/server/@types/shared/models/PlacementRequirements.ts @@ -6,11 +6,11 @@ import type { ApType } from './ApType'; import type { Gender } from './Gender'; import type { PlacementCriteria } from './PlacementCriteria'; export type PlacementRequirements = { + desirableCriteria: Array; + essentialCriteria: Array; gender: Gender; - type: ApType; location: string; radius: number; - essentialCriteria: Array; - desirableCriteria: Array; + type: ApType; }; diff --git a/server/@types/shared/models/Premises.ts b/server/@types/shared/models/Premises.ts index 418871f1f7..05f90594a1 100644 --- a/server/@types/shared/models/Premises.ts +++ b/server/@types/shared/models/Premises.ts @@ -8,20 +8,20 @@ import type { LocalAuthorityArea } from './LocalAuthorityArea'; import type { ProbationRegion } from './ProbationRegion'; import type { PropertyStatus } from './PropertyStatus'; export type Premises = { - service: string; - id: string; - name: string; addressLine1: string; addressLine2?: string; - town?: string; - postcode: string; - bedCount: number; + apArea: ApArea; availableBedsForToday: number; + bedCount: number; + characteristics?: Array; + id: string; + localAuthorityArea?: LocalAuthorityArea; + name: string; notes?: string; + postcode: string; probationRegion: ProbationRegion; - apArea: ApArea; - localAuthorityArea?: LocalAuthorityArea; - characteristics?: Array; + service: string; status: PropertyStatus; + town?: string; }; diff --git a/server/@types/shared/models/PremisesBooking.ts b/server/@types/shared/models/PremisesBooking.ts index c39ae38f60..8a968d0334 100644 --- a/server/@types/shared/models/PremisesBooking.ts +++ b/server/@types/shared/models/PremisesBooking.ts @@ -4,13 +4,15 @@ /* eslint-disable */ import type { Bed } from './Bed'; import type { BookingStatus } from './BookingStatus'; -import type { Person } from './Person'; +import type { FullPerson } from './FullPerson'; +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; export type PremisesBooking = { - id?: string; arrivalDate?: string; - departureDate?: string; - person?: Person; bed?: Bed; + departureDate?: string; + id?: string; + person?: (FullPerson | RestrictedPerson | UnknownPerson); status?: BookingStatus; }; diff --git a/server/@types/shared/models/PremisesSummary.ts b/server/@types/shared/models/PremisesSummary.ts index c39519570b..6befcabc6e 100644 --- a/server/@types/shared/models/PremisesSummary.ts +++ b/server/@types/shared/models/PremisesSummary.ts @@ -4,13 +4,13 @@ /* eslint-disable */ import type { PropertyStatus } from './PropertyStatus'; export type PremisesSummary = { - service: string; - id: string; - name: string; addressLine1: string; addressLine2?: string; - postcode: string; bedCount: number; + id: string; + name: string; + postcode: string; + service: string; status: PropertyStatus; }; diff --git a/server/@types/shared/models/PrisonCaseNote.ts b/server/@types/shared/models/PrisonCaseNote.ts index e63e2ea7d8..f773a0bf21 100644 --- a/server/@types/shared/models/PrisonCaseNote.ts +++ b/server/@types/shared/models/PrisonCaseNote.ts @@ -3,13 +3,13 @@ /* tslint:disable */ /* eslint-disable */ export type PrisonCaseNote = { - id: string; - sensitive: boolean; + authorName: string; createdAt: string; + id: string; + note: string; occurredAt: string; - authorName: string; - type: string; + sensitive: boolean; subType: string; - note: string; + type: string; }; diff --git a/server/@types/shared/models/Problem.ts b/server/@types/shared/models/Problem.ts index c1b415b955..cfc316a4fd 100644 --- a/server/@types/shared/models/Problem.ts +++ b/server/@types/shared/models/Problem.ts @@ -3,10 +3,10 @@ /* tslint:disable */ /* eslint-disable */ export type Problem = { - type?: string; - title?: string; - status?: number; detail?: string; instance?: string; + status?: number; + title?: string; + type?: string; }; diff --git a/server/@types/shared/models/ProfileResponse.ts b/server/@types/shared/models/ProfileResponse.ts index 5ba46e1a8d..629170f8b3 100644 --- a/server/@types/shared/models/ProfileResponse.ts +++ b/server/@types/shared/models/ProfileResponse.ts @@ -2,10 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { User } from './User'; +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { LoadError } from './LoadError'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; export type ProfileResponse = { deliusUsername: string; - loadError?: 'staff_record_not_found'; - user?: User; + loadError?: LoadError; + user?: (ApprovedPremisesUser | TemporaryAccommodationUser); }; diff --git a/server/@types/shared/models/Reallocation.ts b/server/@types/shared/models/Reallocation.ts index 941bd7c87e..a1dde3edc0 100644 --- a/server/@types/shared/models/Reallocation.ts +++ b/server/@types/shared/models/Reallocation.ts @@ -5,7 +5,7 @@ import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; import type { TaskType } from './TaskType'; export type Reallocation = { - user: ApprovedPremisesUser; taskType: TaskType; + user: ApprovedPremisesUser; }; diff --git a/server/@types/shared/models/ReferralHistoryNote.ts b/server/@types/shared/models/ReferralHistoryNote.ts index 6e069d40f6..ab98f55ebd 100644 --- a/server/@types/shared/models/ReferralHistoryNote.ts +++ b/server/@types/shared/models/ReferralHistoryNote.ts @@ -4,11 +4,11 @@ /* eslint-disable */ import type { ReferralHistoryNoteMessageDetails } from './ReferralHistoryNoteMessageDetails'; export type ReferralHistoryNote = { - id: string; createdAt: string; + createdByUserName: string; + id: string; message?: string; messageDetails?: ReferralHistoryNoteMessageDetails; - createdByUserName: string; type: string; }; diff --git a/server/@types/shared/models/ReferralHistoryNoteMessageDetails.ts b/server/@types/shared/models/ReferralHistoryNoteMessageDetails.ts index dcd268514b..35a9ccf6c1 100644 --- a/server/@types/shared/models/ReferralHistoryNoteMessageDetails.ts +++ b/server/@types/shared/models/ReferralHistoryNoteMessageDetails.ts @@ -2,11 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; export type ReferralHistoryNoteMessageDetails = { + /** + * Any object that conforms to the current JSON schema for an application + */ + domainEvent?: Record; + isWithdrawn?: boolean; rejectionReason?: string; rejectionReasonDetails?: string; - isWithdrawn?: boolean; - domainEvent?: AnyValue; }; diff --git a/server/@types/shared/models/ReferralHistorySystemNote.ts b/server/@types/shared/models/ReferralHistorySystemNote.ts index 8344ca0243..8c050c076a 100644 --- a/server/@types/shared/models/ReferralHistorySystemNote.ts +++ b/server/@types/shared/models/ReferralHistorySystemNote.ts @@ -2,8 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { Category } from './Category'; import type { ReferralHistoryNote } from './ReferralHistoryNote'; export type ReferralHistorySystemNote = (ReferralHistoryNote & { - category: 'submitted' | 'unallocated' | 'in_review' | 'ready_to_place' | 'rejected' | 'completed'; + category?: Category; +} & { + category: Category; }); diff --git a/server/@types/shared/models/ReferralRejectionReason.ts b/server/@types/shared/models/ReferralRejectionReason.ts index b42ea76387..2aa00dd3a0 100644 --- a/server/@types/shared/models/ReferralRejectionReason.ts +++ b/server/@types/shared/models/ReferralRejectionReason.ts @@ -4,8 +4,8 @@ /* eslint-disable */ export type ReferralRejectionReason = { id: string; + isActive: boolean; name: string; serviceScope: string; - isActive: boolean; }; diff --git a/server/@types/shared/models/RequestForPlacement.ts b/server/@types/shared/models/RequestForPlacement.ts index 18943111a1..16551d7a67 100644 --- a/server/@types/shared/models/RequestForPlacement.ts +++ b/server/@types/shared/models/RequestForPlacement.ts @@ -2,38 +2,34 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { PlacementDates } from './PlacementDates'; import type { RequestForPlacementStatus } from './RequestForPlacementStatus'; import type { RequestForPlacementType } from './RequestForPlacementType'; import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; export type RequestForPlacement = { /** - * If `type` is `"manual"`, provides the `PlacementApplication` ID. - * If `type` is `"automatic"` this field provides a `PlacementRequest` ID. - * + * If true, the user making this request can withdraw this request for placement. If false, it may still be possible to indirectly withdraw this request for placement by withdrawing the application. */ - id: string; - createdByUserId: string; + canBeDirectlyWithdrawn: boolean; createdAt: string; - submittedAt?: string; + createdByUserId: string; /** - * If `type` is `"manual"`, provides the value of `PlacementApplication.decisionMadeAt`. - * If `type` is `"automatic"` this field provides the value of `PlacementRequest.assessmentCompletedAt`. - * + * Any object that conforms to the current JSON schema for an application */ - requestReviewedAt?: string; - document?: AnyValue; + document?: Record; /** - * If true, the user making this request can withdraw this request for placement. - * If false, it may still be possible to indirectly withdraw this request for placement by withdrawing the application. - * + * If `type` is `"manual"`, provides the `PlacementApplication` ID. If `type` is `"automatic"` this field provides a `PlacementRequest` ID. */ - canBeDirectlyWithdrawn: boolean; + id: string; isWithdrawn: boolean; - withdrawalReason?: WithdrawPlacementRequestReason; - type: RequestForPlacementType; placementDates: Array; + /** + * If `type` is `"manual"`, provides the value of `PlacementApplication.decisionMadeAt`. If `type` is `"automatic"` this field provides the value of `PlacementRequest.assessmentCompletedAt`. + */ + requestReviewedAt?: string; status: RequestForPlacementStatus; + submittedAt?: string; + type: RequestForPlacementType; + withdrawalReason?: WithdrawPlacementRequestReason; }; diff --git a/server/@types/shared/models/RiskTier.ts b/server/@types/shared/models/RiskTier.ts index 7e5053aa36..8d5026caa5 100644 --- a/server/@types/shared/models/RiskTier.ts +++ b/server/@types/shared/models/RiskTier.ts @@ -3,7 +3,7 @@ /* tslint:disable */ /* eslint-disable */ export type RiskTier = { - level: string; lastUpdated: string; + level: string; }; diff --git a/server/@types/shared/models/Room.ts b/server/@types/shared/models/Room.ts index 0456a0de80..b5aeac0c25 100644 --- a/server/@types/shared/models/Room.ts +++ b/server/@types/shared/models/Room.ts @@ -5,11 +5,11 @@ import type { Bed } from './Bed'; import type { Characteristic } from './Characteristic'; export type Room = { + beds?: Array; + characteristics: Array; + code?: string; id: string; name: string; - code?: string; notes?: string; - beds?: Array; - characteristics: Array; }; diff --git a/server/@types/shared/models/RoshRisks.ts b/server/@types/shared/models/RoshRisks.ts index 7f41c7ad68..e9dcbb3afc 100644 --- a/server/@types/shared/models/RoshRisks.ts +++ b/server/@types/shared/models/RoshRisks.ts @@ -3,11 +3,11 @@ /* tslint:disable */ /* eslint-disable */ export type RoshRisks = { + lastUpdated?: string; overallRisk: string; riskToChildren: string; - riskToPublic: string; riskToKnownAdult: string; + riskToPublic: string; riskToStaff: string; - lastUpdated?: string; }; diff --git a/server/@types/shared/models/SeedRequest.ts b/server/@types/shared/models/SeedRequest.ts index d17270e127..fb30d8112a 100644 --- a/server/@types/shared/models/SeedRequest.ts +++ b/server/@types/shared/models/SeedRequest.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { SeedFileType } from './SeedFileType'; export type SeedRequest = { - seedType: SeedFileType; fileName: string; + seedType: SeedFileType; }; diff --git a/server/@types/shared/models/LatestCas2StatusUpdate.ts b/server/@types/shared/models/ServiceScope.ts similarity index 61% rename from server/@types/shared/models/LatestCas2StatusUpdate.ts rename to server/@types/shared/models/ServiceScope.ts index ae530a3a72..0acb7b2f71 100644 --- a/server/@types/shared/models/LatestCas2StatusUpdate.ts +++ b/server/@types/shared/models/ServiceScope.ts @@ -2,8 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type LatestCas2StatusUpdate = { - statusId: string; - label: string; -}; - +export type ServiceScope = 'approved-premises' | 'temporary-accommodation' | '*'; diff --git a/server/@types/shared/models/StaffMember.ts b/server/@types/shared/models/StaffMember.ts index 1fd025e971..9bda2d8d77 100644 --- a/server/@types/shared/models/StaffMember.ts +++ b/server/@types/shared/models/StaffMember.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * KeyWorker is a legacy field only used by CAS1. It is not longer being captured or populated + */ export type StaffMember = { code: string; keyWorker: boolean; diff --git a/server/@types/shared/models/SubmitApplication.ts b/server/@types/shared/models/SubmitApplication.ts index 66be5eee50..5c72c1760d 100644 --- a/server/@types/shared/models/SubmitApplication.ts +++ b/server/@types/shared/models/SubmitApplication.ts @@ -2,9 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; export type SubmitApplication = { + /** + * Any object that conforms to the current JSON schema for an application + */ + translatedDocument?: Record; type: string; - translatedDocument?: AnyValue; }; diff --git a/server/@types/shared/models/SubmitApprovedPremisesApplication.ts b/server/@types/shared/models/SubmitApprovedPremisesApplication.ts index cffe9531da..52468cd657 100644 --- a/server/@types/shared/models/SubmitApprovedPremisesApplication.ts +++ b/server/@types/shared/models/SubmitApprovedPremisesApplication.ts @@ -11,37 +11,38 @@ import type { SituationOption } from './SituationOption'; import type { SubmitApplication } from './SubmitApplication'; export type SubmitApprovedPremisesApplication = (SubmitApplication & { /** - * Use apType - * @deprecated + * If the user's ap area id is incorrect, they can optionally override it for the application */ - isPipeApplication?: boolean; - isWomensApplication?: boolean; + apAreaId?: string; + apType?: ApType; + applicantUserDetails?: Cas1ApplicationUserDetails; + arrivalDate?: string; + caseManagerIsNotApplicant?: boolean; + caseManagerUserDetails?: Cas1ApplicationUserDetails; /** * noticeType should be used to indicate if this an emergency application - * @deprecated */ isEmergencyApplication?: boolean; /** * Use apType - * @deprecated */ isEsapApplication?: boolean; - apType?: ApType; - targetLocation: string; - releaseType: ReleaseTypeOption; - sentenceType: SentenceTypeOption; - situation?: SituationOption; - arrivalDate?: string; /** - * If the user's ap area id is incorrect, they can optionally override it for the application + * Use apType */ - apAreaId?: string; - applicantUserDetails?: Cas1ApplicationUserDetails; - caseManagerIsNotApplicant?: boolean; - caseManagerUserDetails?: Cas1ApplicationUserDetails; + isPipeApplication?: boolean; + isWomensApplication?: boolean; + licenseExpiryDate?: string; noticeType?: Cas1ApplicationTimelinessCategory; reasonForShortNotice?: string; reasonForShortNoticeOther?: string; - licenseExpiryDate?: string; + releaseType?: ReleaseTypeOption; + sentenceType?: SentenceTypeOption; + situation?: SituationOption; + targetLocation?: string; +} & { + releaseType: ReleaseTypeOption; + sentenceType: SentenceTypeOption; + targetLocation: string; }); diff --git a/server/@types/shared/models/SubmitCas2Application.ts b/server/@types/shared/models/SubmitCas2Application.ts deleted file mode 100644 index 31b03e8fcb..0000000000 --- a/server/@types/shared/models/SubmitCas2Application.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* generated using openapi-typescript-codegen -- do not edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { AnyValue } from './AnyValue'; -export type SubmitCas2Application = { - translatedDocument: AnyValue; - /** - * Id of the application being submitted - */ - applicationId: string; - /** - * First and second preferences for where the accommodation should be located, pipe-separated - */ - preferredAreas?: string; - hdcEligibilityDate?: string; - conditionalReleaseDate?: string; - telephoneNumber: string; -}; - diff --git a/server/@types/shared/models/SubmitPlacementApplication.ts b/server/@types/shared/models/SubmitPlacementApplication.ts index 192680493e..d99e9dd948 100644 --- a/server/@types/shared/models/SubmitPlacementApplication.ts +++ b/server/@types/shared/models/SubmitPlacementApplication.ts @@ -2,12 +2,17 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { PlacementDates } from './PlacementDates'; import type { PlacementType } from './PlacementType'; +/** + * Information needed to submit a placement application + */ export type SubmitPlacementApplication = { - translatedDocument: AnyValue; - placementType: PlacementType; placementDates: Array; + placementType: PlacementType; + /** + * Any object that conforms to the current JSON schema for an application + */ + translatedDocument: Record; }; diff --git a/server/@types/shared/models/SubmitTemporaryAccommodationApplication.ts b/server/@types/shared/models/SubmitTemporaryAccommodationApplication.ts index ba7d38f880..c2c33ec5d2 100644 --- a/server/@types/shared/models/SubmitTemporaryAccommodationApplication.ts +++ b/server/@types/shared/models/SubmitTemporaryAccommodationApplication.ts @@ -2,26 +2,34 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { SubmitApplication } from './SubmitApplication'; export type SubmitTemporaryAccommodationApplication = (SubmitApplication & { - arrivalDate: string; - isRegisteredSexOffender?: boolean; - needsAccessibleProperty?: boolean; - hasHistoryOfArson?: boolean; - isDutyToReferSubmitted?: boolean; - dutyToReferSubmissionDate?: string; + arrivalDate?: string; + dutyToReferLocalAuthorityAreaName?: string; dutyToReferOutcome?: string; - isApplicationEligible?: boolean; + dutyToReferSubmissionDate?: string; eligibilityReason?: string; - dutyToReferLocalAuthorityAreaName?: string; - personReleaseDate?: string; - pdu?: string; - probationDeliveryUnitId?: string; - isHistoryOfSexualOffence?: boolean; - isConcerningSexualBehaviour?: boolean; + hasHistoryOfArson?: boolean; + isApplicationEligible?: boolean; isConcerningArsonBehaviour?: boolean; + isConcerningSexualBehaviour?: boolean; + isDutyToReferSubmitted?: boolean; + isHistoryOfSexualOffence?: boolean; + isRegisteredSexOffender?: boolean; + needsAccessibleProperty?: boolean; + pdu?: string; + personReleaseDate?: string; prisonReleaseTypes?: Array; - summaryData: AnyValue; + probationDeliveryUnitId?: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + summaryData?: Record; +} & { + arrivalDate: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + summaryData: Record; }); diff --git a/server/@types/shared/models/SupervisingOfficer.ts b/server/@types/shared/models/SupervisingOfficer.ts index dad4f643be..623ac13230 100644 --- a/server/@types/shared/models/SupervisingOfficer.ts +++ b/server/@types/shared/models/SupervisingOfficer.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type SupervisingOfficer = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/SupervisingProvider.ts b/server/@types/shared/models/SupervisingProvider.ts index 03b5cd0307..c12a088303 100644 --- a/server/@types/shared/models/SupervisingProvider.ts +++ b/server/@types/shared/models/SupervisingProvider.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type SupervisingProvider = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/SupervisingTeam.ts b/server/@types/shared/models/SupervisingTeam.ts index 454781ad34..a0afaa5f42 100644 --- a/server/@types/shared/models/SupervisingTeam.ts +++ b/server/@types/shared/models/SupervisingTeam.ts @@ -4,7 +4,7 @@ /* eslint-disable */ export type SupervisingTeam = { id: string; - name: string; isActive: boolean; + name: string; }; diff --git a/server/@types/shared/models/Task.ts b/server/@types/shared/models/Task.ts index c1a1f9273d..0281e685e8 100644 --- a/server/@types/shared/models/Task.ts +++ b/server/@types/shared/models/Task.ts @@ -4,31 +4,31 @@ /* eslint-disable */ import type { ApArea } from './ApArea'; import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; -import type { PersonSummary } from './PersonSummary'; +import type { FullPersonSummary } from './FullPersonSummary'; import type { ProbationDeliveryUnit } from './ProbationDeliveryUnit'; +import type { RestrictedPersonSummary } from './RestrictedPersonSummary'; import type { TaskStatus } from './TaskStatus'; import type { TaskType } from './TaskType'; +import type { UnknownPersonSummary } from './UnknownPersonSummary'; export type Task = { - taskType: TaskType; - id: string; + allocatedToStaffMember?: ApprovedPremisesUser; + apArea?: ApArea; applicationId: string; - personSummary: PersonSummary; - /** - * Superseded by personSummary which provides 'name' as well as 'personType' and 'crn'. - * @deprecated - */ - personName: string; crn: string; + dueAt: string; /** * The Due date of the task - this is deprecated in favour of the `dueAt` field - * @deprecated */ dueDate: string; - dueAt: string; - allocatedToStaffMember?: ApprovedPremisesUser; - status: TaskStatus; - apArea?: ApArea; - probationDeliveryUnit?: ProbationDeliveryUnit; + id: string; outcomeRecordedAt?: string; + /** + * Superseded by personSummary which provides 'name' as well as 'personType' and 'crn'. + */ + personName: string; + personSummary: (FullPersonSummary | RestrictedPersonSummary | UnknownPersonSummary); + probationDeliveryUnit?: ProbationDeliveryUnit; + status: TaskStatus; + taskType: TaskType; }; diff --git a/server/@types/shared/models/TaskWrapper.ts b/server/@types/shared/models/TaskWrapper.ts index 88a3251eeb..64a3f103d0 100644 --- a/server/@types/shared/models/TaskWrapper.ts +++ b/server/@types/shared/models/TaskWrapper.ts @@ -2,10 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Task } from './Task'; +import type { AssessmentTask } from './AssessmentTask'; +import type { BookingAppealTask } from './BookingAppealTask'; +import type { PlacementApplicationTask } from './PlacementApplicationTask'; +import type { PlacementRequestTask } from './PlacementRequestTask'; import type { UserWithWorkload } from './UserWithWorkload'; export type TaskWrapper = { - task: Task; + task: (AssessmentTask | BookingAppealTask | PlacementApplicationTask | PlacementRequestTask); /** * Users to whom this task can be allocated */ diff --git a/server/@types/shared/models/TemporaryAccommodationApplication.ts b/server/@types/shared/models/TemporaryAccommodationApplication.ts index ab587e59f5..66bc787e76 100644 --- a/server/@types/shared/models/TemporaryAccommodationApplication.ts +++ b/server/@types/shared/models/TemporaryAccommodationApplication.ts @@ -2,21 +2,32 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; -import type { Application } from './Application'; import type { ApplicationStatus } from './ApplicationStatus'; +import type { FullPerson } from './FullPerson'; import type { PersonRisks } from './PersonRisks'; -export type TemporaryAccommodationApplication = (Application & { +import type { RestrictedPerson } from './RestrictedPerson'; +import type { UnknownPerson } from './UnknownPerson'; +export type TemporaryAccommodationApplication = { + arrivalDate?: string; + assessmentId?: string; + createdAt: string; createdByUserId: string; - schemaVersion: string; + /** + * Any object that conforms to the current JSON schema for an application + */ + data?: Record; + /** + * Any object that conforms to the current JSON schema for an application + */ + document?: Record; + id: string; + offenceId: string; outdatedSchema: boolean; - data?: AnyValue; - document?: AnyValue; - status: ApplicationStatus; + person: (FullPerson | RestrictedPerson | UnknownPerson); risks?: PersonRisks; + schemaVersion: string; + status: ApplicationStatus; submittedAt?: string; - arrivalDate?: string; - offenceId: string; - assessmentId?: string; -}); + type: string; +}; diff --git a/server/@types/shared/models/TemporaryAccommodationApplicationSummary.ts b/server/@types/shared/models/TemporaryAccommodationApplicationSummary.ts index 29d1ea7337..d4f51ebd99 100644 --- a/server/@types/shared/models/TemporaryAccommodationApplicationSummary.ts +++ b/server/@types/shared/models/TemporaryAccommodationApplicationSummary.ts @@ -6,8 +6,11 @@ import type { ApplicationStatus } from './ApplicationStatus'; import type { ApplicationSummary } from './ApplicationSummary'; import type { PersonRisks } from './PersonRisks'; export type TemporaryAccommodationApplicationSummary = (ApplicationSummary & { + createdByUserId?: string; + risks?: PersonRisks; + status?: ApplicationStatus; +} & { createdByUserId: string; status: ApplicationStatus; - risks?: PersonRisks; }); diff --git a/server/@types/shared/models/TemporaryAccommodationAssessment.ts b/server/@types/shared/models/TemporaryAccommodationAssessment.ts index 170f19aa11..783ad21b9f 100644 --- a/server/@types/shared/models/TemporaryAccommodationAssessment.ts +++ b/server/@types/shared/models/TemporaryAccommodationAssessment.ts @@ -2,17 +2,25 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { Assessment } from './Assessment'; import type { TemporaryAccommodationApplication } from './TemporaryAccommodationApplication'; import type { TemporaryAccommodationAssessmentStatus } from './TemporaryAccommodationAssessmentStatus'; import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; export type TemporaryAccommodationAssessment = (Assessment & { - application: TemporaryAccommodationApplication; + accommodationRequiredFromDate?: string; allocatedToStaffMember?: TemporaryAccommodationUser; - status?: TemporaryAccommodationAssessmentStatus; - summaryData: AnyValue; + application?: TemporaryAccommodationApplication; releaseDate?: string; - accommodationRequiredFromDate?: string; + status?: TemporaryAccommodationAssessmentStatus; + /** + * Any object that conforms to the current JSON schema for an application + */ + summaryData?: Record; +} & { + application: TemporaryAccommodationApplication; + /** + * Any object that conforms to the current JSON schema for an application + */ + summaryData: Record; }); diff --git a/server/@types/shared/models/TemporaryAccommodationAssessmentSummary.ts b/server/@types/shared/models/TemporaryAccommodationAssessmentSummary.ts index 4e9015fff8..ae41b6e575 100644 --- a/server/@types/shared/models/TemporaryAccommodationAssessmentSummary.ts +++ b/server/@types/shared/models/TemporaryAccommodationAssessmentSummary.ts @@ -5,7 +5,9 @@ import type { AssessmentSummary } from './AssessmentSummary'; import type { TemporaryAccommodationAssessmentStatus } from './TemporaryAccommodationAssessmentStatus'; export type TemporaryAccommodationAssessmentSummary = (AssessmentSummary & { - status: TemporaryAccommodationAssessmentStatus; probationDeliveryUnitName?: string; + status?: TemporaryAccommodationAssessmentStatus; +} & { + status: TemporaryAccommodationAssessmentStatus; }); diff --git a/server/@types/shared/models/TemporaryAccommodationBedSearchParameters.ts b/server/@types/shared/models/TemporaryAccommodationBedSearchParameters.ts index 96dfa34536..456bd372ad 100644 --- a/server/@types/shared/models/TemporaryAccommodationBedSearchParameters.ts +++ b/server/@types/shared/models/TemporaryAccommodationBedSearchParameters.ts @@ -5,13 +5,18 @@ import type { BedSearchAttributes } from './BedSearchAttributes'; import type { BedSearchParameters } from './BedSearchParameters'; export type TemporaryAccommodationBedSearchParameters = (BedSearchParameters & { + /** + * Bedspace and property attributes to filter on + */ + attributes?: Array; /** * The list of pdus Ids to search within */ - probationDeliveryUnits: Array; + probationDeliveryUnits?: Array; +} & { /** - * Bedspace and property attributes to filter on + * The list of pdus Ids to search within */ - attributes?: Array; + probationDeliveryUnits: Array; }); diff --git a/server/@types/shared/models/TemporaryAccommodationBedSearchResult.ts b/server/@types/shared/models/TemporaryAccommodationBedSearchResult.ts index 5a751c28e6..5601010c5d 100644 --- a/server/@types/shared/models/TemporaryAccommodationBedSearchResult.ts +++ b/server/@types/shared/models/TemporaryAccommodationBedSearchResult.ts @@ -5,6 +5,8 @@ import type { BedSearchResult } from './BedSearchResult'; import type { TemporaryAccommodationBedSearchResultOverlap } from './TemporaryAccommodationBedSearchResultOverlap'; export type TemporaryAccommodationBedSearchResult = (BedSearchResult & { + overlaps?: Array; +} & { overlaps: Array; }); diff --git a/server/@types/shared/models/TemporaryAccommodationBedSearchResultOverlap.ts b/server/@types/shared/models/TemporaryAccommodationBedSearchResultOverlap.ts index 1e953bb288..8e188a2c8a 100644 --- a/server/@types/shared/models/TemporaryAccommodationBedSearchResultOverlap.ts +++ b/server/@types/shared/models/TemporaryAccommodationBedSearchResultOverlap.ts @@ -4,13 +4,13 @@ /* eslint-disable */ import type { PersonType } from './PersonType'; export type TemporaryAccommodationBedSearchResultOverlap = { - name: string; + assessmentId?: string; + bookingId: string; crn: string; - sex?: string; - personType: PersonType; days: number; - bookingId: string; + name: string; + personType: PersonType; roomId: string; - assessmentId?: string; + sex?: string; }; diff --git a/server/@types/shared/models/TemporaryAccommodationPremisesSummary.ts b/server/@types/shared/models/TemporaryAccommodationPremisesSummary.ts index 18911c01fc..dc8bb7d45b 100644 --- a/server/@types/shared/models/TemporaryAccommodationPremisesSummary.ts +++ b/server/@types/shared/models/TemporaryAccommodationPremisesSummary.ts @@ -4,8 +4,8 @@ /* eslint-disable */ import type { PremisesSummary } from './PremisesSummary'; export type TemporaryAccommodationPremisesSummary = (PremisesSummary & { - pdu?: string; localAuthorityAreaName?: string; + pdu?: string; } & { pdu: string; }); diff --git a/server/@types/shared/models/TemporaryAccommodationUser.ts b/server/@types/shared/models/TemporaryAccommodationUser.ts index 7a3ddb9f63..a3dcb2ce5a 100644 --- a/server/@types/shared/models/TemporaryAccommodationUser.ts +++ b/server/@types/shared/models/TemporaryAccommodationUser.ts @@ -5,6 +5,8 @@ import type { TemporaryAccommodationUserRole } from './TemporaryAccommodationUserRole'; import type { User } from './User'; export type TemporaryAccommodationUser = (User & { + roles?: Array; +} & { roles: Array; }); diff --git a/server/@types/shared/models/TimelineEvent.ts b/server/@types/shared/models/TimelineEvent.ts index beb01037e1..9b0ca59e89 100644 --- a/server/@types/shared/models/TimelineEvent.ts +++ b/server/@types/shared/models/TimelineEvent.ts @@ -2,17 +2,18 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { ApprovedPremisesUser } from './ApprovedPremisesUser'; +import type { TemporaryAccommodationUser } from './TemporaryAccommodationUser'; import type { TimelineEventAssociatedUrl } from './TimelineEventAssociatedUrl'; import type { TimelineEventType } from './TimelineEventType'; import type { TriggerSourceType } from './TriggerSourceType'; -import type { User } from './User'; export type TimelineEvent = { - type?: TimelineEventType; + associatedUrls?: Array; + content?: string; + createdBy?: (ApprovedPremisesUser | TemporaryAccommodationUser); id?: string; occurredAt?: string; - content?: string; - createdBy?: User; - associatedUrls?: Array; triggerSource?: TriggerSourceType; + type?: TimelineEventType; }; diff --git a/server/@types/shared/models/Turnaround.ts b/server/@types/shared/models/Turnaround.ts index 8e36062840..39d33ea467 100644 --- a/server/@types/shared/models/Turnaround.ts +++ b/server/@types/shared/models/Turnaround.ts @@ -2,10 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * The full history of turnarounds + */ export type Turnaround = { - id: string; bookingId: string; - workingDays: number; createdAt: string; + id: string; + workingDays: number; }; diff --git a/server/@types/shared/models/UpdateCas2Assessment.ts b/server/@types/shared/models/Type.ts similarity index 57% rename from server/@types/shared/models/UpdateCas2Assessment.ts rename to server/@types/shared/models/Type.ts index 77496ab43c..04350217d7 100644 --- a/server/@types/shared/models/UpdateCas2Assessment.ts +++ b/server/@types/shared/models/Type.ts @@ -2,8 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type UpdateCas2Assessment = { - nacroReferralId?: string; - assessorName?: string; -}; - +export type Type = 'space' | 'legacy'; diff --git a/server/@types/shared/models/Unit.ts b/server/@types/shared/models/Unit.ts index 11d5eff8b5..ca80e5aacf 100644 --- a/server/@types/shared/models/Unit.ts +++ b/server/@types/shared/models/Unit.ts @@ -2,7 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -/** - * Any object - */ export type Unit = Record; diff --git a/server/@types/shared/models/UpdateApplication.ts b/server/@types/shared/models/UpdateApplication.ts index e9d92b526c..059eef41b4 100644 --- a/server/@types/shared/models/UpdateApplication.ts +++ b/server/@types/shared/models/UpdateApplication.ts @@ -2,10 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; import type { UpdateApplicationType } from './UpdateApplicationType'; export type UpdateApplication = { + data: Record>; type: UpdateApplicationType; - data: Record; }; diff --git a/server/@types/shared/models/UpdateApprovedPremisesApplication.ts b/server/@types/shared/models/UpdateApprovedPremisesApplication.ts index 2844ececb1..1d86ce2baa 100644 --- a/server/@types/shared/models/UpdateApprovedPremisesApplication.ts +++ b/server/@types/shared/models/UpdateApprovedPremisesApplication.ts @@ -7,27 +7,24 @@ import type { Cas1ApplicationTimelinessCategory } from './Cas1ApplicationTimelin import type { ReleaseTypeOption } from './ReleaseTypeOption'; import type { UpdateApplication } from './UpdateApplication'; export type UpdateApprovedPremisesApplication = (UpdateApplication & { - isInapplicable?: boolean; - isWomensApplication?: boolean; - /** - * Use apType - * @deprecated - */ - isPipeApplication?: boolean; + apType?: ApType; + arrivalDate?: string; /** * noticeType should be used to indicate if an emergency application - * @deprecated */ isEmergencyApplication?: boolean; /** * Use apType - * @deprecated */ isEsapApplication?: boolean; - apType?: ApType; - targetLocation?: string; - releaseType?: ReleaseTypeOption; - arrivalDate?: string; + isInapplicable?: boolean; + /** + * Use apType + */ + isPipeApplication?: boolean; + isWomensApplication?: boolean; noticeType?: Cas1ApplicationTimelinessCategory; + releaseType?: ReleaseTypeOption; + targetLocation?: string; }); diff --git a/server/@types/shared/models/UpdateAssessment.ts b/server/@types/shared/models/UpdateAssessment.ts index 61f3edfeae..8a36a1ddd9 100644 --- a/server/@types/shared/models/UpdateAssessment.ts +++ b/server/@types/shared/models/UpdateAssessment.ts @@ -2,10 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; +/** + * Updated assessment + */ export type UpdateAssessment = { - data: Record; - releaseDate?: string; accommodationRequiredFromDate?: string; + data: Record>; + releaseDate?: string; }; diff --git a/server/@types/shared/models/UpdateCas1OutOfServiceBed.ts b/server/@types/shared/models/UpdateCas1OutOfServiceBed.ts index c4854ee8c7..0d419bd70d 100644 --- a/server/@types/shared/models/UpdateCas1OutOfServiceBed.ts +++ b/server/@types/shared/models/UpdateCas1OutOfServiceBed.ts @@ -2,11 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the out-of-service bed + */ export type UpdateCas1OutOfServiceBed = { - startDate: string; endDate: string; + notes?: string; reason: string; referenceNumber?: string; - notes?: string; + startDate: string; }; diff --git a/server/@types/shared/models/UpdateLostBed.ts b/server/@types/shared/models/UpdateLostBed.ts index 44431b94e4..1cc16e46dc 100644 --- a/server/@types/shared/models/UpdateLostBed.ts +++ b/server/@types/shared/models/UpdateLostBed.ts @@ -2,11 +2,14 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * details of the lost bed + */ export type UpdateLostBed = { - startDate: string; endDate: string; + notes?: string; reason: string; referenceNumber?: string; - notes?: string; + startDate: string; }; diff --git a/server/@types/shared/models/UpdatePlacementApplication.ts b/server/@types/shared/models/UpdatePlacementApplication.ts index 1336289cdc..20630fb685 100644 --- a/server/@types/shared/models/UpdatePlacementApplication.ts +++ b/server/@types/shared/models/UpdatePlacementApplication.ts @@ -2,8 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { AnyValue } from './AnyValue'; +/** + * Details about the application + */ export type UpdatePlacementApplication = { - data: Record; + data: Record>; }; diff --git a/server/@types/shared/models/UpdatePremises.ts b/server/@types/shared/models/UpdatePremises.ts index 8fecb94e37..4ca5612226 100644 --- a/server/@types/shared/models/UpdatePremises.ts +++ b/server/@types/shared/models/UpdatePremises.ts @@ -3,19 +3,22 @@ /* tslint:disable */ /* eslint-disable */ import type { PropertyStatus } from './PropertyStatus'; +/** + * Information to update the premises with + */ export type UpdatePremises = { addressLine1: string; addressLine2?: string; - town?: string; - postcode: string; - notes?: string; - localAuthorityAreaId?: string; - probationRegionId: string; characteristicIds: Array; - status: PropertyStatus; + localAuthorityAreaId?: string; + name?: string; + notes?: string; pdu?: string; + postcode: string; probationDeliveryUnitId?: string; + probationRegionId: string; + status: PropertyStatus; + town?: string; turnaroundWorkingDayCount?: number; - name?: string; }; diff --git a/server/@types/shared/models/UpdateRoom.ts b/server/@types/shared/models/UpdateRoom.ts index d8145ecf35..01472fca82 100644 --- a/server/@types/shared/models/UpdateRoom.ts +++ b/server/@types/shared/models/UpdateRoom.ts @@ -2,13 +2,16 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Information to update the room with + */ export type UpdateRoom = { - notes?: string; - characteristicIds: Array; - name?: string; /** * End date of the bed availability, open for availability if not specified */ bedEndDate?: string; + characteristicIds: Array; + name?: string; + notes?: string; }; diff --git a/server/@types/shared/models/UpdatedClarificationNote.ts b/server/@types/shared/models/UpdatedClarificationNote.ts index 738b73d6eb..0fd2744dfd 100644 --- a/server/@types/shared/models/UpdatedClarificationNote.ts +++ b/server/@types/shared/models/UpdatedClarificationNote.ts @@ -2,6 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +/** + * Clarification note + */ export type UpdatedClarificationNote = { response: string; responseReceivedOn: string; diff --git a/server/@types/shared/models/User.ts b/server/@types/shared/models/User.ts index a97ae4bd76..1b4e6fb6cc 100644 --- a/server/@types/shared/models/User.ts +++ b/server/@types/shared/models/User.ts @@ -5,14 +5,14 @@ import type { ProbationDeliveryUnit } from './ProbationDeliveryUnit'; import type { ProbationRegion } from './ProbationRegion'; export type User = { - service: string; - id: string; - name: string; deliusUsername: string; email?: string; - telephoneNumber?: string; + id: string; isActive?: boolean; - region: ProbationRegion; + name: string; probationDeliveryUnit?: ProbationDeliveryUnit; + region: ProbationRegion; + service: string; + telephoneNumber?: string; }; diff --git a/server/@types/shared/models/UserRolesAndQualifications.ts b/server/@types/shared/models/UserRolesAndQualifications.ts index 252104bdee..9fdec40c5c 100644 --- a/server/@types/shared/models/UserRolesAndQualifications.ts +++ b/server/@types/shared/models/UserRolesAndQualifications.ts @@ -5,7 +5,7 @@ import type { ApprovedPremisesUserRole } from './ApprovedPremisesUserRole'; import type { UserQualification } from './UserQualification'; export type UserRolesAndQualifications = { - roles: Array; qualifications: Array; + roles: Array; }; diff --git a/server/@types/shared/models/UserWithWorkload.ts b/server/@types/shared/models/UserWithWorkload.ts index 78707f408d..e3e9b97fbe 100644 --- a/server/@types/shared/models/UserWithWorkload.ts +++ b/server/@types/shared/models/UserWithWorkload.ts @@ -5,19 +5,28 @@ import type { ApArea } from './ApArea'; import type { ApprovedPremisesUserRole } from './ApprovedPremisesUserRole'; import type { NamedId } from './NamedId'; -import type { User } from './User'; +import type { ProbationDeliveryUnit } from './ProbationDeliveryUnit'; +import type { ProbationRegion } from './ProbationRegion'; import type { UserQualification } from './UserQualification'; -export type UserWithWorkload = (User & { - numTasksPending?: number; - numTasksCompleted7Days?: number; +/** + * Users to whom this task can be allocated + */ +export type UserWithWorkload = { + apArea?: ApArea; + cruManagementArea?: NamedId; + deliusUsername: string; + email?: string; + id: string; + isActive?: boolean; + name: string; numTasksCompleted30Days?: number; + numTasksCompleted7Days?: number; + numTasksPending?: number; + probationDeliveryUnit?: ProbationDeliveryUnit; qualifications?: Array; + region: ProbationRegion; roles?: Array; - /** - * This is deprecated. Used cruManagementArea instead as this is used to group task management - * @deprecated - */ - apArea?: ApArea; - cruManagementArea?: NamedId; -}); + service: string; + telephoneNumber?: string; +}; diff --git a/server/@types/shared/models/ValidationError.ts b/server/@types/shared/models/ValidationError.ts index 47173e5fa0..a9c1e5b1ba 100644 --- a/server/@types/shared/models/ValidationError.ts +++ b/server/@types/shared/models/ValidationError.ts @@ -3,8 +3,12 @@ /* tslint:disable */ /* eslint-disable */ import type { InvalidParam } from './InvalidParam'; -import type { Problem } from './Problem'; -export type ValidationError = (Problem & { +export type ValidationError = { + detail?: string; + instance?: string; 'invalid-params'?: Array; -}); + status?: number; + title?: string; + type?: string; +}; diff --git a/server/@types/shared/models/WithdrawPlacementApplication.ts b/server/@types/shared/models/WithdrawPlacementApplication.ts index 0dedb9b16b..35dc35e053 100644 --- a/server/@types/shared/models/WithdrawPlacementApplication.ts +++ b/server/@types/shared/models/WithdrawPlacementApplication.ts @@ -3,6 +3,9 @@ /* tslint:disable */ /* eslint-disable */ import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; +/** + * Withdrawal details + */ export type WithdrawPlacementApplication = { reason: WithdrawPlacementRequestReason; }; diff --git a/server/@types/shared/models/WithdrawPlacementRequest.ts b/server/@types/shared/models/WithdrawPlacementRequest.ts index ee38619e04..551dafd63d 100644 --- a/server/@types/shared/models/WithdrawPlacementRequest.ts +++ b/server/@types/shared/models/WithdrawPlacementRequest.ts @@ -3,6 +3,9 @@ /* tslint:disable */ /* eslint-disable */ import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason'; +/** + * Withdrawal details + */ export type WithdrawPlacementRequest = { reason: WithdrawPlacementRequestReason; }; diff --git a/server/@types/shared/models/Withdrawable.ts b/server/@types/shared/models/Withdrawable.ts index c44077bc63..5d57540aa6 100644 --- a/server/@types/shared/models/Withdrawable.ts +++ b/server/@types/shared/models/Withdrawable.ts @@ -5,11 +5,11 @@ import type { DatePeriod } from './DatePeriod'; import type { WithdrawableType } from './WithdrawableType'; export type Withdrawable = { - id: string; - type: WithdrawableType; /** * 0, 1 or more dates can be specified depending upon the WithdrawableType */ dates: Array; + id: string; + type: WithdrawableType; };