@evergis/api 4.1.19 → 4.1.21

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
@@ -23,11 +23,8 @@ export declare enum UrlPath {
23
23
  Presentation = "/presentation",
24
24
  Portal = "/portal"
25
25
  }
26
- export type SocAuthNetwork = "vk" | "facebook" | "google";
26
+ export type SocAuthNetwork = "vk" | "facebook" | "google" | "yandex";
27
27
  export declare class Api extends EventEmitter {
28
- protected readonly http: HttpClient;
29
- private readonly wsUrl;
30
- private readonly urlPath;
31
28
  readonly url: string;
32
29
  readonly layers: Layers;
33
30
  readonly tables: Tables;
@@ -57,7 +54,12 @@ export declare class Api extends EventEmitter {
57
54
  readonly dataSource: DataSourceService;
58
55
  readonly remoteTaskManager: RemoteTaskManager;
59
56
  readonly cameras: Cameras;
57
+ protected readonly http: HttpClient;
58
+ private readonly wsUrl;
59
+ private readonly urlPath;
60
60
  constructor({ url, wsUrl, wsKeepAlive, snappingHubUrl, http, urlPath, httpOptions, }: ApiParams);
61
+ get isShared(): boolean;
62
+ get isPresentation(): boolean;
61
63
  init({ authParams, authQueryParams, connectWs, fetchSettings, fetchUser, useJwt, }: {
62
64
  authParams?: LoginDc;
63
65
  authQueryParams?: AuthenticateParams;
@@ -73,6 +75,4 @@ export declare class Api extends EventEmitter {
73
75
  connectSignalR(): Promise<void>;
74
76
  logout(): Promise<void>;
75
77
  private defineUrlPath;
76
- get isShared(): boolean;
77
- get isPresentation(): boolean;
78
78
  }
@@ -1,5 +1,5 @@
1
1
  import { Service } from './Service';
2
- import { AttributeDefinitionDc, AvailiableValuesDc, EqlRequestDc, GetAvailiableLayerParametersParams, GetLayerParameters1Params, GetLayerParametersParams, GetPagedQueryResultParams, GetQueryHistoryParams, GetVectorTileParams, PagedFeaturesListDc, PagedListQueryHistoryDc, RemoveLayerParameterValueParams, SetLayerParameterValueParams, SetLayerParametersParams, SetLayerParametersPayload } from './data-contracts';
2
+ import { AttributeDefinitionDc, AvailiableValuesDc, EqlDependenciesDc, EqlRequestDc, GetAvailiableLayerParametersParams, GetLayerParameters1Params, GetLayerParametersParams, GetPagedQueryResultParams, GetQueryHistoryParams, GetVectorTileParams, PagedFeaturesListDc, PagedListQueryHistoryDc, RemoveLayerParameterValueParams, SetLayerParameterValueParams, SetLayerParametersParams, SetLayerParametersPayload } from './data-contracts';
3
3
  /**
4
4
  * @title Spatial Processing Core API
5
5
  * @version 1.5.1.0
@@ -30,6 +30,18 @@ export declare class EqlService extends Service {
30
30
  * @response `200` OK
31
31
  */
32
32
  getQueryDescription(data: EqlRequestDc): Promise<Record<string, AttributeDefinitionDc>>;
33
+ /**
34
+ * No description
35
+ *
36
+ * @tags Eql
37
+ * @name GetQueryDependencies
38
+ * @operationId EqlController_GetQueryDependencies
39
+ * @summary Get EQL result dependencies.
40
+ * @request POST:/eql/dependencies
41
+ * @secure
42
+ * @response `200` OK
43
+ */
44
+ getQueryDependencies(data: EqlRequestDc): Promise<EqlDependenciesDc>;
33
45
  /**
34
46
  * No description
35
47
  *
@@ -1713,6 +1713,24 @@ export type EqlAttributesConfigurationDc = AttributesConfigurationDc & {
1713
1713
  /** Configuration of the attributes of the layer. */
1714
1714
  attributes?: EqlAttributeConfigurationDc[] | null;
1715
1715
  };
1716
+ /**
1717
+ * CTE dependency.
1718
+ */
1719
+ export interface EqlCteDependencyDc {
1720
+ /** Name. */
1721
+ name?: string;
1722
+ /** Tables dependencies. */
1723
+ tables?: EqlTableDependencyDc[];
1724
+ }
1725
+ /**
1726
+ * EQL dependencies.
1727
+ */
1728
+ export interface EqlDependenciesDc {
1729
+ /** Tables dependencies. */
1730
+ tables?: EqlTableDependencyDc[];
1731
+ /** CTE dependencies. */
1732
+ ctes?: EqlCteDependencyDc[];
1733
+ }
1716
1734
  /**
1717
1735
  * EQL requst data contract.
1718
1736
  */
@@ -1747,6 +1765,17 @@ export interface EqlRequestDc {
1747
1765
  /** EQL query parameters. */
1748
1766
  parameters?: Record<string, any>;
1749
1767
  }
1768
+ /**
1769
+ * Table dependency data contract.
1770
+ */
1771
+ export interface EqlTableDependencyDc {
1772
+ /** Schema. */
1773
+ schema?: string;
1774
+ /** Name. */
1775
+ name?: string;
1776
+ /** Alias. */
1777
+ alias?: string;
1778
+ }
1750
1779
  /**
1751
1780
  * Resource error details.
1752
1781
  */
@@ -7772,8 +7801,8 @@ export type RunScriptPayload = any;
7772
7801
  export interface RunScriptParams {
7773
7802
  /** Python resource id. */
7774
7803
  resourceId?: string;
7775
- /** Script name. */
7776
- scriptName?: string;
7804
+ /** File name. */
7805
+ fileName?: string;
7777
7806
  /** Method name. */
7778
7807
  methodName?: string;
7779
7808
  }
package/dist/api.esm.js CHANGED
@@ -1194,6 +1194,20 @@ class EqlService extends Service {
1194
1194
  getQueryDescription(data) {
1195
1195
  return this.http.post(`/eql/description`, data).json();
1196
1196
  }
1197
+ /**
1198
+ * No description
1199
+ *
1200
+ * @tags Eql
1201
+ * @name GetQueryDependencies
1202
+ * @operationId EqlController_GetQueryDependencies
1203
+ * @summary Get EQL result dependencies.
1204
+ * @request POST:/eql/dependencies
1205
+ * @secure
1206
+ * @response `200` OK
1207
+ */
1208
+ getQueryDependencies(data) {
1209
+ return this.http.post(`/eql/dependencies`, data).json();
1210
+ }
1197
1211
  /**
1198
1212
  * No description
1199
1213
  *
@@ -1760,7 +1774,14 @@ class CatalogService extends Service {
1760
1774
 
1761
1775
  class FileUpload extends CatalogService {
1762
1776
  upload(file, rewrite, parentId, fileName) {
1763
- return this.createFile1({ file, rewrite: !!rewrite, parentId, fileName });
1777
+ const props = { file, rewrite: !!rewrite };
1778
+ if (parentId) {
1779
+ props.parentId = parentId;
1780
+ }
1781
+ if (fileName) {
1782
+ props.fileName = fileName;
1783
+ }
1784
+ return this.createFile1(props);
1764
1785
  }
1765
1786
  replaceFile(params) {
1766
1787
  return this.createFile(params);
@@ -2562,9 +2583,6 @@ const SHARED_PORT = "8082";
2562
2583
  const URL_PATHS = Object.values(UrlPath);
2563
2584
  const DEFAULT_URL_PATH = URL_PATHS[0];
2564
2585
  class Api extends EventEmitter {
2565
- http;
2566
- wsUrl;
2567
- urlPath;
2568
2586
  url;
2569
2587
  layers;
2570
2588
  tables;
@@ -2594,6 +2612,9 @@ class Api extends EventEmitter {
2594
2612
  dataSource;
2595
2613
  remoteTaskManager;
2596
2614
  cameras;
2615
+ http;
2616
+ wsUrl;
2617
+ urlPath;
2597
2618
  constructor({ url, wsUrl, wsKeepAlive, snappingHubUrl, http, urlPath, httpOptions, }) {
2598
2619
  super();
2599
2620
  const { hooks } = httpOptions || {};
@@ -2698,6 +2719,12 @@ class Api extends EventEmitter {
2698
2719
  .build()
2699
2720
  : null;
2700
2721
  }
2722
+ get isShared() {
2723
+ return this.urlPath === UrlPath.Shared;
2724
+ }
2725
+ get isPresentation() {
2726
+ return this.urlPath === UrlPath.Presentation || window.location.port === SHARED_PORT;
2727
+ }
2701
2728
  async init({ authParams, authQueryParams, connectWs, fetchSettings, fetchUser, useJwt, }) {
2702
2729
  try {
2703
2730
  await this.account.login(authParams, authQueryParams, useJwt);
@@ -2763,12 +2790,6 @@ class Api extends EventEmitter {
2763
2790
  const urlPath = firstPath ? `/${firstPath}` : void 0;
2764
2791
  return urlPath && URL_PATHS.includes(urlPath) ? urlPath : DEFAULT_URL_PATH;
2765
2792
  }
2766
- get isShared() {
2767
- return this.urlPath === UrlPath.Shared;
2768
- }
2769
- get isPresentation() {
2770
- return this.urlPath === UrlPath.Presentation || window.location.port === SHARED_PORT;
2771
- }
2772
2793
  }
2773
2794
 
2774
2795
  const addSubDomainToLocation = (subDomain) => `${window.location.protocol}//${subDomain}.${window.location.host}`;