@como/como-client 0.6.9 → 0.7.0
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.
- package/lib/como.js +16 -3
- package/lib/services/form.service.js +32 -0
- package/package.json +1 -1
- package/src/como.js +10 -2
package/lib/como.js
CHANGED
|
@@ -895,10 +895,9 @@ var Como = function () {
|
|
|
895
895
|
_context14.prev = 5;
|
|
896
896
|
_context14.t0 = _context14['catch'](1);
|
|
897
897
|
|
|
898
|
-
console.log('clientUpdateMembership failed, token:' + token + ', locationId:' + locationId);
|
|
899
|
-
initService.logError({ method: 'clientUpdateMembership', token: token, locationId: locationId });
|
|
898
|
+
console.log('clientUpdateMembership failed, token:' + token + ', locationId:' + locationId + ', error: ' + _context14.t0);
|
|
900
899
|
|
|
901
|
-
case
|
|
900
|
+
case 8:
|
|
902
901
|
case 'end':
|
|
903
902
|
return _context14.stop();
|
|
904
903
|
}
|
|
@@ -2249,6 +2248,20 @@ var Como = function () {
|
|
|
2249
2248
|
|
|
2250
2249
|
return getPurchaseHistory;
|
|
2251
2250
|
}()
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Get app texts for multi languages - only for apps that has project set in translation service
|
|
2254
|
+
*/
|
|
2255
|
+
|
|
2256
|
+
}, {
|
|
2257
|
+
key: 'getAppTextsV2',
|
|
2258
|
+
value: function getAppTextsV2() {
|
|
2259
|
+
var _comoData44 = this.comoData,
|
|
2260
|
+
api = _comoData44.api,
|
|
2261
|
+
locationId = _comoData44.locationId;
|
|
2262
|
+
|
|
2263
|
+
return api.getAllTranslations(locationId);
|
|
2264
|
+
}
|
|
2252
2265
|
}]);
|
|
2253
2266
|
return Como;
|
|
2254
2267
|
}();
|
|
@@ -136,4 +136,36 @@ exports.getZappResource = function (service) {
|
|
|
136
136
|
return _ref7.apply(this, arguments);
|
|
137
137
|
};
|
|
138
138
|
}();
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
exports.getAllTranslations = function (service) {
|
|
142
|
+
return function () {
|
|
143
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(locationId) {
|
|
144
|
+
var url, _ref10, data;
|
|
145
|
+
|
|
146
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
147
|
+
while (1) {
|
|
148
|
+
switch (_context5.prev = _context5.next) {
|
|
149
|
+
case 0:
|
|
150
|
+
url = "/v1/translation/" + locationId;
|
|
151
|
+
_context5.next = 3;
|
|
152
|
+
return service.get(url);
|
|
153
|
+
|
|
154
|
+
case 3:
|
|
155
|
+
_ref10 = _context5.sent;
|
|
156
|
+
data = _ref10.data;
|
|
157
|
+
return _context5.abrupt("return", data);
|
|
158
|
+
|
|
159
|
+
case 6:
|
|
160
|
+
case "end":
|
|
161
|
+
return _context5.stop();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}, _callee5, undefined);
|
|
165
|
+
}));
|
|
166
|
+
|
|
167
|
+
return function (_x9) {
|
|
168
|
+
return _ref9.apply(this, arguments);
|
|
169
|
+
};
|
|
170
|
+
}();
|
|
139
171
|
};
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -372,8 +372,8 @@ class Como {
|
|
|
372
372
|
return api.clientUpdateMembership(env.services_root, token, locationId, pushEnable, locationEnable);
|
|
373
373
|
}
|
|
374
374
|
catch(e){
|
|
375
|
-
console.log(`clientUpdateMembership failed, token:${token}, locationId:${locationId}`);
|
|
376
|
-
|
|
375
|
+
console.log(`clientUpdateMembership failed, token:${token}, locationId:${locationId}, error: ${e}`);
|
|
376
|
+
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
|
|
@@ -938,6 +938,14 @@ class Como {
|
|
|
938
938
|
} = this.comoData;
|
|
939
939
|
return api.getPurchaseHistory(locationId, membership.Key, limit, offset);
|
|
940
940
|
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* Get app texts for multi languages - only for apps that has project set in translation service
|
|
944
|
+
*/
|
|
945
|
+
getAppTextsV2() {
|
|
946
|
+
const { api, locationId } = this.comoData;
|
|
947
|
+
return api.getAllTranslations(locationId);
|
|
948
|
+
}
|
|
941
949
|
}
|
|
942
950
|
|
|
943
951
|
module.exports = Como;
|