mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 11:11:13 -05:00
Apply validation enhancement migration
Apply migration to enhance the `validate_submission_items_for_approval` function with specific error codes and item details. Update `process_approval_transaction` to utilize this enhanced error information for improved debugging and monitoring. This completes Phase 3 of the pipeline audit.
This commit is contained in:
@@ -6345,17 +6345,33 @@ export type Database = {
|
||||
monitor_ban_attempts: { Args: never; Returns: undefined }
|
||||
monitor_failed_submissions: { Args: never; Returns: undefined }
|
||||
monitor_slow_approvals: { Args: never; Returns: undefined }
|
||||
process_approval_transaction: {
|
||||
Args: {
|
||||
p_idempotency_key?: string
|
||||
p_item_ids: string[]
|
||||
p_moderator_id: string
|
||||
p_request_id?: string
|
||||
p_submission_id: string
|
||||
p_submitter_id: string
|
||||
}
|
||||
Returns: Json
|
||||
}
|
||||
process_approval_transaction:
|
||||
| {
|
||||
Args: {
|
||||
p_idempotency_key?: string
|
||||
p_item_ids: string[]
|
||||
p_moderator_id: string
|
||||
p_request_id?: string
|
||||
p_submission_id: string
|
||||
p_submitter_id: string
|
||||
}
|
||||
Returns: Json
|
||||
}
|
||||
| {
|
||||
Args: {
|
||||
p_idempotency_key: string
|
||||
p_item_ids: string[]
|
||||
p_moderator_id: string
|
||||
p_submission_id: string
|
||||
}
|
||||
Returns: {
|
||||
approved_count: number
|
||||
error_code: string
|
||||
failed_items: Json
|
||||
message: string
|
||||
success: boolean
|
||||
}[]
|
||||
}
|
||||
release_expired_locks: { Args: never; Returns: number }
|
||||
release_submission_lock: {
|
||||
Args: { moderator_id: string; submission_id: string }
|
||||
@@ -6455,16 +6471,26 @@ export type Database = {
|
||||
Args: { _action: string; _submission_id: string; _user_id: string }
|
||||
Returns: boolean
|
||||
}
|
||||
validate_submission_items_for_approval: {
|
||||
Args: { p_item_ids: string[] }
|
||||
Returns: {
|
||||
error_code: string
|
||||
error_message: string
|
||||
invalid_item_id: string
|
||||
is_valid: boolean
|
||||
item_details: Json
|
||||
}[]
|
||||
}
|
||||
validate_submission_items_for_approval:
|
||||
| {
|
||||
Args: { p_item_ids: string[] }
|
||||
Returns: {
|
||||
error_code: string
|
||||
error_message: string
|
||||
invalid_item_id: string
|
||||
is_valid: boolean
|
||||
item_details: Json
|
||||
}[]
|
||||
}
|
||||
| {
|
||||
Args: { p_submission_id: string }
|
||||
Returns: {
|
||||
error_code: string
|
||||
error_message: string
|
||||
is_valid: boolean
|
||||
item_details: Json
|
||||
}[]
|
||||
}
|
||||
}
|
||||
Enums: {
|
||||
account_deletion_status:
|
||||
|
||||
Reference in New Issue
Block a user