@evergis/api 3.0.45 → 3.0.49

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/dist/Api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Options as KyOptions } from 'ky';
2
2
  import { EventEmitter } from '@evergis/event-emitter';
3
- import { Account, External, ClientSettings, FileUpload, General, Geocode, Import, Layers, Names, Namespace, Notification, Projects, ResourceCatalog, Resources, Scheduler, Security, Styles, Tables, Tools, AccountPreview } from './services';
3
+ import { Account, External, ClientSettings, FileUpload, General, Geocode, Import, Layers, Names, Namespace, Notification, Projects, ResourceCatalog, Resources, Scheduler, Security, Styles, Tables, Tools, AccountPreview, BulkOperations } from './services';
4
4
  import { Print } from './services/Print';
5
5
  import { HttpClient } from './__generated__/HttpClient';
6
6
  import { LoginDc } from './__generated__/data-contracts';
@@ -43,6 +43,7 @@ export declare class Api extends EventEmitter {
43
43
  readonly external: External;
44
44
  readonly clientSettings: ClientSettings;
45
45
  readonly names: Names;
46
+ readonly bulk: BulkOperations;
46
47
  constructor({ url, wsUrl, http, urlPath, httpOptions }: ApiParams);
47
48
  init({ authParams, connectWs, initScheduler, fetchSettings, fetchUser, }: {
48
49
  authParams?: LoginDc;
@@ -1,4 +1,4 @@
1
- import { ChangeEmailParams, ChangePasswordPayload, ConfirmChangeEmailParams, ConfirmEmail1Params, CreateRoleDc, CreateUserDc, CreateUserParams, ExtendedUserInfoDc, GetExtendedUsersParams, GetRolesParams, GetUsersParams, IsEmailExistsParams, IsUsernameExistsParams, ListResponseExtendedUserInfoDc, ListResponseRoleInfoDc, ListResponseUserInfoDc, LoginDc, RegisterUserDc, ResetPasswordCallbackPayload, ResetPasswordParams, SetEmailPayload, SetUserPasswordPayload, UpdateRoleDc, UpdateUserDc, UsedProjectDc, UserInfoDc } from './data-contracts';
1
+ import { ChangeEmailParams, ChangePasswordPayload, ConfirmChangeEmailParams, ConfirmEmail1Params, CreateRoleDc, CreateUserDc, CreateUserParams, ExtendedUserInfoDc, GetExtendedUsersParams, GetRolesParams, GetUsersParams, IsEmailExistsParams, IsUsernameExistsParams, ListResponseExtendedUserInfoDc, ListResponseRoleInfoDc, ListResponseUserInfoDc, LoginDc, RegisterUserDc, ResetPasswordCallbackPayload, ResetPasswordParams, SetEmailPayload, UpdateRoleDc, UpdateUserDc, UsedProjectDc, UserInfoDc } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -178,10 +178,10 @@ export declare class AccountService extends Service {
178
178
  * @name SetUserPassword
179
179
  * @operationId AccountController_SetUserPassword
180
180
  * @summary Set user password.
181
- * @request PATCH:/account/user/{username}/password
181
+ * @request PATCH:/account/password/set
182
182
  * @response `200` Success
183
183
  */
184
- setUserPassword(username: string, data: SetUserPasswordPayload): Promise<void>;
184
+ setUserPassword(data: LoginDc): Promise<void>;
185
185
  /**
186
186
  * No description
187
187
  *
@@ -1,4 +1,4 @@
1
- import { BatchResourcesAclDc } from './data-contracts';
1
+ import { BatchResourcesAclDc, BatchResourcesCatalogDc, BulkOperationResultDc } from './data-contracts';
2
2
  import { Service } from './Service';
3
3
  /**
4
4
  * @title Spatial Processing Core API
@@ -6,6 +6,39 @@ import { Service } from './Service';
6
6
  * @baseUrl /sp
7
7
  */
8
8
  export declare class BulkOperationsService extends Service {
9
+ /**
10
+ * No description
11
+ *
12
+ * @tags BulkOperations
13
+ * @name BatchUpdateCatalogResources
14
+ * @operationId BulkOperationsController_BatchUpdateCatalogResources
15
+ * @summary Overrides resources in catalog.
16
+ * @request PUT:/bulk/catalog/updateResources
17
+ * @response `200` Success
18
+ */
19
+ batchUpdateCatalogResources(data: BatchResourcesCatalogDc): Promise<BulkOperationResultDc[]>;
20
+ /**
21
+ * No description
22
+ *
23
+ * @tags BulkOperations
24
+ * @name BatchAddResourcesToCatalog
25
+ * @operationId BulkOperationsController_BatchAddResourcesToCatalog
26
+ * @summary Add resources to catalog.
27
+ * @request POST:/bulk/catalog/addResources
28
+ * @response `200` Success
29
+ */
30
+ batchAddResourcesToCatalog(data: BatchResourcesCatalogDc): Promise<BulkOperationResultDc[]>;
31
+ /**
32
+ * No description
33
+ *
34
+ * @tags BulkOperations
35
+ * @name BatchDeleteResourcesFromCatalog
36
+ * @operationId BulkOperationsController_BatchDeleteResourcesFromCatalog
37
+ * @summary Delete resources to catalog.
38
+ * @request POST:/bulk/catalog/removeResources
39
+ * @response `200` Success
40
+ */
41
+ batchDeleteResourcesFromCatalog(data: BatchResourcesCatalogDc): Promise<BulkOperationResultDc[]>;
9
42
  /**
10
43
  * No description
11
44
  *
@@ -16,5 +49,5 @@ export declare class BulkOperationsService extends Service {
16
49
  * @request PUT:/bulk/resources/permissions
17
50
  * @response `200` Success
18
51
  */
19
- batchResourcesPermissionsSet(data: BatchResourcesAclDc): Promise<void>;
52
+ batchResourcesPermissionsSet(data: BatchResourcesAclDc): Promise<BulkOperationResultDc[]>;
20
53
  }
@@ -604,6 +604,17 @@ export interface BatchResourcesAclDc {
604
604
  /** A set of projects acl. */
605
605
  projects?: ResourceAclDc[];
606
606
  }
607
+ /**
608
+ * Provides bulk request to manage catalog resources.
609
+ */
610
+ export interface BatchResourcesCatalogDc {
611
+ /** List of layers. */
612
+ layers?: CatalogResourceDc[];
613
+ /** List of tables. */
614
+ tables?: CatalogResourceDc[];
615
+ /** List of projects. */
616
+ projects?: CatalogResourceDc[];
617
+ }
607
618
  /**
608
619
  * The class describes data contract of bookmark at the map.
609
620
  */
@@ -641,6 +652,17 @@ export declare type BufferTaskParametersDc = FeatureTaskParametersDc & {
641
652
  idAttributeName?: string;
642
653
  geometryAttributeName?: string;
643
654
  };
655
+ /**
656
+ * Provides set resources bulk operation status.
657
+ */
658
+ export interface BulkOperationResultDc {
659
+ /** Name of the resource. */
660
+ resourceName?: string;
661
+ /** Error while perform operation. */
662
+ error?: string;
663
+ /** Sets true. */
664
+ isSuccess?: boolean;
665
+ }
644
666
  export declare type CalculatedParameterDc = ParameterDcDouble & {
645
667
  type?: string;
646
668
  expression?: string;
@@ -655,6 +677,15 @@ export interface CatalogDataDc {
655
677
  /** The user name. */
656
678
  users: string[];
657
679
  }
680
+ /**
681
+ * Provides catalog resources with users.
682
+ */
683
+ export interface CatalogResourceDc {
684
+ /** Name of the resource to add. */
685
+ objectName: string;
686
+ /** Users list. */
687
+ users: string[];
688
+ }
658
689
  /**
659
690
  * The symbol that draws a feature as a circle.
660
691
  */
@@ -3333,11 +3364,8 @@ export declare enum ResourceTypeLink {
3333
3364
  export interface RoleInfoDc {
3334
3365
  /** Username. */
3335
3366
  name?: string;
3336
- /**
3337
- * The number of users in the role.
3338
- * @format int32
3339
- */
3340
- usersInRole?: number;
3367
+ /** The number of users in the role. */
3368
+ users?: string[];
3341
3369
  /**
3342
3370
  * Gets or sets date and time of creation.
3343
3371
  * @format date-time
@@ -3409,6 +3437,8 @@ export declare type ScaleBarElementDc = ModelElementDc & {
3409
3437
  export interface SearchedUserDc {
3410
3438
  /** Username. */
3411
3439
  username?: string;
3440
+ /** Own user role. */
3441
+ ownRole?: string;
3412
3442
  /** Photo. */
3413
3443
  photo?: string;
3414
3444
  }
@@ -5171,7 +5201,6 @@ export interface ConfirmChangeEmailParams {
5171
5201
  /** Confirmation code. */
5172
5202
  code: string;
5173
5203
  }
5174
- export declare type SetUserPasswordPayload = string;
5175
5204
  export interface ChangePasswordPayload {
5176
5205
  oldPassword: string;
5177
5206
  password: string;
@@ -5403,6 +5432,8 @@ export interface GetLayersListParams {
5403
5432
  geometryFilter?: string[];
5404
5433
  /** Filters layers list by users favorite. */
5405
5434
  isFavorite?: boolean;
5435
+ /** If set, returns for superuser layers for all users. */
5436
+ forAllUsers?: boolean;
5406
5437
  }
5407
5438
  export declare type SetPermissionsBatchPayload = ResourceAclDc[];
5408
5439
  export interface GetFeaturesParams {
@@ -5793,6 +5824,8 @@ export interface GetProjectsListParams {
5793
5824
  orderByFields?: string[];
5794
5825
  /** Filters projects list by users favorite. */
5795
5826
  isFavorite?: boolean;
5827
+ /** If set, returns for superuser projects for all users. */
5828
+ forAllUsers?: boolean;
5796
5829
  }
5797
5830
  export declare type SetPermissionsBatchBody = ResourceAclDc[];
5798
5831
  export interface SetPreviewBody {
@@ -5992,6 +6025,8 @@ export interface GetTableListParams {
5992
6025
  orderByFields?: string[];
5993
6026
  /** Filters tables list by users favorite. */
5994
6027
  isFavorite?: boolean;
6028
+ /** If set, returns for superuser tables for all users. */
6029
+ forAllUsers?: boolean;
5995
6030
  /** Filters layers by geometry types. */
5996
6031
  geometryFilter?: string[];
5997
6032
  }
@@ -197,6 +197,128 @@ let Service = function Service(http) {
197
197
  this.http = http;
198
198
  };
199
199
 
200
+ /**
201
+ * @title Spatial Processing Core API
202
+ * @version v0.6.0
203
+ * @baseUrl /sp
204
+ */
205
+
206
+ let BulkOperationsService = /*#__PURE__*/function (_Service) {
207
+ _inherits(BulkOperationsService, _Service);
208
+
209
+ var _super = /*#__PURE__*/_createSuper(BulkOperationsService);
210
+
211
+ function BulkOperationsService() {
212
+ _classCallCheck(this, BulkOperationsService);
213
+
214
+ return _super.apply(this, arguments);
215
+ }
216
+
217
+ _createClass(BulkOperationsService, [{
218
+ key: "batchUpdateCatalogResources",
219
+
220
+ /**
221
+ * No description
222
+ *
223
+ * @tags BulkOperations
224
+ * @name BatchUpdateCatalogResources
225
+ * @operationId BulkOperationsController_BatchUpdateCatalogResources
226
+ * @summary Overrides resources in catalog.
227
+ * @request PUT:/bulk/catalog/updateResources
228
+ * @response `200` Success
229
+ */
230
+ value: function batchUpdateCatalogResources(data) {
231
+ return this.http.put("/bulk/catalog/updateResources", data).json();
232
+ }
233
+ /**
234
+ * No description
235
+ *
236
+ * @tags BulkOperations
237
+ * @name BatchAddResourcesToCatalog
238
+ * @operationId BulkOperationsController_BatchAddResourcesToCatalog
239
+ * @summary Add resources to catalog.
240
+ * @request POST:/bulk/catalog/addResources
241
+ * @response `200` Success
242
+ */
243
+
244
+ }, {
245
+ key: "batchAddResourcesToCatalog",
246
+ value: function batchAddResourcesToCatalog(data) {
247
+ return this.http.post("/bulk/catalog/addResources", data).json();
248
+ }
249
+ /**
250
+ * No description
251
+ *
252
+ * @tags BulkOperations
253
+ * @name BatchDeleteResourcesFromCatalog
254
+ * @operationId BulkOperationsController_BatchDeleteResourcesFromCatalog
255
+ * @summary Delete resources to catalog.
256
+ * @request POST:/bulk/catalog/removeResources
257
+ * @response `200` Success
258
+ */
259
+
260
+ }, {
261
+ key: "batchDeleteResourcesFromCatalog",
262
+ value: function batchDeleteResourcesFromCatalog(data) {
263
+ return this.http.post("/bulk/catalog/removeResources", data).json();
264
+ }
265
+ /**
266
+ * No description
267
+ *
268
+ * @tags BulkOperations
269
+ * @name BatchResourcesPermissionsSet
270
+ * @operationId BulkOperationsController_BatchResourcesPermissionsSet
271
+ * @summary Perform resources set acl access batch operation.
272
+ * @request PUT:/bulk/resources/permissions
273
+ * @response `200` Success
274
+ */
275
+
276
+ }, {
277
+ key: "batchResourcesPermissionsSet",
278
+ value: function batchResourcesPermissionsSet(data) {
279
+ return this.http.put("/bulk/resources/permissions", data).json();
280
+ }
281
+ }]);
282
+
283
+ return BulkOperationsService;
284
+ }(Service);
285
+
286
+ let BulkOperations = /*#__PURE__*/function (_BulkOperationsServic) {
287
+ _inherits(BulkOperations, _BulkOperationsServic);
288
+
289
+ var _super = /*#__PURE__*/_createSuper(BulkOperations);
290
+
291
+ function BulkOperations() {
292
+ _classCallCheck(this, BulkOperations);
293
+
294
+ return _super.apply(this, arguments);
295
+ }
296
+
297
+ _createClass(BulkOperations, [{
298
+ key: "updatePermissions",
299
+ value: function updatePermissions(data) {
300
+ return this.batchResourcesPermissionsSet(data);
301
+ }
302
+ }, {
303
+ key: "addToCatalog",
304
+ value: function addToCatalog(data) {
305
+ return this.batchAddResourcesToCatalog(data);
306
+ }
307
+ }, {
308
+ key: "deleteFromCatalog",
309
+ value: function deleteFromCatalog(data) {
310
+ return this.batchDeleteResourcesFromCatalog(data);
311
+ }
312
+ }, {
313
+ key: "updateCatalogResources",
314
+ value: function updateCatalogResources(data) {
315
+ return this.batchUpdateCatalogResources(data);
316
+ }
317
+ }]);
318
+
319
+ return BulkOperations;
320
+ }(BulkOperationsService);
321
+
200
322
  /**
201
323
  * @title Spatial Processing Core API
202
324
  * @version v0.6.0
@@ -4651,14 +4773,14 @@ let AccountService = /*#__PURE__*/function (_Service) {
4651
4773
  * @name SetUserPassword
4652
4774
  * @operationId AccountController_SetUserPassword
4653
4775
  * @summary Set user password.
4654
- * @request PATCH:/account/user/{username}/password
4776
+ * @request PATCH:/account/password/set
4655
4777
  * @response `200` Success
4656
4778
  */
4657
4779
 
4658
4780
  }, {
4659
4781
  key: "setUserPassword",
4660
- value: function setUserPassword(username, data) {
4661
- return this.http.patch("/account/user/" + username + "/password", data).then(() => {});
4782
+ value: function setUserPassword(data) {
4783
+ return this.http.patch("/account/password/set", data).then(() => {});
4662
4784
  }
4663
4785
  /**
4664
4786
  * No description
@@ -5006,7 +5128,10 @@ let Account = /*#__PURE__*/function (_AccountService) {
5006
5128
  }, {
5007
5129
  key: "setPassword",
5008
5130
  value: function setPassword(password) {
5009
- return this.setUserPassword(this.username, password);
5131
+ return this.setUserPassword({
5132
+ username: this.username,
5133
+ password
5134
+ });
5010
5135
  }
5011
5136
  }, {
5012
5137
  key: "username",
@@ -6203,6 +6328,7 @@ let Api = /*#__PURE__*/function (_EventEmitter) {
6203
6328
  _this.styles = new Styles(_this.http);
6204
6329
  _this.account = new Account(_this.http);
6205
6330
  _this.accountPreview = new AccountPreview(_this.http, _this.account);
6331
+ _this.bulk = new BulkOperations(_this.http);
6206
6332
  _this.security = new Security(_this.http, _this.account);
6207
6333
  _this.notification = new Notification(_this.http);
6208
6334
  _this.scheduler = new Scheduler(_this.http);
@@ -6983,6 +7109,7 @@ exports.API_USER_INFO_KEY = API_USER_INFO_KEY;
6983
7109
  exports.Account = Account;
6984
7110
  exports.AccountPreview = AccountPreview;
6985
7111
  exports.Api = Api;
7112
+ exports.BulkOperations = BulkOperations;
6986
7113
  exports.ClientSettings = ClientSettings;
6987
7114
  exports.EvergisDynamicLayer = EvergisDynamicLayer;
6988
7115
  exports.EvergisTileLayer = EvergisTileLayer;