@clevercloud/client
Advanced tools
Comparing version 2.0.1 to 2.1.0-beta.0
@@ -413,2 +413,9 @@ "use strict"; | ||
}, | ||
cards: { | ||
get: prepareRequest(unknown.todo_getCards, ['id']), | ||
post: prepareRequest(unknown.todo_addCard, ['id']), | ||
_: { | ||
delete: prepareRequest(unknown.todo_deleteCard, ['id', 'mId']) | ||
} | ||
}, | ||
fullprice: { | ||
@@ -442,2 +449,14 @@ _: { | ||
get: prepareRequest(organisation.todo_getRecurrentPayment, ['id']) | ||
}, | ||
'sepa-debit-accounts': { | ||
get: prepareRequest(unknown.todo_getSepaDebitAccounts, ['id']), | ||
post: prepareRequest(unknown.todo_addSepaDebitAccount, ['id']), | ||
_: { | ||
delete: prepareRequest(unknown.todo_deleteSepaDebitAccount, ['id', 'mId']) | ||
} | ||
}, | ||
tokens: { | ||
stripe: { | ||
get: prepareRequest(unknown.todo_getStripeToken, ['id']) | ||
} | ||
} | ||
@@ -458,2 +477,5 @@ } | ||
end: { | ||
'sepa-debit': { | ||
post: prepareRequest(unknown.todo_endPaymentWithSepaDebit, ['bid']) | ||
}, | ||
stripe: { | ||
@@ -484,3 +506,3 @@ post: prepareRequest(unknown.todo_endPaymentWithStripe, ['bid']), | ||
stripe: { | ||
get: prepareRequest(unknown.todo_getStripeToken) | ||
get: prepareRequest(unknown.todo_getStripeToken_1) | ||
} | ||
@@ -730,2 +752,5 @@ } | ||
}, | ||
cards: { | ||
get: prepareRequest(unknown.todo_getUserCards) | ||
}, | ||
fullprice: { | ||
@@ -757,5 +782,8 @@ _: { | ||
}, | ||
'sepa-debit-accounts': { | ||
get: prepareRequest(unknown.todo_getUserSepaDebitAccounts) | ||
}, | ||
tokens: { | ||
stripe: { | ||
get: prepareRequest(organisation.todo_getStripeToken_1) | ||
get: prepareRequest(organisation.todo_getStripeToken_2) | ||
} | ||
@@ -762,0 +790,0 @@ } |
@@ -50,3 +50,3 @@ "use strict"; | ||
exports.todo_getRecurrentPayment_1 = todo_getRecurrentPayment_1; | ||
exports.todo_getStripeToken_1 = todo_getStripeToken_1; | ||
exports.todo_getStripeToken_2 = todo_getStripeToken_2; | ||
@@ -939,3 +939,3 @@ var _pickNonNull = require("../pick-non-null.js"); | ||
function todo_getStripeToken_1() { | ||
function todo_getStripeToken_2() { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -942,0 +942,0 @@ return Promise.resolve({ |
@@ -19,3 +19,10 @@ "use strict"; | ||
exports.todo_getAvailableRights = todo_getAvailableRights; | ||
exports.todo_getCards = todo_getCards; | ||
exports.todo_addCard = todo_addCard; | ||
exports.todo_deleteCard = todo_deleteCard; | ||
exports.todo_getNewSetupIntent = todo_getNewSetupIntent; | ||
exports.todo_getSepaDebitAccounts = todo_getSepaDebitAccounts; | ||
exports.todo_addSepaDebitAccount = todo_addSepaDebitAccount; | ||
exports.todo_deleteSepaDebitAccount = todo_deleteSepaDebitAccount; | ||
exports.todo_getStripeToken = todo_getStripeToken; | ||
exports.todo_getPasswordForgottenForm = todo_getPasswordForgottenForm; | ||
@@ -28,3 +35,4 @@ exports.todo_askForPasswordResetViaForm = todo_askForPasswordResetViaForm; | ||
exports.todo_getAvailablePaymentProviders = todo_getAvailablePaymentProviders; | ||
exports.todo_getStripeToken = todo_getStripeToken; | ||
exports.todo_getStripeToken_1 = todo_getStripeToken_1; | ||
exports.todo_endPaymentWithSepaDebit = todo_endPaymentWithSepaDebit; | ||
exports.todo_endPaymentWithStripe = todo_endPaymentWithStripe; | ||
@@ -42,2 +50,4 @@ exports.todo_updateStripePayment = todo_updateStripePayment; | ||
exports.todo_getZones = todo_getZones; | ||
exports.todo_getUserCards = todo_getUserCards; | ||
exports.todo_getUserSepaDebitAccounts = todo_getUserSepaDebitAccounts; | ||
exports.todo_getLoginForm = todo_getLoginForm; | ||
@@ -344,2 +354,60 @@ exports.todo_login = todo_login; | ||
/** | ||
* GET /organisations/{id}/payments/cards | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
function todo_getCards(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/cards`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* POST /organisations/{id}/payments/cards | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {Object} body | ||
*/ | ||
function todo_addCard(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/organisations/${params.id}/payments/cards`, | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json' | ||
}, | ||
// no query params | ||
body | ||
}); | ||
} | ||
/** | ||
* DELETE /organisations/{id}/payments/cards/{mId} | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {String} params.mId | ||
*/ | ||
function todo_deleteCard(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/organisations/${params.id}/payments/cards/${params.mId}`, | ||
headers: {} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /organisations/{id}/payments/methods/newintent | ||
@@ -365,2 +433,79 @@ * @param {Object} params | ||
/** | ||
* GET /organisations/{id}/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
function todo_getSepaDebitAccounts(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* POST /organisations/{id}/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {Object} body | ||
*/ | ||
function todo_addSepaDebitAccount(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts`, | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json' | ||
}, | ||
// no query params | ||
body | ||
}); | ||
} | ||
/** | ||
* DELETE /organisations/{id}/payments/sepa-debit-accounts/{mId} | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {String} params.mId | ||
*/ | ||
function todo_deleteSepaDebitAccount(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts/${params.mId}`, | ||
headers: {} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /organisations/{id}/payments/tokens/stripe | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
function todo_getStripeToken(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/tokens/stripe`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /password_forgotten | ||
@@ -505,3 +650,3 @@ * @param {Object} params | ||
function todo_getStripeToken() { | ||
function todo_getStripeToken_1() { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -519,2 +664,23 @@ return Promise.resolve({ | ||
/** | ||
* POST /payments/{bid}/end/sepa-debit | ||
* @param {Object} params | ||
* @param {String} params.bid | ||
* @param {Object} body | ||
*/ | ||
function todo_endPaymentWithSepaDebit(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/payments/${params.bid}/end/sepa-debit`, | ||
headers: { | ||
Accept: 'application/json', | ||
'Content-Type': 'application/json' | ||
}, | ||
// no query params | ||
body | ||
}); | ||
} | ||
/** | ||
* POST /payments/{bid}/end/stripe | ||
@@ -751,2 +917,38 @@ * @param {Object} params | ||
/** | ||
* GET /self/payments/cards | ||
* @param {Object} params | ||
*/ | ||
function todo_getUserCards() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/self/payments/cards`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /self/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
*/ | ||
function todo_getUserSepaDebitAccounts() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/self/payments/sepa-debit-accounts`, | ||
headers: { | ||
Accept: 'application/json' | ||
} // no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /session/login | ||
@@ -753,0 +955,0 @@ * @param {Object} params |
@@ -392,2 +392,9 @@ import * as addon from './addon.js'; | ||
}, | ||
cards: { | ||
get: prepareRequest(unknown.todo_getCards, ['id']), | ||
post: prepareRequest(unknown.todo_addCard, ['id']), | ||
_: { | ||
delete: prepareRequest(unknown.todo_deleteCard, ['id', 'mId']), | ||
}, | ||
}, | ||
fullprice: { | ||
@@ -422,2 +429,14 @@ _: { | ||
}, | ||
'sepa-debit-accounts': { | ||
get: prepareRequest(unknown.todo_getSepaDebitAccounts, ['id']), | ||
post: prepareRequest(unknown.todo_addSepaDebitAccount, ['id']), | ||
_: { | ||
delete: prepareRequest(unknown.todo_deleteSepaDebitAccount, ['id', 'mId']), | ||
}, | ||
}, | ||
tokens: { | ||
stripe: { | ||
get: prepareRequest(unknown.todo_getStripeToken, ['id']), | ||
}, | ||
}, | ||
}, | ||
@@ -437,2 +456,5 @@ }, | ||
end: { | ||
'sepa-debit': { | ||
post: prepareRequest(unknown.todo_endPaymentWithSepaDebit, ['bid']), | ||
}, | ||
stripe: { | ||
@@ -463,3 +485,3 @@ post: prepareRequest(unknown.todo_endPaymentWithStripe, ['bid']), | ||
stripe: { | ||
get: prepareRequest(unknown.todo_getStripeToken), | ||
get: prepareRequest(unknown.todo_getStripeToken_1), | ||
}, | ||
@@ -709,2 +731,5 @@ }, | ||
}, | ||
cards: { | ||
get: prepareRequest(unknown.todo_getUserCards), | ||
}, | ||
fullprice: { | ||
@@ -736,5 +761,8 @@ _: { | ||
}, | ||
'sepa-debit-accounts': { | ||
get: prepareRequest(unknown.todo_getUserSepaDebitAccounts), | ||
}, | ||
tokens: { | ||
stripe: { | ||
get: prepareRequest(organisation.todo_getStripeToken_1), | ||
get: prepareRequest(organisation.todo_getStripeToken_2), | ||
}, | ||
@@ -741,0 +769,0 @@ }, |
@@ -743,3 +743,3 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
*/ | ||
export function todo_getStripeToken_1() { | ||
export function todo_getStripeToken_2() { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -746,0 +746,0 @@ return Promise.resolve({ |
@@ -265,2 +265,52 @@ import { pickNonNull } from '../pick-non-null.js'; | ||
/** | ||
* GET /organisations/{id}/payments/cards | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
export function todo_getCards(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/cards`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* POST /organisations/{id}/payments/cards | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {Object} body | ||
*/ | ||
export function todo_addCard(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/organisations/${params.id}/payments/cards`, | ||
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, | ||
// no query params | ||
body, | ||
}); | ||
} | ||
/** | ||
* DELETE /organisations/{id}/payments/cards/{mId} | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {String} params.mId | ||
*/ | ||
export function todo_deleteCard(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/organisations/${params.id}/payments/cards/${params.mId}`, | ||
headers: {}, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /organisations/{id}/payments/methods/newintent | ||
@@ -283,2 +333,68 @@ * @param {Object} params | ||
/** | ||
* GET /organisations/{id}/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
export function todo_getSepaDebitAccounts(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* POST /organisations/{id}/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {Object} body | ||
*/ | ||
export function todo_addSepaDebitAccount(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts`, | ||
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, | ||
// no query params | ||
body, | ||
}); | ||
} | ||
/** | ||
* DELETE /organisations/{id}/payments/sepa-debit-accounts/{mId} | ||
* @param {Object} params | ||
* @param {String} params.id | ||
* @param {String} params.mId | ||
*/ | ||
export function todo_deleteSepaDebitAccount(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'delete', | ||
url: `/organisations/${params.id}/payments/sepa-debit-accounts/${params.mId}`, | ||
headers: {}, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /organisations/{id}/payments/tokens/stripe | ||
* @param {Object} params | ||
* @param {String} params.id | ||
*/ | ||
export function todo_getStripeToken(params) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/organisations/${params.id}/payments/tokens/stripe`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /password_forgotten | ||
@@ -398,3 +514,3 @@ * @param {Object} params | ||
*/ | ||
export function todo_getStripeToken() { | ||
export function todo_getStripeToken_1() { | ||
// no multipath for /self or /organisations/{id} | ||
@@ -411,2 +527,19 @@ return Promise.resolve({ | ||
/** | ||
* POST /payments/{bid}/end/sepa-debit | ||
* @param {Object} params | ||
* @param {String} params.bid | ||
* @param {Object} body | ||
*/ | ||
export function todo_endPaymentWithSepaDebit(params, body) { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'post', | ||
url: `/payments/${params.bid}/end/sepa-debit`, | ||
headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, | ||
// no query params | ||
body, | ||
}); | ||
} | ||
/** | ||
* POST /payments/{bid}/end/stripe | ||
@@ -605,2 +738,32 @@ * @param {Object} params | ||
/** | ||
* GET /self/payments/cards | ||
* @param {Object} params | ||
*/ | ||
export function todo_getUserCards() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/self/payments/cards`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /self/payments/sepa-debit-accounts | ||
* @param {Object} params | ||
*/ | ||
export function todo_getUserSepaDebitAccounts() { | ||
// no multipath for /self or /organisations/{id} | ||
return Promise.resolve({ | ||
method: 'get', | ||
url: `/self/payments/sepa-debit-accounts`, | ||
headers: { Accept: 'application/json' }, | ||
// no query params | ||
// no body | ||
}); | ||
} | ||
/** | ||
* GET /session/login | ||
@@ -607,0 +770,0 @@ * @param {Object} params |
{ | ||
"name": "@clevercloud/client", | ||
"version": "2.0.1", | ||
"version": "2.1.0-beta.0", | ||
"description": "JavaScript REST client and utils for Clever Cloud's API", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/CleverCloud/clever-client.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
372933
12249
1
1