Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API model updates #763

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions server/@types/shared/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ 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 { 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,6 +135,7 @@ export type { MappaEnvelope } from './models/MappaEnvelope';
export type { MigrationJobRequest } from './models/MigrationJobRequest';
export type { MigrationJobType } from './models/MigrationJobType';
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';
Expand All @@ -136,6 +145,8 @@ export type { NewBooking } from './models/NewBooking';
export type { NewBookingNotMade } from './models/NewBookingNotMade';
export type { NewCancellation } from './models/NewCancellation';
export type { NewCas1Arrival } from './models/NewCas1Arrival';
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 @@ -198,9 +209,11 @@ export type { PrisonCaseNote } from './models/PrisonCaseNote';
export type { ProbationDeliveryUnit } from './models/ProbationDeliveryUnit';
export type { ProbationRegion } from './models/ProbationRegion';
export type { Problem } from './models/Problem';
export type { ProfileResponse } from './models/ProfileResponse';
export type { PropertyStatus } from './models/PropertyStatus';
export type { Reallocation } from './models/Reallocation';
export type { ReferralHistoryNote } from './models/ReferralHistoryNote';
export type { ReferralHistoryNoteMessageDetails } from './models/ReferralHistoryNoteMessageDetails';
export type { ReferralHistorySystemNote } from './models/ReferralHistorySystemNote';
export type { ReferralHistoryUserNote } from './models/ReferralHistoryUserNote';
export type { ReferralRejectionReason } from './models/ReferralRejectionReason';
Expand Down Expand Up @@ -237,6 +250,7 @@ export type { TaskSortField } from './models/TaskSortField';
export type { TaskStatus } from './models/TaskStatus';
export type { TaskType } from './models/TaskType';
export type { TaskWrapper } from './models/TaskWrapper';
export type { Temporality } from './models/Temporality';
export type { TemporaryAccommodationApplication } from './models/TemporaryAccommodationApplication';
export type { TemporaryAccommodationApplicationSummary } from './models/TemporaryAccommodationApplicationSummary';
export type { TemporaryAccommodationAssessment } from './models/TemporaryAccommodationAssessment';
Expand All @@ -260,6 +274,7 @@ 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
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' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager';
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'manager' | 'legacy_manager' | 'future_manager' | 'workflow_manager' | 'cru_member' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager';
2 changes: 2 additions & 0 deletions server/@types/shared/models/AssessmentAcceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { ApType } from './ApType';
import type { PlacementDates } from './PlacementDates';
import type { PlacementRequirements } from './PlacementRequirements';
export type AssessmentAcceptance = {
document: AnyValue;
requirements?: PlacementRequirements;
placementDates?: PlacementDates;
apType?: ApType;
notes?: string;
};

1 change: 1 addition & 0 deletions server/@types/shared/models/Cancellation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export type Cancellation = {
notes?: string;
createdAt: string;
premisesName: string;
otherReason?: string;
};

29 changes: 29 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Cas1OutOfServiceBedCancellation } from './Cas1OutOfServiceBedCancellation';
import type { Cas1OutOfServiceBedReason } from './Cas1OutOfServiceBedReason';
import type { Cas1OutOfServiceBedRevision } from './Cas1OutOfServiceBedRevision';
import type { Cas1OutOfServiceBedStatus } from './Cas1OutOfServiceBedStatus';
import type { NamedId } from './NamedId';
import type { Temporality } from './Temporality';
export type Cas1OutOfServiceBed = {
id: string;
createdAt: string;
outOfServiceFrom: string;
outOfServiceTo: string;
bed: NamedId;
room: NamedId;
premises: NamedId;
apArea: NamedId;
reason: Cas1OutOfServiceBedReason;
referenceNumber?: string;
notes?: string;
daysLostCount: number;
temporality: Temporality;
status: Cas1OutOfServiceBedStatus;
cancellation?: Cas1OutOfServiceBedCancellation | null;
revisionHistory: Array<Cas1OutOfServiceBedRevision>;
};

10 changes: 10 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBedCancellation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1OutOfServiceBedCancellation = {
id: string;
createdAt: string;
notes?: string;
};

