@clevercloud/client
Advanced tools
Comparing version
# Clever Client changelog | ||
## 4.1.0 (2020-03-20) | ||
* Add `delay` param to `getContinuousAccessLogsFromWarp10()` | ||
## 4.0.0 (2020-03-19) | ||
@@ -4,0 +8,0 @@ |
@@ -79,3 +79,4 @@ "use strict"; | ||
realAddonId, | ||
warpToken | ||
warpToken, | ||
delay = 0 | ||
}, sendToWarp10) { | ||
@@ -98,3 +99,3 @@ const emitter = new _componentEmitter.default(); // Store last log between loops | ||
const batchFrom = lastLog != null ? (0, _date.toMicroTimestamp)(lastLog.t) + 1 : from; | ||
const batchTo = (0, _date.toMicroTimestamp)(); // Prevent huge recursive call stack | ||
const batchTo = (0, _date.toMicroTimestamp)() - delay; // Prevent huge recursive call stack | ||
@@ -106,5 +107,5 @@ setTimeout(() => doCall(batchFrom, batchTo), 1000); | ||
const now = (0, _date.toMicroTimestamp)(); | ||
const now = (0, _date.toMicroTimestamp)() - delay; | ||
doCall(now - 10 * _date.ONE_SECOND_MICROS, now); | ||
return emitter; | ||
} |
@@ -427,3 +427,3 @@ "use strict"; | ||
unpaid: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']) | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']) | ||
} | ||
@@ -437,3 +437,3 @@ }, | ||
methods: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
post: prepareRequest(organisation.todo_addPaymentMethodByOrga, ['id']), | ||
@@ -440,0 +440,0 @@ _: { |
@@ -23,3 +23,3 @@ "use strict"; | ||
exports.todo_buyDropsByOrga = todo_buyDropsByOrga; | ||
exports.todo_getUnpaidInvoicesByOrga_1 = todo_getUnpaidInvoicesByOrga_1; | ||
exports.todo_getUnpaidInvoicesByOrga = todo_getUnpaidInvoicesByOrga; | ||
exports.deletePurchaseOrder = deletePurchaseOrder; | ||
@@ -30,3 +30,3 @@ exports.getInvoice = getInvoice; | ||
exports.todo_getPriceWithTaxByOrga = todo_getPriceWithTaxByOrga; | ||
exports.todo_getUnpaidInvoicesByOrga = todo_getUnpaidInvoicesByOrga; | ||
exports.todo_getUnpaidInvoicesByOrga_1 = todo_getUnpaidInvoicesByOrga_1; | ||
exports.todo_addPaymentMethodByOrga = todo_addPaymentMethodByOrga; | ||
@@ -411,3 +411,3 @@ exports.todo_getDefaultMethodByOrga = todo_getDefaultMethodByOrga; | ||
function todo_getUnpaidInvoicesByOrga_1(params) { | ||
function todo_getUnpaidInvoicesByOrga(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -537,3 +537,3 @@ return Promise.resolve({ | ||
function todo_getUnpaidInvoicesByOrga(params) { | ||
function todo_getUnpaidInvoicesByOrga_1(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -540,0 +540,0 @@ return Promise.resolve({ |
@@ -56,3 +56,3 @@ import Emitter from 'component-emitter'; | ||
// 4. Schedule next loop 1 second later with fetch from="last log ts or first ts" to="now" | ||
export function getContinuousAccessLogsFromWarp10 ({ appId, realAddonId, warpToken }, sendToWarp10) { | ||
export function getContinuousAccessLogsFromWarp10 ({ appId, realAddonId, warpToken, delay = 0 }, sendToWarp10) { | ||
@@ -76,3 +76,3 @@ const emitter = new Emitter(); | ||
const batchFrom = (lastLog != null) ? toMicroTimestamp(lastLog.t) + 1 : from; | ||
const batchTo = toMicroTimestamp(); | ||
const batchTo = toMicroTimestamp() - delay; | ||
@@ -86,3 +86,3 @@ // Prevent huge recursive call stack | ||
// Trigger batch "loop" mechanism | ||
const now = toMicroTimestamp(); | ||
const now = toMicroTimestamp() - delay; | ||
doCall(now - 10 * ONE_SECOND_MICROS, now); | ||
@@ -89,0 +89,0 @@ |
@@ -401,3 +401,3 @@ import * as addon from './addon.js'; | ||
unpaid: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
}, | ||
@@ -411,3 +411,3 @@ }, | ||
methods: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
post: prepareRequest(organisation.todo_addPaymentMethodByOrga, ['id']), | ||
@@ -414,0 +414,0 @@ _: { |
@@ -301,3 +301,3 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
*/ | ||
export function todo_getUnpaidInvoicesByOrga_1(params) { | ||
export function todo_getUnpaidInvoicesByOrga(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -408,3 +408,3 @@ return Promise.resolve({ | ||
*/ | ||
export function todo_getUnpaidInvoicesByOrga(params) { | ||
export function todo_getUnpaidInvoicesByOrga_1(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -411,0 +411,0 @@ return Promise.resolve({ |
{ | ||
"name": "@clevercloud/client", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "JavaScript REST client and utils for Clever Cloud's API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/CleverCloud/clever-client.js", |
398817
0.04%12512
0.01%