From 9f4ef7158316663272565f2f92749503faea1636 Mon Sep 17 00:00:00 2001 From: "communityaccommodationtypegen[bot]" <127299090+communityaccommodationtypegen[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:40:33 +0000 Subject: [PATCH] Updating hmpps-approved-premises-api models from OpenAPI specification --- server/@types/shared/index.d.ts | 12 +++--------- .../shared/models/ApprovedPremisesUserRole.ts | 2 +- .../ArrayOfOASysOffenceDetailsQuestions.ts | 6 ------ .../ArrayOfOASysRiskContributorsQuestions.ts | 6 ------ .../ArrayOfOASysRiskManagementPlanQuestions.ts | 6 ------ .../ArrayOfOASysRiskManagementQuestions.ts | 6 ------ ...yOfOASysRiskOfSeriousHarmSummaryQuestions.ts | 6 ------ .../ArrayOfOASysRisksToOthersQuestions.ts | 6 ------ ...ArrayOfOASysRisksToTheIndividualQuestions.ts | 6 ------ ...rrayOfOASysSupportingInformationQuestions.ts | 6 ------ .../shared/models/Cas1SpaceAvailability.ts | 3 +++ .../shared/models/Cas1SpaceSearchResult.ts | 4 ++++ .../shared/models/Cas1UpdateSpaceBooking.ts | 14 ++++++++++++++ .../shared/models/OASysRiskOfSeriousHarm.ts | 4 ++-- server/@types/shared/models/OASysRiskToSelf.ts | 4 ++-- server/@types/shared/models/OASysSections.ts | 17 +++++++---------- server/@types/shared/models/SeedFileType.ts | 2 +- ...elfQuestions.ts => SeedFromExcelFileType.ts} | 3 +-- .../shared/models/SeedFromExcelRequest.ts | 11 +++++++++++ 19 files changed, 49 insertions(+), 75 deletions(-) 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/ArrayOfOASysRisksToOthersQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysRisksToTheIndividualQuestions.ts delete mode 100644 server/@types/shared/models/ArrayOfOASysSupportingInformationQuestions.ts create mode 100644 server/@types/shared/models/Cas1UpdateSpaceBooking.ts rename server/@types/shared/models/{ArrayOfOASysRiskToSelfQuestions.ts => SeedFromExcelFileType.ts} (52%) create mode 100644 server/@types/shared/models/SeedFromExcelRequest.ts diff --git a/server/@types/shared/index.d.ts b/server/@types/shared/index.d.ts index 31e9bb9075..807a3da38a 100644 --- a/server/@types/shared/index.d.ts +++ b/server/@types/shared/index.d.ts @@ -30,15 +30,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'; @@ -127,6 +118,7 @@ export type { Cas1SpaceSearchParameters } from './models/Cas1SpaceSearchParamete export type { Cas1SpaceSearchRequirements } from './models/Cas1SpaceSearchRequirements'; export type { Cas1SpaceSearchResult } from './models/Cas1SpaceSearchResult'; export type { Cas1SpaceSearchResults } from './models/Cas1SpaceSearchResults'; +export type { Cas1UpdateSpaceBooking } from './models/Cas1UpdateSpaceBooking'; export type { Cas1UpdateUser } from './models/Cas1UpdateUser'; export type { Cas2Application } from './models/Cas2Application'; export type { Cas2ApplicationNote } from './models/Cas2ApplicationNote'; @@ -268,6 +260,8 @@ export type { Room } from './models/Room'; export type { RoshRisks } from './models/RoshRisks'; export type { RoshRisksEnvelope } from './models/RoshRisksEnvelope'; export type { SeedFileType } from './models/SeedFileType'; +export type { SeedFromExcelFileType } from './models/SeedFromExcelFileType'; +export type { SeedFromExcelRequest } from './models/SeedFromExcelRequest'; export type { SeedRequest } from './models/SeedRequest'; export type { SentenceTypeOption } from './models/SentenceTypeOption'; export type { ServiceName } from './models/ServiceName'; diff --git a/server/@types/shared/models/ApprovedPremisesUserRole.ts b/server/@types/shared/models/ApprovedPremisesUserRole.ts index 5225291ad7..ff8a13d6e4 100644 --- a/server/@types/shared/models/ApprovedPremisesUserRole.ts +++ b/server/@types/shared/models/ApprovedPremisesUserRole.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'cru_member_find_and_book_beta' | 'cru_member_enable_out_of_service_beds' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager' | 'janitor' | 'user_manager'; +export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'cru_member_find_and_book_beta' | 'cru_member_enable_out_of_service_beds' | 'applicant' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager' | 'janitor' | 'user_manager'; 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/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/Cas1SpaceAvailability.ts b/server/@types/shared/models/Cas1SpaceAvailability.ts index bed5064c06..6904918d4c 100644 --- a/server/@types/shared/models/Cas1SpaceAvailability.ts +++ b/server/@types/shared/models/Cas1SpaceAvailability.ts @@ -3,6 +3,9 @@ /* tslint:disable */ /* eslint-disable */ import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic'; +/** + * @deprecated + */ export type Cas1SpaceAvailability = { spaceCharacteristics?: Array; durationInDays?: number; diff --git a/server/@types/shared/models/Cas1SpaceSearchResult.ts b/server/@types/shared/models/Cas1SpaceSearchResult.ts index a687a5117f..c324203d4f 100644 --- a/server/@types/shared/models/Cas1SpaceSearchResult.ts +++ b/server/@types/shared/models/Cas1SpaceSearchResult.ts @@ -7,6 +7,10 @@ import type { Cas1SpaceAvailability } from './Cas1SpaceAvailability'; export type Cas1SpaceSearchResult = { premises?: Cas1PremisesSearchResultSummary; distanceInMiles?: number; + /** + * This is not populated and will be removed in the future + * @deprecated + */ spacesAvailable?: Array; }; diff --git a/server/@types/shared/models/Cas1UpdateSpaceBooking.ts b/server/@types/shared/models/Cas1UpdateSpaceBooking.ts new file mode 100644 index 0000000000..3bb4a71246 --- /dev/null +++ b/server/@types/shared/models/Cas1UpdateSpaceBooking.ts @@ -0,0 +1,14 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Cas1SpaceBookingCharacteristic } from './Cas1SpaceBookingCharacteristic'; +/** + * Only provide values when a change is required + */ +export type Cas1UpdateSpaceBooking = { + arrivalDate?: string; + departureDate?: string; + characteristics?: Array; +}; + diff --git a/server/@types/shared/models/OASysRiskOfSeriousHarm.ts b/server/@types/shared/models/OASysRiskOfSeriousHarm.ts index 1922b6a09d..7e7fa60583 100644 --- a/server/@types/shared/models/OASysRiskOfSeriousHarm.ts +++ b/server/@types/shared/models/OASysRiskOfSeriousHarm.ts @@ -2,14 +2,14 @@ /* 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; assessmentState: OASysAssessmentState; dateStarted: string; dateCompleted?: string; - rosh: ArrayOfOASysRiskOfSeriousHarmSummaryQuestions; + rosh: Array; }; diff --git a/server/@types/shared/models/OASysRiskToSelf.ts b/server/@types/shared/models/OASysRiskToSelf.ts index b85b8fa0b3..0215a7fc8e 100644 --- a/server/@types/shared/models/OASysRiskToSelf.ts +++ b/server/@types/shared/models/OASysRiskToSelf.ts @@ -2,14 +2,14 @@ /* 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; assessmentState: OASysAssessmentState; dateStarted: string; dateCompleted?: string; - riskToSelf: ArrayOfOASysRiskToSelfQuestions; + riskToSelf: Array; }; diff --git a/server/@types/shared/models/OASysSections.ts b/server/@types/shared/models/OASysSections.ts index 2cbdffad5a..e7c14e5c47 100644 --- a/server/@types/shared/models/OASysSections.ts +++ b/server/@types/shared/models/OASysSections.ts @@ -2,22 +2,19 @@ /* 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; assessmentState: OASysAssessmentState; dateStarted: string; dateCompleted?: string; - offenceDetails: ArrayOfOASysOffenceDetailsQuestions; - roshSummary: ArrayOfOASysRiskOfSeriousHarmSummaryQuestions; - supportingInformation: ArrayOfOASysSupportingInformationQuestions; - riskToSelf: ArrayOfOASysRiskToSelfQuestions; - riskManagementPlan: ArrayOfOASysRiskManagementPlanQuestions; + offenceDetails: Array; + roshSummary: Array; + supportingInformation: Array; + riskToSelf: Array; + riskManagementPlan: Array; }; diff --git a/server/@types/shared/models/SeedFileType.ts b/server/@types/shared/models/SeedFileType.ts index d13e3a3b2a..907a88e1a2 100644 --- a/server/@types/shared/models/SeedFileType.ts +++ b/server/@types/shared/models/SeedFileType.ts @@ -2,4 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export type SeedFileType = 'approved_premises' | 'approved_premises_rooms' | 'temporary_accommodation_premises' | 'temporary_accommodation_bedspace' | 'user' | 'nomis_users' | 'external_users' | 'cas2_applications' | 'temporary_accommodation_users' | 'approved_premises_users' | 'characteristics' | 'update_noms_number' | 'update_users_from_api' | 'approved_premises_ap_staff_users' | 'approved_premises_cancel_bookings' | 'approved_premises_assessment_more_info_bug_fix' | 'approved_premises_redact_assessment_details' | 'approved_premises_booking_to_space_booking' | 'approved_premises_withdraw_placement_request' | 'approved_premises_replay_domain_events' | 'approved_premises_duplicate_application' | 'approved_premises_update_event_number' | 'approved_premises_link_booking_to_placement_request' | 'approved_premises_out_of_service_beds' | 'approved_premises_cru_management_areas' | 'approved_premises_space_planning_dry_run' | 'approved_premises_import_delius_booking_management_data' | 'approved_premises_update_space_booking'; +export type SeedFileType = 'approved_premises' | 'approved_premises_rooms' | 'temporary_accommodation_premises' | 'temporary_accommodation_bedspace' | 'user' | 'nomis_users' | 'external_users' | 'cas2_applications' | 'temporary_accommodation_users' | 'approved_premises_users' | 'characteristics' | 'update_noms_number' | 'update_users_from_api' | 'approved_premises_ap_staff_users' | 'approved_premises_cancel_bookings' | 'approved_premises_assessment_more_info_bug_fix' | 'approved_premises_redact_assessment_details' | 'approved_premises_booking_to_space_booking' | 'approved_premises_withdraw_placement_request' | 'approved_premises_replay_domain_events' | 'approved_premises_duplicate_application' | 'approved_premises_update_event_number' | 'approved_premises_link_booking_to_placement_request' | 'approved_premises_out_of_service_beds' | 'approved_premises_cru_management_areas' | 'approved_premises_space_planning_dry_run' | 'approved_premises_import_delius_booking_management_data' | 'approved_premises_update_space_booking' | 'temporary_accommodation_referral_rejection'; diff --git a/server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts b/server/@types/shared/models/SeedFromExcelFileType.ts similarity index 52% rename from server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts rename to server/@types/shared/models/SeedFromExcelFileType.ts index 85e1675ff1..2bbe7619f4 100644 --- a/server/@types/shared/models/ArrayOfOASysRiskToSelfQuestions.ts +++ b/server/@types/shared/models/SeedFromExcelFileType.ts @@ -2,5 +2,4 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { OASysQuestion } from './OASysQuestion'; -export type ArrayOfOASysRiskToSelfQuestions = Array; +export type SeedFromExcelFileType = 'approved_premises_room' | 'cas1_import_site_survey_premise'; diff --git a/server/@types/shared/models/SeedFromExcelRequest.ts b/server/@types/shared/models/SeedFromExcelRequest.ts new file mode 100644 index 0000000000..b79fb96784 --- /dev/null +++ b/server/@types/shared/models/SeedFromExcelRequest.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { SeedFromExcelFileType } from './SeedFromExcelFileType'; +export type SeedFromExcelRequest = { + seedType: SeedFromExcelFileType; + premisesId: string; + fileName: string; +}; +