-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathorchestrationApiTypes.ts
More file actions
125 lines (101 loc) · 7.6 KB
/
Copy pathorchestrationApiTypes.ts
File metadata and controls
125 lines (101 loc) · 7.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import { components } from '../@types/orchestration-api'
// Visitor restrictions can be 2 types (local/global). Raw API values are processed in the data layer
// and replaced with the VISITOR_RESTRICTION value for use within the application
type VISITOR_RESTRICTION = 'VISITOR_RESTRICTION'
export type VisitorSupport = components['schemas']['VisitorSupportDto']
export type PageVisitDto = components['schemas']['PageVisitDto']
export type Visit = components['schemas']['VisitDto']
export type VisitBookingDetailsRaw = components['schemas']['VisitBookingDetailsDto']
type VisitNotificationDto = components['schemas']['VisitNotificationDto']
// Replace raw event and notifications 'type' ones that have VISITOR_RESTRICTION
export type VisitBookingDetails = Omit<VisitBookingDetailsRaw, 'events' | 'notifications'> & {
events: EventAudit[]
notifications: (Omit<VisitNotificationDto, 'type'> & { type: NotificationType })[]
}
export type VisitRestriction = Visit['visitRestriction']
export type VisitSubStatus = Visit['visitSubStatus']
export type VisitPreview = components['schemas']['VisitPreviewDto']
export type Visitor = components['schemas']['VisitorDto']
export type VisitPassDto = components['schemas']['VisitPassDto']
export type VisitPassRequestDto = components['schemas']['VisitPassRequestDto']
export type VisitPassVisitorDto = components['schemas']['VisitPassVisitorDto']
export type ApplicationDto = components['schemas']['ApplicationDto']
export type ChangeApplicationDto = components['schemas']['ChangeApplicationDto']
export type CreateApplicationDto = components['schemas']['CreateApplicationDto']
export type OutcomeDto = components['schemas']['OutcomeDto']
export type CancelVisitOrchestrationDto = components['schemas']['CancelVisitOrchestrationDto']
export type IgnoreVisitNotificationsDto = components['schemas']['IgnoreVisitNotificationsDto']
export type ApplicationMethodType = components['schemas']['BookingOrchestrationRequestDto']['applicationMethodType']
export type BookingOrchestrationRequestDto = components['schemas']['BookingOrchestrationRequestDto']
export type BookingRequestVisitorDetailsDto = components['schemas']['BookingRequestVisitorDetailsDto']
export type SessionExcludeDateDto = components['schemas']['SessionExcludeDateDto']
export type PrisonAndSessionsExcludeDatesDto = components['schemas']['PrisonAndSessionsExcludeDatesDto']
export type SessionCapacity = components['schemas']['SessionCapacityDto']
export type SessionSchedule = components['schemas']['SessionScheduleDto']
export type VisitSession = components['schemas']['VisitSessionDto']
export type Alert = components['schemas']['AlertDto']
export type OffenderRestriction = components['schemas']['OffenderRestrictionDto']
export type VisitSchedulerUpdatePrisonDto = components['schemas']['VisitSchedulerUpdatePrisonDto']
// Visit orders
export type PrisonerBalanceDto = components['schemas']['PrisonerBalanceDto']
export type PrisonerBalanceAdjustmentDto = components['schemas']['PrisonerBalanceAdjustmentDto']
export type PrisonerBalanceAdjustmentValidationErrorResponse =
components['schemas']['PrisonerBalanceAdjustmentValidationErrorResponse']
export type PrisonerBalanceAdjustmentValidationError =
components['schemas']['PrisonerBalanceAdjustmentValidationErrorResponse']['validationErrors'][number]
export type PrisonerBalanceAdjustmentReason = PrisonerBalanceAdjustmentDto['adjustmentReasonType']
export type VisitOrderHistoryDetailsDto = components['schemas']['VisitOrderHistoryDetailsDto']
export type VisitOrderHistoryDto = components['schemas']['VisitOrderHistoryDto']
export type VisitOrderHistoryAttributeType = components['schemas']['VisitOrderHistoryAttributesDto']['attributeType']
export type PrisonerProfileDto = components['schemas']['PrisonerProfileDto']
export type VisitSummary = components['schemas']['VisitSummaryDto']
// Raw local/global visitor restrictions mapped to VISITOR_RESTRICTION as described above
export type EventAuditRaw = components['schemas']['EventAuditOrchestrationDto']
export type EventAuditTypeRaw = EventAuditRaw['type']
export type EventAuditType =
| Exclude<EventAuditTypeRaw, 'PERSON_RESTRICTION_UPSERTED_EVENT' | 'VISITOR_RESTRICTION_UPSERTED_EVENT'>
| VISITOR_RESTRICTION
export type EventAudit = Omit<EventAuditRaw, 'type'> & { type: EventAuditType }
// Raw local/global visitor restrictions mapped to VISITOR_RESTRICTION as described above
export type NotificationCount = components['schemas']['NotificationCountDto']
export type VisitNotificationEventRaw = components['schemas']['VisitNotificationEventDto']
export type NotificationTypeRaw = VisitNotificationEventRaw['type']
export type NotificationType =
| Exclude<NotificationTypeRaw, 'PERSON_RESTRICTION_UPSERTED_EVENT' | 'VISITOR_RESTRICTION_UPSERTED_EVENT'>
| VISITOR_RESTRICTION
export type VisitNotificationEvent = Omit<VisitNotificationEventRaw, 'type'> & { type: NotificationType }
export type VisitNotificationsRaw = components['schemas']['OrchestrationVisitNotificationsDto']
export type VisitNotifications = Omit<VisitNotificationsRaw, 'notifications'> & {
notifications: (Omit<VisitNotificationEventRaw, 'type'> & { type: NotificationType })[]
}
export type VisitNotificationEventAttributeNames =
components['schemas']['VisitNotificationEventAttributeDto']['attributeName']
// Visit sessions and scheduled events (calendar)
export type VisitSessionsAndScheduleDto = components['schemas']['VisitSessionsAndScheduleDto']
export type SessionsAndScheduleDto = components['schemas']['SessionsAndScheduleDto']
export type VisitSessionV2Dto = components['schemas']['VisitSessionV2Dto']
export type PrisonerScheduledEventDto = components['schemas']['PrisonerScheduledEventDto']
export type PrisonDto = components['schemas']['PrisonDto']
export type ExcludeDateDto = components['schemas']['ExcludeDateDto']
export type IsExcludeDateDto = components['schemas']['IsExcludeDateDto']
export type ApproveVisitRequestBodyDto = components['schemas']['ApproveVisitRequestBodyDto']
export type RejectVisitRequestBodyDto = components['schemas']['RejectVisitRequestBodyDto']
export type VisitRequestResponse = components['schemas']['OrchestrationApproveRejectVisitRequestResponseDto']
export type VisitRequestSummary = components['schemas']['OrchestrationVisitRequestSummaryDto']
export type VisitRequestsCountDto = components['schemas']['VisitRequestsCountDto']
export type ApplicationValidationErrorResponse = components['schemas']['ApplicationValidationErrorResponse']
// Booker management
export type ApproveVisitorRequestDto = components['schemas']['ApproveVisitorRequestDto']
export type BookerDetailedInfoDto = components['schemas']['BookerDetailedInfoDto']
export type BookerSearchResultsDto = components['schemas']['BookerSearchResultsDto']
export type BookerPrisonerVisitorRequestDto = components['schemas']['BookerPrisonerVisitorRequestDto']
export type PrisonVisitorRequestDto = components['schemas']['PrisonVisitorRequestDto']
export type PrisonVisitorRequestListEntryDto = components['schemas']['PrisonVisitorRequestListEntryDto']
export type RegisterVisitorForBookerPrisonerDto = components['schemas']['RegisterVisitorForBookerPrisonerDto']
export type RejectVisitorRequestDto = components['schemas']['RejectVisitorRequestDto']
export type SearchBookerDto = components['schemas']['SearchBookerDto']
export type SocialContactsDto = components['schemas']['SocialContactsDto']
export type StaffUsernameDto = components['schemas']['StaffUsernameDto']
export type VisitorInfoDto = components['schemas']['VisitorInfoDto']
export type VisitorRequestsCountByPrisonCodeDto = components['schemas']['VisitorRequestsCountByPrisonCodeDto']
export type VisitorRequestForReviewDto = components['schemas']['SingleVisitorRequestForReviewDto']