@deephaven/jsapi-types 1.0.0-dev0.36.0 → 1.0.0-dev0.37.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 (2) hide show
  1. package/dist/index.d.ts +1862 -1765
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  // Minimum TypeScript Version: 4.3
2
2
  // Generated using com.vertispan.tsdefs.doclet.TsDoclet
3
3
 
4
- export interface IIterableResult<T> {
5
- value:T;
6
- done:boolean;
7
- }
8
4
  /**
9
5
  * This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
10
6
  * returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
@@ -15,6 +11,10 @@ export interface Iterator<T> {
15
11
  hasNext():boolean;
16
12
  next():IIterableResult<T>;
17
13
  }
14
+ export interface IIterableResult<T> {
15
+ value:T;
16
+ done:boolean;
17
+ }
18
18
  export namespace dh.storage {
19
19
 
20
20
  /**
@@ -75,21 +75,6 @@ export namespace dh.storage {
75
75
  createDirectory(path:string):Promise<void>;
76
76
  }
77
77
 
78
- /**
79
- * Storage service metadata about files and folders.
80
- */
81
- export class ItemDetails {
82
- protected constructor();
83
-
84
- toString():string;
85
- get filename():string;
86
- get basename():string;
87
- get size():number;
88
- get etag():string;
89
- get type():ItemTypeType;
90
- get dirname():string;
91
- }
92
-
93
78
  /**
94
79
  * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
95
80
  * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
@@ -106,6 +91,21 @@ export namespace dh.storage {
106
91
  get etag():string;
107
92
  }
108
93
 
94
+ /**
95
+ * Storage service metadata about files and folders.
96
+ */
97
+ export class ItemDetails {
98
+ protected constructor();
99
+
100
+ toString():string;
101
+ get filename():string;
102
+ get basename():string;
103
+ get size():number;
104
+ get etag():string;
105
+ get type():ItemTypeType;
106
+ get dirname():string;
107
+ }
108
+
109
109
 
110
110
  type ItemTypeType = string;
