Releases: makenotion/notion-sdk-js
Releases · makenotion/notion-sdk-js
v0.2.1
Changes
Adds support for url
in returned Page object per this change https://developers.notion.com/changelog/page-objects-now-return-url
v0.2.0
Breaking changes
- The
HTTPResponseError
class is no longer exported, andHTTPResponseError.isHTTPResponseError(error)
is replaced byisHTTPResponseError(error)
. - Most error class constructor signatures have changed. Please see the types for more details. Error class constructors no longer reference the
got
library.
New features
- The
got
library is replaced withnode-fetch
. - You may now pass a
fetch
function when creating aClient
instance. The client will use this fetch function for all HTTP requests. - Error types have been reworked for improved type safety. No more stringly-typed errors! Inside a
isNotionClientError
type guard, botherror.name
anderror.code
are enumerated unions that can be used to further refine the type oferror
. error.code
is guaranteed to be in your library'sAPIErrorCode
orClientErrorCode
enum types, even if the API returns a new, unknowncode
in a response. In this case,error.code
will beClientErrorCode.ResponseError
.- Types have been updated according to the API changes.
Public release - v0.1.3
Releasing with initial feature set. Stay tuned - we'd love to evolve this library to meet many more needs.