ApiResponse<T>
@blobs/sdk / types/Common / ApiResponse
Defined in: types/Common.ts:14
Standard envelope returned by the API and SDK transport layer.
success is the discriminator: when true, data is populated; when false,
error (and optionally message/code) describe what went wrong. SDK
services typically unwrap this and return the inner data directly.
Type Parameters
T
T = any
The shape of the payload when success is true.
Properties
success
success:
boolean
Defined in: types/Common.ts:16
Whether the request succeeded. Acts as the discriminator for data vs error.
data?
optionaldata?:T
Defined in: types/Common.ts:18
Successful response payload. Present when success is true.
error?
optionalerror?:string
Defined in: types/Common.ts:20
Short, machine-readable error string. Present when success is false.
message?
optionalmessage?:string
Defined in: types/Common.ts:22
Human-readable message accompanying success or error responses.
code?
optionalcode?:string
Defined in: types/Common.ts:24
Stable error or transport code (e.g., UNAUTHORIZED, NOT_FOUND) for handling.