@explo-tech/fido-api 0.8.5 → 1.0.0
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/core/ApiError.ts +0 -1
- package/core/ApiRequestOptions.ts +0 -1
- package/core/ApiResult.ts +0 -1
- package/core/CancelablePromise.ts +0 -1
- package/core/OpenAPI.ts +5 -6
- package/core/request.ts +15 -28
- package/index.ts +0 -1
- package/models/AggregateProperty.ts +0 -1
- package/models/Aggregation.ts +0 -1
- package/models/AggregationOption.ts +0 -1
- package/models/And.ts +0 -1
- package/models/BaseComputation.ts +0 -1
- package/models/BooleanPropertyValue.ts +0 -1
- package/models/CalendarInterval.ts +0 -1
- package/models/CalendarIntervalGrouping.ts +0 -1
- package/models/ClientError.ts +0 -1
- package/models/Computation.ts +0 -1
- package/models/ComputedView.ts +3 -4
- package/models/DataPage.ts +0 -1
- package/models/DataRecord.ts +0 -1
- package/models/DataRequestParameters.ts +0 -1
- package/models/DataResponseMetadata.ts +0 -1
- package/models/DataSchema.ts +0 -1
- package/models/DataSource.ts +0 -1
- package/models/DataSourceConfiguration.ts +0 -1
- package/models/DataSourceRequest.ts +0 -1
- package/models/DataSourceResponse.ts +0 -1
- package/models/DatePart.ts +0 -1
- package/models/DatePartGrouping.ts +0 -1
- package/models/DatePropertyValue.ts +0 -1
- package/models/DateTimePropertyValue.ts +0 -1
- package/models/DecimalIntervalGrouping.ts +0 -1
- package/models/DecimalPropertyValue.ts +0 -1
- package/models/DoublePropertyValue.ts +0 -1
- package/models/Equal.ts +0 -1
- package/models/Filter.ts +0 -1
- package/models/GreaterThan.ts +0 -1
- package/models/GreaterThanOrEqual.ts +0 -1
- package/models/Grouping.ts +0 -1
- package/models/In.ts +0 -1
- package/models/IntegerIntervalGrouping.ts +0 -1
- package/models/IntegerPropertyValue.ts +0 -1
- package/models/LateBoundEqual.ts +0 -1
- package/models/LateBoundGreaterThan.ts +0 -1
- package/models/LateBoundGreaterThanOrEqual.ts +0 -1
- package/models/LateBoundIn.ts +0 -1
- package/models/LateBoundLessThan.ts +0 -1
- package/models/LateBoundLessThanOrEqual.ts +0 -1
- package/models/LateBoundStringContains.ts +0 -1
- package/models/LessThan.ts +0 -1
- package/models/LessThanOrEqual.ts +0 -1
- package/models/ListNamespacesResponse.ts +0 -1
- package/models/ListViewsRequest.ts +0 -1
- package/models/ListViewsResponse.ts +0 -1
- package/models/MSS.ts +0 -1
- package/models/MSSAuthentication.ts +0 -1
- package/models/MySql.ts +0 -1
- package/models/MySqlAuthentication.ts +0 -1
- package/models/Namespace.ts +0 -1
- package/models/NamespaceRequest.ts +0 -1
- package/models/NamespaceResponse.ts +0 -1
- package/models/NamespaceResponseMetadata.ts +0 -1
- package/models/Not.ts +0 -1
- package/models/Null.ts +0 -1
- package/models/Or.ts +0 -1
- package/models/PagingConfiguration.ts +0 -1
- package/models/PasswordAuthentication.ts +0 -1
- package/models/Pivot.ts +0 -1
- package/models/PivotColumn.ts +0 -1
- package/models/PivotValue.ts +0 -1
- package/models/Postgres.ts +0 -1
- package/models/PostgresAuthentication.ts +0 -1
- package/models/Property.ts +0 -1
- package/models/PropertySchema.ts +0 -1
- package/models/PropertyType.ts +0 -1
- package/models/PropertyValue.ts +0 -1
- package/models/PublicTunnel.ts +0 -1
- package/models/QueryExecutionResponse.ts +0 -1
- package/models/QueryPreviewRequest.ts +0 -1
- package/models/RequestTelemetry.ts +0 -1
- package/models/SSHAuthentication.ts +0 -1
- package/models/SSHTunnel.ts +0 -1
- package/models/Sort.ts +0 -1
- package/models/SortDirection.ts +0 -1
- package/models/SourceProperty.ts +0 -1
- package/models/StringContains.ts +0 -1
- package/models/StringPropertyValue.ts +0 -1
- package/models/TablePreviewRequest.ts +0 -1
- package/models/TableView.ts +3 -4
- package/models/Tenant.ts +0 -1
- package/models/TenantKey.ts +0 -1
- package/models/TenantPrivateKeyAuthentication.ts +0 -1
- package/models/TenantRequest.ts +0 -1
- package/models/TenantResponse.ts +0 -1
- package/models/TestConnectionRequest.ts +0 -1
- package/models/TestConnectionResponse.ts +0 -1
- package/models/Tunnel.ts +0 -1
- package/models/UUID.ts +0 -1
- package/models/ValueGrouping.ts +0 -1
- package/models/VendorPrivateKeyAuthentication.ts +0 -1
- package/models/View.ts +6 -5
- package/models/ViewRequest.ts +8 -2
- package/models/ViewResponse.ts +11 -8
- package/models/ViewRunRequest.ts +0 -1
- package/package.json +1 -1
- package/services/DataSourceResourceService.ts +0 -1
- package/services/HealthResourceService.ts +0 -1
- package/services/ListViewsResourceService.ts +0 -1
- package/services/NamespaceResourceService.ts +0 -1
- package/services/QueryResourceService.ts +0 -1
- package/services/TenantResourceService.ts +0 -1
- package/services/TestConnectionResourceService.ts +0 -1
- package/services/ViewResourceService.ts +0 -1
package/core/ApiError.ts
CHANGED
package/core/ApiResult.ts
CHANGED
package/core/OpenAPI.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
@@ -12,11 +11,11 @@ export type OpenAPIConfig = {
|
|
|
12
11
|
VERSION: string;
|
|
13
12
|
WITH_CREDENTIALS: boolean;
|
|
14
13
|
CREDENTIALS: 'include' | 'omit' | 'same-origin';
|
|
15
|
-
TOKEN?: string | Resolver<string
|
|
16
|
-
USERNAME?: string | Resolver<string
|
|
17
|
-
PASSWORD?: string | Resolver<string
|
|
18
|
-
HEADERS?: Headers | Resolver<Headers
|
|
19
|
-
ENCODE_PATH?: (
|
|
14
|
+
TOKEN?: string | Resolver<string>;
|
|
15
|
+
USERNAME?: string | Resolver<string>;
|
|
16
|
+
PASSWORD?: string | Resolver<string>;
|
|
17
|
+
HEADERS?: Headers | Resolver<Headers>;
|
|
18
|
+
ENCODE_PATH?: (path: string) => string;
|
|
20
19
|
};
|
|
21
20
|
|
|
22
21
|
export const OpenAPI: OpenAPIConfig = {
|
package/core/request.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
@@ -9,19 +8,19 @@ import { CancelablePromise } from './CancelablePromise';
|
|
|
9
8
|
import type { OnCancel } from './CancelablePromise';
|
|
10
9
|
import type { OpenAPIConfig } from './OpenAPI';
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
const isDefined = <T>(value: T | null | undefined): value is Exclude<T, null | undefined> => {
|
|
13
12
|
return value !== undefined && value !== null;
|
|
14
13
|
};
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
const isString = (value: any): value is string => {
|
|
17
16
|
return typeof value === 'string';
|
|
18
17
|
};
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
const isStringWithValue = (value: any): value is string => {
|
|
21
20
|
return isString(value) && value !== '';
|
|
22
21
|
};
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
const isBlob = (value: any): value is Blob => {
|
|
25
24
|
return (
|
|
26
25
|
typeof value === 'object' &&
|
|
27
26
|
typeof value.type === 'string' &&
|
|
@@ -34,11 +33,11 @@ export const isBlob = (value: any): value is Blob => {
|
|
|
34
33
|
);
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
const isFormData = (value: any): value is FormData => {
|
|
38
37
|
return value instanceof FormData;
|
|
39
38
|
};
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
const base64 = (str: string): string => {
|
|
42
41
|
try {
|
|
43
42
|
return btoa(str);
|
|
44
43
|
} catch (err) {
|
|
@@ -47,7 +46,7 @@ export const base64 = (str: string): string => {
|
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
const getQueryString = (params: Record<string, any>): string => {
|
|
51
50
|
const qs: string[] = [];
|
|
52
51
|
|
|
53
52
|
const append = (key: string, value: any) => {
|
|
@@ -100,7 +99,7 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => {
|
|
|
100
99
|
return url;
|
|
101
100
|
};
|
|
102
101
|
|
|
103
|
-
|
|
102
|
+
const getFormData = (options: ApiRequestOptions): FormData | undefined => {
|
|
104
103
|
if (options.formData) {
|
|
105
104
|
const formData = new FormData();
|
|
106
105
|
|
|
@@ -129,14 +128,14 @@ export const getFormData = (options: ApiRequestOptions): FormData | undefined =>
|
|
|
129
128
|
|
|
130
129
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
131
130
|
|
|
132
|
-
|
|
131
|
+
const resolve = async <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>): Promise<T | undefined> => {
|
|
133
132
|
if (typeof resolver === 'function') {
|
|
134
133
|
return (resolver as Resolver<T>)(options);
|
|
135
134
|
}
|
|
136
135
|
return resolver;
|
|
137
136
|
};
|
|
138
137
|
|
|
139
|
-
|
|
138
|
+
const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise<Headers> => {
|
|
140
139
|
const token = await resolve(options, config.TOKEN);
|
|
141
140
|
const username = await resolve(options, config.USERNAME);
|
|
142
141
|
const password = await resolve(options, config.PASSWORD);
|
|
@@ -177,7 +176,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
|
|
|
177
176
|
return new Headers(headers);
|
|
178
177
|
};
|
|
179
178
|
|
|
180
|
-
|
|
179
|
+
const getRequestBody = (options: ApiRequestOptions): any => {
|
|
181
180
|
if (options.body !== undefined) {
|
|
182
181
|
if (options.mediaType?.includes('/json')) {
|
|
183
182
|
return JSON.stringify(options.body)
|
|
@@ -217,7 +216,7 @@ export const sendRequest = async (
|
|
|
217
216
|
return await fetch(url, request);
|
|
218
217
|
};
|
|
219
218
|
|
|
220
|
-
|
|
219
|
+
const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => {
|
|
221
220
|
if (responseHeader) {
|
|
222
221
|
const content = response.headers.get(responseHeader);
|
|
223
222
|
if (isString(content)) {
|
|
@@ -227,7 +226,7 @@ export const getResponseHeader = (response: Response, responseHeader?: string):
|
|
|
227
226
|
return undefined;
|
|
228
227
|
};
|
|
229
228
|
|
|
230
|
-
|
|
229
|
+
const getResponseBody = async (response: Response): Promise<any> => {
|
|
231
230
|
if (response.status !== 204) {
|
|
232
231
|
try {
|
|
233
232
|
const contentType = response.headers.get('Content-Type');
|
|
@@ -247,7 +246,7 @@ export const getResponseBody = async (response: Response): Promise<any> => {
|
|
|
247
246
|
return undefined;
|
|
248
247
|
};
|
|
249
248
|
|
|
250
|
-
|
|
249
|
+
const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => {
|
|
251
250
|
const errors: Record<number, string> = {
|
|
252
251
|
400: 'Bad Request',
|
|
253
252
|
401: 'Unauthorized',
|
|
@@ -265,19 +264,7 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult):
|
|
|
265
264
|
}
|
|
266
265
|
|
|
267
266
|
if (!result.ok) {
|
|
268
|
-
|
|
269
|
-
const errorStatusText = result.statusText ?? 'unknown';
|
|
270
|
-
const errorBody = (() => {
|
|
271
|
-
try {
|
|
272
|
-
return JSON.stringify(result.body, null, 2);
|
|
273
|
-
} catch (e) {
|
|
274
|
-
return undefined;
|
|
275
|
-
}
|
|
276
|
-
})();
|
|
277
|
-
|
|
278
|
-
throw new ApiError(options, result,
|
|
279
|
-
`Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`
|
|
280
|
-
);
|
|
267
|
+
throw new ApiError(options, result, 'Generic Error');
|
|
281
268
|
}
|
|
282
269
|
};
|
|
283
270
|
|
package/index.ts
CHANGED
package/models/Aggregation.ts
CHANGED
package/models/And.ts
CHANGED
package/models/ClientError.ts
CHANGED
package/models/Computation.ts
CHANGED
package/models/ComputedView.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
@@ -9,9 +8,9 @@ export type ComputedView = {
|
|
|
9
8
|
name: string;
|
|
10
9
|
description: string | null;
|
|
11
10
|
columnDefinitions: Array<PropertySchema>;
|
|
12
|
-
readonly id?: string;
|
|
13
|
-
readonly namespaceId?: string;
|
|
14
|
-
'@type':
|
|
11
|
+
readonly id?: string | null;
|
|
12
|
+
readonly namespaceId?: string | null;
|
|
13
|
+
'@type': 'computed-view';
|
|
15
14
|
query: string;
|
|
16
15
|
};
|
|
17
16
|
|
package/models/DataPage.ts
CHANGED
package/models/DataRecord.ts
CHANGED
package/models/DataSchema.ts
CHANGED
package/models/DataSource.ts
CHANGED
package/models/DatePart.ts
CHANGED
package/models/Equal.ts
CHANGED
package/models/Filter.ts
CHANGED
package/models/GreaterThan.ts
CHANGED
package/models/Grouping.ts
CHANGED
package/models/In.ts
CHANGED
package/models/LateBoundEqual.ts
CHANGED
package/models/LateBoundIn.ts
CHANGED
package/models/LessThan.ts
CHANGED
package/models/MSS.ts
CHANGED
package/models/MySql.ts
CHANGED
package/models/Namespace.ts
CHANGED
package/models/Not.ts
CHANGED
package/models/Null.ts
CHANGED
package/models/Or.ts
CHANGED
package/models/Pivot.ts
CHANGED
package/models/PivotColumn.ts
CHANGED
package/models/PivotValue.ts
CHANGED
package/models/Postgres.ts
CHANGED
package/models/Property.ts
CHANGED
package/models/PropertySchema.ts
CHANGED
package/models/PropertyType.ts
CHANGED
package/models/PropertyValue.ts
CHANGED
package/models/PublicTunnel.ts
CHANGED
package/models/SSHTunnel.ts
CHANGED
package/models/Sort.ts
CHANGED
package/models/SortDirection.ts
CHANGED
package/models/SourceProperty.ts
CHANGED
package/models/StringContains.ts
CHANGED
package/models/TableView.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
@@ -9,9 +8,9 @@ export type TableView = {
|
|
|
9
8
|
name: string;
|
|
10
9
|
description: string | null;
|
|
11
10
|
columnDefinitions: Array<PropertySchema>;
|
|
12
|
-
readonly id?: string;
|
|
13
|
-
readonly namespaceId?: string;
|
|
14
|
-
'@type':
|
|
11
|
+
readonly id?: string | null;
|
|
12
|
+
readonly namespaceId?: string | null;
|
|
13
|
+
'@type': 'table-view';
|
|
15
14
|
tableName: string;
|
|
16
15
|
};
|
|
17
16
|
|
package/models/Tenant.ts
CHANGED
package/models/TenantKey.ts
CHANGED
package/models/TenantRequest.ts
CHANGED
package/models/TenantResponse.ts
CHANGED
package/models/Tunnel.ts
CHANGED
package/models/UUID.ts
CHANGED
package/models/ValueGrouping.ts
CHANGED
package/models/View.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
|
|
5
|
+
import type { ComputedView } from './ComputedView';
|
|
6
6
|
import type { PropertySchema } from './PropertySchema';
|
|
7
|
+
import type { TableView } from './TableView';
|
|
7
8
|
|
|
8
|
-
export type View = {
|
|
9
|
+
export type View = (ComputedView | TableView | {
|
|
9
10
|
name: string;
|
|
10
11
|
description: string | null;
|
|
11
12
|
columnDefinitions: Array<PropertySchema>;
|
|
12
|
-
readonly id?: string;
|
|
13
|
-
readonly namespaceId?: string;
|
|
14
|
-
};
|
|
13
|
+
readonly id?: string | null;
|
|
14
|
+
readonly namespaceId?: string | null;
|
|
15
|
+
});
|
|
15
16
|
|
package/models/ViewRequest.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
|
|
6
5
|
import type { ComputedView } from './ComputedView';
|
|
6
|
+
import type { PropertySchema } from './PropertySchema';
|
|
7
7
|
import type { TableView } from './TableView';
|
|
8
8
|
|
|
9
9
|
export type ViewRequest = {
|
|
10
|
-
view: (TableView |
|
|
10
|
+
view: (ComputedView | TableView | {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
columnDefinitions: Array<PropertySchema>;
|
|
14
|
+
readonly id?: string | null;
|
|
15
|
+
readonly namespaceId?: string | null;
|
|
16
|
+
});
|
|
11
17
|
};
|
|
12
18
|
|
package/models/ViewResponse.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* generated using openapi-typescript-codegen -- do no edit */
|
|
2
1
|
/* istanbul ignore file */
|
|
3
2
|
/* tslint:disable */
|
|
4
3
|
/* eslint-disable */
|
|
@@ -8,16 +7,20 @@ import type { PropertySchema } from './PropertySchema';
|
|
|
8
7
|
import type { TableView } from './TableView';
|
|
9
8
|
|
|
10
9
|
export type ViewResponse = {
|
|
11
|
-
view: (
|
|
12
|
-
readonly id: string;
|
|
13
|
-
readonly namespaceId: string;
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly namespaceId: string;
|
|
10
|
+
view: (ComputedView | TableView | {
|
|
11
|
+
readonly id: string | null;
|
|
12
|
+
readonly namespaceId: string | null;
|
|
13
|
+
readonly id: string | null;
|
|
14
|
+
readonly namespaceId: string | null;
|
|
15
|
+
readonly id: string | null;
|
|
16
|
+
readonly namespaceId: string | null;
|
|
17
|
+
readonly id: string | null;
|
|
18
|
+
readonly namespaceId: string | null;
|
|
16
19
|
name: string;
|
|
17
20
|
description: string | null;
|
|
18
21
|
columnDefinitions: Array<PropertySchema>;
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly namespaceId: string;
|
|
22
|
+
readonly id: string | null;
|
|
23
|
+
readonly namespaceId: string | null;
|
|
21
24
|
});
|
|
22
25
|
};
|
|
23
26
|
|
package/models/ViewRunRequest.ts
CHANGED
package/package.json
CHANGED