111
111
  export class ItemType {
@@ -117,12 +117,137 @@ export namespace dh.storage {
117
117
 
118
118
  export namespace dh {
119
119
 
120
+ /**
121
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
122
+ * request the viewport again.
123
+ */
124
+ export interface ViewportRow extends Row {
125
+ get(column:Column):any;
126
+ getFormat(column:Column):Format;
127
+ get index():LongWrapper;
128
+ }
129
+ export interface HasEventHandling {
130
+ /**
131
+ * Listen for events on this object.
132
+ * @param name - the name of the event to listen for
133
+ * @param callback - a function to call when the event occurs
134
+ * @return Returns a cleanup function.
135
+ * @typeParam T - the type of the data that the event will provide
136
+ */
137
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
138
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
139
+ hasListeners(name:string):boolean;
140
+ /**
141
+ * Removes an event listener added to this table.
142
+ * @param name -
143
+ * @param callback -
144
+ * @return
145
+ * @typeParam T -
146
+ */
147
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
148
+ }
120
149
  export interface ColumnGroup {
121
150
  get name():string|null;
122
151
  get children():string[]|null;
123
152
  get color():string|null;
124
153
  }
125
154
  /**
155
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table, but
156
+ * with additional properties to reflect the tree structure.
157
+ */
158
+ export interface TreeRow extends Row {
159
+ get(column:Column):any;
160
+ getFormat(column:Column):Format;
161
+ /**
162
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
163
+ * rows below this one with a greater depth than this one.
164
+ * @return boolean
165
+ */
166
+ get isExpanded():boolean;
167
+ /**
168
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
169
+ * and its expand/collapse icon.
170
+ * @return int
171
+ */
172
+ get depth():number;
173
+ /**
174
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when the
175
+ * table updates, depending on the table's configuration.
176
+ * @return boolean
177
+ */
178
+ get hasChildren():boolean;
179
+ get index():LongWrapper;
180
+ }
181
+ export interface RefreshToken {
182
+ get bytes():string;
183
+ get expiry():number;
184
+ }
185
+ /**
186
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it.
187
+ */
188
+ export interface Format {
189
+ /**
190
+ * The format string to apply to the value of this cell.
191
+ * @return String
192
+ */
193
+ readonly formatString?:string|null;
194
+ /**
195
+ * Color to apply to the cell's background, in <b>#rrggbb</b> format.
196
+ * @return String
197
+ */
198
+ readonly backgroundColor?:string|null;
199
+ /**
200
+ * Color to apply to the text, in <b>#rrggbb</b> format.
201
+ * @return String
202
+ */
203
+ readonly color?:string|null;
204
+ /**
205
+ *
206
+ * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
207
+ */
208
+ readonly numberFormat?:string|null;
209
+ }
210
+ /**
211
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
212
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
213
+ * are correctly freed.
214
+ */
215
+ export interface WidgetExportedObject {
216
+ /**
217
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
218
+ * null, this object cannot be fetched, but can be passed to the server, such as via
219
+ * {@link Widget.sendMessage}.
220
+ * @return the string type of this server-side object, or null.
221
+ */
222
+ readonly type?:string|null;
223
+
224
+ /**
225
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
226
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
227
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
228
+ */
229
+ reexport():Promise<WidgetExportedObject>;
230
+ /**
231
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
232
+ * the same instance.
233
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
234
+ */
235
+ fetch():Promise<any>;
236
+ /**
237
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
238
+ * exist that also use that object. Should not be called after fetch() has been invoked.
239
+ */
240
+ close():void;
241
+ }
242
+ export interface WorkerHeapInfo {
243
+ /**
244
+ * Total heap size available for this worker.
245
+ */
246
+ get totalHeapSize():number;
247
+ get freeMemory():number;
248
+ get maximumHeapSize():number;
249
+ }
250
+ /**
126
251
  * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
127
252
  * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
128
253
  *
@@ -150,13 +275,13 @@ export namespace dh {
150
275
  * @param columns -
151
276
  * @param updateIntervalMs -
152
277
  */
153
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
278
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
154
279
  /**
155
280
  * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
156
281
  * resolve until that data is ready.
157
282
  * @return Promise of {@link dh.TableData}
158
283
  */
159
- getViewportData():Promise<TableData>;
284
+ getViewportData():Promise<ViewportData>;
160
285
  /**
161
286
  * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
162
287
  * returned value.
@@ -174,9 +299,9 @@ export namespace dh {
174
299
  * Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
175
300
  */
176
301
  close():void;
177
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
178
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
179
- nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<CustomEvent<T>>;
302
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
303
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
304
+ nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<Event<T>>;
180
305
  hasListeners(name:string):boolean;
181
306
  /**
182
307
  * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
@@ -251,144 +376,68 @@ export namespace dh {
251
376
  */
252
377
  get isRefreshing():boolean;
253
378
  }
254
- /**
255
- * Common interface for various ways of accessing table data and formatting.
256
- *
257
- * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
258
- * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
259
- */
260
- export interface TableData {
261
- get(index:LongWrapper|number):Row;
379
+ export interface TreeViewportData extends TableData {
380
+ get(index:LongWrapper|number):TreeRow;
262
381
  getData(index:LongWrapper|number, column:Column):any;
263
382
  getFormat(index:LongWrapper|number, column:Column):Format;
383
+ get treeSize():number;
264
384
  get columns():Array<Column>;
265
- get rows():Array<Row>;
266
- }
267
- export interface LayoutHints {
268
- readonly searchDisplayMode?:SearchDisplayModeType|null;
269
-
270
- get hiddenColumns():string[]|null;
271
- get frozenColumns():string[]|null;
272
- get columnGroups():ColumnGroup[]|null;
273
- get areSavedLayoutsAllowed():boolean;
274
- get frontColumns():string[]|null;
275
- get backColumns():string[]|null;
385
+ get rows():Array<TreeRow>;
276
386
  }
277
387
  /**
278
- * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
279
- * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
388
+ * Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
389
+ * on tables, data in trees, and snapshots.
280
390
  * <p>
281
- * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
282
- * server. The setViewport method can be used to adjust this table instead of creating a new one.
283
- * <p>
284
- * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
285
- * to the underlying handle and accumulated data.
286
- * <p>
287
- * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
288
- * the idea then that the caller did not actually use this type. This means that for every exported method (which then
289
- * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
290
- * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
291
- * deems it no longer in use.
292
- * <p>
293
- * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
294
- * true), providing a way to stop the server from streaming updates to the client.
295
- *
296
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
297
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
298
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
299
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
300
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
391
+ * Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
392
+ * and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
393
+ * incur other costs - it is likely faster to access data by columns using {@link getData}.
301
394
  */
302
- export interface TableViewportSubscription extends HasEventHandling {
303
- /**
304
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
305
- * @param firstRow -
306
- * @param lastRow -
307
- * @param columns -
308
- * @param updateIntervalMs -
309
- */
310
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
311
- /**
312
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
313
- */
314
- close():void;
315
- /**
316
- * Gets the data currently visible in this viewport
317
- * @return Promise of {@link dh.TableData}.
318
- */
319
- getViewportData():Promise<TableData>;
320
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
321
- }
322
- export interface WorkerHeapInfo {
395
+ export interface TableData {
323
396
  /**
324
- * Total heap size available for this worker.
397
+ * Reads a row object from the table, from which any subscribed column can be read.
398
+ * @param index - the position or key to access
399
+ * @return the row at the given location
325
400
  */
326
- get totalHeapSize():number;
327
- get freeMemory():number;
328
- get maximumHeapSize():number;
329
- }
330
- /**
331
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
332
- * in columns) either by index, or scanning the complete present index.
333
- *
334
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading
335
- * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
336
- * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
337
- * both options should be considered.
338
- *
339
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
340
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
341
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
342
- * read specific rows or cells out of the table.
343
- */
344
- export interface SubscriptionTableData extends TableData {
345
- get fullIndex():RangeSet;
401
+ get(index:LongWrapper|number):Row;
346
402
  /**
347
- * The ordered set of row indexes removed since the last update
348
- * @return dh.RangeSet
403
+ * Reads a specific cell from the table, by row key and column.
404
+ * @param index - the row in the table to get data from
405
+ * @param column - the column to read
406
+ * @return the value in the table
349
407
  */
350
- get removed():RangeSet;
408
+ getData(index:LongWrapper|number, column:Column):any;
351
409
  /**
352
- * The ordered set of row indexes added since the last update
353
- * @return dh.RangeSet
410
+ * The server-specified Format to use for the cell at the given position.
411
+ * @param index - the row to read
412
+ * @param column - the column to read
413
+ * @return a Format instance with any server-specified details
354
414
  */
355
- get added():RangeSet;
415
+ getFormat(index:LongWrapper|number, column:Column):Format;
356
416
  get columns():Array<Column>;
357
417
  /**
358
- * The ordered set of row indexes updated since the last update
359
- * @return dh.RangeSet
418
+ * A lazily computed array of all rows available on the client.
360
419
  */
361
- get modified():RangeSet;
362
420
  get rows():Array<Row>;
363
421
  }
364
- export interface RefreshToken {
365
- get bytes():string;
366
- get expiry():number;
422
+ /**
423
+ * Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
424
+ * details about the event.
425
+ * @typeParam T - the type of the event detail
426
+ */
427
+ export interface Event<T> {
428
+ readonly detail?:null|@jsinterop.annotations.JsNullable T;
429
+
430
+ get type():string;
367
431
  }
368
432
  /**
369
- * This object may be pooled internally or discarded and not updated. Do not retain references to it.
433
+ * Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
434
+ * not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
435
+ * event, or re-request the viewport data.
370
436
  */
371
- export interface Format {
372
- /**
373
- * The format string to apply to the value of this cell.
374
- * @return String
375
- */
376
- readonly formatString?:string|null;
377
- /**
378
- * Color to apply to the cell's background, in <b>#rrggbb</b> format.
379
- * @return String
380
- */
381
- readonly backgroundColor?:string|null;
382
- /**
383
- * Color to apply to the text, in <b>#rrggbb</b> format.
384
- * @return String
385
- */
386
- readonly color?:string|null;
387
- /**
388
- *
389
- * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
390
- */
391
- readonly numberFormat?:string|null;
437
+ export interface Row {
438
+ get(column:Column):any;
439
+ getFormat(column:Column):Format;
440
+ get index():LongWrapper;
392
441
  }
393
442
  /**
394
443
  * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
@@ -480,125 +529,94 @@ export namespace dh {
480
529
  naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
481
530
  }
482
531
  /**
483
- * Row implementation that also provides additional read-only properties. represents visible rows in the table,
484
- * but with additional properties to reflect the tree structure.
532
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
533
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
534
+ *
535
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
536
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
537
+ * backwards compatibility and to better follow JS expectations.
485
538
  */
486
- export interface TreeRow extends ViewportRow {
487
- /**
488
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
489
- * rows below this one with a greater depth than this one
490
- * @return boolean
491
- */
492
- get isExpanded():boolean;
539
+ export interface WidgetMessageDetails {
493
540
  /**
494
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
495
- * row and its expand/collapse icon
496
- * @return int
541
+ * Returns the data from this message as a base64-encoded string.
497
542
  */
498
- get depth():number;
543
+ getDataAsBase64():string;
499
544
  /**
500
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when
501
- * the table updates, depending on the table's configuration
502
- * @return boolean
545
+ * Returns the data from this message as a Uint8Array.
503
546
  */
504
- get hasChildren():boolean;
505
- get index():LongWrapper;
506
- }
507
- export interface HasEventHandling {
547
+ getDataAsU8():Uint8Array;
508
548
  /**
509
- * Listen for events on this object.
510
- * @param name - the name of the event to listen for
511
- * @param callback - a function to call when the event occurs
512
- * @return Returns a cleanup function.
513
- * @typeParam T - the type of the data that the event will provide
549
+ * Returns the data from this message as a utf-8 string.
514
550
  */
515
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
516
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
517
- hasListeners(name:string):boolean;
551
+ getDataAsString():string;
518
552
  /**
519
- * Removes an event listener added to this table.
520
- * @param name -
521
- * @param callback -
522
- * @return
523
- * @typeParam T -
553
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
554
+ * objects, and should close them when no longer needed.
524
555
  */
525
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
556
+ get exportedObjects():WidgetExportedObject[];
526
557
  }
527
558
  /**
528
- * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
529
- * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
530
- * for easier scrolling without going to the server.
559
+ * Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
560
+ * ViewportData also contains the offset to this data, so that the actual row number may be determined.
561
+ * <p>
562
+ * For viewport subscriptions, it is not necessary to read with the key, only with the position.
563
+ * <p>
564
+ * Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
565
+ * scrolling without going to the server.
531
566
  */
532
567
  export interface ViewportData extends TableData {
533
568
  /**
534
- * The index of the first returned row
535
- * @return double
569
+ * Reads a row object from the viewport, based on its position in the table.
536
570
  */
537
- get offset():number;
571
+ get(index:LongWrapper|number):ViewportRow;
572
+ getData(index:LongWrapper|number, column:Column):any;
573
+ getFormat(index:LongWrapper|number, column:Column):Format;
538
574
  /**
539
- * A list of columns describing the data types in each row
540
- * @return {@link dh.Column} array.
575
+ * The position of the first returned row, null if this data is not for a viewport.
541
576
  */
577
+ get offset():number;
542
578
  get columns():Array<Column>;
543
- /**
544
- * An array of rows of data
545
- * @return {@link dh.ViewportRow} array.
546
- */
547
579
  get rows():Array<ViewportRow>;
548
580
  }
549
- export interface Row {
550
- get(column:Column):any;
551
- getFormat(column:Column):Format;
552
- get index():LongWrapper;
553
- }
554
581
  /**
555
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
556
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
557
- *
558
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
559
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
560
- * backwards compatibility and to better follow JS expectations.
582
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
583
+ * columns) either by index, or scanning the complete present index.
584
+ * <p>
585
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading all
586
+ * data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
587
+ * in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
588
+ * options should be considered.
589
+ * <p>
590
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
591
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
592
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
593
+ * specific rows or cells out of the table.
561
594
  */
562
- export interface WidgetMessageDetails {
595
+ export interface SubscriptionTableData extends TableData {
596
+ get fullIndex():RangeSet;
563
597
  /**
564
- * Returns the data from this message as a base64-encoded string.
598
+ * The ordered set of row indexes removed since the last update
599
+ * @return the rangeset of removed rows
565
600
  */
566
- getDataAsBase64():string;
601
+ get removed():RangeSet;
567
602
  /**
568
- * Returns the data from this message as a Uint8Array.
603
+ * The ordered set of row indexes added since the last update.
604
+ * @return the rangeset of rows added
569
605
  */
570
- getDataAsU8():Uint8Array;
606
+ get added():RangeSet;
607
+ get columns():Array<Column>;
571
608
  /**
572
- * Returns the data from this message as a utf-8 string.
609
+ * The ordered set of row indexes updated since the last update
610
+ * @return the rnageset of modified rows
573
611
  */
574
- getDataAsString():string;
612
+ get modified():RangeSet;
575
613
  /**
576
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
577
- * objects, and should close them when no longer needed.
614
+ * A lazily computed array of all rows available on the client.
578
615
  */
579
- get exportedObjects():WidgetExportedObject[];
580
- }
581
- /**
582
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
583
- * the viewport again.
584
- */
585
- export interface ViewportRow extends Row {
586
- get index():LongWrapper;
587
- }
588
- /**
589
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
590
- */
591
- export interface LocalTimeWrapper {
592
- valueOf():string;
593
- getHour():number;
594
- getMinute():number;
595
- getSecond():number;
596
- getNano():number;
597
- toString():string;
616
+ get rows():Array<Row>;
598
617
  }
599
618
  /**
600
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
601
- * table column.
619
+ * Represents statistics for a given table column.
602
620
  */
603
621
  export interface ColumnStatistics {
604
622
  /**
@@ -624,42 +642,15 @@ export namespace dh {
624
642
  */
625
643
  get statisticsMap():Map<string, object>;
626
644
  }
627
- /**
628
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
629
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
630
- * are correctly freed.
631
- */
632
- export interface WidgetExportedObject {
633
- /**
634
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
635
- * null, this object cannot be fetched, but can be passed to the server, such as via
636
- * {@link Widget.sendMessage}.
637
- * @return the string type of this server-side object, or null.
638
- */
639
- readonly type?:string|null;
645
+ export interface LayoutHints {
646
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
640
647
 
641
- /**
642
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
643
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
644
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
645
- */
646
- reexport():Promise<WidgetExportedObject>;
647
- /**
648
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
649
- * the same instance.
650
- * @return a promise that will resolve to a client side object that represents the reference on the server.
651
- */
652
- fetch():Promise<any>;
653
- /**
654
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
655
- * exist that also use that object. Should not be called after fetch() has been invoked.
656
- */
657
- close():void;
658
- }
659
- export interface TreeViewportData extends TableData {
660
- get offset():number;
661
- get columns():Array<Column>;
662
- get rows():Array<TreeRow>;
648
+ get hiddenColumns():string[]|null;
649
+ get frozenColumns():string[]|null;
650
+ get columnGroups():ColumnGroup[]|null;
651
+ get areSavedLayoutsAllowed():boolean;
652
+ get frontColumns():string[]|null;
653
+ get backColumns():string[]|null;
663
654
  }
664
655
  /**
665
656
  * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
@@ -671,553 +662,584 @@ export namespace dh {
671
662
  getDayOfMonth():number;
672
663
  toString():string;
673
664
  }
674
-
675
- export class LoginCredentials {
676
- type?:string|null;
677
- username?:string|null;
678
- token?:string|null;
679
-
680
- constructor();
665
+ /**
666
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
667
+ */
668
+ export interface LocalTimeWrapper {
669
+ valueOf():string;
670
+ getHour():number;
671
+ getMinute():number;
672
+ getSecond():number;
673
+ getNano():number;
674
+ toString():string;
681
675
  }
682
676
 
683
677
  /**
684
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
685
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
686
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
687
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
688
- * of <b>TotalsTableConfig</b> will be supplied.
689
- *
690
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
691
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
692
- * expected formats.
678
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
679
+ * the server to get each Table. All tables will have the same structure.
693
680
  */
694
- export class TotalsTableConfig {
695
- /**
696
- * @deprecated
697
- */
698
- static readonly COUNT:string;
681
+ export class PartitionedTable implements HasEventHandling {
699
682
  /**
700
- * @deprecated
683
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
701
684
  */
702
- static readonly MIN:string;
685
+ static readonly EVENT_KEYADDED:string;
703
686
  /**
704
- * @deprecated
687
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
705
688
  */
706
- static readonly MAX:string;
689
+ static readonly EVENT_DISCONNECT:string;
707
690
  /**
708
- * @deprecated
691
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
709
692
  */
710
- static readonly SUM:string;
693
+ static readonly EVENT_RECONNECT:string;
711
694
  /**
712
- * @deprecated
695
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
713
696
  */
714
- static readonly ABS_SUM:string;
697
+ static readonly EVENT_RECONNECTFAILED:string;
698
+
699
+ protected constructor();
700
+
715
701
  /**
716
- * @deprecated
702
+ * Fetch the table with the given key. If the key does not exist, returns `null`.
703
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
704
+ * @return Promise of dh.Table, or `null` if the key does not exist.
717
705
  */
718
- static readonly VAR:string;
706
+ getTable(key:object):Promise<Table|undefined|null>;
719
707
  /**
720
- * @deprecated
708
+ * Open a new table that is the result of merging all constituent tables. See
709
+ * {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
710
+ * @return A merged representation of the constituent tables.
721
711
  */
722
- static readonly AVG:string;
712
+ getMergedTable():Promise<Table>;
723
713
  /**
724
- * @deprecated
714
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
715
+ * for <b>keyadded</b> will ensure no keys are missed.
716
+ * @return Set of Object
725
717
  */
726
- static readonly STD:string;
718
+ getKeys():Set<object>;
727
719
  /**
720
+ * Fetch a table containing all the valid keys of the partitioned table.
721
+ * @return Promise of a Table
728
722
  * @deprecated
729
723
  */
730
- static readonly FIRST:string;
724
+ getKeyTable():Promise<Table>;
731
725
  /**
732
- * @deprecated
726
+ * Fetch the underlying base table of the partitioned table.
727
+ * @return Promise of a Table
733
728
  */
734
- static readonly LAST:string;
729
+ getBaseTable():Promise<Table>;
735
730
  /**
736
- * @deprecated
731
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
732
+ * will not affect tables in use.
737
733
  */
738
- static readonly SKIP:string;
734
+ close():void;
739
735
  /**
740
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
736
+ * The count of known keys.
737
+ * @return int
741
738
  */
742
- showTotalsByDefault:boolean;
739
+ get size():number;
743
740
  /**
744
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
741
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
742
+ * non-key columns.
743
+ * @return Array of Column
745
744
  */
746
- showGrandTotalsByDefault:boolean;
745
+ get columns():Column[];
747
746
  /**
748
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
747
+ * An array of all the key columns that the tables are partitioned by.
748
+ * @return Array of Column
749
749
  */
750
- defaultOperation:AggregationOperationType;
750
+ get keyColumns():Column[];
751
751
  /**
752
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
753
- * Table. If a column is omitted, the defaultOperation is used.
752
+ * Listen for events on this object.
753
+ * @param name - the name of the event to listen for
754
+ * @param callback - a function to call when the event occurs
755
+ * @return Returns a cleanup function.
756
+ * @typeParam T - the type of the data that the event will provide
754
757
  */
755
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
758
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
759
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
760
+ hasListeners(name:string):boolean;
756
761
  /**
757
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
758
- * these columns. See also `Table.selectDistinct`.
762
+ * Removes an event listener added to this table.
763
+ * @param name -
764
+ * @param callback -
765
+ * @return
766
+ * @typeParam T -
759
767
  */
760
- groupBy:Array<string>;
761
-
762
- constructor();
768
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
769
+ }
763
770
 
764
- toString():string;
771
+ export class DateWrapper extends LongWrapper {
772
+ protected constructor();
773
+
774
+ static ofJsDate(date:Date):DateWrapper;
775
+ asDate():Date;
765
776
  }
766
777
 
767
778
  /**
768
- * Provides access to data in a table. Note that several methods present their response through Promises. This allows
769
- * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
770
- * inform the UI right away that they have taken place.
779
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
780
+ * roll-up table.
771
781
  */
772
- export class Table implements JoinableTable, HasEventHandling {
773
- readonly description?:string|null;
774
- readonly pluginName?:string|null;
775
- readonly layoutHints?:null|LayoutHints;
776
- static readonly EVENT_SIZECHANGED:string;
777
- static readonly EVENT_UPDATED:string;
778
- static readonly EVENT_ROWADDED:string;
779
- static readonly EVENT_ROWREMOVED:string;
780
- static readonly EVENT_ROWUPDATED:string;
781
- static readonly EVENT_SORTCHANGED:string;
782
- static readonly EVENT_FILTERCHANGED:string;
783
- static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
784
- static readonly EVENT_DISCONNECT:string;
785
- static readonly EVENT_RECONNECT:string;
786
- static readonly EVENT_RECONNECTFAILED:string;
787
- static readonly EVENT_REQUEST_FAILED:string;
788
- static readonly EVENT_REQUEST_SUCCEEDED:string;
789
- static readonly SIZE_UNCOALESCED:number;
790
-
791
- protected constructor();
792
-
793
- batch(userCode:(arg0:unknown)=>void):Promise<Table>;
794
- /**
795
- * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
796
- * caching a returned value.
797
- * @param key -
798
- * @return {@link dh.Column}
799
- */
800
- findColumn(key:string):Column;
801
- /**
802
- * Retrieve multiple columns specified by the given names.
803
- * @param keys -
804
- * @return {@link dh.Column} array
805
- */
806
- findColumns(keys:string[]):Column[];
807
- isBlinkTable():boolean;
808
- /**
809
- * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
810
- * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
811
- * @return Promise of dh.InputTable
812
- */
813
- inputTable():Promise<InputTable>;
814
- /**
815
- * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
816
- */
817
- close():void;
818
- getAttributes():string[];
819
- /**
820
- * null if no property exists, a string if it is an easily serializable property, or a ```Promise
821
- * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
822
- * @param attributeName -
823
- * @return Object
824
- */
825
- getAttribute(attributeName:string):unknown|undefined|null;
826
- /**
827
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
828
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
829
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
830
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
831
- * not.
832
- * @param sort -
833
- * @return {@link dh.Sort} array
834
- */
835
- applySort(sort:Sort[]):Array<Sort>;
836
- /**
837
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
838
- * will immediately return the new value, but you may receive update events using the old filter before the new one
839
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
840
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
841
- * will not.
842
- * @param filter -
843
- * @return {@link dh.FilterCondition} array
844
- */
845
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
846
- /**
847
- * used when adding new filter and sort operations to the table, as long as they are present.
848
- * @param customColumns -
849
- * @return {@link dh.CustomColumn} array
850
- */
851
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
852
- /**
853
- * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
854
- * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
855
- * will result in events to be fired once data becomes available, starting with an `updated` event and a
856
- * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
857
- * needed.
858
- * @param firstRow -
859
- * @param lastRow -
860
- * @param columns -
861
- * @param updateIntervalMs -
862
- * @return {@link dh.TableViewportSubscription}
863
- */
864
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
782
+ export class RollupConfig {
865
783
  /**
866
- * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
867
- * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
868
- * separate the lifespan of this promise from the table itself, call
869
- * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
870
- * @return Promise of {@link dh.TableData}
784
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
871
785
  */
872
- getViewportData():Promise<TableData>;
786
+ groupingColumns:Array<String>;
873
787
  /**
874
- * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
875
- * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
876
- * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
877
- * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
878
- * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
879
- * called on it to stop it, and all events are fired from the TableSubscription instance.
880
- * @param columns -
881
- * @param updateIntervalMs -
882
- * @return {@link dh.TableSubscription}
788
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
789
+ * roll-up table.
883
790
  */
884
- subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
791
+ aggregations:{ [key: string]: Array<string>; };
885
792
  /**
886
- * a new table containing the distinct tuples of values from the given columns that are present in the original
887
- * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
888
- * order of appearance of values from the original table.
889
- * @param columns -
890
- * @return Promise of dh.Table
793
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
794
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
795
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
796
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
891
797
  */
892
- selectDistinct(columns:Column[]):Promise<Table>;
798
+ includeConstituents:boolean;
799
+ includeOriginalColumns?:boolean|null;
893
800
  /**
894
- * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
895
- * @return Promise of dh.Table
801
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
896
802
  */
897
- copy():Promise<Table>;
803
+ includeDescriptions:boolean;
804
+
805
+ constructor();
806
+ }
807
+
808
+ /**
809
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
810
+ */
811
+ export class BigIntegerWrapper {
812
+ protected constructor();
813
+
814
+ static ofString(str:string):BigIntegerWrapper;
815
+ asNumber():number;
816
+ valueOf():string;
817
+ toString():string;
818
+ }
819
+
820
+ export class QueryInfo {
821
+ static readonly EVENT_TABLE_OPENED:string;
822
+ static readonly EVENT_DISCONNECT:string;
823
+ static readonly EVENT_RECONNECT:string;
824
+ static readonly EVENT_CONNECT:string;
825
+
826
+ protected constructor();
827
+ }
828
+
829
+ export class IdeSession implements HasEventHandling {
830
+ static readonly EVENT_COMMANDSTARTED:string;
831
+ static readonly EVENT_REQUEST_FAILED:string;
832
+
833
+ protected constructor();
834
+
898
835
  /**
899
- * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
900
- * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
901
- * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
902
- * called on it when not in use.
903
- * @param config -
904
- * @return Promise of dh.TotalsTable
836
+ * Load the named table, with columns and size information already fully populated.
837
+ * @param name -
838
+ * @param applyPreviewColumns - optional boolean
839
+ * @return {@link Promise} of {@link dh.Table}
905
840
  */
906
- getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
841
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
907
842
  /**
908
- * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
909
- * above for more specifics.
910
- * @param config -
911
- * @return promise of dh.TotalsTable
843
+ * Load the named Figure, including its tables and tablemaps as needed.
844
+ * @param name -
845
+ * @return promise of dh.plot.Figure
912
846
  */
913
- getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
847
+ getFigure(name:string):Promise<dh.plot.Figure>;
914
848
  /**
915
- * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
916
- * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
917
- * @param configObject -
918
- * @return Promise of dh.TreeTable
849
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
850
+ * size is presently not available until the viewport is first set.
851
+ * @param name -
852
+ * @return {@link Promise} of {@link dh.TreeTable}
919
853
  */
920
- rollup(configObject:RollupConfig):Promise<TreeTable>;
854
+ getTreeTable(name:string):Promise<TreeTable>;
855
+ getHierarchicalTable(name:string):Promise<TreeTable>;
856
+ getPartitionedTable(name:string):Promise<PartitionedTable>;
857
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
858
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
921
859
  /**
922
- * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
923
- * new `TreeTable` which must have close() called on it when not in use.
924
- * @param configObject -
925
- * @return Promise dh.TreeTable
860
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
861
+ * @param tables -
862
+ * @return {@link Promise} of {@link dh.Table}
926
863
  */
927
- treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
864
+ mergeTables(tables:Table[]):Promise<Table>;
865
+ bindTableToVariable(table:Table, name:string):Promise<void>;
866
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
867
+ close():void;
868
+ runCode(code:string):Promise<dh.ide.CommandResult>;
869
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
870
+ openDocument(params:object):void;
871
+ changeDocument(params:object):void;
872
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
873
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
874
+ getHover(params:object):Promise<dh.lsp.Hover>;
875
+ closeDocument(params:object):void;
928
876
  /**
929
- * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
930
- * table will not update. This does not change the original table, and the new table will not have any of the client
931
- * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
932
- * @return Promise of dh.Table
877
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
878
+ * values will be null.
879
+ * @param size -
880
+ * @return {@link Promise} of {@link dh.Table}
933
881
  */
934
- freeze():Promise<Table>;
935
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
882
+ emptyTable(size:number):Promise<Table>;
936
883
  /**
937
- *
938
- * @inheritDoc
939
- * @deprecated
884
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
885
+ * the table will be populated with the interval from the specified date until now.
886
+ * @param periodNanos -
887
+ * @param startTime -
888
+ * @return {@link Promise} of {@link dh.Table}
940
889
  */
941
- join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
942
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
943
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
944
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
945
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
946
- byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
890
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
891
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
892
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
893
+ hasListeners(name:string):boolean;
894
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
895
+ }
896
+
897
+ /**
898
+ * A js type for operating on input tables.
899
+ *
900
+ * Represents a User Input Table, which can have data added to it from other sources.
901
+ *
902
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
903
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
904
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
905
+ * before sending the next operation.
906
+ *
907
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
908
+ *
909
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
910
+ * object.
911
+ */
912
+ export class InputTable {
913
+ protected constructor();
914
+
947
915
  /**
948
- * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
949
- * keys.
950
- * @param keys -
951
- * @param dropKeys -
952
- * @return Promise dh.PartitionedTable
916
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
917
+ * property at that name and validate it can be put into the given column type.
918
+ * @param row -
919
+ * @param userTimeZone -
920
+ * @return Promise of dh.InputTable
953
921
  */
954
- partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
922
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
955
923
  /**
956
- * a promise that will resolve to ColumnStatistics for the column of this table.
957
- * @param column -
958
- * @return Promise of dh.ColumnStatistics
924
+ * Add multiple rows to a table.
925
+ * @param rows -
926
+ * @param userTimeZone -
927
+ * @return Promise of dh.InputTable
959
928
  */
960
- getColumnStatistics(column:Column):Promise<ColumnStatistics>;
929
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
961
930
  /**
962
- * Seek the row matching the data provided
963
- * @param startingRow - Row to start the seek from
964
- * @param column - Column to seek for value on
965
- * @param valueType - Type of value provided
966
- * @param seekValue - Value to seek
967
- * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
968
- * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
969
- * `false`.
970
- * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
971
- * @return A promise that resolves to the row value found.
931
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
932
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
933
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
934
+ * resolved to the same InputTable instance this method was called upon once the server returns.
935
+ * @param tableToAdd -
936
+ * @return Promise of dh.InputTable
972
937
  */
973
- seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
974
- toString():string;
938
+ addTable(tableToAdd:Table):Promise<InputTable>;
975
939
  /**
976
- * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
977
- * .inputTable() to add or remove data from the underlying table.
978
- * @return boolean
940
+ * Add multiple tables to this Input Table.
941
+ * @param tablesToAdd -
942
+ * @return Promise of dh.InputTable
979
943
  */
980
- get hasInputTable():boolean;
944
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
981
945
  /**
982
- * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
983
- * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
984
- * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
985
- * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
986
- * @return {@link dh.Column} array
946
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
947
+ * @param tableToDelete -
948
+ * @return Promise of dh.InputTable
987
949
  */
988
- get columns():Array<Column>;
950
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
989
951
  /**
990
- * The default configuration to be used when building a <b>TotalsTable</b> for this table.
991
- * @return dh.TotalsTableConfig
952
+ * Delete multiple tables from this Input Table.
953
+ * @param tablesToDelete -
954
+ * @return
992
955
  */
993
- get totalsTableConfig():TotalsTableConfig;
956
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
994
957
  /**
995
- * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
996
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
997
- * for the <b>sortchanged</b> event to know when to update the UI.
998
- * @return {@link dh.Sort} array
958
+ * A list of the key columns, by name
959
+ * @return String array.
999
960
  */
1000
- get sort():Array<Sort>;
961
+ get keys():string[];
1001
962
  /**
1002
- * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1003
- * ones. To update, call <b>applyCustomColumns()</b>.
1004
- * @return {@link dh.CustomColumn} array
963
+ * A list of the value columns, by name
964
+ * @return String array.
1005
965
  */
1006
- get customColumns():Array<CustomColumn>;
966
+ get values():string[];
1007
967
  /**
1008
- * True if this table may receive updates from the server, including size changed events, updated events after
1009
- * initial snapshot.
1010
- * @return boolean
968
+ * A list of the key columns.
969
+ * @return Column array.
1011
970
  */
1012
- get isRefreshing():boolean;
971
+ get keyColumns():Column[];
1013
972
  /**
1014
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1015
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
1016
- * for the <b>filterchanged</b> event to know when to update the UI.
1017
- * @return {@link dh.FilterCondition} array
973
+ * A list of the value Column objects
974
+ * @return {@link dh.Column} array.
1018
975
  */
1019
- get filter():Array<FilterCondition>;
976
+ get valueColumns():Column[];
1020
977
  /**
1021
- * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
1022
- * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
1023
- * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
1024
- * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
1025
- * @return double
978
+ * The source table for this Input Table
979
+ * @return dh.table
1026
980
  */
1027
- get totalSize():number;
981
+ get table():Table;
982
+ }
983
+
984
+ /**
985
+ * Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
986
+ */
987
+ export class ConnectOptions {
1028
988
  /**
1029
- * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
1030
- * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
1031
- * property). for details).
1032
- * @return double
989
+ * Optional map of http header names and values to send to the server with each request.
1033
990
  */
1034
- get size():number;
991
+ headers?:{ [key: string]: string; }|null;
1035
992
  /**
1036
- * True if this table has been closed.
1037
- * @return boolean
993
+ * True to enable debug logging. At this time, only enables logging for gRPC calls.
1038
994
  */
1039
- get isClosed():boolean;
995
+ debug?:boolean|null;
1040
996
  /**
1041
- * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
1042
- * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
1043
- * will be unavailable until table is coalesced.
1044
- * @return boolean
997
+ * Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
998
+ * of `fetch`.
999
+ * <p>
1000
+ * Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
1045
1001
  */
1046
- get isUncoalesced():boolean;
1002
+ useWebsockets?:boolean|null;
1003
+
1004
+ constructor();
1005
+ }
1006
+
1007
+ export class CoreClient implements HasEventHandling {
1008
+ static readonly EVENT_CONNECT:string;
1009
+ static readonly EVENT_DISCONNECT:string;
1010
+ static readonly EVENT_RECONNECT:string;
1011
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1012
+ static readonly EVENT_REQUEST_FAILED:string;
1013
+ static readonly EVENT_REQUEST_STARTED:string;
1014
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1047
1015
  /**
1048
- * Listen for events on this object.
1049
- * @param name - the name of the event to listen for
1050
- * @param callback - a function to call when the event occurs
1051
- * @return Returns a cleanup function.
1052
- * @typeParam T - the type of the data that the event will provide
1016
+ * @deprecated
1053
1017
  */
1054
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1055
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1018
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1019
+ static readonly LOGIN_TYPE_PASSWORD:string;
1020
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
1021
+
1022
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
1023
+
1024
+ running():Promise<CoreClient>;
1025
+ getServerUrl():string;
1026
+ getAuthConfigValues():Promise<string[][]>;
1027
+ login(credentials:LoginCredentials):Promise<void>;
1028
+ relogin(token:RefreshToken):Promise<void>;
1029
+ onConnected(timeoutInMillis?:number):Promise<void>;
1030
+ getServerConfigValues():Promise<string[][]>;
1031
+ getStorageService():dh.storage.StorageService;
1032
+ getAsIdeConnection():Promise<IdeConnection>;
1033
+ disconnect():void;
1034
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1035
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1056
1036
  hasListeners(name:string):boolean;
1057
- /**
1058
- * Removes an event listener added to this table.
1059
- * @param name -
1060
- * @param callback -
1061
- * @return
1062
- * @typeParam T -
1063
- */
1064
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1065
- /**
1066
- * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
1067
- * do not support reverse.
1068
- * @return {@link dh.Sort}
1069
- */
1070
- static reverse():Sort;
1037
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1071
1038
  }
1072
1039
 
1040
+ /**
1041
+ * Event fired when a command is issued from the client.
1042
+ */
1043
+ export class CommandInfo {
1044
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1045
+
1046
+ get result():Promise<dh.ide.CommandResult>;
1047
+ get code():string;
1048
+ }
1073
1049
 
1074
1050
  /**
1075
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1076
- * the server to get each Table. All tables will have the same structure.
1051
+ * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
1052
+ * mechanism, and so reimplemented here.
1053
+ * <p>
1054
+ * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
1055
+ * <p>
1056
+ * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
1057
+ * operations are performed, but encourage the client code to re-set them to the desired position.
1058
+ * <p>
1059
+ * The table size will be -1 until a viewport has been fetched.
1060
+ * <p>
1061
+ * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
1062
+ * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
1063
+ * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
1064
+ * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
1065
+ * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
1066
+ * the viewport).
1067
+ * <p>
1068
+ * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
1069
+ * and count of children at each level of the hierarchy, and differences in the data that is available.
1070
+ * <p>
1071
+ * <ul>
1072
+ * <li>There is no {@link Table.totalSize | totalSize} property.</li>
1073
+ * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
1074
+ * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
1075
+ * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
1076
+ * new operation is pending.</li>
1077
+ * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
1078
+ * custom columns applied, and the TreeTable can be recreated.</li>
1079
+ * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
1080
+ * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
1081
+ * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
1082
+ * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
1083
+ * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
1084
+ * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
1085
+ * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
1086
+ * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
1087
+ * where {@link TreeRowImpl.hasChildren} is false will be different from usual.</li>
1088
+ * </ul>
1077
1089
  */
1078
- export class PartitionedTable implements HasEventHandling {
1090
+ export class TreeTable implements HasEventHandling {
1079
1091
  /**
1080
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1092
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1081
1093
  */
1082
- static readonly EVENT_KEYADDED:string;
1094
+ static readonly EVENT_UPDATED:string;
1083
1095
  /**
1084
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1096
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1085
1097
  */
1086
1098
  static readonly EVENT_DISCONNECT:string;
1087
1099
  /**
1088
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1100
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1089
1101
  */
1090
1102
  static readonly EVENT_RECONNECT:string;
1091
1103
  /**
1092
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1104
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1105
+ */
1106
+ static readonly EVENT_RECONNECTFAILED:string;
1107
+ /**
1108
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1109
+ */
1110
+ static readonly EVENT_REQUEST_FAILED:string;
1111
+ readonly description?:string|null;
1112
+ readonly layoutHints?:null|LayoutHints;
1113
+
1114
+ protected constructor();
1115
+
1116
+ /**
1117
+ * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
1118
+ * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
1119
+ * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
1120
+ * boolean parameter.
1121
+ * @param row -
1122
+ * @param expandDescendants -
1123
+ */
1124
+ expand(row:TreeRow|number, expandDescendants?:boolean):void;
1125
+ /**
1126
+ * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
1127
+ * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
1128
+ * @param row -
1129
+ */
1130
+ collapse(row:TreeRow|number):void;
1131
+ /**
1132
+ * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
1133
+ * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
1134
+ * is true, then its children will also be expanded.
1135
+ * @param row - the row to expand or collapse, either the absolute row index or the row object
1136
+ * @param isExpanded - true to expand the row, false to collapse
1137
+ * @param expandDescendants - true to expand the row and all descendants, false to expand only the row, defaults to
1138
+ * false
1093
1139
  */
1094
- static readonly EVENT_RECONNECTFAILED:string;
1095
-
1096
- protected constructor();
1097
-
1098
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1140
+ setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
1141
+ expandAll():void;
1142
+ collapseAll():void;
1099
1143
  /**
1100
- * Fetch the table with the given key. If the key does not exist, returns `null`.
1101
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
1102
- * @return Promise of dh.Table, or `null` if the key does not exist.
1144
+ * Tests if the specified row is expanded.
1145
+ * @param row - the row to test, either the absolute row index or the row object
1146
+ * @return boolean true if the row is expanded, false otherwise
1103
1147
  */
1104
- getTable(key:object):Promise<Table|undefined|null>;
1148
+ isExpanded(row:TreeRow|number):boolean;
1149
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
1150
+ getViewportData():Promise<TreeViewportData>;
1105
1151
  /**
1106
- * Open a new table that is the result of merging all constituent tables. See
1107
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
1108
- * @return A merged representation of the constituent tables.
1152
+ * Indicates that the table will no longer be used, and server resources can be freed.
1109
1153
  */
1110
- getMergedTable():Promise<Table>;
1154
+ close():void;
1111
1155
  /**
1112
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
1113
- * for <b>keyadded</b> will ensure no keys are missed.
1114
- * @return Set of Object
1156
+ * Applies the given sort to all levels of the tree. Returns the previous sort in use.
1157
+ * @param sort -
1158
+ * @return {@link dh.Sort} array
1115
1159
  */
1116
- getKeys():Set<object>;
1160
+ applySort(sort:Sort[]):Array<Sort>;
1117
1161
  /**
1118
- * Fetch a table containing all the valid keys of the partitioned table.
1119
- * @return Promise of a Table
1120
- * @deprecated
1162
+ * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
1163
+ * node will be visible as well even if that parent node would not normally be visible due to the filter's
1164
+ * condition. Returns the previous sort in use.
1165
+ * @param filter -
1166
+ * @return {@link dh.FilterCondition} array
1121
1167
  */
1122
- getKeyTable():Promise<Table>;
1168
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1123
1169
  /**
1124
- * Fetch the underlying base table of the partitioned table.
1125
- * @return Promise of a Table
1170
+ * a column with the given name, or throws an exception if it cannot be found
1171
+ * @param key -
1172
+ * @return {@link dh.Column}
1126
1173
  */
1127
- getBaseTable():Promise<Table>;
1174
+ findColumn(key:string):Column;
1128
1175
  /**
1129
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
1130
- * will not affect tables in use.
1176
+ * an array with all of the named columns in order, or throws an exception if one cannot be found.
1177
+ * @param keys -
1178
+ * @return {@link dh.Column} array
1131
1179
  */
1132
- close():void;
1180
+ findColumns(keys:string[]):Column[];
1133
1181
  /**
1134
- * The count of known keys.
1135
- * @return int
1182
+ * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
1183
+ * values for the given columns in the source table:
1184
+ * <ul>
1185
+ * <li>Rollups may make no sense, since values are aggregated.</li>
1186
+ * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
1187
+ * the tree.</li>
1188
+ * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1189
+ * in the resulting table.</li>
1190
+ * </ul>
1136
1191
  */
1137
- get size():number;
1192
+ selectDistinct(columns:Column[]):Promise<Table>;
1193
+ getTotalsTableConfig():Promise<TotalsTableConfig>;
1194
+ getTotalsTable(config?:object):Promise<TotalsTable>;
1195
+ getGrandTotalsTable(config?:object):Promise<TotalsTable>;
1138
1196
  /**
1139
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
1140
- * non-key columns.
1141
- * @return Array of Column
1197
+ * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1198
+ * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1199
+ * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1200
+ * state is also not copied.
1201
+ * @return Promise of dh.TreeTable
1142
1202
  */
1143
- get columns():Column[];
1203
+ copy():Promise<TreeTable>;
1144
1204
  /**
1145
- * An array of all the key columns that the tables are partitioned by.
1146
- * @return Array of Column
1205
+ * The current filter configuration of this Tree Table.
1206
+ * @return {@link dh.FilterCondition} array
1147
1207
  */
1148
- get keyColumns():Column[];
1208
+ get filter():Array<FilterCondition>;
1149
1209
  /**
1150
- * Listen for events on this object.
1151
- * @param name - the name of the event to listen for
1152
- * @param callback - a function to call when the event occurs
1153
- * @return Returns a cleanup function.
1154
- * @typeParam T - the type of the data that the event will provide
1210
+ * True if this is a roll-up and will provide the original rows that make up each grouping.
1211
+ * @return boolean
1155
1212
  */
1156
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1157
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1158
- hasListeners(name:string):boolean;
1213
+ get includeConstituents():boolean;
1214
+ get groupedColumns():Array<Column>;
1159
1215
  /**
1160
- * Removes an event listener added to this table.
1161
- * @param name -
1162
- * @param callback -
1163
- * @return
1164
- * @typeParam T -
1216
+ * True if this table has been closed.
1217
+ * @return boolean
1165
1218
  */
1166
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1167
- }
1168
-
1169
- /**
1170
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1171
- */
1172
- export class BigDecimalWrapper {
1173
- protected constructor();
1174
-
1175
- static ofString(value:string):BigDecimalWrapper;
1176
- asNumber():number;
1177
- valueOf():string;
1178
- toString():string;
1179
- }
1180
-
1181
- /**
1182
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1183
- * some options, JS applications can run code on the server, and interact with available exportable objects.
1184
- */
1185
- export class IdeConnection implements HasEventHandling {
1219
+ get isClosed():boolean;
1186
1220
  /**
1187
- * @deprecated
1221
+ * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1222
+ * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1223
+ * when considering collapse/expand states).
1224
+ * @return double
1188
1225
  */
1189
- static readonly HACK_CONNECTION_FAILURE:string;
1190
- static readonly EVENT_DISCONNECT:string;
1191
- static readonly EVENT_RECONNECT:string;
1192
- static readonly EVENT_SHUTDOWN:string;
1193
-
1226
+ get size():number;
1194
1227
  /**
1195
- * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1196
- * @param serverUrl - The url used when connecting to the server. Read-only.
1197
- * @param connectOptions - Optional Object
1198
- * @param fromJava - Optional boolean
1199
- * @deprecated
1228
+ * The columns that can be shown in this Tree Table.
1229
+ * @return {@link dh.Column} array
1200
1230
  */
1201
- constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1202
-
1231
+ get columns():Array<Column>;
1203
1232
  /**
1204
- * closes the current connection, releasing any resources on the server or client.
1233
+ * The current sort configuration of this Tree Table
1234
+ * @return {@link dh.Sort} array.
1205
1235
  */
1206
- close():void;
1207
- running():Promise<IdeConnection>;
1208
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1209
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1236
+ get sort():Array<Sort>;
1210
1237
  /**
1211
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1212
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1213
- * log messages as are presently available.
1214
- * @param callback -
1215
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1238
+ * True if this table may receive updates from the server, including size changed events, updated events after
1239
+ * initial snapshot.
1240
+ * @return boolean
1216
1241
  */
1217
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1218
- startSession(type:string):Promise<IdeSession>;
1219
- getConsoleTypes():Promise<Array<string>>;
1220
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1242
+ get isRefreshing():boolean;
1221
1243
  /**
1222
1244
  * Listen for events on this object.
1223
1245
  * @param name - the name of the event to listen for
@@ -1225,129 +1247,19 @@ export namespace dh {
1225
1247
  * @return Returns a cleanup function.
1226
1248
  * @typeParam T - the type of the data that the event will provide
1227
1249
  */
1228
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1229
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1250
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1251
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1230
1252
  hasListeners(name:string):boolean;
1231
1253
  /**
1232
1254
  * Removes an event listener added to this table.
1233
1255
  * @param name -
1234
1256
  * @param callback -
1235
1257
  * @return
1236
- * @typeParam T -
1237
- */
1238
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1239
- }
1240
-
1241
- export class IdeSession implements HasEventHandling {
1242
- static readonly EVENT_COMMANDSTARTED:string;
1243
- static readonly EVENT_REQUEST_FAILED:string;
1244
-
1245
- protected constructor();
1246
-
1247
- /**
1248
- * Load the named table, with columns and size information already fully populated.
1249
- * @param name -
1250
- * @param applyPreviewColumns - optional boolean
1251
- * @return {@link Promise} of {@link dh.Table}
1252
- */
1253
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
1254
- /**
1255
- * Load the named Figure, including its tables and tablemaps as needed.
1256
- * @param name -
1257
- * @return promise of dh.plot.Figure
1258
- */
1259
- getFigure(name:string):Promise<dh.plot.Figure>;
1260
- /**
1261
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
1262
- * size is presently not available until the viewport is first set.
1263
- * @param name -
1264
- * @return {@link Promise} of {@link dh.TreeTable}
1265
- */
1266
- getTreeTable(name:string):Promise<TreeTable>;
1267
- getHierarchicalTable(name:string):Promise<TreeTable>;
1268
- getPartitionedTable(name:string):Promise<PartitionedTable>;
1269
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1270
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1271
- /**
1272
- * Merges the given tables into a single table. Assumes all tables have the same structure.
1273
- * @param tables -
1274
- * @return {@link Promise} of {@link dh.Table}
1275
- */
1276
- mergeTables(tables:Table[]):Promise<Table>;
1277
- bindTableToVariable(table:Table, name:string):Promise<void>;
1278
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1279
- close():void;
1280
- runCode(code:string):Promise<dh.ide.CommandResult>;
1281
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1282
- openDocument(params:object):void;
1283
- changeDocument(params:object):void;
1284
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
1285
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
1286
- getHover(params:object):Promise<dh.lsp.Hover>;
1287
- closeDocument(params:object):void;
1288
- /**
1289
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
1290
- * values will be null.
1291
- * @param size -
1292
- * @return {@link Promise} of {@link dh.Table}
1293
- */
1294
- emptyTable(size:number):Promise<Table>;
1295
- /**
1296
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
1297
- * the table will be populated with the interval from the specified date until now.
1298
- * @param periodNanos -
1299
- * @param startTime -
1300
- * @return {@link Promise} of {@link dh.Table}
1301
- */
1302
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
1303
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1304
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1305
- hasListeners(name:string):boolean;
1306
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1307
- }
1308
-
1309
- export class QueryInfo {
1310
- static readonly EVENT_TABLE_OPENED:string;
1311
- static readonly EVENT_DISCONNECT:string;
1312
- static readonly EVENT_RECONNECT:string;
1313
- static readonly EVENT_CONNECT:string;
1314
-
1315
- protected constructor();
1316
- }
1317
-
1318
- /**
1319
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1320
- *
1321
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1322
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1323
- * value can be provided describing the strategy the engine should use when grouping the rows.
1324
- */
1325
- export class TreeTableConfig {
1326
- /**
1327
- * The column representing the unique ID for each item
1328
- */
1329
- idColumn:string;
1330
- /**
1331
- * The column representing the parent ID for each item
1332
- */
1333
- parentColumn:string;
1334
- /**
1335
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1258
+ * @typeParam T -
1336
1259
  */
1337
- promoteOrphansToRoot:boolean;
1338
-
1339
- constructor();
1260
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1340
1261
  }
1341
1262
 
1342
- /**
1343
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1344
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1345
- */
1346
- export class ConnectOptions {
1347
- headers:{ [key: string]: string; };
1348
-
1349
- constructor();
1350
- }
1351
1263
 
1352
1264
  /**
1353
1265
  * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
@@ -1449,163 +1361,303 @@ export namespace dh {
1449
1361
  }
1450
1362
 
1451
1363
  /**
1452
- * Event fired when a command is issued from the client.
1453
- */
1454
- export class CommandInfo {
1455
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1456
-
1457
- get result():Promise<dh.ide.CommandResult>;
1458
- get code():string;
1459
- }
1460
-
1461
- /**
1462
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1463
- * this type TableMap.
1464
- * @deprecated
1364
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1365
+ *
1366
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1367
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1368
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1465
1369
  */
1466
- export class TableMap {
1467
- static readonly EVENT_KEYADDED:string;
1468
- static readonly EVENT_DISCONNECT:string;
1469
- static readonly EVENT_RECONNECT:string;
1470
- static readonly EVENT_RECONNECTFAILED:string;
1370
+ export class TreeTableConfig {
1371
+ /**
1372
+ * The column representing the unique ID for each item
1373
+ */
1374
+ idColumn:string;
1375
+ /**
1376
+ * The column representing the parent ID for each item
1377
+ */
1378
+ parentColumn:string;
1379
+ /**
1380
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1381
+ */
1382
+ promoteOrphansToRoot:boolean;
1471
1383
 
1472
- protected constructor();
1384
+ constructor();
1473
1385
  }
1474
1386
 
1475
1387
  /**
1476
- * A Widget represents a server side object that sends one or more responses to the client. The client can then
1477
- * interpret these responses to see what to render, or how to respond.
1478
- * <p>
1479
- * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1480
- * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1481
- * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1482
- * object type, the client code that handles the payloads is expected to know what to expect. See
1483
- * {@link dh.WidgetMessageDetails} for more information.
1484
- * <p>
1485
- * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1486
- * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1487
- * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1488
- * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1489
- * remote messages are still pending - it is up to implementations of plugins to handle this case.
1490
- * <p>
1491
- * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1492
- * What it does handle however, is allowing those messages to include references to server-side objects with those
1493
- * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1494
- * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1495
- * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1496
- * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1497
- * entirely to the plugin. Messages will arrive in the order they were sent.
1498
- * <p>
1499
- * This can suggest several patterns for how plugins operate:
1500
- * <ul>
1501
- * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1502
- * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1503
- * `pandas.DataFrame` will result in a widget that only contains a static
1504
- * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1505
- * provided to the JS API consumer.</li>
1506
- * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1507
- * which provided them. One concrete example of this could have been
1508
- * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1509
- * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1510
- * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1511
- * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1512
- * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1513
- * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1514
- * an internal table instance.</li>
1515
- * </ul>
1516
- *
1517
- * Handling server objects in messages also has more than one potential pattern that can be used:
1518
- * <ul>
1519
- * <li>One object per message - the message clearly is about that object, no other details required.</li>
1520
- * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1521
- * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1522
- * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1523
- * be used, which columns should be mapped to each axis.</li>
1524
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1525
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1526
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1527
- * without the server somehow signaling that it will never reference that export again.</li>
1528
- * </ul>
1388
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1389
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1390
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1391
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1392
+ * instance.
1529
1393
  */
1530
- export class Widget implements WidgetMessageDetails, HasEventHandling {
1531
- static readonly EVENT_MESSAGE:string;
1532
- static readonly EVENT_CLOSE:string;
1533
-
1394
+ export class FilterValue {
1534
1395
  protected constructor();
1535
1396
 
1536
1397
  /**
1537
- * Ends the client connection to the server.
1398
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1399
+ * {@link TableData.get} for DateTime values. To create
1400
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1401
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1402
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1403
+ * @param input - the number to wrap as a FilterValue
1404
+ * @return an immutable FilterValue that can be built into a filter
1538
1405
  */
1539
- close():void;
1540
- getDataAsBase64():string;
1541
- getDataAsU8():Uint8Array;
1542
- getDataAsString():string;
1406
+ static ofNumber(input:LongWrapper|number):FilterValue;
1543
1407
  /**
1544
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1545
- * @param msg - string/buffer/view instance that represents data to send
1546
- * @param references - an array of objects that can be safely sent to the server
1408
+ * a filter condition checking if the current value is equal to the given parameter
1409
+ * @param term -
1410
+ * @return {@link dh.FilterCondition}
1411
+ */
1412
+ eq(term:FilterValue):FilterCondition;
1413
+ /**
1414
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1415
+ * vs lower case
1416
+ * @param term -
1417
+ * @return {@link dh.FilterCondition}
1418
+ */
1419
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1420
+ /**
1421
+ * a filter condition checking if the current value is not equal to the given parameter
1422
+ * @param term -
1423
+ * @return {@link dh.FilterCondition}
1424
+ */
1425
+ notEq(term:FilterValue):FilterCondition;
1426
+ /**
1427
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1428
+ * upper vs lower case
1429
+ * @param term -
1430
+ * @return {@link dh.FilterCondition}
1431
+ */
1432
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1433
+ /**
1434
+ * a filter condition checking if the current value is greater than the given parameter
1435
+ * @param term -
1436
+ * @return {@link dh.FilterCondition}
1437
+ */
1438
+ greaterThan(term:FilterValue):FilterCondition;
1439
+ /**
1440
+ * a filter condition checking if the current value is less than the given parameter
1441
+ * @param term -
1442
+ * @return {@link dh.FilterCondition}
1443
+ */
1444
+ lessThan(term:FilterValue):FilterCondition;
1445
+ /**
1446
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1447
+ * @param term -
1448
+ * @return {@link dh.FilterCondition}
1449
+ */
1450
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1451
+ /**
1452
+ * a filter condition checking if the current value is less than or equal to the given parameter
1453
+ * @param term -
1454
+ * @return {@link dh.FilterCondition}
1455
+ */
1456
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1457
+ /**
1458
+ * a filter condition checking if the current value is in the given set of values
1459
+ * @param terms -
1460
+ * @return {@link dh.FilterCondition}
1461
+ */
1462
+ in(terms:FilterValue[]):FilterCondition;
1463
+ /**
1464
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1465
+ * lower case
1466
+ * @param terms -
1467
+ * @return {@link dh.FilterCondition}
1468
+ */
1469
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
1470
+ /**
1471
+ * a filter condition checking that the current value is not in the given set of values
1472
+ * @param terms -
1473
+ * @return {@link dh.FilterCondition}
1474
+ */
1475
+ notIn(terms:FilterValue[]):FilterCondition;
1476
+ /**
1477
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1478
+ * upper vs lower case
1479
+ * @param terms -
1480
+ * @return {@link dh.FilterCondition}
1481
+ */
1482
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1483
+ /**
1484
+ * a filter condition checking if the given value contains the given string value
1485
+ * @param term -
1486
+ * @return {@link dh.FilterCondition}
1487
+ */
1488
+ contains(term:FilterValue):FilterCondition;
1489
+ /**
1490
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1491
+ * lower case
1492
+ * @param term -
1493
+ * @return {@link dh.FilterCondition}
1494
+ */
1495
+ containsIgnoreCase(term:FilterValue):FilterCondition;
1496
+ /**
1497
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1498
+ * use Java regex syntax
1499
+ * @param pattern -
1500
+ * @return {@link dh.FilterCondition}
1501
+ */
1502
+ matches(pattern:FilterValue):FilterCondition;
1503
+ /**
1504
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1505
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1506
+ * @param pattern -
1507
+ * @return {@link dh.FilterCondition}
1508
+ */
1509
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1510
+ /**
1511
+ * a filter condition checking if the current value is a true boolean
1512
+ * @return {@link dh.FilterCondition}
1513
+ */
1514
+ isTrue():FilterCondition;
1515
+ /**
1516
+ * a filter condition checking if the current value is a false boolean
1517
+ * @return {@link dh.FilterCondition}
1518
+ */
1519
+ isFalse():FilterCondition;
1520
+ /**
1521
+ * a filter condition checking if the current value is a null value
1522
+ * @return {@link dh.FilterCondition}
1523
+ */
1524
+ isNull():FilterCondition;
1525
+ /**
1526
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1527
+ * functions that can be invoked on a String:
1528
+ * <ul>
1529
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1530
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1531
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1532
+ * regular expression</li>
1533
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1534
+ * <p>
1535
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1536
+ * </p>
1537
+ * </li>
1538
+ * </ul>
1539
+ * @param method -
1540
+ * @param args -
1541
+ * @return
1547
1542
  */
1548
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1549
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1550
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1551
- hasListeners(name:string):boolean;
1552
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1543
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
1544
+ toString():string;
1553
1545
  /**
1554
- *
1555
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1556
- * them when finished using them.
1546
+ * Constructs a string for the filter API from the given parameter.
1547
+ * @param input -
1548
+ * @return
1557
1549
  */
1558
- get exportedObjects():WidgetExportedObject[];
1550
+ static ofString(input:any):FilterValue;
1559
1551
  /**
1560
- *
1561
- * @return the type of this widget
1552
+ * Constructs a boolean for the filter API from the given parameter.
1553
+ * @param b -
1554
+ * @return
1562
1555
  */
1563
- get type():string;
1556
+ static ofBoolean(b:boolean):FilterValue;
1564
1557
  }
1565
1558
 
1566
1559
  /**
1567
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1568
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1569
- * methods return a new Sort instance.
1560
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1561
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
1570
1562
  */
1571
- export class Sort {
1572
- static readonly ASCENDING:string;
1573
- static readonly DESCENDING:string;
1574
- static readonly REVERSE:string;
1563
+ export class IdeConnection implements HasEventHandling {
1564
+ /**
1565
+ * @deprecated
1566
+ */
1567
+ static readonly HACK_CONNECTION_FAILURE:string;
1568
+ static readonly EVENT_DISCONNECT:string;
1569
+ static readonly EVENT_RECONNECT:string;
1570
+ static readonly EVENT_SHUTDOWN:string;
1575
1571
 
1576
1572
  protected constructor();
1577
1573
 
1578
1574
  /**
1579
- * Builds a Sort instance to sort values in ascending order.
1580
- * @return {@link dh.Sort}
1575
+ * Closes the current connection, releasing any resources on the server or client.
1581
1576
  */
1582
- asc():Sort;
1577
+ close():void;
1578
+ running():Promise<IdeConnection>;
1579
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1580
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1583
1581
  /**
1584
- * Builds a Sort instance to sort values in descending order.
1585
- * @return {@link dh.Sort}
1582
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1583
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1584
+ * log messages as are presently available.
1585
+ * @param callback -
1586
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1586
1587
  */
1587
- desc():Sort;
1588
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1589
+ startSession(type:string):Promise<IdeSession>;
1590
+ getConsoleTypes():Promise<Array<string>>;
1591
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1588
1592
  /**
1589
- * Builds a Sort instance which takes the absolute value before applying order.
1590
- * @return {@link dh.Sort}
1593
+ * Listen for events on this object.
1594
+ * @param name - the name of the event to listen for
1595
+ * @param callback - a function to call when the event occurs
1596
+ * @return Returns a cleanup function.
1597
+ * @typeParam T - the type of the data that the event will provide
1591
1598
  */
1592
- abs():Sort;
1599
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1600
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1601
+ hasListeners(name:string):boolean;
1602
+ /**
1603
+ * Removes an event listener added to this table.
1604
+ * @param name -
1605
+ * @param callback -
1606
+ * @return
1607
+ * @typeParam T -
1608
+ */
1609
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1610
+ }
1611
+
1612
+ export class LongWrapper {
1613
+ protected constructor();
1614
+
1615
+ static ofString(str:string):LongWrapper;
1616
+ asNumber():number;
1617
+ valueOf():string;
1593
1618
  toString():string;
1619
+ }
1620
+
1621
+ /**
1622
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1623
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1624
+ *
1625
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1626
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1627
+ * forward data to it.
1628
+ *
1629
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1630
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1631
+ * viewports to make it less expensive to compute for large tables.
1632
+ */
1633
+ export class TableSubscription implements HasEventHandling {
1634
+ protected constructor();
1635
+
1594
1636
  /**
1595
- * True if the absolute value of the column should be used when sorting; defaults to false.
1596
- * @return boolean
1637
+ * Updates the subscription to use the given columns and update interval.
1638
+ * @param columns - the new columns to subscribe to
1639
+ * @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
1597
1640
  */
1598
- get isAbs():boolean;
1641
+ changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
1642
+ get columns():Array<Column>;
1599
1643
  /**
1600
- * The column which is sorted.
1601
- * @return {@link dh.Column}
1644
+ * Listen for events on this object.
1645
+ * @param name - the name of the event to listen for
1646
+ * @param callback - a function to call when the event occurs
1647
+ * @return Returns a cleanup function.
1648
+ * @typeParam T - the type of the data that the event will provide
1602
1649
  */
1603
- get column():Column;
1650
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1651
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1652
+ hasListeners(name:string):boolean;
1604
1653
  /**
1605
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1606
- * @return String
1654
+ * Removes an event listener added to this table.
1655
+ * @param name -
1656
+ * @param callback -
1657
+ * @return
1658
+ * @typeParam T -
1607
1659
  */
1608
- get direction():string;
1660
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1609
1661
  }
1610
1662
 
1611
1663
  export class CustomColumn {
@@ -1642,373 +1694,433 @@ export namespace dh {
1642
1694
  get type():string;
1643
1695
  }
1644
1696
 
1645
- export class LongWrapper {
1646
- protected constructor();
1647
-
1648
- static ofString(str:string):LongWrapper;
1649
- asNumber():number;
1650
- valueOf():string;
1651
- toString():string;
1652
- }
1653
-
1654
- export class Ide {
1655
- constructor();
1656
-
1697
+ /**
1698
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
1699
+ * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
1700
+ * inform the UI right away that they have taken place.
1701
+ */
1702
+ export class Table implements JoinableTable, HasEventHandling {
1703
+ readonly description?:string|null;
1704
+ readonly pluginName?:string|null;
1705
+ readonly layoutHints?:null|LayoutHints;
1657
1706
  /**
1658
- * @deprecated
1707
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1708
+ */
1709
+ static readonly EVENT_SIZECHANGED:string;
1710
+ /**
1711
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1659
1712
  */
1660
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1713
+ static readonly EVENT_UPDATED:string;
1661
1714
  /**
1662
- * @deprecated
1715
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1716
+ */
1717
+ static readonly EVENT_ROWADDED:string;
1718
+ /**
1719
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1720
+ */
1721
+ static readonly EVENT_ROWREMOVED:string;
1722
+ /**
1723
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1724
+ */
1725
+ static readonly EVENT_ROWUPDATED:string;
1726
+ /**
1727
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1728
+ */
1729
+ static readonly EVENT_SORTCHANGED:string;
1730
+ /**
1731
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1732
+ */
1733
+ static readonly EVENT_FILTERCHANGED:string;
1734
+ /**
1735
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1736
+ */
1737
+ static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
1738
+ /**
1739
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1663
1740
  */
1664
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1665
- }
1666
-
1667
- export class CoreClient implements HasEventHandling {
1668
- static readonly EVENT_CONNECT:string;
1669
1741
  static readonly EVENT_DISCONNECT:string;
1742
+ /**
1743
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1744
+ */
1670
1745
  static readonly EVENT_RECONNECT:string;
1671
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1672
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1746
+ /**
1747
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1748
+ */
1749
+ static readonly EVENT_RECONNECTFAILED:string;
1750
+ /**
1751
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1752
+ */
1673
1753
  static readonly EVENT_REQUEST_FAILED:string;
1674
- static readonly EVENT_REQUEST_STARTED:string;
1754
+ /**
1755
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
1756
+ */
1675
1757
  static readonly EVENT_REQUEST_SUCCEEDED:string;
1676
- static readonly LOGIN_TYPE_PASSWORD:string;
1677
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1678
-
1679
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1680
-
1681
- running():Promise<CoreClient>;
1682
- getServerUrl():string;
1683
- getAuthConfigValues():Promise<string[][]>;
1684
- login(credentials:LoginCredentials):Promise<void>;
1685
- relogin(token:RefreshToken):Promise<void>;
1686
- onConnected(timeoutInMillis?:number):Promise<void>;
1687
- getServerConfigValues():Promise<string[][]>;
1688
- getStorageService():dh.storage.StorageService;
1689
- getAsIdeConnection():Promise<IdeConnection>;
1690
- disconnect():void;
1691
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1692
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1693
- hasListeners(name:string):boolean;
1694
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1695
- }
1696
-
1697
- /**
1698
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1699
- * column.
1700
- */
1701
- export class Column {
1702
1758
  /**
1703
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1704
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1705
- * @return String
1759
+ * The size the table will have if it is uncoalesced.
1706
1760
  */
1707
- readonly constituentType?:string|null;
1708
- readonly description?:string|null;
1761
+ static readonly SIZE_UNCOALESCED:number;
1709
1762
 
1710
1763
  protected constructor();
1711
1764
 
1765
+ batch(userCode:(arg0:unknown)=>void):Promise<Table>;
1712
1766
  /**
1713
- * the value for this column in the given row. Type will be consistent with the type of the Column.
1714
- * @param row -
1715
- * @return Any
1767
+ * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
1768
+ * caching a returned value.
1769
+ * @param key -
1770
+ * @return {@link dh.Column}
1716
1771
  */
1717
- get(row:Row):any;
1718
- getFormat(row:Row):Format;
1772
+ findColumn(key:string):Column;
1773
+ /**
1774
+ * Retrieve multiple columns specified by the given names.
1775
+ * @param keys -
1776
+ * @return {@link dh.Column} array
1777
+ */
1778
+ findColumns(keys:string[]):Column[];
1779
+ isBlinkTable():boolean;
1780
+ /**
1781
+ * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
1782
+ * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
1783
+ * @return Promise of dh.InputTable
1784
+ */
1785
+ inputTable():Promise<InputTable>;
1786
+ /**
1787
+ * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1788
+ */
1789
+ close():void;
1790
+ getAttributes():string[];
1791
+ /**
1792
+ * null if no property exists, a string if it is an easily serializable property, or a ```Promise
1793
+ * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
1794
+ * @param attributeName -
1795
+ * @return Object
1796
+ */
1797
+ getAttribute(attributeName:string):unknown|undefined|null;
1798
+ /**
1799
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
1800
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
1801
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
1802
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
1803
+ * not.
1804
+ * @param sort -
1805
+ * @return {@link dh.Sort} array
1806
+ */
1807
+ applySort(sort:Sort[]):Array<Sort>;
1719
1808
  /**
1720
- * Creates a sort builder object, to be used when sorting by this column.
1721
- * @return {@link dh.Sort}
1809
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
1810
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
1811
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
1812
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
1813
+ * will not.
1814
+ * @param filter -
1815
+ * @return {@link dh.FilterCondition} array
1722
1816
  */
1723
- sort():Sort;
1817
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1724
1818
  /**
1725
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1726
- * operation, or as a builder to create a filter operation.
1727
- * @return {@link dh.FilterValue}
1819
+ * used when adding new filter and sort operations to the table, as long as they are present.
1820
+ * @param customColumns -
1821
+ * @return {@link dh.CustomColumn} array
1728
1822
  */
1729
- filter():FilterValue;
1823
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
1730
1824
  /**
1731
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1732
- * @param expression -
1733
- * @return {@link dh.CustomColumn}
1825
+ * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
1826
+ * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
1827
+ * will result in events to be fired once data becomes available, starting with an `updated` event and a
1828
+ * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
1829
+ * needed.
1830
+ * @param firstRow -
1831
+ * @param lastRow -
1832
+ * @param columns -
1833
+ * @param updateIntervalMs -
1834
+ * @return {@link dh.TableViewportSubscription}
1734
1835
  */
1735
- formatColor(expression:string):CustomColumn;
1836
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
1736
1837
  /**
1737
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1738
- * @param expression -
1739
- * @return {@link dh.CustomColumn}
1838
+ * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
1839
+ * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
1840
+ * separate the lifespan of this promise from the table itself, call
1841
+ * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
1842
+ * @return Promise of {@link dh.TableData}
1740
1843
  */
1741
- formatNumber(expression:string):CustomColumn;
1844
+ getViewportData():Promise<ViewportData>;
1742
1845
  /**
1743
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1744
- * @param expression -
1745
- * @return {@link dh.CustomColumn}
1846
+ * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
1847
+ * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
1848
+ * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
1849
+ * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
1850
+ * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
1851
+ * called on it to stop it, and all events are fired from the TableSubscription instance.
1852
+ * @param columns -
1853
+ * @param updateIntervalMs -
1854
+ * @return {@link dh.TableSubscription}
1746
1855
  */
1747
- formatDate(expression:string):CustomColumn;
1748
- toString():string;
1856
+ subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
1749
1857
  /**
1750
- * Label for this column.
1751
- * @return String
1858
+ * a new table containing the distinct tuples of values from the given columns that are present in the original
1859
+ * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1860
+ * order of appearance of values from the original table.
1861
+ * @param columns -
1862
+ * @return Promise of dh.Table
1752
1863
  */
1753
- get name():string;
1864
+ selectDistinct(columns:Column[]):Promise<Table>;
1754
1865
  /**
1755
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1756
- * <b>isUncoalesced</b> property on <b>Table</b>)
1757
- * @return boolean
1866
+ * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1867
+ * @return Promise of dh.Table
1758
1868
  */
1759
- get isPartitionColumn():boolean;
1869
+ copy():Promise<Table>;
1760
1870
  /**
1761
- *
1762
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1763
- * @return int
1871
+ * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1872
+ * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1873
+ * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1874
+ * called on it when not in use.
1875
+ * @param config -
1876
+ * @return Promise of dh.TotalsTable
1764
1877
  */
1765
- get index():number;
1766
- get isSortable():boolean;
1878
+ getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1767
1879
  /**
1768
- * Type of the row data that can be found in this column.
1769
- * @return String
1880
+ * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1881
+ * above for more specifics.
1882
+ * @param config -
1883
+ * @return promise of dh.TotalsTable
1770
1884
  */
1771
- get type():string;
1885
+ getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1772
1886
  /**
1773
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1774
- * table using <b>applyCustomColumns</b> with the parameters specified.
1775
- * @param expression -
1776
- * @return {@link dh.CustomColumn}
1887
+ * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1888
+ * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1889
+ * @param configObject -
1890
+ * @return Promise of dh.TreeTable
1777
1891
  */
1778
- static formatRowColor(expression:string):CustomColumn;
1892
+ rollup(configObject:RollupConfig):Promise<TreeTable>;
1779
1893
  /**
1780
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1781
- * @param name -
1782
- * @param expression -
1783
- * @return {@link dh.CustomColumn}
1894
+ * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1895
+ * new `TreeTable` which must have close() called on it when not in use.
1896
+ * @param configObject -
1897
+ * @return Promise dh.TreeTable
1784
1898
  */
1785
- static createCustomColumn(name:string, expression:string):CustomColumn;
1786
- }
1787
-
1788
- /**
1789
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1790
- * roll-up table.
1791
- */
1792
- export class RollupConfig {
1899
+ treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
1793
1900
  /**
1794
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1901
+ * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1902
+ * table will not update. This does not change the original table, and the new table will not have any of the client
1903
+ * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1904
+ * @return Promise of dh.Table
1795
1905
  */
1796
- groupingColumns:Array<String>;
1906
+ freeze():Promise<Table>;
1907
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
1797
1908
  /**
1798
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1799
- * roll-up table.
1909
+ *
1910
+ * @inheritDoc
1911
+ * @deprecated
1800
1912
  */
1801
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
1913
+ join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1914
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1915
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
1916
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1917
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1918
+ byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1802
1919
  /**
1803
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1804
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1805
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1806
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
1920
+ * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1921
+ * keys.
1922
+ * @param keys -
1923
+ * @param dropKeys -
1924
+ * @return Promise dh.PartitionedTable
1807
1925
  */
1808
- includeConstituents:boolean;
1809
- includeOriginalColumns?:boolean|null;
1926
+ partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1810
1927
  /**
1811
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1928
+ * a promise that will resolve to ColumnStatistics for the column of this table.
1929
+ * @param column -
1930
+ * @return Promise of dh.ColumnStatistics
1812
1931
  */
1813
- includeDescriptions:boolean;
1814
-
1815
- constructor();
1816
- }
1817
-
1818
- /**
1819
- * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
1820
- * mechanism, and so reimplemented here.
1821
- * <p>
1822
- * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
1823
- * <p>
1824
- * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
1825
- * operations are performed, but encourage the client code to re-set them to the desired position.
1826
- * <p>
1827
- * The table size will be -1 until a viewport has been fetched.
1828
- * <p>
1829
- * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
1830
- * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
1831
- * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
1832
- * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
1833
- * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
1834
- * the viewport).
1835
- * <p>
1836
- * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
1837
- * and count of children at each level of the hierarchy, and differences in the data that is available.
1838
- * <p>
1839
- * <ul>
1840
- * <li>There is no {@link Table.totalSize | totalSize} property.</li>
1841
- * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
1842
- * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
1843
- * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
1844
- * new operation is pending.</li>
1845
- * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
1846
- * custom columns applied, and the TreeTable can be recreated.</li>
1847
- * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
1848
- * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
1849
- * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
1850
- * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
1851
- * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
1852
- * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
1853
- * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
1854
- * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
1855
- * where {@link TreeRow.hasChildren} is false will be different from usual.</li>
1856
- * </ul>
1857
- */
1858
- export class TreeTable implements HasEventHandling {
1932
+ getColumnStatistics(column:Column):Promise<ColumnStatistics>;
1859
1933
  /**
1860
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1934
+ * Seek the row matching the data provided
1935
+ * @param startingRow - Row to start the seek from
1936
+ * @param column - Column to seek for value on
1937
+ * @param valueType - Type of value provided
1938
+ * @param seekValue - Value to seek
1939
+ * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1940
+ * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1941
+ * `false`.
1942
+ * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1943
+ * @return A promise that resolves to the row value found.
1861
1944
  */
1862
- static readonly EVENT_UPDATED:string;
1945
+ seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1946
+ toString():string;
1863
1947
  /**
1864
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1948
+ * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1949
+ * .inputTable() to add or remove data from the underlying table.
1950
+ * @return boolean
1865
1951
  */
1866
- static readonly EVENT_DISCONNECT:string;
1952
+ get hasInputTable():boolean;
1867
1953
  /**
1868
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1954
+ * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1955
+ * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1956
+ * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1957
+ * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
1958
+ * @return {@link dh.Column} array
1869
1959
  */
1870
- static readonly EVENT_RECONNECT:string;
1960
+ get columns():Array<Column>;
1871
1961
  /**
1872
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1962
+ * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1963
+ * @return dh.TotalsTableConfig
1873
1964
  */
1874
- static readonly EVENT_RECONNECTFAILED:string;
1965
+ get totalsTableConfig():TotalsTableConfig;
1875
1966
  /**
1876
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1967
+ * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1968
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1969
+ * for the <b>sortchanged</b> event to know when to update the UI.
1970
+ * @return {@link dh.Sort} array
1877
1971
  */
1878
- static readonly EVENT_REQUEST_FAILED:string;
1879
- readonly description?:string|null;
1880
- readonly layoutHints?:null|LayoutHints;
1881
-
1882
- protected constructor();
1883
-
1972
+ get sort():Array<Sort>;
1884
1973
  /**
1885
- * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
1886
- * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
1887
- * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
1888
- * boolean parameter.
1889
- * @param row -
1890
- * @param expandDescendants -
1974
+ * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1975
+ * ones. To update, call <b>applyCustomColumns()</b>.
1976
+ * @return {@link dh.CustomColumn} array
1977
+ */
1978
+ get customColumns():Array<CustomColumn>;
1979
+ /**
1980
+ * True if this table may receive updates from the server, including size changed events, updated events after
1981
+ * initial snapshot.
1982
+ * @return boolean
1891
1983
  */
1892
- expand(row:TreeRow|number, expandDescendants?:boolean):void;
1984
+ get isRefreshing():boolean;
1893
1985
  /**
1894
- * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
1895
- * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
1896
- * @param row -
1986
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1987
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1988
+ * for the <b>filterchanged</b> event to know when to update the UI.
1989
+ * @return {@link dh.FilterCondition} array
1897
1990
  */
1898
- collapse(row:TreeRow|number):void;
1991
+ get filter():Array<FilterCondition>;
1899
1992
  /**
1900
- * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
1901
- * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
1902
- * is true, then its children will also be expanded.
1903
- * @param row -
1904
- * @param isExpanded -
1905
- * @param expandDescendants -
1993
+ * The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
1994
+ * will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
1995
+ * If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
1996
+ * @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
1906
1997
  */
1907
- setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
1908
- expandAll():void;
1909
- collapseAll():void;
1998
+ get totalSize():number;
1910
1999
  /**
1911
- * true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
1912
- * is available
1913
- * @param row -
1914
- * @return boolean
2000
+ * The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
2001
+ * the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
2002
+ * {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
2003
+ * <p>
2004
+ * When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
2005
+ * @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
2006
+ * uncoalesced.
1915
2007
  */
1916
- isExpanded(row:TreeRow|number):boolean;
1917
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
1918
- getViewportData():Promise<TreeViewportData>;
2008
+ get size():number;
1919
2009
  /**
1920
- * Indicates that the table will no longer be used, and server resources can be freed.
2010
+ * True if this table has been closed.
2011
+ * @return boolean
1921
2012
  */
1922
- close():void;
1923
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2013
+ get isClosed():boolean;
1924
2014
  /**
1925
- * Applies the given sort to all levels of the tree. Returns the previous sort in use.
1926
- * @param sort -
1927
- * @return {@link dh.Sort} array
2015
+ * Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
2016
+ * <p>
2017
+ * Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
2018
+ * subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
2019
+ * this can be very expensive. To see which partitions are available, check each column on the table to see which
2020
+ * have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
2021
+ * for those columns, use {@link Table.selectDistinct}.
2022
+ * @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
1928
2023
  */
1929
- applySort(sort:Sort[]):Array<Sort>;
2024
+ get isUncoalesced():boolean;
1930
2025
  /**
1931
- * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
1932
- * node will be visible as well even if that parent node would not normally be visible due to the filter's
1933
- * condition. Returns the previous sort in use.
1934
- * @param filter -
1935
- * @return {@link dh.FilterCondition} array
2026
+ * Listen for events on this object.
2027
+ * @param name - the name of the event to listen for
2028
+ * @param callback - a function to call when the event occurs
2029
+ * @return Returns a cleanup function.
2030
+ * @typeParam T - the type of the data that the event will provide
1936
2031
  */
1937
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
2032
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2033
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2034
+ hasListeners(name:string):boolean;
1938
2035
  /**
1939
- * a column with the given name, or throws an exception if it cannot be found
1940
- * @param key -
1941
- * @return {@link dh.Column}
2036
+ * Removes an event listener added to this table.
2037
+ * @param name -
2038
+ * @param callback -
2039
+ * @return
2040
+ * @typeParam T -
1942
2041
  */
1943
- findColumn(key:string):Column;
2042
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1944
2043
  /**
1945
- * an array with all of the named columns in order, or throws an exception if one cannot be found.
1946
- * @param keys -
1947
- * @return {@link dh.Column} array
2044
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2045
+ * do not support reverse.
2046
+ * @return {@link dh.Sort}
1948
2047
  */
1949
- findColumns(keys:string[]):Column[];
2048
+ static reverse():Sort;
2049
+ }
2050
+
2051
+ /**
2052
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2053
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2054
+ * methods return a new Sort instance.
2055
+ */
2056
+ export class Sort {
2057
+ static readonly ASCENDING:string;
2058
+ static readonly DESCENDING:string;
2059
+ static readonly REVERSE:string;
2060
+
2061
+ protected constructor();
2062
+
1950
2063
  /**
1951
- * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
1952
- * values for the given columns in the source table:
1953
- * <ul>
1954
- * <li>Rollups may make no sense, since values are aggregated.</li>
1955
- * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
1956
- * the tree.</li>
1957
- * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1958
- * in the resulting table.</li>
1959
- * </ul>
2064
+ * Builds a Sort instance to sort values in ascending order.
2065
+ * @return {@link dh.Sort}
1960
2066
  */
1961
- selectDistinct(columns:Column[]):Promise<Table>;
1962
- getTotalsTableConfig():Promise<TotalsTableConfig>;
1963
- getTotalsTable(config?:object):Promise<TotalsTable>;
1964
- getGrandTotalsTable(config?:object):Promise<TotalsTable>;
2067
+ asc():Sort;
1965
2068
  /**
1966
- * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1967
- * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1968
- * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1969
- * state is also not copied.
1970
- * @return Promise of dh.TreeTable
2069
+ * Builds a Sort instance to sort values in descending order.
2070
+ * @return {@link dh.Sort}
1971
2071
  */
1972
- copy():Promise<TreeTable>;
2072
+ desc():Sort;
1973
2073
  /**
1974
- * The current filter configuration of this Tree Table.
1975
- * @return {@link dh.FilterCondition} array
2074
+ * Builds a Sort instance which takes the absolute value before applying order.
2075
+ * @return {@link dh.Sort}
1976
2076
  */
1977
- get filter():Array<FilterCondition>;
2077
+ abs():Sort;
2078
+ toString():string;
1978
2079
  /**
1979
- * True if this is a roll-up and will provide the original rows that make up each grouping.
2080
+ * True if the absolute value of the column should be used when sorting; defaults to false.
1980
2081
  * @return boolean
1981
2082
  */
1982
- get includeConstituents():boolean;
1983
- get groupedColumns():Array<Column>;
2083
+ get isAbs():boolean;
1984
2084
  /**
1985
- * True if this table has been closed.
1986
- * @return boolean
2085
+ * The column which is sorted.
2086
+ * @return {@link dh.Column}
1987
2087
  */
1988
- get isClosed():boolean;
2088
+ get column():Column;
1989
2089
  /**
1990
- * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1991
- * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1992
- * when considering collapse/expand states).
1993
- * @return double
2090
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2091
+ * @return String
1994
2092
  */
1995
- get size():number;
2093
+ get direction():string;
2094
+ }
2095
+
2096
+ /**
2097
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
2098
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
2099
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
2100
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
2101
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
2102
+ */
2103
+ export class TableViewportSubscription implements HasEventHandling {
2104
+ protected constructor();
2105
+
1996
2106
  /**
1997
- * The columns that can be shown in this Tree Table.
1998
- * @return {@link dh.Column} array
2107
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
2108
+ * @param firstRow -
2109
+ * @param lastRow -
2110
+ * @param columns -
2111
+ * @param updateIntervalMs -
1999
2112
  */
2000
- get columns():Array<Column>;
2113
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
2001
2114
  /**
2002
- * The current sort configuration of this Tree Table
2003
- * @return {@link dh.Sort} array.
2115
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
2004
2116
  */
2005
- get sort():Array<Sort>;
2117
+ close():void;
2006
2118
  /**
2007
- * True if this table may receive updates from the server, including size changed events, updated events after
2008
- * initial snapshot.
2009
- * @return boolean
2119
+ * Gets the data currently visible in this viewport
2120
+ * @return Promise of {@link dh.TableData}.
2010
2121
  */
2011
- get isRefreshing():boolean;
2122
+ getViewportData():Promise<ViewportData>;
2123
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
2012
2124
  /**
2013
2125
  * Listen for events on this object.
2014
2126
  * @param name - the name of the event to listen for
@@ -2016,8 +2128,8 @@ export namespace dh {
2016
2128
  * @return Returns a cleanup function.
2017
2129
  * @typeParam T - the type of the data that the event will provide
2018
2130
  */
2019
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2020
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2131
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2132
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2021
2133
  hasListeners(name:string):boolean;
2022
2134
  /**
2023
2135
  * Removes an event listener added to this table.
@@ -2026,56 +2138,98 @@ export namespace dh {
2026
2138
  * @return
2027
2139
  * @typeParam T -
2028
2140
  */
2029
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2030
- }
2031
-
2032
- /**
2033
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
2034
- */
2035
- export class BigIntegerWrapper {
2036
- protected constructor();
2037
-
2038
- static ofString(str:string):BigIntegerWrapper;
2039
- asNumber():number;
2040
- valueOf():string;
2041
- toString():string;
2141
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2042
2142
  }
2043
2143
 
2044
2144
  /**
2045
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2046
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2047
- *
2048
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2049
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2050
- * forward data to it.
2145
+ * A Widget represents a server side object that sends one or more responses to the client. The client can then
2146
+ * interpret these responses to see what to render, or how to respond.
2147
+ * <p>
2148
+ * Most custom object types result in a single response being sent to the client, often with other exported objects, but
2149
+ * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
2150
+ * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
2151
+ * object type, the client code that handles the payloads is expected to know what to expect. See
2152
+ * {@link dh.WidgetMessageDetails} for more information.
2153
+ * <p>
2154
+ * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
2155
+ * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
2156
+ * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
2157
+ * can close, and after close no more messages will be processed. There can be some latency in closing locally while
2158
+ * remote messages are still pending - it is up to implementations of plugins to handle this case.
2159
+ * <p>
2160
+ * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
2161
+ * What it does handle however, is allowing those messages to include references to server-side objects with those
2162
+ * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
2163
+ * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
2164
+ * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
2165
+ * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
2166
+ * entirely to the plugin. Messages will arrive in the order they were sent.
2167
+ * <p>
2168
+ * This can suggest several patterns for how plugins operate:
2169
+ * <ul>
2170
+ * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
2171
+ * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
2172
+ * `pandas.DataFrame` will result in a widget that only contains a static
2173
+ * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
2174
+ * provided to the JS API consumer.</li>
2175
+ * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
2176
+ * which provided them. One concrete example of this could have been
2177
+ * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
2178
+ * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
2179
+ * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
2180
+ * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
2181
+ * instance, so when the widget goes away, those objects should be released as well. This is also an example of
2182
+ * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
2183
+ * an internal table instance.</li>
2184
+ * </ul>
2051
2185
  *
2052
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2053
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2054
- * viewports to make it less expensive to compute for large tables.
2186
+ * Handling server objects in messages also has more than one potential pattern that can be used:
2187
+ * <ul>
2188
+ * <li>One object per message - the message clearly is about that object, no other details required.</li>
2189
+ * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
2190
+ * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
2191
+ * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
2192
+ * be used, which columns should be mapped to each axis.</li>
2193
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
2194
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
2195
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
2196
+ * without the server somehow signaling that it will never reference that export again.</li>
2197
+ * </ul>
2055
2198
  */
2056
- export class TableSubscription implements HasEventHandling {
2057
- /**
2058
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
2059
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
2060
- * allowing access to the entire range of items currently in the subscribed columns.
2061
- */
2062
- static readonly EVENT_UPDATED:string;
2199
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
2200
+ static readonly EVENT_MESSAGE:string;
2201
+ static readonly EVENT_CLOSE:string;
2063
2202
 
2064
2203
  protected constructor();
2065
2204
 
2066
2205
  /**
2067
- * Stops the subscription on the server.
2206
+ * Ends the client connection to the server.
2207
+ */
2208
+ close():void;
2209
+ getDataAsBase64():string;
2210
+ getDataAsU8():Uint8Array;
2211
+ getDataAsString():string;
2212
+ /**
2213
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
2214
+ * @param msg - string/buffer/view instance that represents data to send
2215
+ * @param references - an array of objects that can be safely sent to the server
2068
2216
  */
2069
- close():void;
2070
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2071
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2217
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
2218
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2219
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2072
2220
  hasListeners(name:string):boolean;
2073
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2221
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2074
2222
  /**
2075
- * The columns that were subscribed to when this subscription was created
2076
- * @return {@link dh.Column}
2223
+ *
2224
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
2225
+ * them when finished using them.
2077
2226
  */
2078
- get columns():Array<Column>;
2227
+ get exportedObjects():WidgetExportedObject[];
2228
+ /**
2229
+ *
2230
+ * @return the type of this widget
2231
+ */
2232
+ get type():string;
2079
2233
  }
2080
2234
 
2081
2235
  /**
@@ -2091,271 +2245,240 @@ export namespace dh {
2091
2245
  }
2092
2246
 
2093
2247
  /**
2094
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
2095
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
2096
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
2097
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
2098
- * instance.
2248
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
2099
2249
  */
2100
- export class FilterValue {
2250
+ export class BigDecimalWrapper {
2101
2251
  protected constructor();
2102
2252
 
2253
+ static ofString(value:string):BigDecimalWrapper;
2254
+ asNumber():number;
2255
+ valueOf():string;
2256
+ toString():string;
2257
+ }
2258
+
2259
+ /**
2260
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
2261
+ * this type TableMap.
2262
+ * @deprecated
2263
+ */
2264
+ export class TableMap {
2265
+ static readonly EVENT_KEYADDED:string;
2266
+ static readonly EVENT_DISCONNECT:string;
2267
+ static readonly EVENT_RECONNECT:string;
2268
+ static readonly EVENT_RECONNECTFAILED:string;
2269
+
2270
+ protected constructor();
2271
+ }
2272
+
2273
+ export class LoginCredentials {
2274
+ type?:string|null;
2275
+ username?:string|null;
2276
+ token?:string|null;
2277
+
2278
+ constructor();
2279
+ }
2280
+
2281
+ /**
2282
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
2283
+ * column.
2284
+ */
2285
+ export class Column {
2103
2286
  /**
2104
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
2105
- * {@link TableData.get} for DateTime values. To create
2106
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
2107
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
2108
- * 64-bit long integer, use {@link LongWrapper.ofString}.
2109
- * @param input - the number to wrap as a FilterValue
2110
- * @return an immutable FilterValue that can be built into a filter
2111
- */
2112
- static ofNumber(input:LongWrapper|number):FilterValue;
2113
- /**
2114
- * a filter condition checking if the current value is equal to the given parameter
2115
- * @param term -
2116
- * @return {@link dh.FilterCondition}
2117
- */
2118
- eq(term:FilterValue):FilterCondition;
2119
- /**
2120
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
2121
- * vs lower case
2122
- * @param term -
2123
- * @return {@link dh.FilterCondition}
2124
- */
2125
- eqIgnoreCase(term:FilterValue):FilterCondition;
2126
- /**
2127
- * a filter condition checking if the current value is not equal to the given parameter
2128
- * @param term -
2129
- * @return {@link dh.FilterCondition}
2130
- */
2131
- notEq(term:FilterValue):FilterCondition;
2132
- /**
2133
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
2134
- * upper vs lower case
2135
- * @param term -
2136
- * @return {@link dh.FilterCondition}
2137
- */
2138
- notEqIgnoreCase(term:FilterValue):FilterCondition;
2139
- /**
2140
- * a filter condition checking if the current value is greater than the given parameter
2141
- * @param term -
2142
- * @return {@link dh.FilterCondition}
2287
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
2288
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
2289
+ * @return String
2143
2290
  */
2144
- greaterThan(term:FilterValue):FilterCondition;
2291
+ readonly constituentType?:string|null;
2292
+ readonly description?:string|null;
2293
+
2294
+ protected constructor();
2295
+
2145
2296
  /**
2146
- * a filter condition checking if the current value is less than the given parameter
2147
- * @param term -
2148
- * @return {@link dh.FilterCondition}
2297
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
2298
+ * @param row -
2299
+ * @return Any
2149
2300
  */
2150
- lessThan(term:FilterValue):FilterCondition;
2301
+ get(row:Row):any;
2302
+ getFormat(row:Row):Format;
2151
2303
  /**
2152
- * a filter condition checking if the current value is greater than or equal to the given parameter
2153
- * @param term -
2154
- * @return {@link dh.FilterCondition}
2304
+ * Creates a sort builder object, to be used when sorting by this column.
2305
+ * @return {@link dh.Sort}
2155
2306
  */
2156
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
2307
+ sort():Sort;
2157
2308
  /**
2158
- * a filter condition checking if the current value is less than or equal to the given parameter
2159
- * @param term -
2160
- * @return {@link dh.FilterCondition}
2309
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
2310
+ * operation, or as a builder to create a filter operation.
2311
+ * @return {@link dh.FilterValue}
2161
2312
  */
2162
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
2313
+ filter():FilterValue;
2163
2314
  /**
2164
- * a filter condition checking if the current value is in the given set of values
2165
- * @param terms -
2166
- * @return {@link dh.FilterCondition}
2315
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
2316
+ * @param expression -
2317
+ * @return {@link dh.CustomColumn}
2167
2318
  */
2168
- in(terms:FilterValue[]):FilterCondition;
2319
+ formatColor(expression:string):CustomColumn;
2169
2320
  /**
2170
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
2171
- * lower case
2172
- * @param terms -
2173
- * @return {@link dh.FilterCondition}
2321
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2322
+ * @param expression -
2323
+ * @return {@link dh.CustomColumn}
2174
2324
  */
2175
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
2325
+ formatNumber(expression:string):CustomColumn;
2176
2326
  /**
2177
- * a filter condition checking that the current value is not in the given set of values
2178
- * @param terms -
2179
- * @return {@link dh.FilterCondition}
2327
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2328
+ * @param expression -
2329
+ * @return {@link dh.CustomColumn}
2180
2330
  */
2181
- notIn(terms:FilterValue[]):FilterCondition;
2331
+ formatDate(expression:string):CustomColumn;
2332
+ toString():string;
2182
2333
  /**
2183
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
2184
- * upper vs lower case
2185
- * @param terms -
2186
- * @return {@link dh.FilterCondition}
2334
+ * Label for this column.
2335
+ * @return String
2187
2336
  */
2188
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
2337
+ get name():string;
2189
2338
  /**
2190
- * a filter condition checking if the given value contains the given string value
2191
- * @param term -
2192
- * @return {@link dh.FilterCondition}
2339
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
2340
+ * {@link Table.uncoalesced}.
2341
+ * @return true if the column is a partition column
2193
2342
  */
2194
- contains(term:FilterValue):FilterCondition;
2343
+ get isPartitionColumn():boolean;
2195
2344
  /**
2196
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
2197
- * lower case
2198
- * @param term -
2199
- * @return {@link dh.FilterCondition}
2345
+ *
2346
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
2347
+ * @return int
2200
2348
  */
2201
- containsIgnoreCase(term:FilterValue):FilterCondition;
2349
+ get index():number;
2350
+ get isSortable():boolean;
2202
2351
  /**
2203
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
2204
- * use Java regex syntax
2205
- * @param pattern -
2206
- * @return {@link dh.FilterCondition}
2352
+ * Type of the row data that can be found in this column.
2353
+ * @return String
2207
2354
  */
2208
- matches(pattern:FilterValue):FilterCondition;
2355
+ get type():string;
2209
2356
  /**
2210
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
2211
- * differences of upper vs lower case. Regex patterns use Java regex syntax
2212
- * @param pattern -
2213
- * @return {@link dh.FilterCondition}
2357
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
2358
+ * table using <b>applyCustomColumns</b> with the parameters specified.
2359
+ * @param expression -
2360
+ * @return {@link dh.CustomColumn}
2214
2361
  */
2215
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
2362
+ static formatRowColor(expression:string):CustomColumn;
2216
2363
  /**
2217
- * a filter condition checking if the current value is a true boolean
2218
- * @return {@link dh.FilterCondition}
2364
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2365
+ * @param name -
2366
+ * @param expression -
2367
+ * @return {@link dh.CustomColumn}
2219
2368
  */
2220
- isTrue():FilterCondition;
2369
+ static createCustomColumn(name:string, expression:string):CustomColumn;
2370
+ }
2371
+
2372
+ /**
2373
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
2374
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
2375
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
2376
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
2377
+ * of <b>TotalsTableConfig</b> will be supplied.
2378
+ *
2379
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
2380
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
2381
+ * expected formats.
2382
+ */
2383
+ export class TotalsTableConfig {
2221
2384
  /**
2222
- * a filter condition checking if the current value is a false boolean
2223
- * @return {@link dh.FilterCondition}
2385
+ * @deprecated
2224
2386
  */
2225
- isFalse():FilterCondition;
2387
+ static readonly COUNT:string;
2226
2388
  /**
2227
- * a filter condition checking if the current value is a null value
2228
- * @return {@link dh.FilterCondition}
2389
+ * @deprecated
2229
2390
  */
2230
- isNull():FilterCondition;
2391
+ static readonly MIN:string;
2231
2392
  /**
2232
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
2233
- * functions that can be invoked on a String:
2234
- * <ul>
2235
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
2236
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
2237
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
2238
- * regular expression</li>
2239
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
2240
- * <p>
2241
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
2242
- * </p>
2243
- * </li>
2244
- * </ul>
2245
- * @param method -
2246
- * @param args -
2247
- * @return
2393
+ * @deprecated
2248
2394
  */
2249
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
2250
- toString():string;
2395
+ static readonly MAX:string;
2251
2396
  /**
2252
- * Constructs a string for the filter API from the given parameter.
2253
- * @param input -
2254
- * @return
2397
+ * @deprecated
2255
2398
  */
2256
- static ofString(input:any):FilterValue;
2399
+ static readonly SUM:string;
2257
2400
  /**
2258
- * Constructs a boolean for the filter API from the given parameter.
2259
- * @param b -
2260
- * @return
2401
+ * @deprecated
2261
2402
  */
2262
- static ofBoolean(b:boolean):FilterValue;
2263
- }
2264
-
2265
- /**
2266
- * A js type for operating on input tables.
2267
- *
2268
- * Represents a User Input Table, which can have data added to it from other sources.
2269
- *
2270
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
2271
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
2272
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
2273
- * before sending the next operation.
2274
- *
2275
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
2276
- *
2277
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
2278
- * object.
2279
- */
2280
- export class InputTable {
2281
- protected constructor();
2282
-
2403
+ static readonly ABS_SUM:string;
2283
2404
  /**
2284
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
2285
- * property at that name and validate it can be put into the given column type.
2286
- * @param row -
2287
- * @param userTimeZone -
2288
- * @return Promise of dh.InputTable
2405
+ * @deprecated
2289
2406
  */
2290
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
2407
+ static readonly VAR:string;
2291
2408
  /**
2292
- * Add multiple rows to a table.
2293
- * @param rows -
2294
- * @param userTimeZone -
2295
- * @return Promise of dh.InputTable
2409
+ * @deprecated
2296
2410
  */
2297
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
2411
+ static readonly AVG:string;
2298
2412
  /**
2299
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
2300
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
2301
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
2302
- * resolved to the same InputTable instance this method was called upon once the server returns.
2303
- * @param tableToAdd -
2304
- * @return Promise of dh.InputTable
2413
+ * @deprecated
2305
2414
  */
2306
- addTable(tableToAdd:Table):Promise<InputTable>;
2415
+ static readonly STD:string;
2307
2416
  /**
2308
- * Add multiple tables to this Input Table.
2309
- * @param tablesToAdd -
2310
- * @return Promise of dh.InputTable
2417
+ * @deprecated
2311
2418
  */
2312
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
2419
+ static readonly FIRST:string;
2313
2420
  /**
2314
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
2315
- * @param tableToDelete -
2316
- * @return Promise of dh.InputTable
2421
+ * @deprecated
2317
2422
  */
2318
- deleteTable(tableToDelete:Table):Promise<InputTable>;
2423
+ static readonly LAST:string;
2319
2424
  /**
2320
- * Delete multiple tables from this Input Table.
2321
- * @param tablesToDelete -
2322
- * @return
2425
+ * @deprecated
2323
2426
  */
2324
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
2427
+ static readonly SKIP:string;
2325
2428
  /**
2326
- * A list of the key columns, by name
2327
- * @return String array.
2429
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
2328
2430
  */
2329
- get keys():string[];
2431
+ showTotalsByDefault:boolean;
2330
2432
  /**
2331
- * A list of the value columns, by name
2332
- * @return String array.
2433
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
2333
2434
  */
2334
- get values():string[];
2435
+ showGrandTotalsByDefault:boolean;
2335
2436
  /**
2336
- * A list of the key columns.
2337
- * @return Column array.
2437
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
2338
2438
  */
2339
- get keyColumns():Column[];
2439
+ defaultOperation:AggregationOperationType;
2340
2440
  /**
2341
- * A list of the value Column objects
2342
- * @return {@link dh.Column} array.
2441
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
2442
+ * Table. If a column is omitted, the defaultOperation is used.
2343
2443
  */
2344
- get valueColumns():Column[];
2444
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
2345
2445
  /**
2346
- * The source table for this Input Table
2347
- * @return dh.table
2446
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
2447
+ * these columns. See also `Table.selectDistinct`.
2348
2448
  */
2349
- get table():Table;
2449
+ groupBy:Array<string>;
2450
+
2451
+ constructor();
2452
+
2453
+ toString():string;
2350
2454
  }
2351
2455
 
2352
- export class DateWrapper extends LongWrapper {
2353
- protected constructor();
2354
2456
 
2355
- static ofJsDate(date:Date):DateWrapper;
2356
- asDate():Date;
2457
+ type ValueTypeType = string;
2458
+ export class ValueType {
2459
+ static readonly STRING:ValueTypeType;
2460
+ static readonly NUMBER:ValueTypeType;
2461
+ static readonly DOUBLE:ValueTypeType;
2462
+ static readonly LONG:ValueTypeType;
2463
+ static readonly DATETIME:ValueTypeType;
2464
+ static readonly BOOLEAN:ValueTypeType;
2357
2465
  }
2358
2466
 
2467
+ /**
2468
+ * A set of string constants that can be used to describe the different objects the JS API can export.
2469
+ */
2470
+ type VariableTypeType = string;
2471
+ export class VariableType {
2472
+ static readonly TABLE:VariableTypeType;
2473
+ static readonly TREETABLE:VariableTypeType;
2474
+ static readonly HIERARCHICALTABLE:VariableTypeType;
2475
+ static readonly TABLEMAP:VariableTypeType;
2476
+ static readonly PARTITIONEDTABLE:VariableTypeType;
2477
+ static readonly FIGURE:VariableTypeType;
2478
+ static readonly OTHERWIDGET:VariableTypeType;
2479
+ static readonly PANDAS:VariableTypeType;
2480
+ static readonly TREEMAP:VariableTypeType;
2481
+ }
2359
2482
 
2360
2483
  /**
2361
2484
  * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
@@ -2378,22 +2501,6 @@ export namespace dh {
2378
2501
  static readonly SKIP:AggregationOperationType;
2379
2502
  }
2380
2503
 
2381
- /**
2382
- * A set of string constants that can be used to describe the different objects the JS API can export.
2383
- */
2384
- type VariableTypeType = string;
2385
- export class VariableType {
2386
- static readonly TABLE:VariableTypeType;
2387
- static readonly TREETABLE:VariableTypeType;
2388
- static readonly HIERARCHICALTABLE:VariableTypeType;
2389
- static readonly TABLEMAP:VariableTypeType;
2390
- static readonly PARTITIONEDTABLE:VariableTypeType;
2391
- static readonly FIGURE:VariableTypeType;
2392
- static readonly OTHERWIDGET:VariableTypeType;
2393
- static readonly PANDAS:VariableTypeType;
2394
- static readonly TREEMAP:VariableTypeType;
2395
- }
2396
-
2397
2504
  type SearchDisplayModeType = string;
2398
2505
  export class SearchDisplayMode {
2399
2506
  static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
@@ -2401,16 +2508,6 @@ export namespace dh {
2401
2508
  static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2402
2509
  }
2403
2510
 
2404
- type ValueTypeType = string;
2405
- export class ValueType {
2406
- static readonly STRING:ValueTypeType;
2407
- static readonly NUMBER:ValueTypeType;
2408
- static readonly DOUBLE:ValueTypeType;
2409
- static readonly LONG:ValueTypeType;
2410
- static readonly DATETIME:ValueTypeType;
2411
- static readonly BOOLEAN:ValueTypeType;
2412
- }
2413
-
2414
2511
  }
2415
2512
 
2416
2513
  export namespace dh.ide {
@@ -2431,35 +2528,6 @@ export namespace dh.ide {
2431
2528
  get error():string;
2432
2529
  }
2433
2530
  /**
2434
- * Specifies a type and either id or name (but not both).
2435
- */
2436
- export interface VariableDescriptor {
2437
- type:string;
2438
- id?:string|null;
2439
- name?:string|null;
2440
- }
2441
- /**
2442
- * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2443
- * server.
2444
- */
2445
- export interface LogItem {
2446
- /**
2447
- * The level of the log message, enabling the client to ignore messages.
2448
- * @return String
2449
- */
2450
- get logLevel():string;
2451
- /**
2452
- * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2453
- * @return double
2454
- */
2455
- get micros():number;
2456
- /**
2457
- * The log message written on the server.
2458
- * @return String
2459
- */
2460
- get message():string;
2461
- }
2462
- /**
2463
2531
  * A format to describe a variable available to be read from the server. Application fields are optional, and only
2464
2532
  * populated when a variable is provided by application mode.
2465
2533
  * <p>
@@ -2501,6 +2569,35 @@ export namespace dh.ide {
2501
2569
  get applicationName():string;
2502
2570
  }
2503
2571
  /**
2572
+ * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2573
+ * server.
2574
+ */
2575
+ export interface LogItem {
2576
+ /**
2577
+ * The level of the log message, enabling the client to ignore messages.
2578
+ * @return String
2579
+ */
2580
+ get logLevel():string;
2581
+ /**
2582
+ * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2583
+ * @return double
2584
+ */
2585
+ get micros():number;
2586
+ /**
2587
+ * The log message written on the server.
2588
+ * @return String
2589
+ */
2590
+ get message():string;
2591
+ }
2592
+ /**
2593
+ * Specifies a type and either id or name (but not both).
2594
+ */
2595
+ export interface VariableDescriptor {
2596
+ type:string;
2597
+ id?:string|null;
2598
+ name?:string|null;
2599
+ }
2600
+ /**
2504
2601
  * Describes changes in the current set of variables in the script session. Note that variables that changed value
2505
2602
  * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2506
2603
  * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
@@ -2508,25 +2605,79 @@ export namespace dh.ide {
2508
2605
  */
2509
2606
  export interface VariableChanges {
2510
2607
  /**
2511
- *
2512
- * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2513
- * different type.
2608
+ *
2609
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2610
+ * different type.
2611
+ */
2612
+ get removed():Array<VariableDefinition>;
2613
+ /**
2614
+ *
2615
+ * @return The variables that were created by this operation, or have a new type.
2616
+ */
2617
+ get created():Array<VariableDefinition>;
2618
+ /**
2619
+ *
2620
+ * @return The variables that changed value during this operation.
2621
+ */
2622
+ get updated():Array<VariableDefinition>;
2623
+ }
2624
+ }
2625
+
2626
+ export namespace dh.i18n {
2627
+
2628
+ /**
2629
+ * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2630
+ *
2631
+ * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2632
+ * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2633
+ * BigDecimal.
2634
+ */
2635
+ export class NumberFormat {
2636
+ /**
2637
+ * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2638
+ * function, which will create and cache an instance so that later calls share the same instance.
2639
+ * @param pattern -
2640
+ */
2641
+ constructor(pattern:string);
2642
+
2643
+ /**
2644
+ * a number format instance matching the specified format. If this format has not been specified before, a new
2645
+ * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2646
+ * take advantage of caching
2647
+ * @param pattern -
2648
+ * @return dh.i18n.NumberFormat
2649
+ */
2650
+ static getFormat(pattern:string):NumberFormat;
2651
+ /**
2652
+ * Parses the given text using the cached format matching the given pattern.
2653
+ * @param pattern -
2654
+ * @param text -
2655
+ * @return double
2656
+ */
2657
+ static parse(pattern:string, text:string):number;
2658
+ /**
2659
+ * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2660
+ * format matching the given pattern string.
2661
+ * @param pattern -
2662
+ * @param number -
2663
+ * @return String
2514
2664
  */
2515
- get removed():Array<VariableDefinition>;
2665
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2516
2666
  /**
2517
- *
2518
- * @return The variables that were created by this operation, or have a new type.
2667
+ * Parses the given text using this instance's pattern into a JS Number.
2668
+ * @param text -
2669
+ * @return double
2519
2670
  */
2520
- get created():Array<VariableDefinition>;
2671
+ parse(text:string):number;
2521
2672
  /**
2522
- *
2523
- * @return The variables that changed value during this operation.
2673
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2674
+ * @param number -
2675
+ * @return String
2524
2676
  */
2525
- get updated():Array<VariableDefinition>;
2677
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2678
+ toString():string;
2526
2679
  }
2527
- }
2528
2680
 
2529
- export namespace dh.i18n {
2530
2681
 
2531
2682
  /**
2532
2683
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
@@ -2626,60 +2777,6 @@ export namespace dh.i18n {
2626
2777
  toString():string;
2627
2778
  }
2628
2779
 
2629
- /**
2630
- * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2631
- *
2632
- * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2633
- * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2634
- * BigDecimal.
2635
- */
2636
- export class NumberFormat {
2637
- /**
2638
- * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2639
- * function, which will create and cache an instance so that later calls share the same instance.
2640
- * @param pattern -
2641
- */
2642
- constructor(pattern:string);
2643
-
2644
- /**
2645
- * a number format instance matching the specified format. If this format has not been specified before, a new
2646
- * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2647
- * take advantage of caching
2648
- * @param pattern -
2649
- * @return dh.i18n.NumberFormat
2650
- */
2651
- static getFormat(pattern:string):NumberFormat;
2652
- /**
2653
- * Parses the given text using the cached format matching the given pattern.
2654
- * @param pattern -
2655
- * @param text -
2656
- * @return double
2657
- */
2658
- static parse(pattern:string, text:string):number;
2659
- /**
2660
- * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2661
- * format matching the given pattern string.
2662
- * @param pattern -
2663
- * @param number -
2664
- * @return String
2665
- */
2666
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2667
- /**
2668
- * Parses the given text using this instance's pattern into a JS Number.
2669
- * @param text -
2670
- * @return double
2671
- */
2672
- parse(text:string):number;
2673
- /**
2674
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2675
- * @param number -
2676
- * @return String
2677
- */
2678
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2679
- toString():string;
2680
- }
2681
-
2682
-
2683
2780
  /**
2684
2781
  * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2685
2782
  * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
@@ -2795,20 +2892,15 @@ export namespace dh.i18n {
2795
2892
 
2796
2893
  export namespace dh.plot {
2797
2894
 
2798
- /**
2799
- * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2800
- */
2801
- export interface MultiSeries {
2802
- /**
2803
- * The name for this multi-series.
2804
- * @return String
2805
- */
2806
- get name():string;
2807
- /**
2808
- * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2809
- * @return int
2810
- */
2811
- get plotStyle():SeriesPlotStyleType;
2895
+ export interface OneClick {
2896
+ setValueForColumn(columnName:string, value:any):void;
2897
+ getValueForColumn(columName:string):any;
2898
+ get requireAllFiltersToDisplay():boolean;
2899
+ get columns():dh.Column[];
2900
+ }
2901
+ export interface FigureDataUpdatedEvent {
2902
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2903
+ get series():Series[];
2812
2904
  }
2813
2905
  /**
2814
2906
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
@@ -2878,16 +2970,6 @@ export namespace dh.plot {
2878
2970
  get formatType():AxisFormatTypeType;
2879
2971
  get minRange():number;
2880
2972
  }
2881
- export interface FigureDataUpdatedEvent {
2882
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2883
- get series():Series[];
2884
- }
2885
- export interface OneClick {
2886
- setValueForColumn(columnName:string, value:any):void;
2887
- getValueForColumn(columName:string):any;
2888
- get requireAllFiltersToDisplay():boolean;
2889
- get columns():dh.Column[];
2890
- }
2891
2973
  /**
2892
2974
  * Provides access to the data for displaying in a figure.
2893
2975
  */
@@ -2933,111 +3015,39 @@ export namespace dh.plot {
2933
3015
  get shapeLabel():string;
2934
3016
  }
2935
3017
  /**
2936
- * Describes how to access and display data required within a series.
3018
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2937
3019
  */
2938
- export interface SeriesDataSource {
3020
+ export interface MultiSeries {
2939
3021
  /**
2940
- * the type of data stored in the underlying table's Column.
3022
+ * The name for this multi-series.
2941
3023
  * @return String
2942
3024
  */
2943
- get columnType():string;
2944
- /**
2945
- * the axis that this source should be drawn on.
2946
- * @return dh.plot.Axis
2947
- */
2948
- get axis():Axis;
3025
+ get name():string;
2949
3026
  /**
2950
- * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
3027
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2951
3028
  * @return int
2952
3029
  */
2953
- get type():SourceTypeType;
3030
+ get plotStyle():SeriesPlotStyleType;
2954
3031
  }
2955
-
2956
3032
  /**
2957
- * Provide the details for a chart.
3033
+ * Describes how to access and display data required within a series.
2958
3034
  */
2959
- export class Chart implements dh.HasEventHandling {
2960
- /**
2961
- * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
2962
- */
2963
- static readonly EVENT_SERIES_ADDED:string;
3035
+ export interface SeriesDataSource {
2964
3036
  /**
2965
- * The title of the chart.
3037
+ * the type of data stored in the underlying table's Column.
2966
3038
  * @return String
2967
3039
  */
2968
- readonly title?:string|null;
2969
-
2970
- protected constructor();
2971
-
2972
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2973
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2974
- hasListeners(name:string):boolean;
2975
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2976
- get column():number;
2977
- get showLegend():boolean;
3040
+ get columnType():string;
2978
3041
  /**
2979
- * The axes used in this chart.
3042
+ * the axis that this source should be drawn on.
2980
3043
  * @return dh.plot.Axis
2981
3044
  */
2982
- get axes():Axis[];
2983
- get is3d():boolean;
2984
- get titleFont():string;
2985
- get colspan():number;
2986
- get titleColor():string;
2987
- get series():Series[];
2988
- get rowspan():number;
3045
+ get axis():Axis;
2989
3046
  /**
2990
- * The type of this chart, see <b>ChartType</b> enum for more details.
3047
+ * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
2991
3048
  * @return int
2992
3049
  */
2993
- get chartType():ChartTypeType;
2994
- get row():number;
2995
- get legendColor():string;
2996
- get legendFont():string;
2997
- get multiSeries():MultiSeries[];
2998
- }
2999
-
3000
- export class DownsampleOptions {
3001
- /**
3002
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3003
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3004
- * series.subscribe().
3005
- */
3006
- static MAX_SERIES_SIZE:number;
3007
- /**
3008
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3009
- * downsampling disabled, the series will not load data.
3010
- */
3011
- static MAX_SUBSCRIPTION_SIZE:number;
3012
- /**
3013
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3014
- * axes are configured.
3015
- */
3016
- static readonly DEFAULT:DownsampleOptions;
3017
- /**
3018
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3019
- * the limit of MAX_SUBSCRIPTION_SIZE.
3020
- */
3021
- static readonly DISABLE:DownsampleOptions;
3022
-
3023
- protected constructor();
3024
- }
3025
-
3026
- /**
3027
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3028
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
3029
- * keep that cached as well.
3030
- */
3031
- export class ChartData {
3032
- constructor(table:dh.Table);
3033
-
3034
- update(tableData:dh.SubscriptionTableData):void;
3035
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3036
- /**
3037
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3038
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3039
- */
3040
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3050
+ get type():SourceTypeType;
3041
3051
  }
3042
3052
 
3043
3053
  export class Figure implements dh.HasEventHandling {
@@ -3111,8 +3121,8 @@ export namespace dh.plot {
3111
3121
  * @return Returns a cleanup function.
3112
3122
  * @typeParam T - the type of the data that the event will provide
3113
3123
  */
3114
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
3115
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3124
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
3125
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
3116
3126
  hasListeners(name:string):boolean;
3117
3127
  /**
3118
3128
  * Removes an event listener added to this table.
@@ -3121,7 +3131,7 @@ export namespace dh.plot {
3121
3131
  * @return
3122
3132
  * @typeParam T -
3123
3133
  */
3124
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3134
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3125
3135
  }
3126
3136
 
3127
3137
  /**
@@ -3158,37 +3168,55 @@ export namespace dh.plot {
3158
3168
  constructor();
3159
3169
  }
3160
3170
 
3171
+ export class FigureFetchError {
3172
+ error:object;
3173
+ errors:Array<string>;
3174
+
3175
+ protected constructor();
3176
+ }
3177
+
3161
3178
  /**
3162
- * Helper class for plot downsampling methods.
3179
+ * Provide the details for a chart.
3163
3180
  */
3164
- export class Downsample {
3181
+ export class Chart implements dh.HasEventHandling {
3182
+ /**
3183
+ * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3184
+ */
3185
+ static readonly EVENT_SERIES_ADDED:string;
3186
+ /**
3187
+ * The title of the chart.
3188
+ * @return String
3189
+ */
3190
+ readonly title?:string|null;
3191
+
3165
3192
  protected constructor();
3166
3193
 
3194
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
3195
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
3196
+ hasListeners(name:string):boolean;
3197
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3198
+ get column():number;
3199
+ get showLegend():boolean;
3167
3200
  /**
3168
- * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3169
- * the same visual fidelity as the original table, but with fewer rows.
3170
- * @param table - The table to downsample.
3171
- * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3172
- * @param yCols - The names of the Y columns to downsample.
3173
- * @param width - The width of the visible area in pixels.
3174
- * @param xRange - The visible range as `[start, end]` or null to always use all data.
3175
- * @return A promise that resolves to the downsampled table.
3201
+ * The axes used in this chart.
3202
+ * @return dh.plot.Axis
3203
+ */
3204
+ get axes():Axis[];
3205
+ get is3d():boolean;
3206
+ get titleFont():string;
3207
+ get colspan():number;
3208
+ get titleColor():string;
3209
+ get series():Series[];
3210
+ get rowspan():number;
3211
+ /**
3212
+ * The type of this chart, see <b>ChartType</b> enum for more details.
3213
+ * @return int
3176
3214
  */
3177
- static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3178
- }
3179
-
3180
- export class FigureFetchError {
3181
- error:object;
3182
- errors:Array<string>;
3183
-
3184
- protected constructor();
3185
- }
3186
-
3187
- export class SeriesDataSourceException {
3188
- protected constructor();
3189
-
3190
- get source():SeriesDataSource;
3191
- get message():string;
3215
+ get chartType():ChartTypeType;
3216
+ get row():number;
3217
+ get legendColor():string;
3218
+ get legendFont():string;
3219
+ get multiSeries():MultiSeries[];
3192
3220
  }
3193
3221
 
3194
3222
  export class AxisDescriptor {
@@ -3224,11 +3252,11 @@ export namespace dh.plot {
3224
3252
  constructor();
3225
3253
  }
3226
3254
 
3227
- export class FigureSourceException {
3228
- table:dh.Table;
3229
- source:SeriesDataSource;
3230
-
3255
+ export class SeriesDataSourceException {
3231
3256
  protected constructor();
3257
+
3258
+ get source():SeriesDataSource;
3259
+ get message():string;
3232
3260
  }
3233
3261
 
3234
3262
  export class SeriesDescriptor {
@@ -3250,6 +3278,75 @@ export namespace dh.plot {
3250
3278
  constructor();
3251
3279
  }
3252
3280
 
3281
+ export class FigureSourceException {
3282
+ table:dh.Table;
3283
+ source:SeriesDataSource;
3284
+
3285
+ protected constructor();
3286
+ }
3287
+
3288
+ export class DownsampleOptions {
3289
+ /**
3290
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3291
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3292
+ * series.subscribe().
3293
+ */
3294
+ static MAX_SERIES_SIZE:number;
3295
+ /**
3296
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3297
+ * downsampling disabled, the series will not load data.
3298
+ */
3299
+ static MAX_SUBSCRIPTION_SIZE:number;
3300
+ /**
3301
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3302
+ * axes are configured.
3303
+ */
3304
+ static readonly DEFAULT:DownsampleOptions;
3305
+ /**
3306
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3307
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3308
+ */
3309
+ static readonly DISABLE:DownsampleOptions;
3310
+
3311
+ protected constructor();
3312
+ }
3313
+
3314
+ /**
3315
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3316
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3317
+ * keep that cached as well.
3318
+ */
3319
+ export class ChartData {
3320
+ constructor(table:dh.Table);
3321
+
3322
+ update(tableData:unknown):void;
3323
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3324
+ /**
3325
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3326
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3327
+ */
3328
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3329
+ }
3330
+
3331
+ /**
3332
+ * Helper class for plot downsampling methods.
3333
+ */
3334
+ export class Downsample {
3335
+ protected constructor();
3336
+
3337
+ /**
3338
+ * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3339
+ * the same visual fidelity as the original table, but with fewer rows.
3340
+ * @param table - The table to downsample.
3341
+ * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3342
+ * @param yCols - The names of the Y columns to downsample.
3343
+ * @param width - The width of the visible area in pixels.
3344
+ * @param xRange - The visible range as `[start, end]` or null to always use all data.
3345
+ * @return A promise that resolves to the downsampled table.
3346
+ */
3347
+ static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3348
+ }
3349
+
3253
3350
 
3254
3351
  type SeriesPlotStyleType = number;
3255
3352
  export class SeriesPlotStyle {
@@ -3267,46 +3364,6 @@ export namespace dh.plot {
3267
3364
  static readonly TREEMAP:SeriesPlotStyleType;
3268
3365
  }
3269
3366
 
3270
- type AxisFormatTypeType = number;
3271
- export class AxisFormatType {
3272
- static readonly CATEGORY:AxisFormatTypeType;
3273
- static readonly NUMBER:AxisFormatTypeType;
3274
- }
3275
-
3276
- type AxisPositionType = number;
3277
- export class AxisPosition {
3278
- static readonly TOP:AxisPositionType;
3279
- static readonly BOTTOM:AxisPositionType;
3280
- static readonly LEFT:AxisPositionType;
3281
- static readonly RIGHT:AxisPositionType;
3282
- static readonly NONE:AxisPositionType;
3283
- }
3284
-
3285
- type AxisTypeType = number;
3286
- export class AxisType {
3287
- static readonly X:AxisTypeType;
3288
- static readonly Y:AxisTypeType;
3289
- static readonly SHAPE:AxisTypeType;
3290
- static readonly SIZE:AxisTypeType;
3291
- static readonly LABEL:AxisTypeType;
3292
- static readonly COLOR:AxisTypeType;
3293
- }
3294
-
3295
- /**
3296
- * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3297
- * those series should be rendered.
3298
- */
3299
- type ChartTypeType = number;
3300
- export class ChartType {
3301
- static readonly XY:ChartTypeType;
3302
- static readonly PIE:ChartTypeType;
3303
- static readonly OHLC:ChartTypeType;
3304
- static readonly CATEGORY:ChartTypeType;
3305
- static readonly XYZ:ChartTypeType;
3306
- static readonly CATEGORY_3D:ChartTypeType;
3307
- static readonly TREEMAP:ChartTypeType;
3308
- }
3309
-
3310
3367
  /**
3311
3368
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3312
3369
  * item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
@@ -3336,23 +3393,49 @@ export namespace dh.plot {
3336
3393
  static readonly HOVER_TEXT:SourceTypeType;
3337
3394
  }
3338
3395
 
3339
- }
3396
+ type AxisFormatTypeType = number;
3397
+ export class AxisFormatType {
3398
+ static readonly CATEGORY:AxisFormatTypeType;
3399
+ static readonly NUMBER:AxisFormatTypeType;
3400
+ }
3340
3401
 
3341
- export namespace dh.lsp {
3402
+ type AxisTypeType = number;
3403
+ export class AxisType {
3404
+ static readonly X:AxisTypeType;
3405
+ static readonly Y:AxisTypeType;
3406
+ static readonly SHAPE:AxisTypeType;
3407
+ static readonly SIZE:AxisTypeType;
3408
+ static readonly LABEL:AxisTypeType;
3409
+ static readonly COLOR:AxisTypeType;
3410
+ }
3342
3411
 
3343
- export class MarkupContent {
3344
- kind:string;
3345
- value:string;
3412
+ type AxisPositionType = number;
3413
+ export class AxisPosition {
3414
+ static readonly TOP:AxisPositionType;
3415
+ static readonly BOTTOM:AxisPositionType;
3416
+ static readonly LEFT:AxisPositionType;
3417
+ static readonly RIGHT:AxisPositionType;
3418
+ static readonly NONE:AxisPositionType;
3419
+ }
3346
3420
 
3347
- constructor();
3421
+ /**
3422
+ * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3423
+ * those series should be rendered.
3424
+ */
3425
+ type ChartTypeType = number;
3426
+ export class ChartType {
3427
+ static readonly XY:ChartTypeType;
3428
+ static readonly PIE:ChartTypeType;
3429
+ static readonly OHLC:ChartTypeType;
3430
+ static readonly CATEGORY:ChartTypeType;
3431
+ static readonly XYZ:ChartTypeType;
3432
+ static readonly CATEGORY_3D:ChartTypeType;
3433
+ static readonly TREEMAP:ChartTypeType;
3348
3434
  }
3349
3435
 
3350
- export class ParameterInformation {
3351
- label:string;
3352
- documentation:MarkupContent;
3436
+ }
3353
3437
 
3354
- constructor();
3355
- }
3438
+ export namespace dh.lsp {
3356
3439
 
3357
3440
  export class TextDocumentContentChangeEvent {
3358
3441
  range:Range;
@@ -3362,6 +3445,13 @@ export namespace dh.lsp {
3362
3445
  constructor();
3363
3446
  }
3364
3447
 
3448
+ export class MarkupContent {
3449
+ kind:string;
3450
+ value:string;
3451
+
3452
+ constructor();
3453
+ }
3454
+
3365
3455
  export class Hover {
3366
3456
  contents:MarkupContent;
3367
3457
  range:Range;
@@ -3369,20 +3459,28 @@ export namespace dh.lsp {
3369
3459
  constructor();
3370
3460
  }
3371
3461
 
3372
- export class TextEdit {
3373
- range:Range;
3374
- text:string;
3462
+ export class ParameterInformation {
3463
+ label:string;
3464
+ documentation:MarkupContent;
3375
3465
 
3376
3466
  constructor();
3377
3467
  }
3378
3468
 
3379
- export class Range {
3380
- start:Position;
3381
- end:Position;
3469
+ export class CompletionItem {
3470
+ label:string;
3471
+ kind:number;
3472
+ detail:string;
3473
+ documentation:MarkupContent;
3474
+ deprecated:boolean;
3475
+ preselect:boolean;
3476
+ textEdit:TextEdit;
3477
+ sortText:string;
3478
+ filterText:string;
3479
+ insertTextFormat:number;
3480
+ additionalTextEdits:Array<TextEdit>;
3481
+ commitCharacters:Array<string>;
3382
3482
 
3383
3483
  constructor();
3384
-
3385
- isInside(innerStart:Position, innerEnd:Position):boolean;
3386
3484
  }
3387
3485
 
3388
3486
  export class Position {
@@ -3398,35 +3496,33 @@ export namespace dh.lsp {
3398
3496
  copy():Position;
3399
3497
  }
3400
3498
 
3401
- export class SignatureInformation {
3402
- label:string;
3403
- documentation:MarkupContent;
3404
- parameters:Array<ParameterInformation>;
3405
- activeParameter:number;
3499
+ export class TextEdit {
3500
+ range:Range;
3501
+ text:string;
3406
3502
 
3407
3503
  constructor();
3408
3504
  }
3409
3505
 
3410
- export class CompletionItem {
3506
+ export class Range {
3507
+ start:Position;
3508
+ end:Position;
3509
+
3510
+ constructor();
3511
+
3512
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3513
+ }
3514
+
3515
+ export class SignatureInformation {
3411
3516
  label:string;
3412
- kind:number;
3413
- detail:string;
3414
3517
  documentation:MarkupContent;
3415
- deprecated:boolean;
3416
- preselect:boolean;
3417
- textEdit:TextEdit;
3418
- sortText:string;
3419
- filterText:string;
3420
- insertTextFormat:number;
3421
- additionalTextEdits:Array<TextEdit>;
3422
- commitCharacters:Array<string>;
3518
+ parameters:Array<ParameterInformation>;
3519
+ activeParameter:number;
3423
3520
 
3424
3521
  constructor();
3425
3522
  }
3426
3523
 
3427
3524
  }
3428
3525
 
3429
-
3430
3526
  export namespace dh.calendar {
3431
3527
 
3432
3528
  export interface Holiday {
@@ -3441,10 +3537,6 @@ export namespace dh.calendar {
3441
3537
  */
3442
3538
  get businessPeriods():Array<BusinessPeriod>;
3443
3539
  }
3444
- export interface BusinessPeriod {
3445
- get close():string;
3446
- get open():string;
3447
- }
3448
3540
  /**
3449
3541
  * Defines a calendar with business hours and holidays.
3450
3542
  */
@@ -3475,6 +3567,10 @@ export namespace dh.calendar {
3475
3567
  */
3476
3568
  get businessPeriods():Array<BusinessPeriod>;
3477
3569
  }
3570
+ export interface BusinessPeriod {
3571
+ get close():string;
3572
+ get open():string;
3573
+ }
3478
3574
 
3479
3575
  type DayOfWeekType = string;
3480
3576
  export class DayOfWeek {
@@ -3490,3 +3586,4 @@ export namespace dh.calendar {
3490
3586
  }
3491
3587
 
3492
3588
  }
3589
+