@databricks/appkit-ui 0.44.0 → 0.45.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.
Files changed (32) hide show
  1. package/dist/js/arrow/arrow-client.d.ts +8 -1
  2. package/dist/js/arrow/arrow-client.d.ts.map +1 -1
  3. package/dist/js/arrow/arrow-client.js +21 -2
  4. package/dist/js/arrow/arrow-client.js.map +1 -1
  5. package/dist/js/sse/connect-sse.js +1 -1
  6. package/dist/js/sse/connect-sse.js.map +1 -1
  7. package/dist/react/charts/types.d.ts +11 -4
  8. package/dist/react/charts/types.d.ts.map +1 -1
  9. package/dist/react/charts/types.js.map +1 -1
  10. package/dist/react/hooks/types.d.ts +10 -2
  11. package/dist/react/hooks/types.d.ts.map +1 -1
  12. package/dist/react/hooks/use-analytics-query.d.ts +5 -3
  13. package/dist/react/hooks/use-analytics-query.d.ts.map +1 -1
  14. package/dist/react/hooks/use-analytics-query.js +114 -33
  15. package/dist/react/hooks/use-analytics-query.js.map +1 -1
  16. package/dist/react/hooks/use-chart-data.d.ts +3 -3
  17. package/dist/react/hooks/use-chart-data.d.ts.map +1 -1
  18. package/dist/react/hooks/use-chart-data.js +3 -3
  19. package/dist/react/hooks/use-chart-data.js.map +1 -1
  20. package/dist/shared/src/index.d.ts +1 -0
  21. package/dist/shared/src/sse/analytics.d.ts +1 -0
  22. package/docs/api/appkit/Class.AppKitError.md +40 -8
  23. package/docs/api/appkit/Class.AuthenticationError.md +56 -16
  24. package/docs/api/appkit/Class.ConfigurationError.md +57 -17
  25. package/docs/api/appkit/Class.ConnectionError.md +57 -17
  26. package/docs/api/appkit/Class.ExecutionError.md +80 -22
  27. package/docs/api/appkit/Class.InitializationError.md +55 -15
  28. package/docs/api/appkit/Class.ServerError.md +55 -15
  29. package/docs/api/appkit/Class.TunnelError.md +56 -16
  30. package/docs/api/appkit/Class.ValidationError.md +55 -15
  31. package/package.json +1 -1
  32. package/sbom.cdx.json +1 -1
