@como/como-client 0.7.84 → 0.7.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,21 +67,23 @@ exports.register = function (service) {
67
67
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(form, verification, reCaptchaToken) {
68
68
  var source = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'App';
69
69
 
70
- var _ref4, data;
70
+ var body, headers, _ref4, data;
71
71
 
72
72
  return _regenerator2.default.wrap(function _callee2$(_context2) {
73
73
  while (1) {
74
74
  switch (_context2.prev = _context2.next) {
75
75
  case 0:
76
- _context2.next = 2;
77
- return service.post('/auth/v1/registration', { form: form, verification: verification, reCaptchaToken: reCaptchaToken, source: source });
76
+ body = { form: form, verification: verification, reCaptchaToken: reCaptchaToken, source: source };
77
+ headers = getHashHeader(body);
78
+ _context2.next = 4;
79
+ return service.post('/auth/v1/registration', body, { headers: headers });
78
80
 
79
- case 2:
81
+ case 4:
80
82
  _ref4 = _context2.sent;
81
83
  data = _ref4.data;
82
84
  return _context2.abrupt("return", data);
83
85
 
84
- case 5:
86
+ case 7:
85
87
  case "end":
86
88
  return _context2.stop();
87
89
  }
@@ -98,22 +100,23 @@ exports.register = function (service) {
98
100
  exports.registerVerify = function (service) {
99
101
  return function () {
100
102
  var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(verification, type, form, reCaptchaToken) {
101
- var body, _ref6, data;
103
+ var body, headers, _ref6, data;
102
104
 
103
105
  return _regenerator2.default.wrap(function _callee3$(_context3) {
104
106
  while (1) {
105
107
  switch (_context3.prev = _context3.next) {
106
108
  case 0:
107
109
  body = { verification: verification, type: type, form: form, reCaptchaToken: reCaptchaToken };
108
- _context3.next = 3;
109
- return service.post('/auth/v1/registration/verify', body);
110
+ headers = getHashHeader(body);
111
+ _context3.next = 4;
112
+ return service.post('/auth/v1/registration/verify', body, { headers: headers });
110
113
 
111
- case 3:
114
+ case 4:
112
115
  _ref6 = _context3.sent;
113
116
  data = _ref6.data;
114
117
  return _context3.abrupt("return", data);
115
118
 
116
- case 6:
119
+ case 7:
117
120
  case "end":
118
121
  return _context3.stop();
119
122
  }
@@ -132,21 +135,23 @@ exports.updateProfile = function (service) {
132
135
  var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(form, reCaptchaToken) {
133
136
  var source = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'App';
134
137
 
135
- var _ref8, data;
138
+ var body, headers, _ref8, data;
136
139
 
137
140
  return _regenerator2.default.wrap(function _callee4$(_context4) {
138
141
  while (1) {
139
142
  switch (_context4.prev = _context4.next) {
140
143
  case 0:
141
- _context4.next = 2;
142
- return service.post('/auth/v1/update-profile', { form: form, source: source, reCaptchaToken: reCaptchaToken });
144
+ body = { form: form, source: source, reCaptchaToken: reCaptchaToken };
145
+ headers = getHashHeader(body);
146
+ _context4.next = 4;
147
+ return service.post('/auth/v1/update-profile', body, { headers: headers });
143
148
 
144
- case 2:
149
+ case 4:
145
150
  _ref8 = _context4.sent;
146
151
  data = _ref8.data;
147
152
  return _context4.abrupt("return", data);
148
153
 
149
- case 5:
154
+ case 7:
150
155
  case "end":
151
156
  return _context4.stop();
152
157
  }
@@ -165,22 +170,23 @@ exports.updateProfileVerify = function (service) {
165
170
  var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(code, type, form, reCaptchaToken) {
166
171
  var source = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'App';
167
172
 
168
- var body, _ref10, data;
173
+ var body, headers, _ref10, data;
169
174
 
170
175
  return _regenerator2.default.wrap(function _callee5$(_context5) {
171
176
  while (1) {
172
177
  switch (_context5.prev = _context5.next) {
173
178
  case 0:
174
179
  body = { code: code, type: type, form: form, source: source, reCaptchaToken: reCaptchaToken };
175
- _context5.next = 3;
176
- return service.post('/auth/v1/update-profile/verify', body);
180
+ headers = getHashHeader(body);
181
+ _context5.next = 4;
182
+ return service.post('/auth/v1/update-profile/verify', body, { headers: headers });
177
183
 
178
- case 3:
184
+ case 4:
179
185
  _ref10 = _context5.sent;
180
186
  data = _ref10.data;
181
187
  return _context5.abrupt("return", data);
182
188
 
183
- case 6:
189
+ case 7:
184
190
  case "end":
185
191
  return _context5.stop();
186
192
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@como/como-client",
3
- "version": "0.7.84",
3
+ "version": "0.7.86",
4
4
  "description": "Client module for Como's loaylty API",
5
5
  "main": "src/como.js",
6
6
  "scripts": {