All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- The supported version of the dependency
uvicorn
has been raised from>=0.20.0,<0.21
to>=0.22.0,<0.23
. - The supported version of the dependency
starlette
has been raised from>=0.23.1,<0.24
to>=0.28.0,<0.29
. - The supported version of the dependency
structlog
has been raised from>=22.3.0,<23
to>=23.1.0,<24
.
- Requests made by
DataAPI
now use the correctContent-Type
. - Requests made by
DataAPI
now correctly send an empty body for requests where no body is expected (such asquery
ordelete
). - The
testing.mock_event
function now generates a unique event time each time it is called.
DataAPI
now raises the newdata_api.exceptions.ClientError
exception when an exception in the underlying HTTP library occurs, rather than exposing that library's exceptions directly.MissingIdFieldError
has been renamed toMissingFieldError
and the name of the missing field is now exposed in the exception value.- Added missing class attribute docstrings to
SalesforceRestApiError
,InnerSalesforceRestApiError
andReferenceId
. - Updated the docstrings for the public APIs to align with the style guidelines.
- Updated the user-facing error and CLI messages to align with the style guidelines.
- All
DataAPI
exceptions now have suitable string representations, making it easier to diagnose errors seen in function logs. - The
testing.mock_event
function now generates a unique event ID each time it is called.
- Added a
testing
module, containingmock_event
andmock_context
functions for simplifying unit testing of Python functions. - Added example code snippets and attribute values to the docstrings for public APIs.
- Invocation metadata is now set on the function response via the
x-extra-info
header.
- All publicly exported
dataclass
es (such asContext
,InvocationEvent
andRecord
) now only accept their fields being passed as keyword arguments, rather than as positional arguments. - If an unhandled internal runtime error occurs, the log output now includes the full stack trace,
and the function response's HTTP status code is now
503
rather than500
. - The docstrings for several public types and APIs have been improved.
- The minimum version of the dependencies
orjson
,starlette
andstructlog
have been raised.
- Function projects must now include a valid
project.toml
file to pass validation. Functions generated usingsf generate function
already include this file. - The
context.org.data_api
client now uses the Salesforce REST API version specified by thecom.salesforce.salesforce-api-version
key inproject.toml
, rather than using the Salesforce Org's maximum supported REST API version. This version must be'53.0'
or newer. - The error messages shown for invalid functions have been improved.
- Initial beta implementation.