@@ -21,6 +21,7 @@ throw new TunnelError("Failed to parse WebSocket message", { cause: parseError }
21
21
  ```ts
22
22
  new TunnelError(message: string, options?: {
23
23
  cause?: Error;
24
+ clientMessage?: string;
24
25
  context?: Record<string, unknown>;
25
26
  }): TunnelError;
26
27
 
@@ -28,12 +29,13 @@ new TunnelError(message: string, options?: {
28
29
 
29
30
  #### Parameters[​](#parameters "Direct link to Parameters")
30
31
 
31
- | Parameter | Type |
32
- | ------------------ | ----------------------------------------------------------------- |
33
- | `message` | `string` |
34
- | `options?` | { `cause?`: `Error`; `context?`: `Record`<`string`, `unknown`>; } |
35
- | `options.cause?` | `Error` |
36
- | `options.context?` | `Record`<`string`, `unknown`> |
32
+ | Parameter | Type |
33
+ | ------------------------ | --------------------------------------------------------------------------------------------- |
34
+ | `message` | `string` |
35
+ | `options?` | { `cause?`: `Error`; `clientMessage?`: `string`; `context?`: `Record`<`string`, `unknown`>; } |
36
+ | `options.cause?` | `Error` |
37
+ | `options.clientMessage?` | `string` |
38
+ | `options.context?` | `Record`<`string`, `unknown`> |
37
39
 
38
40
  #### Returns[​](#returns "Direct link to Returns")
39
41
 
@@ -45,6 +47,23 @@ new TunnelError(message: string, options?: {
45
47
 
46
48
  ## Properties[​](#properties "Direct link to Properties")
47
49
 
50
+ ### \_clientMessage?[​](#_clientmessage "Direct link to _clientMessage?")
51
+
52
+ ```ts
53
+ protected readonly optional _clientMessage: string;
54
+
55
+ ```
56
+
57
+ Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message` — `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
58
+
59
+ Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
60
+
61
+ #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
62
+
63
+ [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`_clientMessage`](./docs/api/appkit/Class.AppKitError.md#_clientmessage)
64
+
65
+ ***
66
+
48
67
  ### cause?[​](#cause "Direct link to cause?")
49
68
 
50
69
  ```ts
@@ -54,7 +73,7 @@ readonly optional cause: Error;
54
73
 
55
74
  Optional cause of the error
56
75
 
57
- #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
76
+ #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
58
77
 
59
78
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`cause`](./docs/api/appkit/Class.AppKitError.md#cause)
60
79
 
@@ -84,7 +103,7 @@ readonly optional context: Record<string, unknown>;
84
103
 
85
104
  Additional context for the error
86
105
 
87
- #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
106
+ #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from")
88
107
 
89
108
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`context`](./docs/api/appkit/Class.AppKitError.md#context)
90
109
 
@@ -118,6 +137,27 @@ HTTP status code suggestion (can be overridden)
118
137
 
119
138
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`statusCode`](./docs/api/appkit/Class.AppKitError.md#statuscode)
120
139
 
140
+ ## Accessors[​](#accessors "Direct link to Accessors")
141
+
142
+ ### clientMessage[​](#clientmessage "Direct link to clientMessage")
143
+
144
+ #### Get Signature[​](#get-signature "Direct link to Get Signature")
145
+
146
+ ```ts
147
+ get clientMessage(): string;
148
+
149
+ ```
150
+
151
+ Sanitized message safe to forward to clients. Override in subclasses if a more specific default is appropriate.
152
+
153
+ ##### Returns[​](#returns-1 "Direct link to Returns")
154
+
155
+ `string`
156
+
157
+ #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from")
158
+
159
+ [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`clientMessage`](./docs/api/appkit/Class.AppKitError.md#clientmessage)
160
+
121
161
  ## Methods[​](#methods "Direct link to Methods")
122
162
 
123
163
  ### toJSON()[​](#tojson "Direct link to toJSON()")
@@ -129,11 +169,11 @@ toJSON(): Record<string, unknown>;
129
169
 
130
170
  Convert error to JSON for logging/serialization. Sensitive values in context are automatically redacted.
131
171
 
132
- #### Returns[​](#returns-1 "Direct link to Returns")
172
+ #### Returns[​](#returns-2 "Direct link to Returns")
133
173
 
134
174
  `Record`<`string`, `unknown`>
135
175
 
136
- #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from")
176
+ #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from")
137
177
 
138
178
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toJSON`](./docs/api/appkit/Class.AppKitError.md#tojson)
139
179
 
@@ -148,11 +188,11 @@ toString(): string;
148
188
 
149
189
  Create a human-readable string representation
150
190
 
151
- #### Returns[​](#returns-2 "Direct link to Returns")
191
+ #### Returns[​](#returns-3 "Direct link to Returns")
152
192
 
153
193
  `string`
154
194
 
155
- #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from")
195
+ #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from")
156
196
 
157
197
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toString`](./docs/api/appkit/Class.AppKitError.md#tostring)
158
198
 
@@ -174,7 +214,7 @@ Create a tunnel error for asset fetch failure
174
214
  | `path` | `string` |
175
215
  | `cause?` | `Error` |
176
216
 
177
- #### Returns[​](#returns-3 "Direct link to Returns")
217
+ #### Returns[​](#returns-4 "Direct link to Returns")
178
218
 
179
219
  `TunnelError`
180
220
 
@@ -189,7 +229,7 @@ static getterNotRegistered(): TunnelError;
189
229
 
190
230
  Create a tunnel error for missing tunnel getter
191
231
 
192
- #### Returns[​](#returns-4 "Direct link to Returns")
232
+ #### Returns[​](#returns-5 "Direct link to Returns")
193
233
 
194
234
  `TunnelError`
195
235
 
@@ -204,7 +244,7 @@ static noConnection(): TunnelError;
204
244
 
205
245
  Create a tunnel error for no available connection
206
246
 
207
- #### Returns[​](#returns-5 "Direct link to Returns")
247
+ #### Returns[​](#returns-6 "Direct link to Returns")
208
248
 
209
249
  `TunnelError`
210
250
 
@@ -226,6 +266,6 @@ Create a tunnel error for message parsing failure
226
266
  | `messageType` | `string` |
227
267
  | `cause?` | `Error` |
228
268
 
229
- #### Returns[​](#returns-6 "Direct link to Returns")
269
+ #### Returns[​](#returns-7 "Direct link to Returns")
230
270
 
231
271
  `TunnelError`
@@ -21,6 +21,7 @@ throw new ValidationError("maxPoolSize must be at least 1", { context: { value:
21
21
  ```ts
22
22
  new ValidationError(message: string, options?: {
23
23
  cause?: Error;
24
+ clientMessage?: string;
24
25
  context?: Record<string, unknown>;
25
26
  }): ValidationError;
26
27
 
@@ -28,12 +29,13 @@ new ValidationError(message: string, options?: {
28
29
 
29
30
  #### Parameters[​](#parameters "Direct link to Parameters")
30
31
 
31
- | Parameter | Type |
32
- | ------------------ | ----------------------------------------------------------------- |
33
- | `message` | `string` |
34
- | `options?` | { `cause?`: `Error`; `context?`: `Record`<`string`, `unknown`>; } |
35
- | `options.cause?` | `Error` |
36
- | `options.context?` | `Record`<`string`, `unknown`> |
32
+ | Parameter | Type |
33
+ | ------------------------ | --------------------------------------------------------------------------------------------- |
34
+ | `message` | `string` |
35
+ | `options?` | { `cause?`: `Error`; `clientMessage?`: `string`; `context?`: `Record`<`string`, `unknown`>; } |
36
+ | `options.cause?` | `Error` |
37
+ | `options.clientMessage?` | `string` |
38
+ | `options.context?` | `Record`<`string`, `unknown`> |
37
39
 
38
40
  #### Returns[​](#returns "Direct link to Returns")
39
41
 
@@ -45,6 +47,23 @@ new ValidationError(message: string, options?: {
45
47
 
46
48
  ## Properties[​](#properties "Direct link to Properties")
47
49
 
50
+ ### \_clientMessage?[​](#_clientmessage "Direct link to _clientMessage?")
51
+
52
+ ```ts
53
+ protected readonly optional _clientMessage: string;
54
+
55
+ ```
56
+
57
+ Client-safe error message. When set, callers serializing the error to a client (SSE, HTTP body) MUST prefer `clientMessage` over `message` — `message` may contain raw upstream / SDK text including statement fragments, internal object names, and correlation IDs.
58
+
59
+ Subclasses can set this in their constructor for a fixed sanitized string. When unset, `clientMessage` defaults to a generic per-code string (see the getter), and the raw `message` is kept server-side only.
60
+
61
+ #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
62
+
63
+ [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`_clientMessage`](./docs/api/appkit/Class.AppKitError.md#_clientmessage)
64
+
65
+ ***
66
+
48
67
  ### cause?[​](#cause "Direct link to cause?")
49
68
 
50
69
  ```ts
@@ -54,7 +73,7 @@ readonly optional cause: Error;
54
73
 
55
74
  Optional cause of the error
56
75
 
57
- #### Inherited from[​](#inherited-from-1 "Direct link to Inherited from")
76
+ #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
58
77
 
59
78
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`cause`](./docs/api/appkit/Class.AppKitError.md#cause)
60
79
 
@@ -84,7 +103,7 @@ readonly optional context: Record<string, unknown>;
84
103
 
85
104
  Additional context for the error
86
105
 
87
- #### Inherited from[​](#inherited-from-2 "Direct link to Inherited from")
106
+ #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from")
88
107
 
89
108
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`context`](./docs/api/appkit/Class.AppKitError.md#context)
90
109
 
@@ -118,6 +137,27 @@ HTTP status code suggestion (can be overridden)
118
137
 
119
138
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`statusCode`](./docs/api/appkit/Class.AppKitError.md#statuscode)
120
139
 
140
+ ## Accessors[​](#accessors "Direct link to Accessors")
141
+
142
+ ### clientMessage[​](#clientmessage "Direct link to clientMessage")
143
+
144
+ #### Get Signature[​](#get-signature "Direct link to Get Signature")
145
+
146
+ ```ts
147
+ get clientMessage(): string;
148
+
149
+ ```
150
+
151
+ Sanitized message safe to forward to clients. Override in subclasses if a more specific default is appropriate.
152
+
153
+ ##### Returns[​](#returns-1 "Direct link to Returns")
154
+
155
+ `string`
156
+
157
+ #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from")
158
+
159
+ [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`clientMessage`](./docs/api/appkit/Class.AppKitError.md#clientmessage)
160
+
121
161
  ## Methods[​](#methods "Direct link to Methods")
122
162
 
123
163
  ### toJSON()[​](#tojson "Direct link to toJSON()")
@@ -129,11 +169,11 @@ toJSON(): Record<string, unknown>;
129
169
 
130
170
  Convert error to JSON for logging/serialization. Sensitive values in context are automatically redacted.
131
171
 
132
- #### Returns[​](#returns-1 "Direct link to Returns")
172
+ #### Returns[​](#returns-2 "Direct link to Returns")
133
173
 
134
174
  `Record`<`string`, `unknown`>
135
175
 
136
- #### Inherited from[​](#inherited-from-3 "Direct link to Inherited from")
176
+ #### Inherited from[​](#inherited-from-5 "Direct link to Inherited from")
137
177
 
138
178
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toJSON`](./docs/api/appkit/Class.AppKitError.md#tojson)
139
179
 
@@ -148,11 +188,11 @@ toString(): string;
148
188
 
149
189
  Create a human-readable string representation
150
190
 
151
- #### Returns[​](#returns-2 "Direct link to Returns")
191
+ #### Returns[​](#returns-3 "Direct link to Returns")
152
192
 
153
193
  `string`
154
194
 
155
- #### Inherited from[​](#inherited-from-4 "Direct link to Inherited from")
195
+ #### Inherited from[​](#inherited-from-6 "Direct link to Inherited from")
156
196
 
157
197
  [`AppKitError`](./docs/api/appkit/Class.AppKitError.md).[`toString`](./docs/api/appkit/Class.AppKitError.md#tostring)
158
198
 
@@ -178,7 +218,7 @@ Create a validation error for an invalid field value. Note: The actual value is
178
218
  | `value` | `unknown` |
179
219
  | `expected?` | `string` |
180
220
 
181
- #### Returns[​](#returns-3 "Direct link to Returns")
221
+ #### Returns[​](#returns-4 "Direct link to Returns")
182
222
 
183
223
  `ValidationError`
184
224
 
@@ -199,7 +239,7 @@ Create a validation error for missing environment variables
199
239
  | --------- | ----------- |
200
240
  | `vars` | `string`\[] |
201
241
 
202
- #### Returns[​](#returns-4 "Direct link to Returns")
242
+ #### Returns[​](#returns-5 "Direct link to Returns")
203
243
 
204
244
  `ValidationError`
205
245
 
@@ -220,6 +260,6 @@ Create a validation error for a missing required field
220
260
  | ----------- | -------- |
221
261
  | `fieldName` | `string` |
222
262
 
223
- #### Returns[​](#returns-5 "Direct link to Returns")
263
+ #### Returns[​](#returns-6 "Direct link to Returns")
224
264
 
225
265
  `ValidationError`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@databricks/appkit-ui",
3
3
  "type": "module",
4
- "version": "0.44.0",
4
+ "version": "0.45.0",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": [
7
7
  "**/*.css"