@evergis/api 3.0.91 → 3.0.92

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Kirill Protasov
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Kirill Protasov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.md CHANGED
@@ -1,21 +1,21 @@
1
- # @evergis/api
2
-
3
- ```javascript
4
- import { Api } from '@evergis/api';
5
-
6
- const api = new Api({
7
- url: '/',
8
- });
9
- ```
10
-
11
- ## Possible Environment variables
12
-
13
- ```
14
-
15
- NODE_ENV = "development" | "test" | "production"
16
- URL = "string"
17
- LOGIN = "string"
18
- PASSWORD = "string"
19
- WORKSPACE = "string"
20
-
21
- ```
1
+ # @evergis/api
2
+
3
+ ```javascript
4
+ import { Api } from '@evergis/api';
5
+
6
+ const api = new Api({
7
+ url: '/',
8
+ });
9
+ ```
10
+
11
+ ## Possible Environment variables
12
+
13
+ ```
14
+
15
+ NODE_ENV = "development" | "test" | "production"
16
+ URL = "string"
17
+ LOGIN = "string"
18
+ PASSWORD = "string"
19
+ WORKSPACE = "string"
20
+
21
+ ```
package/dist/Api.d.ts CHANGED
@@ -52,7 +52,7 @@ export declare class Api extends EventEmitter {
52
52
  readonly statistic: Statistic;
53
53
  readonly feedback: Feedback;
54
54
  readonly snappingHub: HubConnection | null;
55
- constructor({ url, wsUrl, snappingHubUrl, http, urlPath, httpOptions }: ApiParams);
55
+ constructor({ url, wsUrl, snappingHubUrl, http, urlPath, httpOptions, }: ApiParams);
56
56
  init({ authParams, connectWs, initScheduler, fetchSettings, fetchUser, }: {
57
57
  authParams?: LoginDc;
58
58
  connectWs?: boolean;
@@ -75,41 +75,41 @@ export interface AggregationDataResultDc {
75
75
  }
76
76
  /**
77
77
  *
78
-
78
+
79
79
  None
80
-
80
+
81
81
  Array
82
-
82
+
83
83
  Min
84
-
84
+
85
85
  Max
86
-
86
+
87
87
  Avg
88
-
88
+
89
89
  Sum
90
-
90
+
91
91
  Extent
92
-
92
+
93
93
  Count
94
-
94
+
95
95
  First
96
-
96
+
97
97
  Last
98
-
98
+
99
99
  Median
100
-
100
+
101
101
  Mod
102
-
102
+
103
103
  StdDeviation
104
-
104
+
105
105
  SumOfProduct
106
-
106
+
107
107
  OnlyValue
108
-
108
+
109
109
  WeightedAvg
110
-
110
+
111
111
  DensityIndicators
112
-
112
+
113
113
  DividedSum
114
114
  */
115
115
  export declare enum AggregationFunction {
@@ -408,27 +408,27 @@ export interface AttributeFormatDefinitionDc {
408
408
  }
409
409
  /**
410
410
  * Types of the attributes that are supported by the system.
411
-
411
+
412
412
  Unknown
413
-
413
+
414
414
  String
415
-
415
+
416
416
  Int32
417
-
417
+
418
418
  Int64
419
-
419
+
420
420
  Double
421
-
421
+
422
422
  DateTime
423
-
423
+
424
424
  Boolean
425
-
425
+
426
426
  Point
427
-
427
+
428
428
  Polyline
429
-
429
+
430
430
  Polygon
431
-
431
+
432
432
  Multipoint
433
433
  */
434
434
  export declare enum AttributeType {
@@ -636,15 +636,15 @@ export interface CirclePointSymbolDc {
636
636
  }
637
637
  /**
638
638
  * Describes classification methods.
639
-
639
+
640
640
  none
641
-
641
+
642
642
  naturalBreaks
643
-
643
+
644
644
  equalInterval
645
-
645
+
646
646
  quantile
647
-
647
+
648
648
  unique
649
649
  */
650
650
  export declare enum ClassificationType {
@@ -656,11 +656,11 @@ export declare enum ClassificationType {
656
656
  }
657
657
  /**
658
658
  * Type of attribute.
659
-
659
+
660
660
  decimal
661
-
661
+
662
662
  dateTime
663
-
663
+
664
664
  text
665
665
  */
666
666
  export declare enum ClassifyAttributeType {
@@ -1312,15 +1312,15 @@ export interface ErrorDetailsDc {
1312
1312
  }
1313
1313
  /**
1314
1314
  * Type of the error.
1315
-
1315
+
1316
1316
  ResourceLimitExceeded
1317
-
1317
+
1318
1318
  ResourceNotFound
1319
-
1319
+
1320
1320
  InternalError
1321
-
1321
+
1322
1322
  BadRequest
1323
-
1323
+
1324
1324
  DuplicateContent
1325
1325
  */
1326
1326
  export declare enum ErrorDetailsType {
@@ -1810,9 +1810,9 @@ export interface FeatureTaskParametersDc {
1810
1810
  }
1811
1811
  /**
1812
1812
  * Type of the feature.
1813
-
1813
+
1814
1814
  Unknown
1815
-
1815
+
1816
1816
  GeometricFeature
1817
1817
  */
1818
1818
  export declare enum FeatureType {
@@ -1984,17 +1984,17 @@ export interface GeometryDc {
1984
1984
  }
1985
1985
  /**
1986
1986
  *
1987
-
1987
+
1988
1988
  unknown
1989
-
1989
+
1990
1990
  point
1991
-
1991
+
1992
1992
  polyline
1993
-
1993
+
1994
1994
  polygon
1995
-
1995
+
1996
1996
  envelope
1997
-
1997
+
1998
1998
  multipoint
1999
1999
  */
2000
2000
  export declare enum GeometryType {
@@ -2021,13 +2021,13 @@ export interface GridElementDc {
2021
2021
  }
2022
2022
  /**
2023
2023
  * Resource group.
2024
-
2024
+
2025
2025
  my
2026
-
2026
+
2027
2027
  role
2028
-
2028
+
2029
2029
  public
2030
-
2030
+
2031
2031
  all
2032
2032
  */
2033
2033
  export declare enum Group {
@@ -2890,15 +2890,15 @@ export interface NamespaceInfoDc {
2890
2890
  export declare type ObjectId = object;
2891
2891
  /**
2892
2892
  *
2893
-
2893
+
2894
2894
  Unknown
2895
-
2895
+
2896
2896
  union
2897
-
2897
+
2898
2898
  intersection
2899
-
2899
+
2900
2900
  subtraction
2901
-
2901
+
2902
2902
  symDifference
2903
2903
  */
2904
2904
  export declare enum Operation {
@@ -3012,19 +3012,19 @@ export interface PatternBrushDc {
3012
3012
  }
3013
3013
  /**
3014
3014
  * User permissions for server security objects (services, projects etc.)
3015
-
3015
+
3016
3016
  none
3017
-
3017
+
3018
3018
  configure
3019
-
3019
+
3020
3020
  write
3021
-
3021
+
3022
3022
  read
3023
-
3023
+
3024
3024
  read,configure
3025
-
3025
+
3026
3026
  read,write
3027
-
3027
+
3028
3028
  read,write,configure
3029
3029
  */
3030
3030
  export declare enum Permissions {
@@ -3139,17 +3139,17 @@ export interface PolicyDc {
3139
3139
  }
3140
3140
  /**
3141
3141
  * Type of the authorization policy.
3142
-
3142
+
3143
3143
  Unknown
3144
-
3144
+
3145
3145
  CreateTable
3146
-
3146
+
3147
3147
  CreateLayer
3148
-
3148
+
3149
3149
  CreateProject
3150
-
3150
+
3151
3151
  MaxFeaturesInOneTable
3152
-
3152
+
3153
3153
  MaxObjectsToExport
3154
3154
  */
3155
3155
  export declare enum PolicyType {
@@ -4072,17 +4072,17 @@ export interface ResourceInfoDc {
4072
4072
  }
4073
4073
  /**
4074
4074
  * The `ResourceType` represents resource manager supports types.
4075
-
4075
+
4076
4076
  Unknown
4077
-
4077
+
4078
4078
  table
4079
-
4079
+
4080
4080
  layer
4081
-
4081
+
4082
4082
  project
4083
-
4083
+
4084
4084
  file
4085
-
4085
+
4086
4086
  feature
4087
4087
  */
4088
4088
  export declare enum ResourceType {
@@ -4233,21 +4233,21 @@ export interface ServerInfoDc {
4233
4233
  }
4234
4234
  /**
4235
4235
  * Status of the server task.
4236
-
4236
+
4237
4237
  None
4238
-
4238
+
4239
4239
  Scheduled
4240
-
4240
+
4241
4241
  Planning
4242
-
4242
+
4243
4243
  Executing
4244
-
4244
+
4245
4245
  Completed
4246
-
4246
+
4247
4247
  Failed
4248
-
4248
+
4249
4249
  Canceled
4250
-
4250
+
4251
4251
  Timeout
4252
4252
  */
4253
4253
  export declare enum ServerTaskStatus {
@@ -4715,11 +4715,11 @@ export interface StepResultDc {
4715
4715
  }
4716
4716
  /**
4717
4717
  * The `StringSubType` provides information about string attribute subtype.
4718
-
4718
+
4719
4719
  None
4720
-
4720
+
4721
4721
  Image
4722
-
4722
+
4723
4723
  PkkCode
4724
4724
  */
4725
4725
  export declare enum StringSubType {
@@ -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(target, property, receiver) {
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(target, property, receiver || target);
188
+ return _get.apply(this, arguments);
181
189
  }
182
190
 
183
191
  let HttpClient = /*#__PURE__*/function () {
@@ -853,8 +861,8 @@ let Notification = /*#__PURE__*/function (_NotificationService) {
853
861
  || event.code === 4002
854
862
  /* InvalidSession */
855
863
  ) {
856
- _this.connectStatus = exports.ConnectionStatus.SessionClosed;
857
- } else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
864
+ _this.connectStatus = exports.ConnectionStatus.SessionClosed;
865
+ } else if (_this.reconnectTries < _this.MAX_WS_RECONNECT_TRIES) {
858
866
  _this.connectStatus = exports.ConnectionStatus.Break;
859
867
  _this.reconnectTries++;
860
868
 
@@ -1360,7 +1368,7 @@ let Scheduler = /*#__PURE__*/function (_SchedulerService) {
1360
1368
  const taskProgress = await this.getTaskProgress(id);
1361
1369
  this.resolveTaskStatus(taskProgress, resolve, reject);
1362
1370
 
1363
- const taskResultCallback = async (_ref) => {
1371
+ const taskResultCallback = async _ref => {
1364
1372
  let {
1365
1373
  data
1366
1374
  } = _ref;
@@ -3438,12 +3446,12 @@ let Resources = /*#__PURE__*/function () {
3438
3446
  }, {
3439
3447
  key: "getDependentNames",
3440
3448
  value: function getDependentNames(deps, depType) {
3441
- return deps.filter((_ref) => {
3449
+ return deps.filter(_ref => {
3442
3450
  let {
3443
3451
  type
3444
3452
  } = _ref;
3445
3453
  return type === depType;
3446
- }).map((_ref2) => {
3454
+ }).map(_ref2 => {
3447
3455
  let {
3448
3456
  name
3449
3457
  } = _ref2;
@@ -5363,7 +5371,9 @@ let Names = /*#__PURE__*/function () {
5363
5371
  value: function extractResource(resourceName) {
5364
5372
  if (resourceName) {
5365
5373
  if (resourceName.includes(exports.ResourceSeparator.Server)) {
5366
- const [workspace, name] = resourceName.split(exports.ResourceSeparator.Server, 2);
5374
+ const matches = resourceName.split(exports.ResourceSeparator.Server);
5375
+ const name = matches.pop();
5376
+ const workspace = matches.join(exports.ResourceSeparator.Server);
5367
5377
  return {
5368
5378
  workspace,
5369
5379
  name
@@ -5865,7 +5875,9 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
5865
5875
  account: _this.account
5866
5876
  });
5867
5877
  _this.snappingHub = snappingHubUrl ? new signalr.HubConnectionBuilder().withUrl(snappingHubUrl, {
5868
- withCredentials: true
5878
+ withCredentials: true,
5879
+ skipNegotiation: true,
5880
+ transport: signalr.HttpTransportType.WebSockets
5869
5881
  }).withAutomaticReconnect().build() : null;
5870
5882
  return _this;
5871
5883
  }