API Reference
This section documents the SDK packages APIs.
Importing
Every function described in each package below is a top-level export. You can import any of them like this:
ES6
ES5 (CommonJS)
ES5 (UMD build)
Core
sdk-client
sdk-client
Core package to enable executing HTTP request. To be used together with middlewares.
Middlewares
It's up to you to pick whatever middleware fits your needs: you can compose them together, create your own custom versions, choose only one of them (e.g. you might not need authentication, but you need to send http requests).
sdk-middleware-auth
sdk-middleware-auth
Middleware to authenticate the request using one of the supported auth flows.
sdk-middleware-http
sdk-middleware-http
Middleware to send the actual HTTP request.
sdk-middleware-queue
sdk-middleware-queue
Middleware to throttle concurrent request to a certain limit. Useful to reduce concurrent HTTP requests.
sdk-middleware-logger
sdk-middleware-logger
Middleware to log incoming request and response objects.
sdk-middleware-user-agent
sdk-middleware-user-agent
Middleware to automatically set the User-Agent
to the request.
sdk-middleware-correlation-id
sdk-middleware-correlation-id
Middleware to add a correlation id to requests.
Helpers
Those are optional packages that provides help building the final request. You can choose to use them but you don't have to.
api-request-builder
api-request-builder
Provides an API to construct a URI for the HTTP API endpoints in a declarative way. Useful for building request uri
for requests.
http-user-agent
http-user-agent
Creates a proper HTTP User-Agent. Can be used everywhere.
sync-actions
sync-actions
Provides an API to construct update actions. Useful for building request body
for updates.
Last updated