# Shared ## Domain Types ### API Error - `class ApiError:` A direct mapping of tonic::Status, for use in HTTP responses. - `long code` The error code is used to identify the nature of the error. It corresponds to an HTTP status code. - `String message` A human-readable message providing more details about the error. - `Optional> details` Additional error details, if any. This can include structured information such as field violations or error metadata. ### Base Response - `class BaseResponse:` - `ResponseMetadata metadata` Response metadata, including the request ID and optional pagination info. - `String requestId` A unique ID for this request, generated upon ingestion of the request. - `Optional nextPageToken` Base64URL-encoded pagination token containing limit and offset - `Optional pageNumber` Pagination. Included if this was a GET (list) response - `Optional previousPageToken` Base64URL-encoded pagination token containing limit and offset - `Optional totalItems` Total number of items available (not just in this page). - `Optional totalPages` Total number of pages available. - `Optional error` Structured error details when the request is unsuccessful. - `long code` The error code is used to identify the nature of the error. It corresponds to an HTTP status code. - `String message` A human-readable message providing more details about the error. - `Optional> details` Additional error details, if any. This can include structured information such as field violations or error metadata. ### Response Metadata - `class ResponseMetadata:` Metadata for the response. This will always contain a request ID which can be used to identify the request to Clear Street for tracing, and optionally may include pagination data. - `String requestId` A unique ID for this request, generated upon ingestion of the request. - `Optional nextPageToken` Base64URL-encoded pagination token containing limit and offset - `Optional pageNumber` Pagination. Included if this was a GET (list) response - `Optional previousPageToken` Base64URL-encoded pagination token containing limit and offset - `Optional totalItems` Total number of items available (not just in this page). - `Optional totalPages` Total number of pages available.