@lightdash/sdk 2.433.1 → 2.435.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/dist/sdk.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sdk.cjs.js
3
- size: 43228905 bytes
4
- sha256: 3d8e50ef3d438ded10f45192756a9db84d090a409f6491f589852d6cff5c4d1b
3
+ size: 43232461 bytes
4
+ sha256: 818c7e5bb28aa4946df0b13c6d0a2ad3d698475d0ee681b745a722b05a04f44f
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sdk.cjs.js.map
3
- size: 86289331 bytes
4
- sha256: fb4e256ca76acab1b477fe97c4ec1249ea839786c90c662d8358a51799006ec7
3
+ size: 86299102 bytes
4
+ sha256: 5b2e1745df06ff93aadf68401f8aa6910df55dcca6a6a788156f8917862b60d0
package/dist/sdk.d.ts CHANGED
@@ -61,6 +61,16 @@ type SdkFilter = {
61
61
 
62
62
  type MetricsCatalogFilter = 'tables' | 'owners' | 'categories';
63
63
 
64
+ type SdkErrorKind = 'network' | 'token_expired' | 'invalid_token' | 'unauthorized' | 'forbidden' | 'not_found' | 'invalid_request' | 'server' | 'render' | 'unknown';
65
+ type SdkError = {
66
+ kind: SdkErrorKind;
67
+ status: number | null;
68
+ message: string;
69
+ retryable: boolean;
70
+ fatal: boolean;
71
+ };
72
+ type SdkErrorHandler = (error: SdkError) => void;
73
+
64
74
  type BaseProps = {
65
75
  instanceUrl: string;
66
76
  token: Promise<string> | string;
@@ -75,6 +85,7 @@ type BaseProps = {
75
85
  onExplore?: (options: {
76
86
  chart: SavedChart;
77
87
  }) => void;
88
+ onError?: SdkErrorHandler;
78
89
  };
79
90
  type DashboardProps = BaseProps & {
80
91
  paletteUuid?: string;
@@ -88,7 +99,7 @@ type ChartProps = Omit<BaseProps, 'filters'> & {
88
99
  id: string;
89
100
  isEditMode?: boolean;
90
101
  };
91
- type AiAgentProps = Omit<BaseProps, 'contentOverrides' | 'uiOverrides' | 'filters' | 'onExplore'> & {
102
+ type AiAgentProps = Omit<BaseProps, 'contentOverrides' | 'uiOverrides' | 'filters' | 'onExplore' | 'onError'> & {
92
103
  agentUuid: string;
93
104
  onThreadChange?: (options: {
94
105
  threadUuid: string;
@@ -131,4 +142,4 @@ declare const Lightdash: {
131
142
  };
132
143
 
133
144
  export { AiAgent, Chart, Dashboard, DashboardBuilder, Explore, MetricsCatalog, createLightdashApiClient, Lightdash as default, useLightdashAiAgentThreads, useLightdashContent };
134
- export type { LightdashAiAgentThread, LightdashAiAgentThreadResults, LightdashApiClientConfig, LightdashContentItem, LightdashContentResults, LightdashSdkApiAuth, ListAiAgentThreadsOptions, ListContentOptions, MetricsCatalogFilter };
145
+ export type { LightdashAiAgentThread, LightdashAiAgentThreadResults, LightdashApiClientConfig, LightdashContentItem, LightdashContentResults, LightdashSdkApiAuth, ListAiAgentThreadsOptions, ListContentOptions, MetricsCatalogFilter, SdkError, SdkErrorKind };
package/dist/sdk.es.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sdk.es.js
3
- size: 43089861 bytes
4
- sha256: 9bcf627d3d8905cd6abb0399a836211cedc2ac9e2662d7b1fcaf28d9e0652770
3
+ size: 43093393 bytes
4
+ sha256: e0a8b67228b715274a4b7b89b80dbe09162d32dc2a24222a681299549ab4c1f9
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/sdk.es.js.map
3
- size: 86277575 bytes
4
- sha256: 4bd982fb2fd7c647abe9cb13da9f752883f448ab22335dff0677ebdb462eea05
3
+ size: 86287341 bytes
4
+ sha256: b1138958ba9c7e826713e06288acb892a01a3e94a35909de3e4ebc6f808d9c96
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/sdk",
3
- "version": "2.433.1",
3
+ "version": "2.435.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",