@como/como-client 0.8.0 → 0.8.1
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 +157 -134
- package/package.json +1 -1
- package/src/como.js +4 -1
package/lib/como.js
CHANGED
|
@@ -1710,9 +1710,32 @@ var Como = function () {
|
|
|
1710
1710
|
|
|
1711
1711
|
}, {
|
|
1712
1712
|
key: 'getRecaptchaConfig',
|
|
1713
|
-
value: function
|
|
1714
|
-
|
|
1715
|
-
|
|
1713
|
+
value: function () {
|
|
1714
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee27() {
|
|
1715
|
+
return _regenerator2.default.wrap(function _callee27$(_context27) {
|
|
1716
|
+
while (1) {
|
|
1717
|
+
switch (_context27.prev = _context27.next) {
|
|
1718
|
+
case 0:
|
|
1719
|
+
_context27.next = 2;
|
|
1720
|
+
return this.refreshTokenIfNeeded();
|
|
1721
|
+
|
|
1722
|
+
case 2:
|
|
1723
|
+
return _context27.abrupt('return', this.comoData.recaptchaConfig);
|
|
1724
|
+
|
|
1725
|
+
case 3:
|
|
1726
|
+
case 'end':
|
|
1727
|
+
return _context27.stop();
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}, _callee27, this);
|
|
1731
|
+
}));
|
|
1732
|
+
|
|
1733
|
+
function getRecaptchaConfig() {
|
|
1734
|
+
return _ref28.apply(this, arguments);
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
return getRecaptchaConfig;
|
|
1738
|
+
}()
|
|
1716
1739
|
|
|
1717
1740
|
/**
|
|
1718
1741
|
* Returns the location specific registration web url
|
|
@@ -1721,33 +1744,33 @@ var Como = function () {
|
|
|
1721
1744
|
}, {
|
|
1722
1745
|
key: 'getRegistrationUrl',
|
|
1723
1746
|
value: function () {
|
|
1724
|
-
var
|
|
1747
|
+
var _ref29 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee28(overrides) {
|
|
1725
1748
|
var _comoData23, token, installationId, locationId, env;
|
|
1726
1749
|
|
|
1727
|
-
return _regenerator2.default.wrap(function
|
|
1750
|
+
return _regenerator2.default.wrap(function _callee28$(_context28) {
|
|
1728
1751
|
while (1) {
|
|
1729
|
-
switch (
|
|
1752
|
+
switch (_context28.prev = _context28.next) {
|
|
1730
1753
|
case 0:
|
|
1731
|
-
|
|
1754
|
+
_context28.next = 2;
|
|
1732
1755
|
return this.refreshTokenIfNeeded();
|
|
1733
1756
|
|
|
1734
1757
|
case 2:
|
|
1735
1758
|
_comoData23 = this.comoData, token = _comoData23.token, installationId = _comoData23.installationId, locationId = _comoData23.locationId, env = _comoData23.env_params;
|
|
1736
|
-
return
|
|
1759
|
+
return _context28.abrupt('return', urlsUtils.appendQuery(env.app_modules_root + '/register?token=' + token + '&locationid=' + locationId, (0, _extends3.default)({}, this.getCredentials(), {
|
|
1737
1760
|
installationId: installationId,
|
|
1738
1761
|
disableSuccessScreen: 'true'
|
|
1739
1762
|
}, overrides)));
|
|
1740
1763
|
|
|
1741
1764
|
case 4:
|
|
1742
1765
|
case 'end':
|
|
1743
|
-
return
|
|
1766
|
+
return _context28.stop();
|
|
1744
1767
|
}
|
|
1745
1768
|
}
|
|
1746
|
-
},
|
|
1769
|
+
}, _callee28, this);
|
|
1747
1770
|
}));
|
|
1748
1771
|
|
|
1749
1772
|
function getRegistrationUrl(_x49) {
|
|
1750
|
-
return
|
|
1773
|
+
return _ref29.apply(this, arguments);
|
|
1751
1774
|
}
|
|
1752
1775
|
|
|
1753
1776
|
return getRegistrationUrl;
|
|
@@ -1760,33 +1783,33 @@ var Como = function () {
|
|
|
1760
1783
|
}, {
|
|
1761
1784
|
key: 'getProfileUrl',
|
|
1762
1785
|
value: function () {
|
|
1763
|
-
var
|
|
1786
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee29(overrides) {
|
|
1764
1787
|
var _comoData24, token, installationId, locationId, env;
|
|
1765
1788
|
|
|
1766
|
-
return _regenerator2.default.wrap(function
|
|
1789
|
+
return _regenerator2.default.wrap(function _callee29$(_context29) {
|
|
1767
1790
|
while (1) {
|
|
1768
|
-
switch (
|
|
1791
|
+
switch (_context29.prev = _context29.next) {
|
|
1769
1792
|
case 0:
|
|
1770
|
-
|
|
1793
|
+
_context29.next = 2;
|
|
1771
1794
|
return this.refreshTokenIfNeeded();
|
|
1772
1795
|
|
|
1773
1796
|
case 2:
|
|
1774
1797
|
_comoData24 = this.comoData, token = _comoData24.token, installationId = _comoData24.installationId, locationId = _comoData24.locationId, env = _comoData24.env_params;
|
|
1775
|
-
return
|
|
1798
|
+
return _context29.abrupt('return', urlsUtils.appendQuery(env.app_modules_root + '/profile?token=' + token + '&locationid=' + locationId, (0, _extends3.default)({}, this.getCredentials(), {
|
|
1776
1799
|
installationId: installationId,
|
|
1777
1800
|
disableSuccessScreen: 'true'
|
|
1778
1801
|
}, overrides)));
|
|
1779
1802
|
|
|
1780
1803
|
case 4:
|
|
1781
1804
|
case 'end':
|
|
1782
|
-
return
|
|
1805
|
+
return _context29.stop();
|
|
1783
1806
|
}
|
|
1784
1807
|
}
|
|
1785
|
-
},
|
|
1808
|
+
}, _callee29, this);
|
|
1786
1809
|
}));
|
|
1787
1810
|
|
|
1788
1811
|
function getProfileUrl(_x50) {
|
|
1789
|
-
return
|
|
1812
|
+
return _ref30.apply(this, arguments);
|
|
1790
1813
|
}
|
|
1791
1814
|
|
|
1792
1815
|
return getProfileUrl;
|
|
@@ -1799,30 +1822,30 @@ var Como = function () {
|
|
|
1799
1822
|
}, {
|
|
1800
1823
|
key: 'getLoginUrl',
|
|
1801
1824
|
value: function () {
|
|
1802
|
-
var
|
|
1825
|
+
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee30() {
|
|
1803
1826
|
var _comoData25, token, locationId, env;
|
|
1804
1827
|
|
|
1805
|
-
return _regenerator2.default.wrap(function
|
|
1828
|
+
return _regenerator2.default.wrap(function _callee30$(_context30) {
|
|
1806
1829
|
while (1) {
|
|
1807
|
-
switch (
|
|
1830
|
+
switch (_context30.prev = _context30.next) {
|
|
1808
1831
|
case 0:
|
|
1809
|
-
|
|
1832
|
+
_context30.next = 2;
|
|
1810
1833
|
return this.refreshTokenIfNeeded();
|
|
1811
1834
|
|
|
1812
1835
|
case 2:
|
|
1813
1836
|
_comoData25 = this.comoData, token = _comoData25.token, locationId = _comoData25.locationId, env = _comoData25.env_params;
|
|
1814
|
-
return
|
|
1837
|
+
return _context30.abrupt('return', env.app_modules_root + '/login?token=' + token + '&locationid=' + locationId);
|
|
1815
1838
|
|
|
1816
1839
|
case 4:
|
|
1817
1840
|
case 'end':
|
|
1818
|
-
return
|
|
1841
|
+
return _context30.stop();
|
|
1819
1842
|
}
|
|
1820
1843
|
}
|
|
1821
|
-
},
|
|
1844
|
+
}, _callee30, this);
|
|
1822
1845
|
}));
|
|
1823
1846
|
|
|
1824
1847
|
function getLoginUrl() {
|
|
1825
|
-
return
|
|
1848
|
+
return _ref31.apply(this, arguments);
|
|
1826
1849
|
}
|
|
1827
1850
|
|
|
1828
1851
|
return getLoginUrl;
|
|
@@ -1835,31 +1858,31 @@ var Como = function () {
|
|
|
1835
1858
|
}, {
|
|
1836
1859
|
key: 'getDataPortabilityUrl',
|
|
1837
1860
|
value: function () {
|
|
1838
|
-
var
|
|
1861
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee31(url, overrides) {
|
|
1839
1862
|
var installationId;
|
|
1840
|
-
return _regenerator2.default.wrap(function
|
|
1863
|
+
return _regenerator2.default.wrap(function _callee31$(_context31) {
|
|
1841
1864
|
while (1) {
|
|
1842
|
-
switch (
|
|
1865
|
+
switch (_context31.prev = _context31.next) {
|
|
1843
1866
|
case 0:
|
|
1844
|
-
|
|
1867
|
+
_context31.next = 2;
|
|
1845
1868
|
return this.refreshTokenIfNeeded();
|
|
1846
1869
|
|
|
1847
1870
|
case 2:
|
|
1848
1871
|
installationId = this.comoData.installationId;
|
|
1849
|
-
return
|
|
1872
|
+
return _context31.abrupt('return', urlsUtils.appendQuery('' + url, (0, _extends3.default)({
|
|
1850
1873
|
installationId: installationId
|
|
1851
1874
|
}, overrides)));
|
|
1852
1875
|
|
|
1853
1876
|
case 4:
|
|
1854
1877
|
case 'end':
|
|
1855
|
-
return
|
|
1878
|
+
return _context31.stop();
|
|
1856
1879
|
}
|
|
1857
1880
|
}
|
|
1858
|
-
},
|
|
1881
|
+
}, _callee31, this);
|
|
1859
1882
|
}));
|
|
1860
1883
|
|
|
1861
1884
|
function getDataPortabilityUrl(_x51, _x52) {
|
|
1862
|
-
return
|
|
1885
|
+
return _ref32.apply(this, arguments);
|
|
1863
1886
|
}
|
|
1864
1887
|
|
|
1865
1888
|
return getDataPortabilityUrl;
|
|
@@ -1872,29 +1895,29 @@ var Como = function () {
|
|
|
1872
1895
|
}, {
|
|
1873
1896
|
key: 'getAppModulesLegacyBaseUrl',
|
|
1874
1897
|
value: function () {
|
|
1875
|
-
var
|
|
1898
|
+
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee32() {
|
|
1876
1899
|
var env;
|
|
1877
|
-
return _regenerator2.default.wrap(function
|
|
1900
|
+
return _regenerator2.default.wrap(function _callee32$(_context32) {
|
|
1878
1901
|
while (1) {
|
|
1879
|
-
switch (
|
|
1902
|
+
switch (_context32.prev = _context32.next) {
|
|
1880
1903
|
case 0:
|
|
1881
|
-
|
|
1904
|
+
_context32.next = 2;
|
|
1882
1905
|
return this.refreshTokenIfNeeded();
|
|
1883
1906
|
|
|
1884
1907
|
case 2:
|
|
1885
1908
|
env = this.comoData.env_params;
|
|
1886
|
-
return
|
|
1909
|
+
return _context32.abrupt('return', '' + env.app_modules_legacy_root);
|
|
1887
1910
|
|
|
1888
1911
|
case 4:
|
|
1889
1912
|
case 'end':
|
|
1890
|
-
return
|
|
1913
|
+
return _context32.stop();
|
|
1891
1914
|
}
|
|
1892
1915
|
}
|
|
1893
|
-
},
|
|
1916
|
+
}, _callee32, this);
|
|
1894
1917
|
}));
|
|
1895
1918
|
|
|
1896
1919
|
function getAppModulesLegacyBaseUrl() {
|
|
1897
|
-
return
|
|
1920
|
+
return _ref33.apply(this, arguments);
|
|
1898
1921
|
}
|
|
1899
1922
|
|
|
1900
1923
|
return getAppModulesLegacyBaseUrl;
|
|
@@ -1991,26 +2014,26 @@ var Como = function () {
|
|
|
1991
2014
|
}, {
|
|
1992
2015
|
key: 'getRegionConfig',
|
|
1993
2016
|
value: function () {
|
|
1994
|
-
var
|
|
2017
|
+
var _ref34 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee33() {
|
|
1995
2018
|
var _comoData28, api, locationId, env;
|
|
1996
2019
|
|
|
1997
|
-
return _regenerator2.default.wrap(function
|
|
2020
|
+
return _regenerator2.default.wrap(function _callee33$(_context33) {
|
|
1998
2021
|
while (1) {
|
|
1999
|
-
switch (
|
|
2022
|
+
switch (_context33.prev = _context33.next) {
|
|
2000
2023
|
case 0:
|
|
2001
2024
|
_comoData28 = this.comoData, api = _comoData28.api, locationId = _comoData28.locationId, env = _comoData28.env_params;
|
|
2002
|
-
return
|
|
2025
|
+
return _context33.abrupt('return', api.getClientBusinessBackend(env.zapp_root, locationId));
|
|
2003
2026
|
|
|
2004
2027
|
case 2:
|
|
2005
2028
|
case 'end':
|
|
2006
|
-
return
|
|
2029
|
+
return _context33.stop();
|
|
2007
2030
|
}
|
|
2008
2031
|
}
|
|
2009
|
-
},
|
|
2032
|
+
}, _callee33, this);
|
|
2010
2033
|
}));
|
|
2011
2034
|
|
|
2012
2035
|
function getRegionConfig() {
|
|
2013
|
-
return
|
|
2036
|
+
return _ref34.apply(this, arguments);
|
|
2014
2037
|
}
|
|
2015
2038
|
|
|
2016
2039
|
return getRegionConfig;
|
|
@@ -2033,26 +2056,26 @@ var Como = function () {
|
|
|
2033
2056
|
}, {
|
|
2034
2057
|
key: 'addPaymentMethod',
|
|
2035
2058
|
value: function () {
|
|
2036
|
-
var
|
|
2059
|
+
var _ref35 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee34(cardToken) {
|
|
2037
2060
|
var _comoData30, api, locationId, token, env;
|
|
2038
2061
|
|
|
2039
|
-
return _regenerator2.default.wrap(function
|
|
2062
|
+
return _regenerator2.default.wrap(function _callee34$(_context34) {
|
|
2040
2063
|
while (1) {
|
|
2041
|
-
switch (
|
|
2064
|
+
switch (_context34.prev = _context34.next) {
|
|
2042
2065
|
case 0:
|
|
2043
2066
|
_comoData30 = this.comoData, api = _comoData30.api, locationId = _comoData30.locationId, token = _comoData30.token, env = _comoData30.env_params;
|
|
2044
|
-
return
|
|
2067
|
+
return _context34.abrupt('return', api.addPaymentMethod(env.services_root, locationId, token, cardToken));
|
|
2045
2068
|
|
|
2046
2069
|
case 2:
|
|
2047
2070
|
case 'end':
|
|
2048
|
-
return
|
|
2071
|
+
return _context34.stop();
|
|
2049
2072
|
}
|
|
2050
2073
|
}
|
|
2051
|
-
},
|
|
2074
|
+
}, _callee34, this);
|
|
2052
2075
|
}));
|
|
2053
2076
|
|
|
2054
2077
|
function addPaymentMethod(_x54) {
|
|
2055
|
-
return
|
|
2078
|
+
return _ref35.apply(this, arguments);
|
|
2056
2079
|
}
|
|
2057
2080
|
|
|
2058
2081
|
return addPaymentMethod;
|
|
@@ -2060,26 +2083,26 @@ var Como = function () {
|
|
|
2060
2083
|
}, {
|
|
2061
2084
|
key: 'knowYourData',
|
|
2062
2085
|
value: function () {
|
|
2063
|
-
var
|
|
2086
|
+
var _ref36 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee35(email) {
|
|
2064
2087
|
var _comoData31, api, locationId, env;
|
|
2065
2088
|
|
|
2066
|
-
return _regenerator2.default.wrap(function
|
|
2089
|
+
return _regenerator2.default.wrap(function _callee35$(_context35) {
|
|
2067
2090
|
while (1) {
|
|
2068
|
-
switch (
|
|
2091
|
+
switch (_context35.prev = _context35.next) {
|
|
2069
2092
|
case 0:
|
|
2070
2093
|
_comoData31 = this.comoData, api = _comoData31.api, locationId = _comoData31.locationId, env = _comoData31.env_params;
|
|
2071
|
-
return
|
|
2094
|
+
return _context35.abrupt('return', api.knowYourData(env.services_root, locationId, email));
|
|
2072
2095
|
|
|
2073
2096
|
case 2:
|
|
2074
2097
|
case 'end':
|
|
2075
|
-
return
|
|
2098
|
+
return _context35.stop();
|
|
2076
2099
|
}
|
|
2077
2100
|
}
|
|
2078
|
-
},
|
|
2101
|
+
}, _callee35, this);
|
|
2079
2102
|
}));
|
|
2080
2103
|
|
|
2081
2104
|
function knowYourData(_x55) {
|
|
2082
|
-
return
|
|
2105
|
+
return _ref36.apply(this, arguments);
|
|
2083
2106
|
}
|
|
2084
2107
|
|
|
2085
2108
|
return knowYourData;
|
|
@@ -2087,26 +2110,26 @@ var Como = function () {
|
|
|
2087
2110
|
}, {
|
|
2088
2111
|
key: 'consentWithdraw',
|
|
2089
2112
|
value: function () {
|
|
2090
|
-
var
|
|
2113
|
+
var _ref37 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee36(consentData) {
|
|
2091
2114
|
var _comoData32, api, locationId, env;
|
|
2092
2115
|
|
|
2093
|
-
return _regenerator2.default.wrap(function
|
|
2116
|
+
return _regenerator2.default.wrap(function _callee36$(_context36) {
|
|
2094
2117
|
while (1) {
|
|
2095
|
-
switch (
|
|
2118
|
+
switch (_context36.prev = _context36.next) {
|
|
2096
2119
|
case 0:
|
|
2097
2120
|
_comoData32 = this.comoData, api = _comoData32.api, locationId = _comoData32.locationId, env = _comoData32.env_params;
|
|
2098
|
-
return
|
|
2121
|
+
return _context36.abrupt('return', api.consentWithdraw(env.services_root, locationId, consentData));
|
|
2099
2122
|
|
|
2100
2123
|
case 2:
|
|
2101
2124
|
case 'end':
|
|
2102
|
-
return
|
|
2125
|
+
return _context36.stop();
|
|
2103
2126
|
}
|
|
2104
2127
|
}
|
|
2105
|
-
},
|
|
2128
|
+
}, _callee36, this);
|
|
2106
2129
|
}));
|
|
2107
2130
|
|
|
2108
2131
|
function consentWithdraw(_x56) {
|
|
2109
|
-
return
|
|
2132
|
+
return _ref37.apply(this, arguments);
|
|
2110
2133
|
}
|
|
2111
2134
|
|
|
2112
2135
|
return consentWithdraw;
|
|
@@ -2114,31 +2137,31 @@ var Como = function () {
|
|
|
2114
2137
|
}, {
|
|
2115
2138
|
key: 'getPaymentMethods',
|
|
2116
2139
|
value: function () {
|
|
2117
|
-
var
|
|
2140
|
+
var _ref38 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee37() {
|
|
2118
2141
|
var _comoData33, env, locationId, api, responseJson;
|
|
2119
2142
|
|
|
2120
|
-
return _regenerator2.default.wrap(function
|
|
2143
|
+
return _regenerator2.default.wrap(function _callee37$(_context37) {
|
|
2121
2144
|
while (1) {
|
|
2122
|
-
switch (
|
|
2145
|
+
switch (_context37.prev = _context37.next) {
|
|
2123
2146
|
case 0:
|
|
2124
2147
|
_comoData33 = this.comoData, env = _comoData33.env_params, locationId = _comoData33.locationId, api = _comoData33.api;
|
|
2125
|
-
|
|
2148
|
+
_context37.next = 3;
|
|
2126
2149
|
return api.getPaymentMethods(env.services_root, locationId);
|
|
2127
2150
|
|
|
2128
2151
|
case 3:
|
|
2129
|
-
responseJson =
|
|
2130
|
-
return
|
|
2152
|
+
responseJson = _context37.sent;
|
|
2153
|
+
return _context37.abrupt('return', responseJson);
|
|
2131
2154
|
|
|
2132
2155
|
case 5:
|
|
2133
2156
|
case 'end':
|
|
2134
|
-
return
|
|
2157
|
+
return _context37.stop();
|
|
2135
2158
|
}
|
|
2136
2159
|
}
|
|
2137
|
-
},
|
|
2160
|
+
}, _callee37, this);
|
|
2138
2161
|
}));
|
|
2139
2162
|
|
|
2140
2163
|
function getPaymentMethods() {
|
|
2141
|
-
return
|
|
2164
|
+
return _ref38.apply(this, arguments);
|
|
2142
2165
|
}
|
|
2143
2166
|
|
|
2144
2167
|
return getPaymentMethods;
|
|
@@ -2155,31 +2178,31 @@ var Como = function () {
|
|
|
2155
2178
|
}, {
|
|
2156
2179
|
key: 'payInApp',
|
|
2157
2180
|
value: function () {
|
|
2158
|
-
var
|
|
2181
|
+
var _ref39 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee38(amount, creditCardToken, itemName, itemNumber, membershipKey) {
|
|
2159
2182
|
var _comoData34, env, token, locationId, api, responseJson;
|
|
2160
2183
|
|
|
2161
|
-
return _regenerator2.default.wrap(function
|
|
2184
|
+
return _regenerator2.default.wrap(function _callee38$(_context38) {
|
|
2162
2185
|
while (1) {
|
|
2163
|
-
switch (
|
|
2186
|
+
switch (_context38.prev = _context38.next) {
|
|
2164
2187
|
case 0:
|
|
2165
2188
|
_comoData34 = this.comoData, env = _comoData34.env_params, token = _comoData34.token, locationId = _comoData34.locationId, api = _comoData34.api;
|
|
2166
|
-
|
|
2189
|
+
_context38.next = 3;
|
|
2167
2190
|
return api.payInApp(env.services_root, locationId, token, amount, creditCardToken, itemName, itemNumber, membershipKey);
|
|
2168
2191
|
|
|
2169
2192
|
case 3:
|
|
2170
|
-
responseJson =
|
|
2171
|
-
return
|
|
2193
|
+
responseJson = _context38.sent;
|
|
2194
|
+
return _context38.abrupt('return', responseJson);
|
|
2172
2195
|
|
|
2173
2196
|
case 5:
|
|
2174
2197
|
case 'end':
|
|
2175
|
-
return
|
|
2198
|
+
return _context38.stop();
|
|
2176
2199
|
}
|
|
2177
2200
|
}
|
|
2178
|
-
},
|
|
2201
|
+
}, _callee38, this);
|
|
2179
2202
|
}));
|
|
2180
2203
|
|
|
2181
2204
|
function payInApp(_x57, _x58, _x59, _x60, _x61) {
|
|
2182
|
-
return
|
|
2205
|
+
return _ref39.apply(this, arguments);
|
|
2183
2206
|
}
|
|
2184
2207
|
|
|
2185
2208
|
return payInApp;
|
|
@@ -2192,31 +2215,31 @@ var Como = function () {
|
|
|
2192
2215
|
}, {
|
|
2193
2216
|
key: 'deletePayment',
|
|
2194
2217
|
value: function () {
|
|
2195
|
-
var
|
|
2218
|
+
var _ref40 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee39(creditCardToken) {
|
|
2196
2219
|
var _comoData35, env, token, locationId, api, responseJson;
|
|
2197
2220
|
|
|
2198
|
-
return _regenerator2.default.wrap(function
|
|
2221
|
+
return _regenerator2.default.wrap(function _callee39$(_context39) {
|
|
2199
2222
|
while (1) {
|
|
2200
|
-
switch (
|
|
2223
|
+
switch (_context39.prev = _context39.next) {
|
|
2201
2224
|
case 0:
|
|
2202
2225
|
_comoData35 = this.comoData, env = _comoData35.env_params, token = _comoData35.token, locationId = _comoData35.locationId, api = _comoData35.api;
|
|
2203
|
-
|
|
2226
|
+
_context39.next = 3;
|
|
2204
2227
|
return api.deletePayment(env.services_root, locationId, token, creditCardToken);
|
|
2205
2228
|
|
|
2206
2229
|
case 3:
|
|
2207
|
-
responseJson =
|
|
2208
|
-
return
|
|
2230
|
+
responseJson = _context39.sent;
|
|
2231
|
+
return _context39.abrupt('return', responseJson);
|
|
2209
2232
|
|
|
2210
2233
|
case 5:
|
|
2211
2234
|
case 'end':
|
|
2212
|
-
return
|
|
2235
|
+
return _context39.stop();
|
|
2213
2236
|
}
|
|
2214
2237
|
}
|
|
2215
|
-
},
|
|
2238
|
+
}, _callee39, this);
|
|
2216
2239
|
}));
|
|
2217
2240
|
|
|
2218
2241
|
function deletePayment(_x62) {
|
|
2219
|
-
return
|
|
2242
|
+
return _ref40.apply(this, arguments);
|
|
2220
2243
|
}
|
|
2221
2244
|
|
|
2222
2245
|
return deletePayment;
|
|
@@ -2228,32 +2251,32 @@ var Como = function () {
|
|
|
2228
2251
|
}, {
|
|
2229
2252
|
key: 'getMemberMessages',
|
|
2230
2253
|
value: function () {
|
|
2231
|
-
var
|
|
2254
|
+
var _ref41 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee40(tag, limit, offset) {
|
|
2232
2255
|
var fetchExpiredMessages = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
2233
2256
|
|
|
2234
2257
|
var _comoData36, api, locationId, env;
|
|
2235
2258
|
|
|
2236
|
-
return _regenerator2.default.wrap(function
|
|
2259
|
+
return _regenerator2.default.wrap(function _callee40$(_context40) {
|
|
2237
2260
|
while (1) {
|
|
2238
|
-
switch (
|
|
2261
|
+
switch (_context40.prev = _context40.next) {
|
|
2239
2262
|
case 0:
|
|
2240
2263
|
_comoData36 = this.comoData, api = _comoData36.api, locationId = _comoData36.locationId, env = _comoData36.env_params;
|
|
2241
|
-
|
|
2264
|
+
_context40.next = 3;
|
|
2242
2265
|
return this.refreshTokenIfNeeded();
|
|
2243
2266
|
|
|
2244
2267
|
case 3:
|
|
2245
|
-
return
|
|
2268
|
+
return _context40.abrupt('return', api.getMemberMessages(env.services_root, locationId, tag, limit, offset, fetchExpiredMessages));
|
|
2246
2269
|
|
|
2247
2270
|
case 4:
|
|
2248
2271
|
case 'end':
|
|
2249
|
-
return
|
|
2272
|
+
return _context40.stop();
|
|
2250
2273
|
}
|
|
2251
2274
|
}
|
|
2252
|
-
},
|
|
2275
|
+
}, _callee40, this);
|
|
2253
2276
|
}));
|
|
2254
2277
|
|
|
2255
2278
|
function getMemberMessages(_x63, _x64, _x65) {
|
|
2256
|
-
return
|
|
2279
|
+
return _ref41.apply(this, arguments);
|
|
2257
2280
|
}
|
|
2258
2281
|
|
|
2259
2282
|
return getMemberMessages;
|
|
@@ -2284,26 +2307,26 @@ var Como = function () {
|
|
|
2284
2307
|
}, {
|
|
2285
2308
|
key: 'budgetTransfer',
|
|
2286
2309
|
value: function () {
|
|
2287
|
-
var
|
|
2310
|
+
var _ref42 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee41(receiver, sender, amount, wallet) {
|
|
2288
2311
|
var _comoData38, api, locationId, env;
|
|
2289
2312
|
|
|
2290
|
-
return _regenerator2.default.wrap(function
|
|
2313
|
+
return _regenerator2.default.wrap(function _callee41$(_context41) {
|
|
2291
2314
|
while (1) {
|
|
2292
|
-
switch (
|
|
2315
|
+
switch (_context41.prev = _context41.next) {
|
|
2293
2316
|
case 0:
|
|
2294
2317
|
_comoData38 = this.comoData, api = _comoData38.api, locationId = _comoData38.locationId, env = _comoData38.env_params;
|
|
2295
|
-
return
|
|
2318
|
+
return _context41.abrupt('return', api.budgetTransfer(env.services_root, locationId, receiver, sender, amount, wallet));
|
|
2296
2319
|
|
|
2297
2320
|
case 2:
|
|
2298
2321
|
case 'end':
|
|
2299
|
-
return
|
|
2322
|
+
return _context41.stop();
|
|
2300
2323
|
}
|
|
2301
2324
|
}
|
|
2302
|
-
},
|
|
2325
|
+
}, _callee41, this);
|
|
2303
2326
|
}));
|
|
2304
2327
|
|
|
2305
2328
|
function budgetTransfer(_x67, _x68, _x69, _x70) {
|
|
2306
|
-
return
|
|
2329
|
+
return _ref42.apply(this, arguments);
|
|
2307
2330
|
}
|
|
2308
2331
|
|
|
2309
2332
|
return budgetTransfer;
|
|
@@ -2330,26 +2353,26 @@ var Como = function () {
|
|
|
2330
2353
|
}, {
|
|
2331
2354
|
key: 'budgetTransferClaim',
|
|
2332
2355
|
value: function () {
|
|
2333
|
-
var
|
|
2356
|
+
var _ref43 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee42(claimCode) {
|
|
2334
2357
|
var _comoData40, api, locationId, env;
|
|
2335
2358
|
|
|
2336
|
-
return _regenerator2.default.wrap(function
|
|
2359
|
+
return _regenerator2.default.wrap(function _callee42$(_context42) {
|
|
2337
2360
|
while (1) {
|
|
2338
|
-
switch (
|
|
2361
|
+
switch (_context42.prev = _context42.next) {
|
|
2339
2362
|
case 0:
|
|
2340
2363
|
_comoData40 = this.comoData, api = _comoData40.api, locationId = _comoData40.locationId, env = _comoData40.env_params;
|
|
2341
|
-
return
|
|
2364
|
+
return _context42.abrupt('return', api.budgetTransferClaim(env.services_root, locationId, claimCode));
|
|
2342
2365
|
|
|
2343
2366
|
case 2:
|
|
2344
2367
|
case 'end':
|
|
2345
|
-
return
|
|
2368
|
+
return _context42.stop();
|
|
2346
2369
|
}
|
|
2347
2370
|
}
|
|
2348
|
-
},
|
|
2371
|
+
}, _callee42, this);
|
|
2349
2372
|
}));
|
|
2350
2373
|
|
|
2351
2374
|
function budgetTransferClaim(_x71) {
|
|
2352
|
-
return
|
|
2375
|
+
return _ref43.apply(this, arguments);
|
|
2353
2376
|
}
|
|
2354
2377
|
|
|
2355
2378
|
return budgetTransferClaim;
|
|
@@ -2382,26 +2405,26 @@ var Como = function () {
|
|
|
2382
2405
|
}, {
|
|
2383
2406
|
key: 'logUserAction',
|
|
2384
2407
|
value: function () {
|
|
2385
|
-
var
|
|
2408
|
+
var _ref44 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee43(action, logData) {
|
|
2386
2409
|
var _comoData42, env, locationId, api;
|
|
2387
2410
|
|
|
2388
|
-
return _regenerator2.default.wrap(function
|
|
2411
|
+
return _regenerator2.default.wrap(function _callee43$(_context43) {
|
|
2389
2412
|
while (1) {
|
|
2390
|
-
switch (
|
|
2413
|
+
switch (_context43.prev = _context43.next) {
|
|
2391
2414
|
case 0:
|
|
2392
2415
|
_comoData42 = this.comoData, env = _comoData42.env_params, locationId = _comoData42.locationId, api = _comoData42.api;
|
|
2393
|
-
return
|
|
2416
|
+
return _context43.abrupt('return', api.logUserAction(env.zapp_root, locationId, action, logData));
|
|
2394
2417
|
|
|
2395
2418
|
case 2:
|
|
2396
2419
|
case 'end':
|
|
2397
|
-
return
|
|
2420
|
+
return _context43.stop();
|
|
2398
2421
|
}
|
|
2399
2422
|
}
|
|
2400
|
-
},
|
|
2423
|
+
}, _callee43, this);
|
|
2401
2424
|
}));
|
|
2402
2425
|
|
|
2403
2426
|
function logUserAction(_x72, _x73) {
|
|
2404
|
-
return
|
|
2427
|
+
return _ref44.apply(this, arguments);
|
|
2405
2428
|
}
|
|
2406
2429
|
|
|
2407
2430
|
return logUserAction;
|
|
@@ -2416,26 +2439,26 @@ var Como = function () {
|
|
|
2416
2439
|
}, {
|
|
2417
2440
|
key: 'getPurchaseHistory',
|
|
2418
2441
|
value: function () {
|
|
2419
|
-
var
|
|
2442
|
+
var _ref45 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee44(limit, offset) {
|
|
2420
2443
|
var _comoData43, locationId, api, membership;
|
|
2421
2444
|
|
|
2422
|
-
return _regenerator2.default.wrap(function
|
|
2445
|
+
return _regenerator2.default.wrap(function _callee44$(_context44) {
|
|
2423
2446
|
while (1) {
|
|
2424
|
-
switch (
|
|
2447
|
+
switch (_context44.prev = _context44.next) {
|
|
2425
2448
|
case 0:
|
|
2426
2449
|
_comoData43 = this.comoData, locationId = _comoData43.locationId, api = _comoData43.api, membership = _comoData43.membership;
|
|
2427
|
-
return
|
|
2450
|
+
return _context44.abrupt('return', api.getPurchaseHistory(locationId, membership.Key, limit, offset));
|
|
2428
2451
|
|
|
2429
2452
|
case 2:
|
|
2430
2453
|
case 'end':
|
|
2431
|
-
return
|
|
2454
|
+
return _context44.stop();
|
|
2432
2455
|
}
|
|
2433
2456
|
}
|
|
2434
|
-
},
|
|
2457
|
+
}, _callee44, this);
|
|
2435
2458
|
}));
|
|
2436
2459
|
|
|
2437
2460
|
function getPurchaseHistory(_x74, _x75) {
|
|
2438
|
-
return
|
|
2461
|
+
return _ref45.apply(this, arguments);
|
|
2439
2462
|
}
|
|
2440
2463
|
|
|
2441
2464
|
return getPurchaseHistory;
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -725,7 +725,10 @@ class Como {
|
|
|
725
725
|
/**
|
|
726
726
|
* Return service recaptch config
|
|
727
727
|
*/
|
|
728
|
-
getRecaptchaConfig() {
|
|
728
|
+
async getRecaptchaConfig() {
|
|
729
|
+
await this.refreshTokenIfNeeded();
|
|
730
|
+
return this.comoData.recaptchaConfig;
|
|
731
|
+
}
|
|
729
732
|
|
|
730
733
|
/**
|
|
731
734
|
* Returns the location specific registration web url
|