Skip to content

Commit

Permalink
Updating hmpps-approved-premises-api models from OpenAPI specification
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent 64ba218 commit 31b9ad7
Show file tree
Hide file tree
Showing 22 changed files with 42 additions and 51 deletions.
1 change: 0 additions & 1 deletion server/@types/shared/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
8 changes: 0 additions & 8 deletions server/@types/shared/models/AnyValue.ts

This file was deleted.

6 changes: 3 additions & 3 deletions server/@types/shared/models/ApprovedPremisesApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* 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';
Expand All @@ -12,6 +11,7 @@ import type { Cas1ApplicationUserDetails } from './Cas1ApplicationUserDetails';
import type { Cas1CruManagementArea } from './Cas1CruManagementArea';
import type { PersonRisks } from './PersonRisks';
import type { PersonStatus } from './PersonStatus';
import type { Unit } from './Unit';
export type ApprovedPremisesApplication = (Application & {
isWomensApplication?: boolean;
/**
Expand All @@ -31,8 +31,8 @@ export type ApprovedPremisesApplication = (Application & {
createdByUserId: string;
schemaVersion: string;
outdatedSchema: boolean;
data?: AnyValue;
document?: AnyValue;
data?: Unit;
document?: Unit;
status: ApprovedPremisesApplicationStatus;
assessmentId?: string;
assessmentDecision?: AssessmentDecision;
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/Assessment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* 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 { Unit } from './Unit';
export type Assessment = {
service: string;
id: string;
Expand All @@ -16,7 +16,7 @@ export type Assessment = {
submittedAt?: string;
decision?: AssessmentDecision;
rejectionRationale?: string;
data?: AnyValue;
data?: Unit;
clarificationNotes: Array<ClarificationNote>;
referralHistoryNotes?: Array<ReferralHistoryNote>;
};
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/AssessmentAcceptance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/* 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';
import type { Unit } from './Unit';
export type AssessmentAcceptance = {
document: AnyValue;
document: Unit;
requirements?: PlacementRequirements;
placementDates?: PlacementDates;
apType?: ApType;
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/AssessmentRejection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type AssessmentRejection = {
document: AnyValue;
document: Unit;
rejectionRationale: string;
referralRejectionReasonId?: string;
referralRejectionReasonDetail?: string;
Expand Down
6 changes: 3 additions & 3 deletions server/@types/shared/models/Cas2Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
/* 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';
import type { Unit } from './Unit';
export type Cas2Application = (Application & {
createdBy: NomisUser;
schemaVersion: string;
outdatedSchema: boolean;
data?: AnyValue;
document?: AnyValue;
data?: Unit;
document?: Unit;
status: ApplicationStatus;
submittedAt?: string;
telephoneNumber?: string;
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/Cas2SubmittedApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
/* 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';
import type { Unit } from './Unit';
export type Cas2SubmittedApplication = {
id: string;
person: Person;
createdAt: string;
submittedBy?: NomisUser;
schemaVersion: string;
outdatedSchema: boolean;
document?: AnyValue;
document?: Unit;
submittedAt?: string;
telephoneNumber?: string;
timelineEvents: Array<Cas2TimelineEvent>;
Expand Down
6 changes: 3 additions & 3 deletions server/@types/shared/models/PlacementApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* 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 { Unit } from './Unit';
import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason';
export type PlacementApplication = (NewPlacementApplication & {
/**
Expand All @@ -23,8 +23,8 @@ export type PlacementApplication = (NewPlacementApplication & {
assessmentId: string;
assessmentCompletedAt: string;
applicationCompletedAt: string;
data?: AnyValue;
document?: AnyValue;
data?: Unit;
document?: Unit;
canBeWithdrawn: boolean;
isWithdrawn: boolean;
withdrawalReason?: WithdrawPlacementRequestReason;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type ReferralHistoryNoteMessageDetails = {
rejectionReason?: string;
rejectionReasonDetails?: string;
isWithdrawn?: boolean;
domainEvent?: AnyValue;
domainEvent?: Unit;
};

4 changes: 2 additions & 2 deletions server/@types/shared/models/RequestForPlacement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* 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 { Unit } from './Unit';
import type { WithdrawPlacementRequestReason } from './WithdrawPlacementRequestReason';
export type RequestForPlacement = {
/**
Expand All @@ -23,7 +23,7 @@ export type RequestForPlacement = {
*
*/
requestReviewedAt?: string;
document?: AnyValue;
document?: Unit;
/**
* 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.
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' | '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';
2 changes: 1 addition & 1 deletion server/@types/shared/models/SeedFromExcelFileType.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 SeedFromExcelFileType = 'approved_premises_room';
export type SeedFromExcelFileType = 'approved_premises_room' | 'cas1_import_site_survey_premise';
4 changes: 2 additions & 2 deletions server/@types/shared/models/SubmitApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type SubmitApplication = {
type: string;
translatedDocument?: AnyValue;
translatedDocument?: Unit;
};

4 changes: 2 additions & 2 deletions server/@types/shared/models/SubmitCas2Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type SubmitCas2Application = {
translatedDocument: AnyValue;
translatedDocument: Unit;
/**
* Id of the application being submitted
*/
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/SubmitPlacementApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { PlacementDates } from './PlacementDates';
import type { PlacementType } from './PlacementType';
import type { Unit } from './Unit';
export type SubmitPlacementApplication = {
translatedDocument: AnyValue;
translatedDocument: Unit;
placementType: PlacementType;
placementDates: Array<PlacementDates>;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { SubmitApplication } from './SubmitApplication';
import type { Unit } from './Unit';
export type SubmitTemporaryAccommodationApplication = (SubmitApplication & {
arrivalDate: string;
isRegisteredSexOffender?: boolean;
Expand All @@ -22,6 +22,6 @@ export type SubmitTemporaryAccommodationApplication = (SubmitApplication & {
isConcerningSexualBehaviour?: boolean;
isConcerningArsonBehaviour?: boolean;
prisonReleaseTypes?: Array<string>;
summaryData: AnyValue;
summaryData: Unit;
});

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Application } from './Application';
import type { ApplicationStatus } from './ApplicationStatus';
import type { PersonRisks } from './PersonRisks';
import type { Unit } from './Unit';
export type TemporaryAccommodationApplication = (Application & {
createdByUserId: string;
schemaVersion: string;
outdatedSchema: boolean;
data?: AnyValue;
document?: AnyValue;
data?: Unit;
document?: Unit;
status: ApplicationStatus;
risks?: PersonRisks;
submittedAt?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
/* 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';
import type { Unit } from './Unit';
export type TemporaryAccommodationAssessment = (Assessment & {
application: TemporaryAccommodationApplication;
allocatedToStaffMember?: TemporaryAccommodationUser;
status?: TemporaryAccommodationAssessmentStatus;
summaryData: AnyValue;
summaryData: Unit;
releaseDate?: string;
accommodationRequiredFromDate?: string;
});
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/UpdateApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
import type { UpdateApplicationType } from './UpdateApplicationType';
export type UpdateApplication = {
type: UpdateApplicationType;
data: Record<string, AnyValue>;
data: Record<string, Unit>;
};

4 changes: 2 additions & 2 deletions server/@types/shared/models/UpdateAssessment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type UpdateAssessment = {
data: Record<string, AnyValue>;
data: Record<string, Unit>;
releaseDate?: string;
accommodationRequiredFromDate?: string;
};
Expand Down
4 changes: 2 additions & 2 deletions server/@types/shared/models/UpdatePlacementApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { AnyValue } from './AnyValue';
import type { Unit } from './Unit';
export type UpdatePlacementApplication = {
data: Record<string, AnyValue>;
data: Record<string, Unit>;
};

0 comments on commit 31b9ad7

Please sign in to comment.