@lightdash-tools/client 0.13.1 → 0.13.2
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/http/axios-client.d.ts +0 -5
- package/dist/http/axios-client.js +0 -8
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -2
- package/dist/types/api.d.ts +3 -14
- package/dist/types/api.js +3 -2
- package/package.json +2 -2
- package/src/http/axios-client.ts +0 -8
- package/src/index.ts +1 -2
- package/src/types/api.ts +3 -17
|
@@ -15,8 +15,3 @@ export declare function createAxiosInstanceV1(config: ResolvedLightdashClientCon
|
|
|
15
15
|
* Creates a configured Axios instance for the Lightdash API v2.
|
|
16
16
|
*/
|
|
17
17
|
export declare function createAxiosInstanceV2(config: ResolvedLightdashClientConfig): AxiosInstance;
|
|
18
|
-
/**
|
|
19
|
-
* Creates a configured Axios instance for the Lightdash API v1.
|
|
20
|
-
* @deprecated Use `createAxiosInstanceV1` instead. This function is kept for backward compatibility.
|
|
21
|
-
*/
|
|
22
|
-
export declare function createAxiosInstance(config: ResolvedLightdashClientConfig): AxiosInstance;
|
|
@@ -8,7 +8,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.createAxiosInstanceV1 = createAxiosInstanceV1;
|
|
10
10
|
exports.createAxiosInstanceV2 = createAxiosInstanceV2;
|
|
11
|
-
exports.createAxiosInstance = createAxiosInstance;
|
|
12
11
|
const axios_1 = __importDefault(require("axios"));
|
|
13
12
|
const config_1 = require("../config");
|
|
14
13
|
const interceptors_1 = require("./interceptors");
|
|
@@ -42,10 +41,3 @@ function createAxiosInstanceV1(config) {
|
|
|
42
41
|
function createAxiosInstanceV2(config) {
|
|
43
42
|
return createAxiosInstanceForVersion(config, 'v2');
|
|
44
43
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Creates a configured Axios instance for the Lightdash API v1.
|
|
47
|
-
* @deprecated Use `createAxiosInstanceV1` instead. This function is kept for backward compatibility.
|
|
48
|
-
*/
|
|
49
|
-
function createAxiosInstance(config) {
|
|
50
|
-
return createAxiosInstanceV1(config);
|
|
51
|
-
}
|
package/dist/index.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ export { DEFAULT_BINARY_MAX_BYTES, isBlockedBinaryHostname, type GetBytesOptions
|
|
|
37
37
|
export { loadConfigFromEnv, mergeConfig, createBearerConfig } from './utils/env';
|
|
38
38
|
export { ENV_LIGHTDASH_API_KEY, ENV_LIGHTDASH_URL, ENV_LIGHTDASH_PROXY_AUTHORIZATION, } from './utils/env';
|
|
39
39
|
export { HttpClient } from './http/http-client';
|
|
40
|
-
export { isApiSuccessEnvelope,
|
|
40
|
+
export { isApiSuccessEnvelope, type ApiEnvelope, type ApiErrorEnvelope, type ApiSuccessEnvelope, } from './http/unwrap-api-success';
|
|
41
41
|
export { RateLimiter } from './http/rate-limiter';
|
|
42
42
|
export { SecretString } from './utils/secret-string';
|
|
43
|
-
export type {
|
|
43
|
+
export type { ApiError } from './types/api';
|
|
44
44
|
export type { paths, components, operations } from './types/api';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SecretString = exports.RateLimiter = exports.
|
|
3
|
+
exports.SecretString = exports.RateLimiter = exports.isApiSuccessEnvelope = exports.HttpClient = exports.ENV_LIGHTDASH_PROXY_AUTHORIZATION = exports.ENV_LIGHTDASH_URL = exports.ENV_LIGHTDASH_API_KEY = exports.createBearerConfig = exports.mergeConfig = exports.loadConfigFromEnv = exports.isBlockedBinaryHostname = exports.DEFAULT_BINARY_MAX_BYTES = exports.CHART_IMAGE_MAX_BYTES = exports.CHART_IMAGE_EXPORT_TIMEOUT_MS = exports.CONTRACT_ERROR_MESSAGE = exports.CONTRACT_ERROR_NAME = exports.ChartImageSizeError = exports.NetworkError = exports.RateLimitError = exports.LightdashApiError = exports.DEFAULT_RETRY = exports.DEFAULT_TIMEOUT = exports.DEFAULT_RATE_LIMIT = exports.consoleLogger = exports.noopLogger = exports.DashboardsClientV2 = exports.ChartsClientV2 = exports.ContentClient = exports.AnalyticsClient = exports.TagsClient = exports.SchedulersClient = exports.MetricsClient = exports.ValidationClientV2 = exports.ValidationClient = exports.ProjectAccessClient = exports.AiAgentsClient = exports.ProjectRoleAssignmentsClient = exports.OrganizationRolesClient = exports.GroupsClient = exports.UsersClient = exports.resolveEvaluationRun = exports.applyBundleDiff = exports.fetchBundleCurrentState = exports.V2ApiClients = exports.V1ApiClients = exports.LightdashClient = void 0;
|
|
4
4
|
var client_1 = require("./client");
|
|
5
5
|
Object.defineProperty(exports, "LightdashClient", { enumerable: true, get: function () { return client_1.LightdashClient; } });
|
|
6
6
|
Object.defineProperty(exports, "V1ApiClients", { enumerable: true, get: function () { return client_1.V1ApiClients; } });
|
|
@@ -71,7 +71,6 @@ var http_client_2 = require("./http/http-client");
|
|
|
71
71
|
Object.defineProperty(exports, "HttpClient", { enumerable: true, get: function () { return http_client_2.HttpClient; } });
|
|
72
72
|
var unwrap_api_success_1 = require("./http/unwrap-api-success");
|
|
73
73
|
Object.defineProperty(exports, "isApiSuccessEnvelope", { enumerable: true, get: function () { return unwrap_api_success_1.isApiSuccessEnvelope; } });
|
|
74
|
-
Object.defineProperty(exports, "unwrapApiSuccessResults", { enumerable: true, get: function () { return unwrap_api_success_1.unwrapApiSuccessResults; } });
|
|
75
74
|
var rate_limiter_1 = require("./http/rate-limiter");
|
|
76
75
|
Object.defineProperty(exports, "RateLimiter", { enumerable: true, get: function () { return rate_limiter_1.RateLimiter; } });
|
|
77
76
|
var secret_string_1 = require("./utils/secret-string");
|
package/dist/types/api.d.ts
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Helper types for Lightdash API. Re-exports generated OpenAPI types
|
|
2
|
+
* Helper types for Lightdash API. Re-exports generated OpenAPI types.
|
|
3
3
|
*
|
|
4
4
|
* Note: Domain models (Project, Organization, etc.) are available from @lightdash-tools/common.
|
|
5
|
-
* Use this module for advanced types (paths, components, operations)
|
|
5
|
+
* Use this module for advanced types (paths, components, operations).
|
|
6
|
+
* Response envelopes live in `http/unwrap-api-success` (re-exported from the package root).
|
|
6
7
|
*/
|
|
7
8
|
import type { components } from '@lightdash-tools/common';
|
|
8
9
|
export type { paths, components, operations } from '@lightdash-tools/common';
|
|
9
10
|
/** API error schema from OpenAPI. */
|
|
10
11
|
export type ApiError = components['schemas']['ApiErrorPayload'];
|
|
11
|
-
/** Successful API response wrapper (status ok + results). */
|
|
12
|
-
export interface ApiResponseOk<T> {
|
|
13
|
-
status: 'ok';
|
|
14
|
-
results: T;
|
|
15
|
-
}
|
|
16
|
-
/** Failed API response wrapper (status error + error). */
|
|
17
|
-
export interface ApiResponseError {
|
|
18
|
-
status: 'error';
|
|
19
|
-
error: ApiError['error'];
|
|
20
|
-
}
|
|
21
|
-
/** Discriminated union for API response body. */
|
|
22
|
-
export type ApiResponseBody<T> = ApiResponseError | ApiResponseOk<T>;
|
package/dist/types/api.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Helper types for Lightdash API. Re-exports generated OpenAPI types
|
|
3
|
+
* Helper types for Lightdash API. Re-exports generated OpenAPI types.
|
|
4
4
|
*
|
|
5
5
|
* Note: Domain models (Project, Organization, etc.) are available from @lightdash-tools/common.
|
|
6
|
-
* Use this module for advanced types (paths, components, operations)
|
|
6
|
+
* Use this module for advanced types (paths, components, operations).
|
|
7
|
+
* Response envelopes live in `http/unwrap-api-success` (re-exported from the package root).
|
|
7
8
|
*/
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash-tools/client",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Client library for Lightdash AI.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"axios": "^1.19.0",
|
|
17
17
|
"bottleneck": "^2.19.5",
|
|
18
|
-
"@lightdash-tools/common": "0.13.
|
|
18
|
+
"@lightdash-tools/common": "0.13.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^25.9.3"
|
package/src/http/axios-client.ts
CHANGED
|
@@ -52,11 +52,3 @@ export function createAxiosInstanceV1(config: ResolvedLightdashClientConfig): Ax
|
|
|
52
52
|
export function createAxiosInstanceV2(config: ResolvedLightdashClientConfig): AxiosInstance {
|
|
53
53
|
return createAxiosInstanceForVersion(config, 'v2');
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Creates a configured Axios instance for the Lightdash API v1.
|
|
58
|
-
* @deprecated Use `createAxiosInstanceV1` instead. This function is kept for backward compatibility.
|
|
59
|
-
*/
|
|
60
|
-
export function createAxiosInstance(config: ResolvedLightdashClientConfig): AxiosInstance {
|
|
61
|
-
return createAxiosInstanceV1(config);
|
|
62
|
-
}
|
package/src/index.ts
CHANGED
|
@@ -93,12 +93,11 @@ export {
|
|
|
93
93
|
export { HttpClient } from './http/http-client';
|
|
94
94
|
export {
|
|
95
95
|
isApiSuccessEnvelope,
|
|
96
|
-
unwrapApiSuccessResults,
|
|
97
96
|
type ApiEnvelope,
|
|
98
97
|
type ApiErrorEnvelope,
|
|
99
98
|
type ApiSuccessEnvelope,
|
|
100
99
|
} from './http/unwrap-api-success';
|
|
101
100
|
export { RateLimiter } from './http/rate-limiter';
|
|
102
101
|
export { SecretString } from './utils/secret-string';
|
|
103
|
-
export type {
|
|
102
|
+
export type { ApiError } from './types/api';
|
|
104
103
|
export type { paths, components, operations } from './types/api';
|
package/src/types/api.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Helper types for Lightdash API. Re-exports generated OpenAPI types
|
|
2
|
+
* Helper types for Lightdash API. Re-exports generated OpenAPI types.
|
|
3
3
|
*
|
|
4
4
|
* Note: Domain models (Project, Organization, etc.) are available from @lightdash-tools/common.
|
|
5
|
-
* Use this module for advanced types (paths, components, operations)
|
|
5
|
+
* Use this module for advanced types (paths, components, operations).
|
|
6
|
+
* Response envelopes live in `http/unwrap-api-success` (re-exported from the package root).
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
import type { components } from '@lightdash-tools/common';
|
|
@@ -11,18 +12,3 @@ export type { paths, components, operations } from '@lightdash-tools/common';
|
|
|
11
12
|
|
|
12
13
|
/** API error schema from OpenAPI. */
|
|
13
14
|
export type ApiError = components['schemas']['ApiErrorPayload'];
|
|
14
|
-
|
|
15
|
-
/** Successful API response wrapper (status ok + results). */
|
|
16
|
-
export interface ApiResponseOk<T> {
|
|
17
|
-
status: 'ok';
|
|
18
|
-
results: T;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** Failed API response wrapper (status error + error). */
|
|
22
|
-
export interface ApiResponseError {
|
|
23
|
-
status: 'error';
|
|
24
|
-
error: ApiError['error'];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/** Discriminated union for API response body. */
|
|
28
|
-
export type ApiResponseBody<T> = ApiResponseError | ApiResponseOk<T>;
|