@evergis/api 3.0.104 → 3.0.108
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/LICENSE +20 -20
- package/README.md +21 -21
- package/dist/__generated__/data-contracts.d.ts +146 -146
- package/dist/api.cjs.development.js +19 -11
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +166 -157
- package/dist/api.esm.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/services/Account.d.ts +0 -1
- package/dist/services/ClientSettings.d.ts +1 -0
- package/dist/services/Notification.d.ts +1 -1
- package/package.json +2 -2
|
@@ -35,6 +35,9 @@ function _defineProperties(target, props) {
|
|
|
35
35
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
36
36
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
37
37
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
38
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
39
|
+
writable: false
|
|
40
|
+
});
|
|
38
41
|
return Constructor;
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -68,6 +71,9 @@ function _inherits(subClass, superClass) {
|
|
|
68
71
|
configurable: true
|
|
69
72
|
}
|
|
70
73
|
});
|
|
74
|
+
Object.defineProperty(subClass, "prototype", {
|
|
75
|
+
writable: false
|
|
76
|
+
});
|
|
71
77
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
72
78
|
}
|
|
73
79
|
|
|
@@ -126,6 +132,8 @@ function _assertThisInitialized(self) {
|
|
|
126
132
|
function _possibleConstructorReturn(self, call) {
|
|
127
133
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
128
134
|
return call;
|
|
135
|
+
} else if (call !== void 0) {
|
|
136
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
return _assertThisInitialized(self);
|
|
@@ -159,7 +167,7 @@ function _superPropBase(object, property) {
|
|
|
159
167
|
return object;
|
|
160
168
|
}
|
|
161
169
|
|
|
162
|
-
function _get(
|
|
170
|
+
function _get() {
|
|
163
171
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
164
172
|
_get = Reflect.get;
|
|
165
173
|
} else {
|
|
@@ -170,14 +178,14 @@ function _get(target, property, receiver) {
|
|
|
170
178
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
171
179
|
|
|
172
180
|
if (desc.get) {
|
|
173
|
-
return desc.get.call(receiver);
|
|
181
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
174
182
|
}
|
|
175
183
|
|
|
176
184
|
return desc.value;
|
|
177
185
|
};
|
|
178
186
|
}
|
|
179
187
|
|
|
180
|
-
return _get(
|
|
188
|
+
return _get.apply(this, arguments);
|
|
181
189
|
}
|
|
182
190
|
|
|
183
191
|
let HttpClient = /*#__PURE__*/function () {
|
|
@@ -885,8 +893,8 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
|
|
|
885
893
|
|| event.code === 4002
|
|
886
894
|
/* InvalidSession */
|
|
887
895
|
) {
|
|
888
|
-
|
|
889
|
-
|
|
896
|
+
_this.connectStatus = exports.ConnectionStatus.SessionClosed;
|
|
897
|
+
} else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
|
|
890
898
|
_this.connectStatus = exports.ConnectionStatus.Break;
|
|
891
899
|
_this.reconnectTries++;
|
|
892
900
|
|
|
@@ -1392,7 +1400,7 @@ let Scheduler = /*#__PURE__*/function (_SchedulerService) {
|
|
|
1392
1400
|
const taskProgress = await this.getTaskProgress(id);
|
|
1393
1401
|
this.resolveTaskStatus(taskProgress, resolve, reject);
|
|
1394
1402
|
|
|
1395
|
-
const taskResultCallback = async
|
|
1403
|
+
const taskResultCallback = async _ref => {
|
|
1396
1404
|
let {
|
|
1397
1405
|
data
|
|
1398
1406
|
} = _ref;
|
|
@@ -3532,12 +3540,12 @@ let Resources = /*#__PURE__*/function () {
|
|
|
3532
3540
|
}, {
|
|
3533
3541
|
key: "getDependentNames",
|
|
3534
3542
|
value: function getDependentNames(deps, depType) {
|
|
3535
|
-
return deps.filter(
|
|
3543
|
+
return deps.filter(_ref => {
|
|
3536
3544
|
let {
|
|
3537
3545
|
type
|
|
3538
3546
|
} = _ref;
|
|
3539
3547
|
return type === depType;
|
|
3540
|
-
}).map(
|
|
3548
|
+
}).map(_ref2 => {
|
|
3541
3549
|
let {
|
|
3542
3550
|
name
|
|
3543
3551
|
} = _ref2;
|
|
@@ -4684,6 +4692,8 @@ let AccountService = /*#__PURE__*/function (_Service) {
|
|
|
4684
4692
|
return AccountService;
|
|
4685
4693
|
}(Service);
|
|
4686
4694
|
|
|
4695
|
+
const API_USER_INFO_KEY = '@evergis/user-info';
|
|
4696
|
+
|
|
4687
4697
|
const getUserInfo = () => JSON.parse(localStorage.getItem(API_USER_INFO_KEY) || 'null') || void 0;
|
|
4688
4698
|
const updateUserInfo = newUserInfo => {
|
|
4689
4699
|
if (newUserInfo) {
|
|
@@ -4694,7 +4704,6 @@ const updateUserInfo = newUserInfo => {
|
|
|
4694
4704
|
}
|
|
4695
4705
|
};
|
|
4696
4706
|
|
|
4697
|
-
const API_USER_INFO_KEY = '@evergis/user-info';
|
|
4698
4707
|
let Account = /*#__PURE__*/function (_AccountService) {
|
|
4699
4708
|
_inherits(Account, _AccountService);
|
|
4700
4709
|
|
|
@@ -4909,7 +4918,7 @@ let AccountPreview = /*#__PURE__*/function (_AccountPreviewServic) {
|
|
|
4909
4918
|
value: async function fetchPreview1() {
|
|
4910
4919
|
var _response$headers$get;
|
|
4911
4920
|
|
|
4912
|
-
const url = this.getPreview(
|
|
4921
|
+
const url = this.getPreview('');
|
|
4913
4922
|
const response = await fetch(url);
|
|
4914
4923
|
const profile_photo = (_response$headers$get = response.headers.get('content-type')) != null && _response$headers$get.includes('text/plain') ? await response.text() : url + "?r=" + Math.random();
|
|
4915
4924
|
updateUserInfo({
|
|
@@ -6674,7 +6683,6 @@ Object.defineProperty(exports, 'TimeoutError', {
|
|
|
6674
6683
|
return ky.TimeoutError;
|
|
6675
6684
|
}
|
|
6676
6685
|
});
|
|
6677
|
-
exports.API_USER_INFO_KEY = API_USER_INFO_KEY;
|
|
6678
6686
|
exports.Account = Account;
|
|
6679
6687
|
exports.AccountPreview = AccountPreview;
|
|
6680
6688
|
exports.Api = Api;
|