Skip to content

Commit

Permalink
Merge pull request #28 from ministryofjustice/update-types-09-12-24
Browse files Browse the repository at this point in the history
Update types from the approved premises API
  • Loading branch information
libuk authored Dec 9, 2024
2 parents 9c4c07d + af06a5e commit 7ee296a
Show file tree
Hide file tree
Showing 30 changed files with 18 additions and 204 deletions.
18 changes: 0 additions & 18 deletions server/@types/shared/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export type { AssessmentSummary } from './models/AssessmentSummary';
export type { AssessmentTask } from './models/AssessmentTask';
export type { Bed } from './models/Bed';
export type { BedDetail } from './models/BedDetail';
export type { BedOccupancyBookingEntry } from './models/BedOccupancyBookingEntry';
export type { BedOccupancyEntry } from './models/BedOccupancyEntry';
export type { BedOccupancyEntryType } from './models/BedOccupancyEntryType';
export type { BedOccupancyLostBedEntry } from './models/BedOccupancyLostBedEntry';
export type { BedOccupancyOpenEntry } from './models/BedOccupancyOpenEntry';
export type { BedOccupancyRange } from './models/BedOccupancyRange';
export type { BedSearchAttributes } from './models/BedSearchAttributes';
export type { BedSearchParameters } from './models/BedSearchParameters';
export type { BedSearchResult } from './models/BedSearchResult';
Expand Down Expand Up @@ -86,14 +80,6 @@ export type { CancellationReason } from './models/CancellationReason';
export type { Cas1ApplicationTimelinessCategory } from './models/Cas1ApplicationTimelinessCategory';
export type { Cas1ApplicationUserDetails } from './models/Cas1ApplicationUserDetails';
export type { Cas1CruManagementArea } from './models/Cas1CruManagementArea';
export type { Cas1OutOfServiceBed } from './models/Cas1OutOfServiceBed';
export type { Cas1OutOfServiceBedCancellation } from './models/Cas1OutOfServiceBedCancellation';
export type { Cas1OutOfServiceBedReason } from './models/Cas1OutOfServiceBedReason';
export type { Cas1OutOfServiceBedRevision } from './models/Cas1OutOfServiceBedRevision';
export type { Cas1OutOfServiceBedRevisionType } from './models/Cas1OutOfServiceBedRevisionType';
export type { Cas1OutOfServiceBedSortField } from './models/Cas1OutOfServiceBedSortField';
export type { Cas1OutOfServiceBedStatus } from './models/Cas1OutOfServiceBedStatus';
export type { Cas1ReportName } from './models/Cas1ReportName';
export type { Cas2Application } from './models/Cas2Application';
export type { Cas2ApplicationNote } from './models/Cas2ApplicationNote';
export type { Cas2ApplicationStatus } from './models/Cas2ApplicationStatus';
Expand Down Expand Up @@ -127,7 +113,6 @@ 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 { GenderForAp } from './models/GenderForAp';
export type { InvalidParam } from './models/InvalidParam';
export type { LatestCas2StatusUpdate } from './models/LatestCas2StatusUpdate';
export type { LocalAuthorityArea } from './models/LocalAuthorityArea';
Expand All @@ -149,8 +134,6 @@ 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 { NewCas1OutOfServiceBed } from './models/NewCas1OutOfServiceBed';
export type { NewCas1OutOfServiceBedCancellation } from './models/NewCas1OutOfServiceBedCancellation';
export type { NewCas2ApplicationNote } from './models/NewCas2ApplicationNote';
export type { NewCas2Arrival } from './models/NewCas2Arrival';
export type { NewCas3Arrival } from './models/NewCas3Arrival';
Expand Down Expand Up @@ -282,7 +265,6 @@ export type { UpdateApplication } from './models/UpdateApplication';
export type { UpdateApplicationType } from './models/UpdateApplicationType';
export type { UpdateApprovedPremisesApplication } from './models/UpdateApprovedPremisesApplication';
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';
Expand Down
3 changes: 1 addition & 2 deletions server/@types/shared/models/ApprovedPremisesApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type { ApType } from './ApType';
import type { AssessmentDecision } from './AssessmentDecision';
import type { Cas1ApplicationUserDetails } from './Cas1ApplicationUserDetails';
import type { Cas1CruManagementArea } from './Cas1CruManagementArea';
import type { GenderForAp } from './GenderForAp';
import type { PersonRisks } from './PersonRisks';
import type { PersonStatus } from './PersonStatus';
export type ApprovedPremisesApplication = (Application & {
Expand Down Expand Up @@ -48,6 +47,6 @@ export type ApprovedPremisesApplication = (Application & {
*/
caseManagerIsNotApplicant?: boolean;
caseManagerUserDetails?: Cas1ApplicationUserDetails;
genderForAp?: GenderForAp;
licenceExpiryDate?: string;
});

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApprovedPremisesUserPermission = 'cas1_adhoc_booking_create' | 'cas1_application_withdraw_others' | 'cas1_assess_appealed_application' | 'cas1_assess_application' | 'cas1_assess_placement_application' | 'cas1_assess_placement_request' | 'cas1_booking_create' | 'cas1_booking_change_dates' | 'cas1_booking_withdraw' | 'cas1_out_of_service_bed_create' | 'cas1_process_an_appeal' | 'cas1_user_list' | 'cas1_user_management' | 'cas1_view_assigned_assessments' | 'cas1_view_cru_dashboard' | 'cas1_view_manage_tasks' | 'cas1_view_out_of_service_beds' | 'cas1_request_for_placement_withdraw_others' | 'cas1_space_booking_create' | 'cas1_space_booking_list' | 'cas1_space_booking_record_arrival' | 'cas1_space_booking_record_departure' | 'cas1_space_booking_record_non_arrival' | 'cas1_space_booking_record_keyworker' | 'cas1_space_booking_view' | 'cas1_space_booking_withdraw' | 'cas1_premises_view_summary' | 'cas1_reports_view';
export type ApprovedPremisesUserPermission = 'cas1_adhoc_booking_create' | 'cas1_application_withdraw_others' | 'cas1_assess_appealed_application' | 'cas1_assess_application' | 'cas1_assess_placement_application' | 'cas1_assess_placement_request' | 'cas1_booking_create' | 'cas1_booking_change_dates' | 'cas1_booking_withdraw' | 'cas1_out_of_service_bed_create' | 'cas1_process_an_appeal' | 'cas1_user_list' | 'cas1_user_management' | 'cas1_view_assigned_assessments' | 'cas1_view_cru_dashboard' | 'cas1_view_manage_tasks' | 'cas1_view_out_of_service_beds' | 'cas1_request_for_placement_withdraw_others' | 'cas1_space_booking_create' | 'cas1_space_booking_list' | 'cas1_space_booking_record_arrival' | 'cas1_space_booking_record_departure' | 'cas1_space_booking_record_non_arrival' | 'cas1_space_booking_record_keyworker' | 'cas1_space_booking_view' | 'cas1_space_booking_withdraw' | 'cas1_premises_view_capacity' | 'cas1_premises_view_summary' | 'cas1_reports_view';
2 changes: 1 addition & 1 deletion server/@types/shared/models/ApprovedPremisesUserRole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'manager' | 'legacy_manager' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'cru_member_find_and_book_beta' | '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' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager' | 'janitor' | 'user_manager';
10 changes: 0 additions & 10 deletions server/@types/shared/models/BedOccupancyBookingEntry.ts

This file was deleted.

12 changes: 0 additions & 12 deletions server/@types/shared/models/BedOccupancyEntry.ts

This file was deleted.

5 changes: 0 additions & 5 deletions server/@types/shared/models/BedOccupancyEntryType.ts

This file was deleted.

9 changes: 0 additions & 9 deletions server/@types/shared/models/BedOccupancyLostBedEntry.ts

This file was deleted.

7 changes: 0 additions & 7 deletions server/@types/shared/models/BedOccupancyOpenEntry.ts

This file was deleted.

11 changes: 0 additions & 11 deletions server/@types/shared/models/BedOccupancyRange.ts

This file was deleted.

4 changes: 4 additions & 0 deletions server/@types/shared/models/BookingBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export type BookingBody = {
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;
Expand Down
1 change: 1 addition & 0 deletions server/@types/shared/models/BookingSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export type BookingSummary = {
arrivalDate: string;
departureDate: string;
createdAt: string;
type: 'space' | 'legacy';
};

29 changes: 0 additions & 29 deletions server/@types/shared/models/Cas1OutOfServiceBed.ts

This file was deleted.

10 changes: 0 additions & 10 deletions server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts

This file was deleted.

10 changes: 0 additions & 10 deletions server/@types/shared/models/Cas1OutOfServiceBedReason.ts

This file was deleted.

19 changes: 0 additions & 19 deletions server/@types/shared/models/Cas1OutOfServiceBedRevision.ts

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions server/@types/shared/models/Cas1OutOfServiceBedSortField.ts

This file was deleted.

5 changes: 0 additions & 5 deletions server/@types/shared/models/Cas1OutOfServiceBedStatus.ts

This file was deleted.

5 changes: 0 additions & 5 deletions server/@types/shared/models/Cas1ReportName.ts

This file was deleted.

5 changes: 0 additions & 5 deletions server/@types/shared/models/GenderForAp.ts

This file was deleted.

2 changes: 1 addition & 1 deletion server/@types/shared/models/MigrationJobType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type MigrationJobType = 'update_all_users_from_community_api' | 'update_sentence_type_and_situation' | 'update_booking_status' | 'update_task_due_dates' | 'update_users_pdu_by_api' | 'update_cas2_applications_with_assessments' | 'update_cas2_status_updates_with_assessments' | 'update_cas2_notes_with_assessments' | 'update_cas1_fix_placement_app_links' | 'update_cas1_notice_types' | 'update_cas1_backfill_user_ap_area' | 'update_cas3_application_offender_name' | 'update_cas3_domain_event_type_for_person_departed_updated';
export type MigrationJobType = 'update_all_users_from_community_api' | 'update_sentence_type_and_situation' | 'update_booking_status' | 'update_task_due_dates' | 'update_users_pdu_by_api' | 'update_cas2_applications_with_assessments' | 'update_cas2_status_updates_with_assessments' | 'update_cas2_notes_with_assessments' | 'update_cas1_fix_placement_app_links' | 'update_cas1_notice_types' | 'update_cas1_backfill_user_ap_area' | 'update_cas3_application_offender_name' | 'update_cas3_domain_event_type_for_person_departed_updated' | 'update_cas1_applications_licence_expiry_date';
13 changes: 0 additions & 13 deletions server/@types/shared/models/NewCas1OutOfServiceBed.ts

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions server/@types/shared/models/PlacementRequestDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import type { Application } from './Application';
import type { Cancellation } from './Cancellation';
import type { PlacementRequest } from './PlacementRequest';
export type PlacementRequestDetail = (PlacementRequest & {
/**
* Not used by UI. Space Booking cancellations to be provided if cancellations are required in future.
* @deprecated
*/
cancellations: Array<Cancellation>;
application: Application;
});
Expand Down
2 changes: 1 addition & 1 deletion server/@types/shared/models/SeedFileType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
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';
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ export type SubmitApprovedPremisesApplication = (SubmitApplication & {
noticeType?: Cas1ApplicationTimelinessCategory;
reasonForShortNotice?: string;
reasonForShortNoticeOther?: string;
licenseExpiryDate?: string;
});

Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ export type TemporaryAccommodationApplication = (Application & {
submittedAt?: string;
arrivalDate?: string;
offenceId: string;
assessmentId?: string;
});

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PersonType } from './PersonType';
export type TemporaryAccommodationBedSearchResultOverlap = {
name: string;
crn: string;
sex?: string;
personType: PersonType;
days: number;
bookingId: string;
roomId: string;
Expand Down
12 changes: 0 additions & 12 deletions server/@types/shared/models/UpdateCas1OutOfServiceBed.ts

This file was deleted.

0 comments on commit 7ee296a

Please sign in to comment.