@deephaven-enterprise/jsapi-types 1.20240723.195-beta → 1.20250219.122-beta

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven-enterprise/jsapi-types",
3
- "version": "1.20240723.195-beta",
3
+ "version": "1.20250219.122-beta",
4
4
  "description": "Deephaven Enterprise Jsapi Types",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -21,6 +21,5 @@
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"
24
- },
25
- "gitHead": "d8caef87e74b302b4c767f79c1b8835c7cd42bca"
24
+ }
26
25
  }
@@ -43,6 +43,12 @@ export interface EnterpriseUserPermissions extends UserPermissions {
43
43
  /** Not allowed to use the web UI at all */
44
44
  isNonInteractive: boolean;
45
45
 
46
+ /** Can manage queries */
47
+ isQueryManager: boolean;
48
+
49
+ /** Can manage schemas */
50
+ isSchemaManager: boolean;
51
+
46
52
  /** Can create new dashboards */
47
53
  canCreateDashboard: boolean;
48
54
 
@@ -63,6 +69,9 @@ export interface EnterpriseUserPermissions extends UserPermissions {
63
69
 
64
70
  /** Can view the list of users a query is shared with for a query they are a viewer of */
65
71
  canViewQuerySharedUsers: boolean;
72
+
73
+ /** Can logout */
74
+ canLogout: boolean;
66
75
  }
67
76
 
68
77
  export type EnterpriseUser = User & {
package/types/Iris.d.ts CHANGED
@@ -1,13 +1,17 @@
1
+ /* eslint-disable max-classes-per-file */
1
2
  // The iris api script isn't packaged as a module (yet), and is just included in index.html, exported to the global namespace
2
3
  // This include file is simply a wrapper so that it behaves like a module, and can be mocked easily for unit tests.
3
4
  // https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#using-global-variables
4
5
  import type { dh as DhType } from '@deephaven/jsapi-types';
5
6
 
6
7
  import {
7
- Parameterized,
8
- ParameterizedQueryVariableType,
8
+ type Parameterized,
9
+ type ParameterizedQueryVariableType,
9
10
  } from './parameterizedQueryTypes.js';
10
- import { ControllerQueryConstants, WorkerKind } from './CommonTypes.js';
11
+ import {
12
+ type ControllerQueryConstants,
13
+ type WorkerKind,
14
+ } from './CommonTypes.js';
11
15
 
12
16
  export type CancelablePromise<T> = Promise<T> & { cancel: () => undefined };
13
17
 
@@ -60,6 +64,21 @@ export type BaseQueryInfo = {
60
64
  assignmentPolicyParams: string | null;
61
65
  };
62
66
 
67
+ /**
68
+ * Plain object representing a query configuration
69
+ * with properties matching {@link EditableQueryInfo}
70
+ * Used as input for the `saveQuery` and `createQuery` methods.
71
+ */
72
+ export type PlainEditableQueryInfo = BaseQueryInfo & {
73
+ scriptCode: string | null;
74
+ serial: string | null;
75
+
76
+ genericWorkerControl: string | null;
77
+ kubernetesControl: string | null;
78
+ pythonControl: string | null;
79
+ workerKind: string | null;
80
+ };
81
+
63
82
  export type BaseQueryInfoReadonly = Readonly<
64
83
  BaseQueryInfo & {
65
84
  /**
@@ -98,9 +117,118 @@ export type TypeSpecificFields<T extends string = string> = Record<
98
117
  { value: unknown; type: string }
99
118
  >;
100
119
 
101
- export type EditableQueryInfo = BaseQueryInfo & {
102
- scriptCode: string;
103
- serial: string | null;
120
+ /**
121
+ * The EditableQueryInfo class uses getter and setter methods for accessing and modifying its properties.
122
+ * As a result, it cannot be directly used with the spread operator.
123
+ */
124
+ export declare class EditableQueryInfo implements PlainEditableQueryInfo {
125
+ get adminGroups(): readonly string[];
126
+
127
+ set adminGroups(value: readonly string[]);
128
+
129
+ get dataMemoryRatio(): number;
130
+
131
+ set dataMemoryRatio(value: number);
132
+
133
+ get dbServerName(): string;
134
+
135
+ set dbServerName(value: string);
136
+
137
+ get enabled(): boolean;
138
+
139
+ set enabled(value: boolean);
140
+
141
+ get enableGcLogs(): boolean;
142
+
143
+ set enableGcLogs(value: boolean);
144
+
145
+ get envVars(): string;
146
+
147
+ set envVars(value: string);
148
+
149
+ get extraClasspaths(): string;
150
+
151
+ set extraClasspaths(value: string);
152
+
153
+ get heapSize(): number;
154
+
155
+ set heapSize(value: number);
156
+
157
+ get additionalMemory(): number;
158
+
159
+ set additionalMemory(value: number);
160
+
161
+ get jvmArgs(): string;
162
+
163
+ set jvmArgs(value: string);
164
+
165
+ get jvmProfile(): string;
166
+
167
+ set jvmProfile(value: string);
168
+
169
+ get name(): string;
170
+
171
+ set name(value: string);
172
+
173
+ get owner(): string;
174
+
175
+ set owner(value: string);
176
+
177
+ get restartUsers(): number;
178
+
179
+ set restartUsers(value: number);
180
+
181
+ get scheduling(): readonly string[];
182
+
183
+ set scheduling(value: readonly string[]);
184
+
185
+ get scriptLanguage(): string | null;
186
+
187
+ set scriptLanguage(value: string | null);
188
+
189
+ get scriptPath(): string | null;
190
+
191
+ set scriptPath(value: string | null);
192
+
193
+ get timeout(): number;
194
+
195
+ set timeout(value: number);
196
+
197
+ get type(): string;
198
+
199
+ set type(value: string);
200
+
201
+ get typeSpecificFields(): TypeSpecificFields | null;
202
+
203
+ set typeSpecificFields(value: TypeSpecificFields | null);
204
+
205
+ get viewerGroups(): readonly string[];
206
+
207
+ set viewerGroups(value: readonly string[]);
208
+
209
+ get replicaCount(): number;
210
+
211
+ set replicaCount(value: number);
212
+
213
+ get spareCount(): number;
214
+
215
+ set spareCount(value: number);
216
+
217
+ get assignmentPolicy(): string | null;
218
+
219
+ set assignmentPolicy(value: string | null);
220
+
221
+ get assignmentPolicyParams(): string | null;
222
+
223
+ set assignmentPolicyParams(value: string | null);
224
+
225
+ get scriptCode(): string | null;
226
+
227
+ set scriptCode(value: string | null);
228
+
229
+ get serial(): string | null;
230
+
231
+ set serial(value: string | null);
104
232
 
105
233
  /**
106
234
  * Store the Kubernetes, Python, and Generic Worker Control values as string.
@@ -108,12 +236,22 @@ export type EditableQueryInfo = BaseQueryInfo & {
108
236
  * want to lose any parameters that may have been set on the server that the
109
237
  * Web UI doesn't know about.
110
238
  */
111
- kubernetesControl?: string | null;
112
- genericWorkerControl?: string | null;
113
- pythonControl?: string | null;
239
+ get kubernetesControl(): string | null;
114
240
 
115
- workerKind?: string | null;
116
- };
241
+ set kubernetesControl(value: string | null);
242
+
243
+ get genericWorkerControl(): string | null;
244
+
245
+ set genericWorkerControl(value: string | null);
246
+
247
+ get pythonControl(): string | null;
248
+
249
+ set pythonControl(value: string | null);
250
+
251
+ get workerKind(): string | null;
252
+
253
+ set workerKind(value: string | null);
254
+ }
117
255
 
118
256
  export interface ReplicaStatus {
119
257
  objects: readonly DhType.ide.VariableDefinition[];
@@ -294,6 +432,13 @@ export interface QuerySelectionPermissions {
294
432
  allAdmin: boolean;
295
433
  allOwner: boolean;
296
434
  allRestartable: boolean;
435
+ allStoppable: boolean;
436
+ allStopped: boolean;
437
+ allDisabled: boolean;
438
+ allEnabled: boolean;
439
+ allTemporary: boolean;
440
+ allImportMerge: boolean;
441
+ readOnlyUser: boolean;
297
442
  }
298
443
 
299
444
  export interface ClientListenerEvent<TDetail = unknown> {
@@ -315,6 +460,8 @@ export interface AssignmentPolicyType {
315
460
 
316
461
  export type AssignmentPolicyTypes = Map<string, AssignmentPolicyType>;
317
462
 
463
+ export type RefreshToken = DhType.RefreshToken;
464
+
318
465
  export interface EnterpriseClient {
319
466
  /**
320
467
  * Get available assignment policy types.
@@ -336,19 +483,22 @@ export interface EnterpriseClient {
336
483
  type: string,
337
484
  listener: (event: ClientListenerEvent<T>) => void
338
485
  ): void;
339
- disconnect(): void;
340
- saveQuery(query: EditableQueryInfo, doRestart: boolean): Promise<void>;
341
- createQuery(query: EditableQueryInfo): Promise<string>;
486
+ disconnect(fireEvents?: boolean): void;
487
+ saveQuery(query: PlainEditableQueryInfo, doRestart: boolean): Promise<void>;
488
+ createQuery(query: PlainEditableQueryInfo): Promise<string>;
342
489
  createAuthToken(key: string): Promise<string>;
343
490
  /** Imports the XML string as queries, and returns the query info. Does _not_ actually create them, use `saveQueries()` to save them. */
344
491
  importQueries: (xml: string) => Promise<QueryInfo[]>;
345
492
  /** Returns a string containing the XML of all queries specified */
346
493
  exportQueries: (serialIds: string[]) => Promise<string>;
347
- relogin(token: unknown): Promise<void>;
494
+ relogin(token: RefreshToken): Promise<void>;
348
495
  getAllGroups(): Promise<string[]>;
349
496
  getAllUsers(): Promise<string[]>;
350
497
  getTemporaryQueueNames(): Promise<string[]>;
351
498
  getScriptPaths(serialId: string | null, owner?: string): Promise<string[]>;
499
+ /**
500
+ * @deprecated
501
+ */
352
502
  getQuerySerialsForDependent(isTemporary: boolean): Promise<string[]>;
353
503
  getDbServersForType(type: string): Promise<ConsoleServerAddress[]>;
354
504
  getJdbcDriverWrappers(): Promise<DriverWrapper[]>;
@@ -359,7 +509,7 @@ export interface EnterpriseClient {
359
509
  * @param replaceExisting Whether to replace existing queries or create new ones. If a serial is specified on a query and it is saved and `replaceExisting` is false, it will throw an error if a query with that serial already exists.
360
510
  */
361
511
  saveQueries: (
362
- queries: readonly EditableQueryInfo[],
512
+ queries: readonly PlainEditableQueryInfo[],
363
513
  replaceExisting: boolean
364
514
  ) => Promise<SaveQueriesResult>;
365
515
  getAuthConfigValues(): Promise<string[][]>;
@@ -407,6 +557,9 @@ export interface EnterpriseClient {
407
557
  operateAs: string
408
558
  ) => Promise<null>;
409
559
 
560
+ /** True if the client is currently connected */
561
+ readonly isConnected: boolean;
562
+
410
563
  /**
411
564
  * Get a Base64 encoded challenge nonce for that can be signed and passed to
412
565
  * `challengeResponse()` for private / public key authentication.
@@ -568,6 +721,10 @@ export interface ServerConfigValues {
568
721
  ruffSettings: Record<string, unknown> | null;
569
722
  ruffEnabled: boolean;
570
723
  ruffEditable: boolean;
724
+ showEmptyStrings: boolean;
725
+ showEmptyStringsEditable: boolean;
726
+ showNullStrings: boolean;
727
+ showNullStringsEditable: boolean;
571
728
  }
572
729
 
573
730
  export interface ApplyParametersResult {