@como/como-client
Advanced tools
Comparing version 0.1.40 to 0.1.41
@@ -47,3 +47,3 @@ 'use strict'; | ||
return function () { | ||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(form) { | ||
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(form, verification) { | ||
var _ref4, data; | ||
@@ -56,3 +56,3 @@ | ||
_context2.next = 2; | ||
return service.post('/auth/v1/registration', { form: form }); | ||
return service.post('/auth/v1/registration', { form: form, verification: verification }); | ||
@@ -72,3 +72,3 @@ case 2: | ||
return function (_x3) { | ||
return function (_x3, _x4) { | ||
return _ref3.apply(this, arguments); | ||
@@ -81,3 +81,3 @@ }; | ||
return function () { | ||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(code, type, form) { | ||
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(verification, type, form) { | ||
var body, _ref6, data; | ||
@@ -89,3 +89,3 @@ | ||
case 0: | ||
body = { code: code, type: type, form: form }; | ||
body = { verification: verification, type: type, form: form }; | ||
_context3.next = 3; | ||
@@ -107,3 +107,3 @@ return service.post('/auth/v1/registration/verify', body); | ||
return function (_x4, _x5, _x6) { | ||
return function (_x5, _x6, _x7) { | ||
return _ref5.apply(this, arguments); | ||
@@ -139,3 +139,3 @@ }; | ||
return function (_x7) { | ||
return function (_x8) { | ||
return _ref7.apply(this, arguments); | ||
@@ -172,3 +172,3 @@ }; | ||
return function (_x8, _x9, _x10) { | ||
return function (_x9, _x10, _x11) { | ||
return _ref9.apply(this, arguments); | ||
@@ -205,3 +205,3 @@ }; | ||
return function (_x11, _x12) { | ||
return function (_x12, _x13) { | ||
return _ref11.apply(this, arguments); | ||
@@ -238,3 +238,3 @@ }; | ||
return function (_x13, _x14) { | ||
return function (_x14, _x15) { | ||
return _ref13.apply(this, arguments); | ||
@@ -275,3 +275,3 @@ }; | ||
return function (_x15, _x16, _x17) { | ||
return function (_x16, _x17, _x18) { | ||
return _ref15.apply(this, arguments); | ||
@@ -333,3 +333,3 @@ }; | ||
return function (_x18, _x19) { | ||
return function (_x19, _x20) { | ||
return _ref19.apply(this, arguments); | ||
@@ -336,0 +336,0 @@ }; |
{ | ||
"name": "@como/como-client", | ||
"version": "0.1.40", | ||
"version": "0.1.41", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -160,7 +160,8 @@ const moment = require('moment-timezone'); | ||
* @param {Object} form registration form values | ||
* @param {Object} verification flow | ||
*/ | ||
async register(form) { | ||
async register(form, verification) { | ||
const { api } = this.comoData; | ||
try { | ||
const data = await api.register(form); | ||
const data = await api.register(form, verification); | ||
return data; | ||
@@ -174,14 +175,14 @@ } catch (error) { | ||
} | ||
} | ||
}; | ||
/** | ||
* | ||
* @param {string} verificationCode code verification sent by 3rd party | ||
* @param {string} verification flow (code & verification step) | ||
* @param {string} type verification type | ||
* @param {Object} form registration form values | ||
*/ | ||
async registerVerify(verificationCode, type, form) { | ||
async registerVerify(verification, type, form){ | ||
const { api } = this.comoData; | ||
try { | ||
const data = await api.registerVerify(verificationCode, type, form); | ||
const data = await api.registerVerify(verification, type, form); | ||
return data; | ||
@@ -195,3 +196,3 @@ } catch (error) { | ||
} | ||
} | ||
}; | ||
@@ -784,2 +785,9 @@ /** | ||
async consentWithdraw() { | ||
const { | ||
api, locationId, token, env_params: env, | ||
} = this.comoData; | ||
return api.consentWithdraw(env.services_root, locationId, token); | ||
}; | ||
async getPaymentMethods() { | ||
@@ -786,0 +794,0 @@ const { |
Sorry, the diff of this file is too big to display
194836
4239