...
- feat(esm/utils): add
diagDomainConfig
⚠ BREAKING CHANGES
- refactor(oauth): rely on global crypto instead of using a conditionnal
import('node:crypto')
- feat(streams): new accesslogs API
- feat(sse): flatten reason object and add a mandatory type
- feat: allow error handling from legacy client
- feat: support repeatable query params
- fix(sse): fix OAuth signature when a query param is repeated
- fix(stream): fix query params with ApplicationLogStream
- fix(sse): use query parameters in OAuth signature
- fix(stream): consider
ENOTFOUND
(macOS DNS error) as retryable for ApplicationLogStream - feat(stream): make
retryCount
public on ApplicationLogStream - fix(stream): prevent uncaught errors on retry with ApplicationLogStream (firefox)
- fix(stream): consider browser network errors as retryable
- feat(stream): add a
connectionTimeout
param on ApplicationLogStream (default: 5s)
- chore: make the options param of the on method optional
- fix: always clear timeouts in
stream.abstract
close method (logs SSE and events WS) - fix: various fixes on ApplicationLogStream (see #93)
- introduce new errors
NetworkError
,HttpError
withstatus
property andServerError
- Clear heartbeat
setInterval
properly - Make sure
start.then()
resolves with areason
not being anError
object - Make sure
start.catch()
rejects with anError
object - Fix the
getBytes
bug - Fix the
last-event-id
- Remove the double retry caused by inner pause/resume
- Fix lastContact when no logs are emitted
- Mark some errors as retryable and some not
- introduce new errors
- test: introduce a test suite for ApplicationLogStream
- fix: abort controller behaviour with
sse-parse
used byApplicationLogsStream
(Node.js < 18.16)
- adjust esm/cjs build to transform dynamic imports into Node.js compatible syntax
- Update project to Node.js 18.5
- Replace
oauth.browser.js
andoauth.node.js
with one browser/Node.js compatible file:oauth.js
- You may need to adjust your bundler's settings to assume
crypto
as a global
- You may need to adjust your bundler's settings to assume
- Delete
request.superagent.js
and makerequest.fetch.js
compatible with Node.js - Move project from CJS to ESM
- Files are is still distributed in
esm
andcjs
directories - The
cjs
will be removed in a later major release - There are still some Node.js specific files we need to replace with browser/Node.js compatible versions
- Files are is still distributed in
- Introduce new
ApplicationLogsStream
class for new SSE logs (v4)
- Improve error handling on fetch request
- Generate-client:
- Handle invalid
delete
function name - Handle
requestBody.content
when only described as a$ref
- Handle invalid
- Add new utils
getOrgaPaymentMethodsError
andgetAllOrgaPaymentMethodsErrors
- Change OVD
openapi.json
URL
- Rollback
cc-client-version
header for all calls
- Add support for remote OVD OpenAPI
- Add
cc-client-version
header for all calls - Add network group routes in
api/v4/network-group.js
- utils/env-var:
- add a json parser and return valid values
- add a strict mode validation
- add a warning error for Java validation
- Add Jenkins addon provider v4 endpoint to get available updates
- Add
GET /v4/addon-providers/jenkins/addons/{addonIdOrRealId} in
api/v4/addon-providers.jswith
getJenkinsUpdates()`
- Add
- Add new addon providers v4 endpoints
- Add
GET /v4/addon-providers/{addonProviderId}/addons/{addonIdOrRealId} in
api/v4/addon-providers.jswith
getAddon()` - Add
GET /v4/addon-providers/{addonProviderId}/clusters/{clusterId} in
api/v4/addon-providers.jswith
getCluster()`
- Add
- Add new billing API endpoints
- Add
GET /organisations/{id}/namespaces
inapi/v4/billing.js
withgetNamespaces()
- Add
GET /billing/organisations/{id}/invoices
inapi/v4/billing.js
withgetAllInvoices()
- Add
GET /billing/organisations/{id}/invoices/unpaid
inapi/v4/billing.js
withgetAllUnpaidInvoices()
- Add
GET /billing/organisations/{id}/invoices/{invoiceNumber}{type}
inapi/v4/billing.js
withgetInvoice()
- Add
GET /billing/organisations/{id}/payments/methods
inapi/v4/billing.js
withgetPaymentMethods()
- Add
POST /billing/organisations/{id}/payments/methods
inapi/v4/billing.js
withcreatePaymentMethod()
- Add
PUT /billing/organisations/{id}/payments/methods/default
inapi/v4/billing.js
withsetDefaultPaymentMethod()
- Add
DELETE /billing/organisations/{id}/payments/methods/{methodId}
inapi/v4/billing.js
withdeletePaymentMethod()
- Add
POST /billing/organisations/{id}/invoices/{invoiceNumber}/payments/paypal
inapi/v4/billing.js
withinitPaypalPayment()
- Add
PUT /billing/organisations/{id}/invoices/{invoiceNumber}/payments/paypal/{payerId}
inapi/v4/billing.js
withauthorizePaypalPayment()
- Add
POST /billing/organisations/{id}/invoices/{invoiceNumber}/payments/stripe
inapi/v4/billing.js
withinitStripePayment()
- Add
PUT /billing/organisations/{id}/invoices/{invoiceNumber}/payments/stripe/{paymentId}
inapi/v4/billing.js
withauthorizeStripePayment()
- Add
GET /billing/organisations/{id}/payments/stripe/intent
inapi/v4/billing.js
withgetStripePaymentIntent()
- Add
- Update superagent
- Update dependencies
- Add
execWarpscript()
function for browsers with fetch - Add new Warp10 requests around access logs
getStatusCodesFromWarp10()
getRequestsFromWarp10()
getAccessLogsHeatmapFromWarp10()
getAccessLogsDotmapFromWarp10()
- Add
withCache()
helper function - Add
withOptions()
helper function - Add timeout support for browser based request (API and Warp10)
- Add new addon-providers API
GET /v4/addon-providers/{providerId}
inapi/v4/addon-providers.js
withgetAddonProvider()
. - Fix client generation with new
/v4
routes
- Expose app statuses
- replace jest by @web/test-runner
- Add new zones API
GET /v4/product/zones
inapi/v4/product.js
withgetAllZones()
.
- Move
GET /products/zones
toapi/product
withgetAllZones()
- Used to be
api/unknown
withtodo_getZones()
- Used to be
In order to support both v2 and v4 endpoints we changed the way we handle the version prefix.
- You no longer need to configure it as part of the
API_HOST
when you callprefixUrl(API_HOST)
in yoursendToApi()
. - You only need to defined the origin with no trailing slash. Example for production:
'https://api.clever-cloud.com'
. - All v2 service modules that you imported from
esm/api
orcjs/api
were moved toesm/api/v2
orcjs/api/v2
.
- Add exponential backoff to the newly refactored
LogsStream
andEventsStream
. - Add docs about how to use those streams.
- Expose logs with a new
EventEmitter
/EventTarget
compatible API - Expose events with a new
EventEmitter
/EventTarget
compatible API
- Add
payment
param toaddTcpRedir()
inapi/application
Fix missing /self
vs /organisations/{id}
:
- Rename
POST /self/addons/preorders
toapi/addon
withpreorder()
- Used to be
api/addon
withtodo_preorderSelfAddon()
- Used to be
- Rename
GET /organisations/{id}/applications/{appId}/deployments/{deploymentId}/instances
toapi/application
withcancelDeployment()
- Used to be
api/application
withgetAllDeploymentInstances()
- Used to be
- Rename
POST /organisations/{id}/addons/preorders
toapi/addon
withpreorder()
- Used to be
api/addon
withtodo_preorderAddonByOrgaId()
- Used to be
- Move
GET /products/addonproviders
toapi/product
withgetAllAddonProviders()
- Used to be
api/unknown
withtodo_getAddonProviders()
- Used to be
- Move
GET /products/prices
toapi/product
withgetCreditPrice()
- Used to be
api/unknown
withtodo_getExcahngeRates()
- Used to be
- Rename
GET /self/applications/{appId}/deployments/{deploymentId}/instances
toapi/application
withcancelDeployment()
- Used to be
api/application
withgetAllDeploymentInstances()
- Used to be
- Add
GET /organisations/{id}/namespaces
inapi/organisation.js
withgetNamespaces()
- Add
GET /organisations/{id}/applications/{appId}/tcpRedirs
inapi/application.js
withgetTcpRedirs()
- Add
POST /organisations/{id}/applications/{appId}/tcpRedirs
inapi/application.js
withaddTcpRedir()
- Add
DELETE /organisations/{id}/applications/{appId}/tcpRedirs/{sourcePort}
inapi/application.js
withremoveTcpRedir()
- Add
delay
param togetContinuousAccessLogsFromWarp10()
Seems like a milliseconds API for access logs on Warp10 was not a good idea. We changed it to be in microseconds and update the date util.
- Make inner
getAccessLogsFromWarp10()
acceptfrom
andto
in microseconds. - Make
getAccessLogsFromWarp10InBatches()
acceptfrom
andto
in microseconds. - Rename date util
toISOStringWithMicrosecondPrecision()
intotoMicroIsoString()
. - Remove date util
asWarp10Timespan()
. - Remove date util
ONE_HOUR
. - Introduce date util
toMicroTimestamp()
. - Introduce date util
ONE_HOUR_MICROS
. - Introduce date util
ONE_SECOND_MICROS
.
- Fix access logs continuous mechanism in
getContinuousAccessLogsFromWarp10()
use microseconds precision
- Fix access logs continuous mechanism in
getContinuousAccessLogsFromWarp10()
- Add
GET /w10tokens/accessLogs/read/{orgaId}
inapi/warp-10.js
withgetWarp10AccessLogsToken()
- Add access-logs requests (via Warp10) in
access-logs.js
getAccessLogsFromWarp10InBatches()
to fetch history access logs in batches (1h windows)getContinuousAccessLogsFromWarp10()
to fetch contiuous access logs in small batches
- Add
execWarpscript()
function for node with superagent - Update
prefixUrl()
, whenurl
isundefined
it defaults to''
- Update dev and peer deps
- Fix the serialization/parsing of env-vars
Please read PR 18 for more details.
- request.superagent: expose an option to retry
- request.superagent: handle ECONNRESET errors
- Remove es-addon specific routes
- API endpoints update
- Add manual endpoints (backups and provider)
- fix: request.superagent can now return raw text if it's not
content-type: application/json
.
- API endpoints update
- Expose full responseBody on errors
- Add app-status utils
- Fix JSON parsing with response Content-Type: application/json; charset=utf8 for real
- Fix JSON parsing with response Content-Type: application/json; charset=utf8
- Fix PUT /self/keys
- Fix PUT .../avatar
- Fix nonce manual usage
- Fix SSE (add a timeout when opening a stream)
- Remove some console.log
- Expose better helpers for streams (events and logs) for (browsers and node)
- Fix logs query param deployment_id naming
- Expose user.getSummary()
- Remove legacy getAuthorization()
- Replace request with superagent
- Provide error id on response.id (lecagy reasons)
- Make sure /cjs is cleared when invoking task "generate-cjs-modules"
- Expose helpers for WebSockets and ServerSentEvents endpoints
- Move some function in "product" service
- Add possibility to merge live OpenAPI doc with custom definitions (temporary lol)
- Use 'oauth-1.0a' for timestamps and nonce for anonymous requests
- Improve request support and error handling (browser & node)
- Fix JSON handling for node (request.request.js)
- utils/env-vars: utils/env-var: sort variables by name (
parseRaw
andtoNameEqualsValueString
)
First public stable release
- Exposes new thin ES6 class based and tree-shakable client
- Exposes legacy client (reusing new client under the hood)