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 dcfbaa2 commit 1f34cee
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 3 deletions.
4 changes: 4 additions & 0 deletions server/@types/shared/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type { ApArea } from './models/ApArea';
export type { Application } from './models/Application';
export type { ApplicationStatus } from './models/ApplicationStatus';
export type { ApplicationSummary } from './models/ApplicationSummary';
export type { ApplicationTimelineNote } from './models/ApplicationTimelineNote';
export type { ApprovedPremises } from './models/ApprovedPremises';
export type { ApprovedPremisesApplication } from './models/ApprovedPremisesApplication';
export type { ApprovedPremisesApplicationSummary } from './models/ApprovedPremisesApplicationSummary';
Expand Down Expand Up @@ -74,6 +75,8 @@ export type { CacheType } from './models/CacheType';
export type { Cancellation } from './models/Cancellation';
export type { CancellationReason } from './models/CancellationReason';
export type { Cas2Application } from './models/Cas2Application';
export type { Cas2ApplicationStatus } from './models/Cas2ApplicationStatus';
export type { Cas2ApplicationStatusUpdate } from './models/Cas2ApplicationStatusUpdate';
export type { Cas2ApplicationSummary } from './models/Cas2ApplicationSummary';
export type { Cas2SubmittedApplication } from './models/Cas2SubmittedApplication';
export type { Cas2SubmittedApplicationSummary } from './models/Cas2SubmittedApplicationSummary';
Expand Down Expand Up @@ -130,6 +133,7 @@ export type { NewReferralHistoryUserNote } from './models/NewReferralHistoryUser
export type { NewRoom } from './models/NewRoom';
export type { NewTurnaround } from './models/NewTurnaround';
export type { NewWithdrawal } from './models/NewWithdrawal';
export type { NomisUser } from './models/NomisUser';
export type { Nonarrival } from './models/Nonarrival';
export type { NonArrivalReason } from './models/NonArrivalReason';
export type { OASysAssessmentId } from './models/OASysAssessmentId';
Expand Down
15 changes: 15 additions & 0 deletions server/@types/shared/models/ApplicationTimelineNote.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Notes added to an application
*/
export type ApplicationTimelineNote = {
id?: string;
createdByUserId: string;
note: string;
createdAt?: string;
};

12 changes: 12 additions & 0 deletions server/@types/shared/models/Cas2ApplicationStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type Cas2ApplicationStatus = {
id: string;
name: string;
label: string;
description: string;
};

12 changes: 12 additions & 0 deletions server/@types/shared/models/Cas2ApplicationStatusUpdate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type Cas2ApplicationStatusUpdate = {
/**
* The "name" of the new status to be applied
*/
newStatus: string;
};

3 changes: 2 additions & 1 deletion server/@types/shared/models/Cas2SubmittedApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

import type { AnyValue } from './AnyValue';
import type { ApplicationStatus } from './ApplicationStatus';
import type { NomisUser } from './NomisUser';
import type { Person } from './Person';

export type Cas2SubmittedApplication = {
id: string;
person: Person;
createdAt: string;
createdByUserId: string;
submittedBy?: NomisUser;
schemaVersion: string;
outdatedSchema: boolean;
document?: AnyValue;
Expand Down
2 changes: 1 addition & 1 deletion server/@types/shared/models/MigrationJobType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/* tslint:disable */
/* eslint-disable */

export type MigrationJobType = 'update_all_users_from_community_api';
export type MigrationJobType = 'update_all_users_from_community_api' | 'update_application_statuses';
13 changes: 13 additions & 0 deletions server/@types/shared/models/NomisUser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type NomisUser = {
id: string;
name: string;
nomisUsername: string;
email?: string;
isActive: boolean;
};

1 change: 1 addition & 0 deletions server/@types/shared/models/PlacementApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export type PlacementApplication = (NewPlacementApplication & {
applicationCompletedAt: string;
data?: AnyValue;
document?: AnyValue;
canBeWithdrawn?: boolean;
});

2 changes: 2 additions & 0 deletions server/@types/shared/models/TimelineEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ export type TimelineEvent = {
type?: TimelineEventType;
id?: string;
occurredAt?: string;
content?: string;
createdBy?: string;
};

2 changes: 1 addition & 1 deletion server/@types/shared/models/TimelineEventType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/* 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' | 'cas3_person_arrived' | 'cas3_person_departed';
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' | 'cas3_person_arrived' | 'cas3_person_departed' | 'application_timeline_note';

0 comments on commit 1f34cee

Please sign in to comment.