10 changes: 10 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBedReason.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1OutOfServiceBedReason = {
id: string;
name: string;
isActive: boolean;
};

19 changes: 19 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBedRevision.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Cas1OutOfServiceBedReason } from './Cas1OutOfServiceBedReason';
import type { Cas1OutOfServiceBedRevisionType } from './Cas1OutOfServiceBedRevisionType';
import type { User } from './User';
export type Cas1OutOfServiceBedRevision = {
id: string;
updatedAt: string;
updatedBy: User;
revisionType: Array<Cas1OutOfServiceBedRevisionType>;
outOfServiceFrom?: string;
outOfServiceTo?: string;
reason?: Cas1OutOfServiceBedReason;
referenceNumber?: string;
notes?: string;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1OutOfServiceBedRevisionType = 'created' | 'updatedStartDate' | 'updatedEndDate' | 'updatedReferenceNumber' | 'updatedReason' | 'updatedNotes';
5 changes: 5 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBedSortField.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1OutOfServiceBedSortField = 'premisesName' | 'roomName' | 'bedName' | 'outOfServiceFrom' | 'outOfServiceTo' | 'reason' | 'daysLost';
5 changes: 5 additions & 0 deletions server/@types/shared/models/Cas1OutOfServiceBedStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1OutOfServiceBedStatus = 'active' | 'cancelled';
5 changes: 5 additions & 0 deletions server/@types/shared/models/Cas1ReportName.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Cas1ReportName = 'applications' | 'applicationsV2' | 'dailyMetrics' | 'lostBeds' | 'placementApplications' | 'placementMatchingOutcomes' | 'requestsForPlacement';
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_application_ap_areas' | 'update_task_due_dates' | 'update_cas2_applications_with_assessments' | 'update_cas2_status_updates_with_assessments' | 'update_cas2_notes_with_assessments' | 'update_cas1_user_details' | 'update_cas1_fix_placement_app_links' | 'update_cas1_notice_types' | 'update_cas1_backfill_user_ap_area' | 'update_cas1_out_of_service_bed_reasons' | 'update_cas3_application_offender_name' | 'update_cas3_users_pdu_from_community_api';
export type MigrationJobType = 'update_all_users_from_community_api' | 'update_sentence_type_and_situation' | 'update_booking_status' | 'update_application_ap_areas' | 'update_task_due_dates' | 'update_cas2_applications_with_assessments' | 'update_cas2_status_updates_with_assessments' | 'update_cas2_notes_with_assessments' | 'update_cas1_user_details' | 'update_cas1_fix_placement_app_links' | 'update_cas1_notice_types' | 'update_cas1_backfill_user_ap_area' | 'update_cas1_out_of_service_bed_reasons' | 'update_cas3_application_offender_name' | 'update_cas3_users_pdu_from_community_api' | 'update_cas1_populate_app_reason_for_short_notice_metadata';
12 changes: 12 additions & 0 deletions server/@types/shared/models/NamedId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* A generic stub for an object with a name and an ID.
*/
export type NamedId = {
id: string;
name: string;
};

13 changes: 13 additions & 0 deletions server/@types/shared/models/NewCas1OutOfServiceBed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type NewCas1OutOfServiceBed = {
startDate: string;
endDate: string;
reason: string;
referenceNumber?: string;
notes?: string;
bedId: string;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type NewCas1OutOfServiceBedCancellation = {
notes?: string;
};

2 changes: 1 addition & 1 deletion server/@types/shared/models/PersonType.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 PersonType = 'FullPerson' | 'RestrictedPerson' | 'UnknownPerson' | 'FullPersonInfo' | 'RestrictedPersonInfo';
export type PersonType = 'FullPerson' | 'RestrictedPerson' | 'UnknownPerson';
11 changes: 11 additions & 0 deletions server/@types/shared/models/ProfileResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { User } from './User';
export type ProfileResponse = {
deliusUsername: string;
loadError?: 'staff_record_not_found';
user?: User;
};

2 changes: 2 additions & 0 deletions server/@types/shared/models/ReferralHistoryNote.ts
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 { ReferralHistoryNoteMessageDetails } from './ReferralHistoryNoteMessageDetails';
export type ReferralHistoryNote = {
id: string;
createdAt: string;
message: string;
messageDetails?: ReferralHistoryNoteMessageDetails;
createdByUserName: string;
type: string;
};
Expand Down
10 changes: 10 additions & 0 deletions server/@types/shared/models/ReferralHistoryNoteMessageDetails.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ReferralHistoryNoteMessageDetails = {
rejectionReason?: string;
rejectionReasonDetails?: string;
isWithdrawn?: boolean;
};

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' | 'approved_premises_ap_staff_users' | 'approved_premises_offline_applications' | 'approved_premises_bookings' | 'approved_premises_cancel_bookings' | 'approved_premises_ap_area_email_addresses' | 'approved_premises_booking_adhoc_property' | 'approved_premises_assessment_more_info_bug_fix' | 'approved_premises_redact_assessment_details' | 'approved_premises_withdraw_placement_request' | 'approved_premises_replay_domain_events' | 'approved_premises_duplicate_application' | 'approved_premises_update_event_number';
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' | 'approved_premises_ap_staff_users' | 'approved_premises_offline_applications' | 'approved_premises_bookings' | 'approved_premises_cancel_bookings' | 'approved_premises_ap_area_email_addresses' | 'approved_premises_booking_adhoc_property' | 'approved_premises_assessment_more_info_bug_fix' | 'approved_premises_redact_assessment_details' | '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';
3 changes: 3 additions & 0 deletions server/@types/shared/models/TaskWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import type { Task } from './Task';
import type { UserWithWorkload } from './UserWithWorkload';
export type TaskWrapper = {
task: Task;
/**
* Users to whom this task can be allocated
*/
users: Array<UserWithWorkload>;
};

5 changes: 5 additions & 0 deletions server/@types/shared/models/Temporality.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type Temporality = 'past' | 'current' | 'future';
2 changes: 1 addition & 1 deletion server/@types/shared/models/TimelineEventType.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 TimelineEventType = 'approved_premises_application_submitted' | 'approved_premises_application_assessed' | 'approved_premises_booking_made' | 'approved_premises_person_arrived' | 'approved_premises_person_not_arrived' | 'approved_premises_person_departed' | 'approved_premises_booking_not_made' | 'approved_premises_booking_cancelled' | 'approved_premises_booking_changed' | 'approved_premises_application_withdrawn' | 'approved_premises_information_request' | 'approved_premises_assessment_appealed' | 'approved_premises_assessment_allocated' | 'approved_premises_placement_application_withdrawn' | 'approved_premises_placement_application_allocated' | 'approved_premises_match_request_withdrawn' | 'approved_premises_request_for_placement_created' | 'cas3_person_arrived' | 'cas3_person_departed' | 'application_timeline_note' | 'cas2_application_submitted' | 'cas2_note' | 'cas2_status_update';
export type TimelineEventType = 'approved_premises_application_submitted' | 'approved_premises_application_assessed' | 'approved_premises_booking_made' | 'approved_premises_person_arrived' | 'approved_premises_person_not_arrived' | 'approved_premises_person_departed' | 'approved_premises_booking_not_made' | 'approved_premises_booking_cancelled' | 'approved_premises_booking_changed' | 'approved_premises_application_withdrawn' | 'approved_premises_information_request' | 'approved_premises_assessment_appealed' | 'approved_premises_assessment_allocated' | 'approved_premises_placement_application_withdrawn' | 'approved_premises_placement_application_allocated' | 'approved_premises_match_request_withdrawn' | 'approved_premises_request_for_placement_created' | 'approved_premises_request_for_placement_assessed' | 'cas3_person_arrived' | 'cas3_person_departed' | 'application_timeline_note' | 'cas2_application_submitted' | 'cas2_note' | 'cas2_status_update';
12 changes: 12 additions & 0 deletions server/@types/shared/models/UpdateCas1OutOfServiceBed.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type UpdateCas1OutOfServiceBed = {
startDate: string;
endDate: string;
reason: string;
referenceNumber?: string;
notes?: string;
};