@explo-tech/fido-api 0.0.6 → 0.0.8

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/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ nodejs 16.17.1
package/index.ts CHANGED
@@ -8,8 +8,10 @@ export type { OpenAPIConfig } from './core/OpenAPI';
8
8
 
9
9
  export type { BooleanPropertyValue } from './models/BooleanPropertyValue';
10
10
  export type { ClientError } from './models/ClientError';
11
+ export type { Computation } from './models/Computation';
11
12
  export type { ComputedViewRunRequest } from './models/ComputedViewRunRequest';
12
13
  export type { DataPage } from './models/DataPage';
14
+ export type { DataRecord } from './models/DataRecord';
13
15
  export type { DataRequestParameters } from './models/DataRequestParameters';
14
16
  export type { DataResponseMetadata } from './models/DataResponseMetadata';
15
17
  export type { DataSchema } from './models/DataSchema';
@@ -23,24 +25,27 @@ export type { DateTimePropertyValue } from './models/DateTimePropertyValue';
23
25
  export type { DecimalPropertyValue } from './models/DecimalPropertyValue';
24
26
  export type { DoublePropertyValue } from './models/DoublePropertyValue';
25
27
  export type { Duration } from './models/Duration';
26
- export type { Instant } from './models/Instant';
28
+ export type { Filter } from './models/Filter';
27
29
  export type { IntegerPropertyValue } from './models/IntegerPropertyValue';
28
30
  export type { LocalDate } from './models/LocalDate';
29
31
  export type { Namespace } from './models/Namespace';
30
32
  export type { NamespaceRequest } from './models/NamespaceRequest';
31
33
  export type { NamespaceResponse } from './models/NamespaceResponse';
32
34
  export type { NamespaceResponseMetadata } from './models/NamespaceResponseMetadata';
35
+ export type { OffsetDateTime } from './models/OffsetDateTime';
33
36
  export type { PagingConfiguration } from './models/PagingConfiguration';
37
+ export type { PasswordAuthentication } from './models/PasswordAuthentication';
34
38
  export type { Postgres } from './models/Postgres';
35
39
  export type { PostgresAuthentication } from './models/PostgresAuthentication';
36
- export type { PostgresPasswordAuthentication } from './models/PostgresPasswordAuthentication';
40
+ export type { Property } from './models/Property';
37
41
  export type { PropertySchema } from './models/PropertySchema';
38
42
  export { PropertyType } from './models/PropertyType';
39
43
  export type { PropertyValue } from './models/PropertyValue';
40
44
  export type { PublicTunnel } from './models/PublicTunnel';
41
45
  export type { QueryExecutionResponse } from './models/QueryExecutionResponse';
42
- export type { Record } from './models/Record';
43
46
  export type { RequestTelemetry } from './models/RequestTelemetry';
47
+ export type { Sort } from './models/Sort';
48
+ export { SortDirection } from './models/SortDirection';
44
49
  export type { SSHAuthentication } from './models/SSHAuthentication';
45
50
  export type { SSHTunnel } from './models/SSHTunnel';
46
51
  export type { StringPropertyValue } from './models/StringPropertyValue';
@@ -0,0 +1,14 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { Filter } from './Filter';
6
+ import type { Property } from './Property';
7
+ import type { Sort } from './Sort';
8
+
9
+ export type Computation = {
10
+ properties: Array<Property>;
11
+ filter: Filter | null;
12
+ sorts: Array<Sort>;
13
+ };
14
+
@@ -2,6 +2,7 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
+ import type { Computation } from './Computation';
5
6
  import type { DataRequestParameters } from './DataRequestParameters';
6
7
 
