diff --git a/server/@types/shared/index.d.ts b/server/@types/shared/index.d.ts index 50760fa05..7af7754e5 100644 --- a/server/@types/shared/index.d.ts +++ b/server/@types/shared/index.d.ts @@ -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'; @@ -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'; @@ -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'; diff --git a/server/@types/shared/models/ApplicationTimelineNote.ts b/server/@types/shared/models/ApplicationTimelineNote.ts new file mode 100644 index 000000000..b610e51e8 --- /dev/null +++ b/server/@types/shared/models/ApplicationTimelineNote.ts @@ -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; +}; + diff --git a/server/@types/shared/models/Cas2ApplicationStatus.ts b/server/@types/shared/models/Cas2ApplicationStatus.ts new file mode 100644 index 000000000..673950d5e --- /dev/null +++ b/server/@types/shared/models/Cas2ApplicationStatus.ts @@ -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; +}; + diff --git a/server/@types/shared/models/Cas2ApplicationStatusUpdate.ts b/server/@types/shared/models/Cas2ApplicationStatusUpdate.ts new file mode 100644 index 000000000..d29ade351 --- /dev/null +++ b/server/@types/shared/models/Cas2ApplicationStatusUpdate.ts @@ -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; +}; + diff --git a/server/@types/shared/models/Cas2SubmittedApplication.ts b/server/@types/shared/models/Cas2SubmittedApplication.ts index 6b63fd02f..4aede3ed8 100644 --- a/server/@types/shared/models/Cas2SubmittedApplication.ts +++ b/server/@types/shared/models/Cas2SubmittedApplication.ts @@ -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; diff --git a/server/@types/shared/models/MigrationJobType.ts b/server/@types/shared/models/MigrationJobType.ts index ab1e28833..5ecc2cdbe 100644 --- a/server/@types/shared/models/MigrationJobType.ts +++ b/server/@types/shared/models/MigrationJobType.ts @@ -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'; diff --git a/server/@types/shared/models/NomisUser.ts b/server/@types/shared/models/NomisUser.ts new file mode 100644 index 000000000..b3bfda0f7 --- /dev/null +++ b/server/@types/shared/models/NomisUser.ts @@ -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; +}; + diff --git a/server/@types/shared/models/PlacementApplication.ts b/server/@types/shared/models/PlacementApplication.ts index 226a331da..b0a55cfde 100644 --- a/server/@types/shared/models/PlacementApplication.ts +++ b/server/@types/shared/models/PlacementApplication.ts @@ -18,5 +18,6 @@ export type PlacementApplication = (NewPlacementApplication & { applicationCompletedAt: string; data?: AnyValue; document?: AnyValue; + canBeWithdrawn?: boolean; }); diff --git a/server/@types/shared/models/TimelineEvent.ts b/server/@types/shared/models/TimelineEvent.ts index d3c58f330..ad3eb2ec8 100644 --- a/server/@types/shared/models/TimelineEvent.ts +++ b/server/@types/shared/models/TimelineEvent.ts @@ -9,5 +9,7 @@ export type TimelineEvent = { type?: TimelineEventType; id?: string; occurredAt?: string; + content?: string; + createdBy?: string; }; diff --git a/server/@types/shared/models/TimelineEventType.ts b/server/@types/shared/models/TimelineEventType.ts index ea8424b6e..41eb1aed9 100644 --- a/server/@types/shared/models/TimelineEventType.ts +++ b/server/@types/shared/models/TimelineEventType.ts @@ -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';