接入前端P0页面真实接口

This commit is contained in:
andy
2026-07-08 16:20:06 +08:00
parent 5c5b8e33b0
commit 66a613d6cd
45 changed files with 8719 additions and 0 deletions

View File

@@ -0,0 +1,352 @@
export type ReservationRecord = Record<string, unknown>
export type ReservationOrderStatus = 'TEMPORARY' | 'ACTIVE' | 'ENDED' | 'LOGIC_DELETED'
export type ReservationTaskStatus =
| 'PENDING_CONFIRM'
| 'READY'
| 'EXECUTING'
| 'FAILED'
| 'COMPLETED'
| 'BLOCKED'
export type ReservationOperaOperationStatus = 'PENDING' | 'EXECUTING' | 'SUCCEEDED' | 'FAILED'
export type ReservationTaskCardType =
| 'NEW_BOOKING'
| 'UPDATE_BOOKING'
| 'CANCEL_BOOKING'
| 'VOUCHER'
| 'ROOMING_LIST'
| 'AMEND_GROUP_CODE'
| 'TRACE_NOTE'
| 'TA_RECORD'
| 'MESSAGE_NOTIFICATION'
| 'MANUAL_REVIEW'
export interface ReservationPageResult {
page_num: number
page_size: number
total: number
}
export interface ReservationOrderListFilters {
hotel_id?: string
order_status?: string
group_code?: string
confirmation_number?: string
keyword?: string
page_num?: number
page_size?: number
}
export interface ReservationOrderListItem {
order_id: string
hotel_id: string
order_status: ReservationOrderStatus | string
temporary_order_no: string | null
confirmation_number: string | null
group_code: string | null
display_name: string
open_task_count: number | null
next_processable_task_id: string | null
updated_at: string | null
}
export interface ReservationOrderListResult {
items: ReservationOrderListItem[]
page: ReservationPageResult
}
export interface ReservationTaskListFilters {
hotel_id?: string
order_id?: string
task_type?: string
order_status?: string
task_subtype?: string
task_status?: string
queue_participation?: boolean
keyword?: string
page_num?: number
page_size?: number
}
export interface ReservationTaskListItem {
task_id: string
order_id: string
hotel_id: string
display_order_key: string | null
temporary_order_no: string | null
task_type: string
task_subtype: string | null
task_status: ReservationTaskStatus | string
card_name: string | null
queue_sequence: number | null
queue_participation: boolean
can_process: boolean
readonly_reason_code: string | null
source_message_id: string | null
source_subject: string | null
source_sender_summary?: string | null
source_received_at?: string | null
external_conversation_id?: string | null
conversation_message_count?: number | null
created_at: string | null
updated_at: string | null
}
export interface ReservationTaskListResult {
items: ReservationTaskListItem[]
page: ReservationPageResult
}
export interface ReservationOrderSummaryResult {
order_id: string
hotel_id: string
order_status: ReservationOrderStatus | string
temporary_order_no: string | null
confirmation_number: string | null
group_code: string | null
block_code: string | null
allotment_code: string | null
display_name: string
created_at: string | null
updated_at: string | null
}
export interface ReservationOrderTaskTimelineItem {
task_id: string
task_type: string
task_subtype: string | null
task_status: ReservationTaskStatus | string
card_name: string | null
queue_sequence: number | null
queue_participation: boolean
can_process: boolean
readonly_reason_code: string | null
source_message_id?: string | null
source_subject?: string | null
source_sender_summary?: string | null
source_received_at?: string | null
external_conversation_id?: string | null
conversation_message_count?: number | null
created_at: string | null
}
export interface ReservationOrderDetailResult {
order: ReservationOrderSummaryResult
tasks: ReservationOrderTaskTimelineItem[]
warnings: string[]
}
export interface SourceMessageConversationResult {
conversation: {
externalConversationId: string
hotelId: string
channel: string
subject: string | null
messageCount: number
firstReceivedAt: string | null
lastReceivedAt: string | null
}
messages: SourceMessageConversationItem[]
}
export interface SourceMessageConversationItem {
id: string
externalMessageId: string | null
externalConversationId: string
senderSummary: string | null
subject: string | null
receivedAt: string | null
sourceSentAt: string | null
textBody: string | null
htmlBody: string | null
htmlSanitizeRequired: boolean
inlineImages: SourceMessageOriginalMedia[]
attachments: SourceMessageOriginalMedia[]
}
export interface SourceMessageOriginalMedia {
mediaType: string | null
fileName: string | null
contentType: string | null
sizeBytes: number | null
externalUrl: string | null
externalMediaId: string | null
}
export interface ReservationWorkbenchFilters {
business_key?: string
order_status?: string
task_status?: string
task_card_type?: string
}
export interface ReservationWorkbenchItem {
order_id: string
hotel_id: string
display_name: string
order_key_type: string
order_business_key: string | null
active_business_key: string | null
temporary_order_code: string | null
order_status: ReservationOrderStatus | string
business_key_source: string
source_message_id: string
guest_name: string
room_type: string
arrival_date: string
departure_date: string
amount: number
currency_code: string
current_task_id: string
current_task_card_type: ReservationTaskCardType | string
current_task_status: ReservationTaskStatus | string
updated_at: string
}
export interface ReservationTaskQueueItem {
task_id: string
order_id: string
system_task_type: string
task_card_type: ReservationTaskCardType | string
task_status: ReservationTaskStatus | string
queue_participation: boolean
execution_order: number
blocked_by_task_id: string | null
updated_at: string
}
export interface ReservationSourceMessageSummary {
source_message_id: string
channel: string
sender_identifier: string
thread_subject: string
payload_received_at: string
summary: string
}
export interface ReservationOrderDetail extends ReservationWorkbenchItem {
tasks: ReservationTaskQueueItem[]
source_message: ReservationSourceMessageSummary
}
export interface ReservationTaskAvailabilityResult {
blocked: boolean
read_only: boolean
editable: boolean
confirmable: boolean
executable: boolean
blocked_by_task_id: string | null
blocked_reason: string | null
}
export interface ReservationTaskFieldResult {
row_number: number | null
card_name: string | null
display_area: string | null
field_path: string
display_name: string
visible: string | null
editable: string | null
input_editable: string | null
select_editable: string | null
date_picker: string | null
number_input: string | null
file_display: string | null
table_editable: string | null
enum_options: string | null
required_rule: string | null
display_condition: string | null
validation_rule: string | null
write_path: string | null
opera_write_participation: string | null
opera_parameter_mapping: string | null
notes: string | null
value: unknown
}
export interface ReservationTaskDetailResult {
task_id: string
order_id: string
source_message_id: string
source_subject?: string | null
source_sender_summary?: string | null
source_received_at?: string | null
external_conversation_id?: string | null
conversation_message_count?: number | null
system_task_type: string
task_card_type: ReservationTaskCardType | string
task_status: ReservationTaskStatus | string
field_contract_version: string
draft_payload: ReservationRecord | null
confirmed_payload: ReservationRecord | null
availability: ReservationTaskAvailabilityResult
fields: ReservationTaskFieldResult[]
opera_operations: ReservationOperaOperationResult[]
}
export interface ReservationTaskPayloadMutationRequest {
field_values: ReservationRecord
}
export interface ReservationTaskPayloadMutationResult {
task_id: string
order_id: string
task_status: ReservationTaskStatus | string
draft_payload: ReservationRecord | null
confirmed_payload: ReservationRecord | null
opera_operations: ReservationOperaOperationResult[]
}
export interface ReservationOperaOperationResult {
operation_id: string
task_id: string
operation_sequence: number
operation_code: string
operation_name: string
operation_status: ReservationOperaOperationStatus | string
attempt_count: number
last_error_message: string | null
attempts: ReservationOperaOperationAttemptResult[]
}
export interface ReservationOperaOperationAttemptResult {
attempt_id: string
attempt_number: number
attempt_status: ReservationOperaOperationStatus | string
response_payload: ReservationRecord | null
error_message: string | null
started_at: string | null
finished_at: string | null
}
export interface ReservationOperaSimulationRequest {
simulate_success?: boolean
failure_message?: string
}
export interface ReservationTaskAuditListResult {
task_id: string
items: ReservationTaskAuditLogResult[]
}
export interface ReservationTaskAuditLogResult {
audit_id: string
order_id: string
task_id: string
operation_id: string | null
actor_type: string
actor_id: string
action: string
reason: string | null
before_snapshot: ReservationRecord | null
after_snapshot: ReservationRecord | null
occurred_at: string
}
export interface BackendHealthResult {
status: string
service: string
}