7
8
  export type ComputedViewRunRequest = {
@@ -9,5 +10,6 @@ export type ComputedViewRunRequest = {
9
10
  tableIdentifier: string;
10
11
  dataRequestParameters: DataRequestParameters;
11
12
  queryContext: Record<string, any>;
13
+ computation: Computation | null;
12
14
  };
13
15
 
@@ -2,9 +2,9 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { Record } from './Record';
5
+ import type { DataRecord } from './DataRecord';
6
6
 
7
7
  export type DataPage = {
8
- records: Array<Record>;
8
+ dataRecords: Array<DataRecord>;
9
9
  };
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  import type { PropertyValue } from './PropertyValue';
6
6
 
7
- export type Record = {
7
+ export type DataRecord = {
8
8
  propertyValues: Record<string, Array<PropertyValue>>;
9
9
  };
10
10
 
@@ -2,9 +2,9 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { Instant } from './Instant';
5
+ import type { OffsetDateTime } from './OffsetDateTime';
6
6
 
7
7
  export type DateTimePropertyValue = {
8
- value: Instant;
8
+ value: OffsetDateTime;
9
9
  };
10
10
 
@@ -2,4 +2,4 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- export type Duration = string;
5
+ export type Duration = Duration;
@@ -0,0 +1,5 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Filter = Record<string, any>;
@@ -2,4 +2,4 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- export type Instant = string;
5
+ export type OffsetDateTime = string;
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- export type PostgresPasswordAuthentication = {
5
+ export type PasswordAuthentication = {
6
6
  username: string;
7
7
  password: string;
8
8
  };
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- import type { PostgresPasswordAuthentication } from './PostgresPasswordAuthentication';
5
+ import type { PasswordAuthentication } from './PasswordAuthentication';
6
6
 
7
- export type PostgresAuthentication = PostgresPasswordAuthentication;
7
+ export type PostgresAuthentication = PasswordAuthentication;
8
8
 
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Property = {
6
+ propertyId: string;
7
+ };
8
+
@@ -9,6 +9,7 @@ export enum PropertyType {
9
9
  DECIMAL = 'DECIMAL',
10
10
  DOUBLE = 'DOUBLE',
11
11
  INTEGER = 'INTEGER',
12
+ LONG = 'LONG',
12
13
  STRING = 'STRING',
13
14
  UNSUPPORTED = 'UNSUPPORTED',
14
15
  }
package/models/Sort.ts ADDED
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { SortDirection } from './SortDirection';
6
+
7
+ export type Sort = {
8
+ sortDirection: SortDirection;
9
+ propertyId: string;
10
+ };
11
+
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export enum SortDirection {
6
+ ASCENDING = 'ASCENDING',
7
+ DESCENDING = 'DESCENDING',
8
+ }
package/models/UUID.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
 
5
- export type UUID = string;
5
+ export type UUID = UUID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explo-tech/fido-api",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Fido api",
5
5
  "homepage": "https://github.com/trust-kaz/fido",
6
6
  "license": "MIT",
@@ -13,21 +13,21 @@ import { request as __request } from '../core/request';
13
13
  export class QueryResourceService {
14
14
 
15
15
  /**
16
- * Gets a preview of a specified table in a Data Source
16
+ * Runs a provided query against the provided data source
17
17
  * @param dataSourceId
18
18
  * @param namespaceId
19
19
  * @param requestBody
20
- * @returns QueryExecutionResponse A DataPage of the resulting Data Source's data
20
+ * @returns QueryExecutionResponse A DataPage of the provided query
21
21
  * @throws ApiError
22
22
  */
23
- public static getDatasourceTablePreview(
23
+ public static runComputedView(
24
24
  dataSourceId: UUID,
25
25
  namespaceId: UUID,
26
- requestBody?: DataSourceTablePreviewRequest,
26
+ requestBody?: ComputedViewRunRequest,
27
27
  ): CancelablePromise<QueryExecutionResponse> {
28
28
  return __request(OpenAPI, {
29
29
  method: 'POST',
30
- url: '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/_preview',
30
+ url: '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/preview',
31
31
  path: {
32
32
  'dataSourceId': dataSourceId,
33
33
  'namespaceId': namespaceId,
@@ -38,21 +38,21 @@ export class QueryResourceService {
38
38
  }
39
39
 
40
40
  /**
41
- * Runs a provided query against the provided data source
41
+ * Gets a preview of a specified table in a Data Source
42
42
  * @param dataSourceId
43
43
  * @param namespaceId
44
44
  * @param requestBody
45
- * @returns QueryExecutionResponse A DataPage of the provided query
45
+ * @returns QueryExecutionResponse A DataPage of the resulting Data Source's data
46
46
  * @throws ApiError
47
47
  */
48
- public static runComputedView(
48
+ public static getDatasourceTablePreview(
49
49
  dataSourceId: UUID,
50
50
  namespaceId: UUID,
51
- requestBody?: ComputedViewRunRequest,
51
+ requestBody?: DataSourceTablePreviewRequest,
52
52
  ): CancelablePromise<QueryExecutionResponse> {
53
53
  return __request(OpenAPI, {
54
54
  method: 'POST',
55
- url: '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/_run',
55
+ url: '/v1/namespaces/{namespaceId}/data-sources/{dataSourceId}/preview-table',
56
56
  path: {
57
57
  'dataSourceId': dataSourceId,
58
58
  'namespaceId': namespaceId,