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 ac36f62 commit 96fb516
Show file tree
Hide file tree
Showing 24 changed files with 79 additions and 58 deletions.
2 changes: 1 addition & 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 Expand Up @@ -92,6 +91,7 @@ export type { Cas1OutOfServiceBedSummary } from './models/Cas1OutOfServiceBedSum
export type { Cas1OverbookingRange } from './models/Cas1OverbookingRange';
export type { Cas1PremiseCapacity } from './models/Cas1PremiseCapacity';
export type { Cas1PremiseCapacityForDay } from './models/Cas1PremiseCapacityForDay';
export type { Cas1PremiseCharacteristic } from './models/Cas1PremiseCharacteristic';
export type { Cas1PremiseCharacteristicAvailability } from './models/Cas1PremiseCharacteristicAvailability';
export type { Cas1PremiseDaySummary } from './models/Cas1PremiseDaySummary';
export type { Cas1PremisesBasicSummary } from './models/Cas1PremisesBasicSummary';
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
8 changes: 8 additions & 0 deletions server/@types/shared/models/Cas1PremiseCharacteristic.ts
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 */
/**
* All premise characteristics
*/
export type Cas1PremiseCharacteristic = 'acceptsChildSexOffenders' | 'acceptsHateCrimeOffenders' | 'acceptsNonSexualChildOffenders' | 'acceptsSexOffenders' | 'additionalRestrictions' | 'hasBrailleSignage' | 'hasHearingLoop' | 'hasLift' | 'hasStepFreeAccessToCommunalAreas' | 'hasTactileFlooring' | 'hasWheelChairAccessibleBathrooms' | 'hasWideAccessToCommunalAreas' | 'hasWideStepFreeAccess' | 'isCatered' | 'isESAP' | 'isIAP' | 'isPIPE' | 'isRecoveryFocussed' | 'isSuitableForVulnerable' | 'isSemiSpecialistMentalHealth';
32 changes: 24 additions & 8 deletions server/@types/shared/models/Cas1PremisesSearchResultSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,39 @@
/* tslint:disable */
/* eslint-disable */
import type { ApType } from './ApType';
import type { Cas1PremiseCharacteristic } from './Cas1PremiseCharacteristic';
import type { CharacteristicPair } from './CharacteristicPair';
import type { NamedId } from './NamedId';
export type Cas1PremisesSearchResultSummary = {
id?: string;
apCode?: string;
deliusQCode?: string;
apType?: ApType;
name?: string;
id: string;
apType: ApType;
name: string;
/**
* Full address, excluding postcode
*/
fullAddress: string;
/**
* Deprecated, use fullAddress
* @deprecated
*/
addressLine1?: string;
/**
* Deprecated, use fullAddress
* @deprecated
*/
addressLine2?: string;
/**
* Deprecated, use fullAddress
* @deprecated
*/
town?: string;
postcode?: string;
apArea?: NamedId;
apArea: NamedId;
/**
* The total number of spaces in this premises
* This is not populated. Instead, use 'characteristics'
* @deprecated
*/
totalSpaceCount?: number;
premisesCharacteristics?: Array<CharacteristicPair>;
characteristics: Array<Cas1PremiseCharacteristic>;
};

5 changes: 5 additions & 0 deletions server/@types/shared/models/Cas1SpaceSearchRequirements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import type { ApType } from './ApType';
import type { Cas1SpaceCharacteristic } from './Cas1SpaceCharacteristic';
import type { Gender } from './Gender';
export type Cas1SpaceSearchRequirements = {
/**
* Searching on multiple types is not supported, instead use apType. If this is used, the first type wll be matched, and type 'normal' will be ignored
* @deprecated
*/
apTypes?: Array<ApType>;
apType?: ApType;
spaceCharacteristics?: Array<Cas1SpaceCharacteristic>;
/**
* gender is obtained from application's associated gender
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/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' | 'cas1_import_site_survey_premise';
export type SeedFromExcelFileType = 'cas1_import_site_survey_rooms' | 'cas1_import_site_survey_premises';
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
Loading

0 comments on commit 96fb516

Please sign in to comment.