@clevercloud/client
Advanced tools
Comparing version 4.2.0 to 5.0.0
# Clever Client changelog | ||
## 5.0.0 (2020-03-27) | ||
### ⚠️ BREAKING CHANGES | ||
* Rename `POST /organisations/{id}/addons/preorders` to `api/addon` with `preorder()` | ||
* Used to be `api/addon` with `todo_preorderAddonByOrgaId()` | ||
* Move `GET /products/addonproviders` to `api/product` with `getAllAddonProviders()` | ||
* Used to be `api/unknown` with `todo_getAddonProviders()` | ||
* Move `GET /products/prices` to `api/product` with `getCreditPrice()` | ||
* Used to be `api/unknown` with `todo_getExcahngeRates()` | ||
* Rename `GET /self/applications/{appId}/deployments/{deploymentId}/instances` to `api/application` with `cancelDeployment()` | ||
* Used to be `api/application` with `getAllDeploymentInstances()` | ||
## 4.2.0 (2020-03-26) | ||
@@ -4,0 +17,0 @@ |
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.create = create; | ||
exports.todo_preorderAddonByOrgaId = todo_preorderAddonByOrgaId; | ||
exports.preorder = preorder; | ||
exports.remove = remove; | ||
@@ -80,3 +80,3 @@ exports.get = get; | ||
function todo_preorderAddonByOrgaId(params, body) { | ||
function preorder(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -83,0 +83,0 @@ return Promise.resolve({ |
@@ -49,2 +49,3 @@ "use strict"; | ||
exports.todo_getSelfApplicationDependents = todo_getSelfApplicationDependents; | ||
exports.cancelDeployment = cancelDeployment; | ||
@@ -467,3 +468,2 @@ var _pickNonNull = require("../pick-non-null.js"); | ||
* DELETE /organisations/{id}/applications/{appId}/deployments/{deploymentId}/instances | ||
* DELETE /self/applications/{appId}/deployments/{deploymentId}/instances | ||
* @param {Object} params | ||
@@ -477,6 +477,6 @@ * @param {String} params.id | ||
function getAllDeploymentInstances(params) { | ||
const urlBase = params.id == null ? '/self' : `/organisations/${params.id}`; | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `${urlBase}/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
url: `/organisations/${params.id}/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
headers: { | ||
@@ -988,2 +988,22 @@ Accept: 'application/json' | ||
}); | ||
} | ||
/** | ||
* DELETE /self/applications/{appId}/deployments/{deploymentId}/instances | ||
* @param {Object} params | ||
* @param {String} params.appId | ||
* @param {String} params.deploymentId | ||
*/ | ||
function cancelDeployment(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/self/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} |
@@ -283,3 +283,3 @@ "use strict"; | ||
preorders: { | ||
post: prepareRequest(addon.todo_preorderAddonByOrgaId, ['id']) | ||
post: prepareRequest(addon.preorder, ['id']) | ||
} | ||
@@ -438,3 +438,3 @@ }, | ||
unpaid: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']) | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']) | ||
} | ||
@@ -448,3 +448,3 @@ }, | ||
methods: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
post: prepareRequest(organisation.todo_addPaymentMethodByOrga, ['id']), | ||
@@ -522,3 +522,3 @@ _: { | ||
addonproviders: { | ||
get: prepareRequest(unknown.todo_getAddonProviders), | ||
get: prepareRequest(product.getAllAddonProviders), | ||
_: { | ||
@@ -556,3 +556,3 @@ get: prepareRequest(product.getAddonProvider, ['provider_id']), | ||
prices: { | ||
get: prepareRequest(unknown.todo_getExcahngeRates) | ||
get: prepareRequest(product.getCreditPrice) | ||
}, | ||
@@ -649,3 +649,3 @@ zones: { | ||
instances: { | ||
delete: prepareRequest(application.getAllDeploymentInstances, ['appId', 'deploymentId']) | ||
delete: prepareRequest(application.cancelDeployment, ['appId', 'deploymentId']) | ||
} | ||
@@ -652,0 +652,0 @@ } |
@@ -24,3 +24,3 @@ "use strict"; | ||
exports.todo_buyDropsByOrga = todo_buyDropsByOrga; | ||
exports.todo_getUnpaidInvoicesByOrga_1 = todo_getUnpaidInvoicesByOrga_1; | ||
exports.todo_getUnpaidInvoicesByOrga = todo_getUnpaidInvoicesByOrga; | ||
exports.deletePurchaseOrder = deletePurchaseOrder; | ||
@@ -31,3 +31,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; | ||
@@ -431,3 +431,3 @@ exports.todo_getDefaultMethodByOrga = todo_getDefaultMethodByOrga; | ||
function todo_getUnpaidInvoicesByOrga_1(params) { | ||
function todo_getUnpaidInvoicesByOrga(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -557,3 +557,3 @@ return Promise.resolve({ | ||
function todo_getUnpaidInvoicesByOrga(params) { | ||
function todo_getUnpaidInvoicesByOrga_1(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -560,0 +560,0 @@ return Promise.resolve({ |
@@ -6,4 +6,6 @@ "use strict"; | ||
}); | ||
exports.getAllAddonProviders = getAllAddonProviders; | ||
exports.getAddonProvider = getAddonProvider; | ||
exports.getAvailableInstances = getAvailableInstances; | ||
exports.getCreditPrice = getCreditPrice; | ||
@@ -13,2 +15,19 @@ var _pickNonNull = require("../pick-non-null.js"); | ||
/** | ||
* GET /products/addonproviders | ||
* @param {Object} params | ||
* @param {String} params.orgaId | ||
*/ | ||
function getAllAddonProviders(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/addonproviders`, | ||
headers: { | ||
Accept: 'application/json' | ||
}, | ||
queryParams: (0, _pickNonNull.pickNonNull)(params, ['orgaId']) // no body | ||
}); | ||
} | ||
/** | ||
* GET /products/addonproviders/{provider_id} | ||
@@ -19,2 +38,4 @@ * @param {Object} params | ||
*/ | ||
function getAddonProvider(params) { | ||
@@ -50,2 +71,20 @@ // no multipath for /self or /organisations/{id} | ||
}); | ||
} | ||
/** | ||
* GET /products/prices | ||
* @param {Object} params | ||
*/ | ||
function getCreditPrice() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/prices`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} |
@@ -32,3 +32,2 @@ "use strict"; | ||
exports.todo_updateStripePayment = todo_updateStripePayment; | ||
exports.todo_getAddonProviders = todo_getAddonProviders; | ||
exports.todo_getAddonProviderInfos = todo_getAddonProviderInfos; | ||
@@ -42,3 +41,2 @@ exports.todo_getAddonProviderVersions = todo_getAddonProviderVersions; | ||
exports.todo_getAvailablePackages = todo_getAvailablePackages; | ||
exports.todo_getExcahngeRates = todo_getExcahngeRates; | ||
exports.todo_getZones = todo_getZones; | ||
@@ -602,21 +600,2 @@ exports.todo_getLoginForm = todo_getLoginForm; | ||
/** | ||
* GET /products/addonproviders | ||
* @param {Object} params | ||
* @param {String} params.orgaId | ||
*/ | ||
function todo_getAddonProviders(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/addonproviders`, | ||
headers: { | ||
Accept: 'application/json' | ||
}, | ||
queryParams: (0, _pickNonNull.pickNonNull)(params, ['orgaId']) // no body | ||
}); | ||
} | ||
/** | ||
* GET /products/addonproviders/{provider_id}/informations | ||
@@ -776,20 +755,2 @@ * @param {Object} params | ||
/** | ||
* GET /products/prices | ||
* @param {Object} params | ||
*/ | ||
function todo_getExcahngeRates() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/prices`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /products/zones | ||
@@ -796,0 +757,0 @@ * @param {Object} params |
@@ -44,3 +44,3 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
*/ | ||
export function todo_preorderAddonByOrgaId(params, body) { | ||
export function preorder(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -47,0 +47,0 @@ return Promise.resolve({ |
@@ -357,3 +357,2 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
* DELETE /organisations/{id}/applications/{appId}/deployments/{deploymentId}/instances | ||
* DELETE /self/applications/{appId}/deployments/{deploymentId}/instances | ||
* @param {Object} params | ||
@@ -365,6 +364,6 @@ * @param {String} params.id | ||
export function getAllDeploymentInstances(params) { | ||
const urlBase = params.id == null ? '/self' : `/organisations/${params.id}`; | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `${urlBase}/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
url: `/organisations/${params.id}/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
headers: { Accept: 'application/json' }, | ||
@@ -802,1 +801,18 @@ // no query params | ||
} | ||
/** | ||
* DELETE /self/applications/{appId}/deployments/{deploymentId}/instances | ||
* @param {Object} params | ||
* @param {String} params.appId | ||
* @param {String} params.deploymentId | ||
*/ | ||
export function cancelDeployment(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/self/applications/${params.appId}/deployments/${params.deploymentId}/instances`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} |
@@ -257,3 +257,3 @@ import * as addon from './addon.js'; | ||
preorders: { | ||
post: prepareRequest(addon.todo_preorderAddonByOrgaId, ['id']), | ||
post: prepareRequest(addon.preorder, ['id']), | ||
}, | ||
@@ -412,3 +412,3 @@ }, | ||
unpaid: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
}, | ||
@@ -422,3 +422,3 @@ }, | ||
methods: { | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga, ['id']), | ||
get: prepareRequest(organisation.todo_getUnpaidInvoicesByOrga_1, ['id']), | ||
post: prepareRequest(organisation.todo_addPaymentMethodByOrga, ['id']), | ||
@@ -496,3 +496,3 @@ _: { | ||
addonproviders: { | ||
get: prepareRequest(unknown.todo_getAddonProviders), | ||
get: prepareRequest(product.getAllAddonProviders), | ||
_: { | ||
@@ -530,3 +530,3 @@ get: prepareRequest(product.getAddonProvider, ['provider_id']), | ||
prices: { | ||
get: prepareRequest(unknown.todo_getExcahngeRates), | ||
get: prepareRequest(product.getCreditPrice), | ||
}, | ||
@@ -623,3 +623,3 @@ zones: { | ||
instances: { | ||
delete: prepareRequest(application.getAllDeploymentInstances, ['appId', 'deploymentId']), | ||
delete: prepareRequest(application.cancelDeployment, ['appId', 'deploymentId']), | ||
}, | ||
@@ -626,0 +626,0 @@ }, |
@@ -317,3 +317,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} | ||
@@ -424,3 +424,3 @@ return Promise.resolve({ | ||
*/ | ||
export function todo_getUnpaidInvoicesByOrga(params) { | ||
export function todo_getUnpaidInvoicesByOrga_1(params) { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -427,0 +427,0 @@ return Promise.resolve({ |
import { pickNonNull } from '../pick-non-null.js'; | ||
/** | ||
* GET /products/addonproviders | ||
* @param {Object} params | ||
* @param {String} params.orgaId | ||
*/ | ||
export function getAllAddonProviders(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/addonproviders`, | ||
headers: { Accept: 'application/json' }, | ||
queryParams: pickNonNull(params, ['orgaId']), | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /products/addonproviders/{provider_id} | ||
@@ -35,1 +51,16 @@ * @param {Object} params | ||
} | ||
/** | ||
* GET /products/prices | ||
* @param {Object} params | ||
*/ | ||
export function getCreditPrice() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/prices`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} |
@@ -477,18 +477,2 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
/** | ||
* GET /products/addonproviders | ||
* @param {Object} params | ||
* @param {String} params.orgaId | ||
*/ | ||
export function todo_getAddonProviders(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/addonproviders`, | ||
headers: { Accept: 'application/json' }, | ||
queryParams: pickNonNull(params, ['orgaId']), | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /products/addonproviders/{provider_id}/informations | ||
@@ -624,17 +608,2 @@ * @param {Object} params | ||
/** | ||
* GET /products/prices | ||
* @param {Object} params | ||
*/ | ||
export function todo_getExcahngeRates() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/products/prices`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /products/zones | ||
@@ -641,0 +610,0 @@ * @param {Object} params |
{ | ||
"name": "@clevercloud/client", | ||
"version": "4.2.0", | ||
"version": "5.0.0", | ||
"description": "JavaScript REST client and utils for Clever Cloud's API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/CleverCloud/clever-client.js", |
405631
12706