The UIResponse class is a wrapper for standard UI API responses. It encapsulates the result of an operation, including data, error messages, and validation states.
When consuming an API response via the SDK, you can expect the following properties:
data: An object containing the successful payload.errors: An array of error message strings.messages: An array of success/info message strings.result: A boolean indicating if the operation was successful.aborted: A boolean indicating if the operation was cancelled.validation: An object containing validation details:result: Boolean indicating if validation passed.fields: An object mapping field names to validation errors.non_column: An array of non-field-specific validation errors.
// Example of the expected shape of a UIResponse instance
{
data: {},
errors: [],
messages: [],
result: false,
aborted: false,
validation: {
result: true,
fields: {},
non_column: [],
}
}