@deephaven/jsapi-types 1.0.0-dev0.33.0 → 1.0.0-dev0.33.1

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 +1508 -1490
  2. package/package.json +2 -5
package/dist/index.d.ts CHANGED
@@ -17,6 +17,36 @@ export interface IIterableResult<T> {
17
17
  }
18
18
  export namespace dh.storage {
19
19
 
20
+ /**
21
+ * Storage service metadata about files and folders.
22
+ */
23
+ export class ItemDetails {
24
+ protected constructor();
25
+
26
+ get filename():string;
27
+ get basename():string;
28
+ get size():number;
29
+ get etag():string;
30
+ get type():ItemTypeType;
31
+ get dirname():string;
32
+ }
33
+
34
+ /**
35
+ * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
36
+ * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
37
+ * be used.
38
+ */
39
+ export class FileContents {
40
+ protected constructor();
41
+
42
+ static blob(blob:Blob):FileContents;
43
+ static text(...text:string[]):FileContents;
44
+ static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
45
+ text():Promise<string>;
46
+ arrayBuffer():Promise<ArrayBuffer>;
47
+ get etag():string;
48
+ }
49
+
20
50
  /**
21
51
  * Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
22
52
  */
@@ -75,36 +105,6 @@ export namespace dh.storage {
75
105
  createDirectory(path:string):Promise<void>;
76
106
  }
77
107
 
78
- /**
79
- * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
80
- * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
81
- * be used.
82
- */
83
- export class FileContents {
84
- protected constructor();
85
-
86
- static blob(blob:Blob):FileContents;
87
- static text(...text:string[]):FileContents;
88
- static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
89
- text():Promise<string>;
90
- arrayBuffer():Promise<ArrayBuffer>;
91
- get etag():string;
92
- }
93
-
94
- /**
95
- * Storage service metadata about files and folders.
96
- */
97
- export class ItemDetails {
98
- protected constructor();
99
-
100
- get filename():string;
101
- get basename():string;
102
- get size():number;
103
- get etag():string;
104
- get type():ItemTypeType;
105
- get dirname():string;
106
- }
107
-
108
108
 
109
109
  type ItemTypeType = string;
110
110
  export class ItemType {
@@ -116,6 +116,47 @@ export namespace dh.storage {
116
116
 
117
117
  export namespace dh {
118
118
 
119
+ /**
120
+ * Common interface for various ways of accessing table data and formatting.
121
+ *
122
+ * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
123
+ * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
124
+ */
125
+ export interface TableData {
126
+ get(index:LongWrapper|number):Row;
127
+ getData(index:LongWrapper|number, column:Column):any;
128
+ getFormat(index:LongWrapper|number, column:Column):Format;
129
+ get columns():Array<Column>;
130
+ get rows():Array<Row>;
131
+ }
132
+ /**
133
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
134
+ * table column.
135
+ */
136
+ export interface ColumnStatistics {
137
+ /**
138
+ * Gets the type of formatting that should be used for given statistic.
139
+ * <p>
140
+ * the format type for a statistic. A null return value means that the column formatting should be used.
141
+ * @param name - the display name of the statistic
142
+ * @return String
143
+ */
144
+ getType(name:string):string;
145
+ /**
146
+ * Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
147
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
148
+ * than 19 unique values.
149
+ * @return Map of String double
150
+ */
151
+ get uniqueValues():Map<string, number>;
152
+ /**
153
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
154
+ * <p>
155
+ * A map of each statistic's name to its value.
156
+ * @return Map of String and Object
157
+ */
158
+ get statisticsMap():Map<string, object>;
159
+ }
119
160
  /**
120
161
  * This object may be pooled internally or discarded and not updated. Do not retain references to it.
121
162
  */
@@ -141,17 +182,45 @@ export namespace dh {
141
182
  */
142
183
  readonly numberFormat?:string|null;
143
184
  }
144
- export interface JoinableTable {
145
- freeze():Promise<Table>;
146
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
185
+ /**
186
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table,
187
+ * but with additional properties to reflect the tree structure.
188
+ */
189
+ export interface TreeRow extends ViewportRow {
147
190
  /**
148
- * @deprecated
191
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
192
+ * rows below this one with a greater depth than this one
193
+ * @return boolean
149
194
  */
150
- join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:object):Promise<Table>;
151
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:string):Promise<Table>;
152
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
153
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
154
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
195
+ get isExpanded():boolean;
196
+ /**
197
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
198
+ * row and its expand/collapse icon
199
+ * @return int
200
+ */
201
+ get depth():number;
202
+ /**
203
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when
204
+ * the table updates, depending on the table's configuration
205
+ * @return boolean
206
+ */
207
+ get hasChildren():boolean;
208
+ get index():LongWrapper;
209
+ }
210
+ export interface LayoutHints {
211
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
212
+
213
+ get hiddenColumns():string[]|null;
214
+ get frozenColumns():string[]|null;
215
+ get columnGroups():ColumnGroup[]|null;
216
+ get areSavedLayoutsAllowed():boolean;
217
+ get frontColumns():string[]|null;
218
+ get backColumns():string[]|null;
219
+ }
220
+ export interface Row {
221
+ get(column:Column):any;
222
+ getFormat(column:Column):Format;
223
+ get index():LongWrapper;
155
224
  }
156
225
  /**
157
226
  * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
@@ -165,26 +234,81 @@ export namespace dh {
165
234
  toString():string;
166
235
  }
167
236
  /**
168
- * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
169
- * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
170
- * for easier scrolling without going to the server.
237
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
238
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
239
+ * are correctly freed.
171
240
  */
172
- export interface ViewportData extends TableData {
241
+ export interface WidgetExportedObject {
173
242
  /**
174
- * The index of the first returned row
175
- * @return double
243
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
244
+ * null, this object cannot be fetched, but can be passed to the server, such as via
245
+ * {@link Widget.sendMessage}.
246
+ * @return the string type of this server-side object, or null.
176
247
  */
177
- get offset():number;
248
+ readonly type?:string|null;
249
+
178
250
  /**
179
- * A list of columns describing the data types in each row
180
- * @return {@link dh.Column} array.
251
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
252
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
253
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
181
254
  */
182
- get columns():Array<Column>;
255
+ reexport():Promise<WidgetExportedObject>;
183
256
  /**
184
- * An array of rows of data
185
- * @return {@link dh.ViewportRow} array.
257
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
258
+ * the same instance.
259
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
186
260
  */
187
- get rows():Array<ViewportRow>;
261
+ fetch():Promise<any>;
262
+ /**
263
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
264
+ * exist that also use that object. Should not be called after fetch() has been invoked.
265
+ */
266
+ close():void;
267
+ }
268
+ /**
269
+ * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
270
+ * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
271
+ * <p>
272
+ * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
273
+ * server. The setViewport method can be used to adjust this table instead of creating a new one.
274
+ * <p>
275
+ * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
276
+ * to the underlying handle and accumulated data.
277
+ * <p>
278
+ * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
279
+ * the idea then that the caller did not actually use this type. This means that for every exported method (which then
280
+ * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
281
+ * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
282
+ * deems it no longer in use.
283
+ * <p>
284
+ * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
285
+ * true), providing a way to stop the server from streaming updates to the client.
286
+ *
287
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
288
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
289
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
290
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
291
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
292
+ */
293
+ export interface TableViewportSubscription extends HasEventHandling {
294
+ /**
295
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
296
+ * @param firstRow -
297
+ * @param lastRow -
298
+ * @param columns -
299
+ * @param updateIntervalMs -
300
+ */
301
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
302
+ /**
303
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
304
+ */
305
+ close():void;
306
+ /**
307
+ * Gets the data currently visible in this viewport
308
+ * @return Promise of {@link dh.TableData}.
309
+ */
310
+ getViewportData():Promise<TableData>;
311
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
188
312
  }
189
313
  /**
190
314
  * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
@@ -315,73 +439,25 @@ export namespace dh {
315
439
  */
316
440
  get isRefreshing():boolean;
317
441
  }
318
- /**
319
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
320
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
321
- *
322
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
323
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
324
- * backwards compatibility and to better follow JS expectations.
325
- */
326
- export interface WidgetMessageDetails {
327
- /**
328
- * Returns the data from this message as a base64-encoded string.
329
- */
330
- getDataAsBase64():string;
442
+ export interface HasEventHandling {
331
443
  /**
332
- * Returns the data from this message as a Uint8Array.
444
+ * Listen for events on this object.
445
+ * @param name - the name of the event to listen for
446
+ * @param callback - a function to call when the event occurs
447
+ * @return Returns a cleanup function.
448
+ * @typeParam T - the type of the data that the event will provide
333
449
  */
334
- getDataAsU8():Uint8Array;
450
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
451
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
452
+ hasListeners(name:string):boolean;
335
453
  /**
336
- * Returns the data from this message as a utf-8 string.
454
+ * Removes an event listener added to this table.
455
+ * @param name -
456
+ * @param callback -
457
+ * @return
458
+ * @typeParam T -
337
459
  */
338
- getDataAsString():string;
339
- /**
340
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
341
- * objects, and should close them when no longer needed.
342
- */
343
- get exportedObjects():WidgetExportedObject[];
344
- }
345
- /**
346
- * Row implementation that also provides additional read-only properties. represents visible rows in the table,
347
- * but with additional properties to reflect the tree structure.
348
- */
349
- export interface TreeRow extends ViewportRow {
350
- /**
351
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
352
- * rows below this one with a greater depth than this one
353
- * @return boolean
354
- */
355
- get isExpanded():boolean;
356
- /**
357
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
358
- * row and its expand/collapse icon
359
- * @return int
360
- */
361
- get depth():number;
362
- /**
363
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when
364
- * the table updates, depending on the table's configuration
365
- * @return boolean
366
- */
367
- get hasChildren():boolean;
368
- get index():LongWrapper;
369
- }
370
- export interface RefreshToken {
371
- get bytes():string;
372
- get expiry():number;
373
- }
374
- export interface ColumnGroup {
375
- get name():string|null;
376
- get children():string[]|null;
377
- get color():string|null;
378
- }
379
- /**
380
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
381
- * the viewport again.
382
- */
383
- export interface ViewportRow extends Row {
384
- get index():LongWrapper;
460
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
385
461
  }
386
462
  /**
387
463
  * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
@@ -415,44 +491,41 @@ export namespace dh {
415
491
  * @return dh.RangeSet
416
492
  */
417
493
  get modified():RangeSet;
418
- get rows():Array<unknown>;
494
+ get rows():Array<Row>;
419
495
  }
420
- export interface Row {
421
- get(column:Column):any;
422
- getFormat(column:Column):Format;
496
+ /**
497
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
498
+ * the viewport again.
499
+ */
500
+ export interface ViewportRow extends Row {
423
501
  get index():LongWrapper;
424
502
  }
425
503
  /**
426
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
427
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
428
- * are correctly freed.
504
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
505
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
506
+ *
507
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
508
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
509
+ * backwards compatibility and to better follow JS expectations.
429
510
  */
430
- export interface WidgetExportedObject {
511
+ export interface WidgetMessageDetails {
431
512
  /**
432
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
433
- * null, this object cannot be fetched, but can be passed to the server, such as via
434
- * {@link Widget.sendMessage}.
435
- * @return the string type of this server-side object, or null.
513
+ * Returns the data from this message as a base64-encoded string.
436
514
  */
437
- readonly type?:string|null;
438
-
515
+ getDataAsBase64():string;
439
516
  /**
440
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
441
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
442
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
517
+ * Returns the data from this message as a Uint8Array.
443
518
  */
444
- reexport():Promise<WidgetExportedObject>;
519
+ getDataAsU8():Uint8Array;
445
520
  /**
446
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
447
- * the same instance.
448
- * @return a promise that will resolve to a client side object that represents the reference on the server.
521
+ * Returns the data from this message as a utf-8 string.
449
522
  */
450
- fetch():Promise<any>;
523
+ getDataAsString():string;
451
524
  /**
452
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
453
- * exist that also use that object. Should not be called after fetch() has been invoked.
525
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
526
+ * objects, and should close them when no longer needed.
454
527
  */
455
- close():void;
528
+ get exportedObjects():WidgetExportedObject[];
456
529
  }
457
530
  /**
458
531
  * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
@@ -464,290 +537,96 @@ export namespace dh {
464
537
  getDayOfMonth():number;
465
538
  toString():string;
466
539
  }
540
+ export interface WorkerHeapInfo {
541
+ /**
542
+ * Total heap size available for this worker.
543
+ */
544
+ get totalHeapSize():number;
545
+ get freeMemory():number;
546
+ get maximumHeapSize():number;
547
+ }
467
548
  /**
468
- * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
469
- * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
470
- * <p>
471
- * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
472
- * server. The setViewport method can be used to adjust this table instead of creating a new one.
473
- * <p>
474
- * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
475
- * to the underlying handle and accumulated data.
476
- * <p>
477
- * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
478
- * the idea then that the caller did not actually use this type. This means that for every exported method (which then
479
- * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
480
- * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
481
- * deems it no longer in use.
482
- * <p>
483
- * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
484
- * true), providing a way to stop the server from streaming updates to the client.
485
- *
486
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
487
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
488
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
489
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
490
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
549
+ * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
550
+ * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
551
+ * for easier scrolling without going to the server.
491
552
  */
492
- export interface TableViewportSubscription extends HasEventHandling {
553
+ export interface ViewportData extends TableData {
493
554
  /**
494
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
495
- * @param firstRow -
496
- * @param lastRow -
497
- * @param columns -
498
- * @param updateIntervalMs -
555
+ * The index of the first returned row
556
+ * @return double
499
557
  */
500
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
558
+ get offset():number;
501
559
  /**
502
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
560
+ * A list of columns describing the data types in each row
561
+ * @return {@link dh.Column} array.
503
562
  */
504
- close():void;
563
+ get columns():Array<Column>;
505
564
  /**
506
- * Gets the data currently visible in this viewport
507
- * @return Promise of {@link dh.TableData}.
565
+ * An array of rows of data
566
+ * @return {@link dh.ViewportRow} array.
508
567
  */
509
- getViewportData():Promise<TableData>;
510
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
568
+ get rows():Array<ViewportRow>;
511
569
  }
512
- export interface HasEventHandling {
513
- /**
514
- * Listen for events on this object.
515
- * @param name - the name of the event to listen for
516
- * @param callback - a function to call when the event occurs
517
- * @return Returns a cleanup function.
518
- * @typeParam T - the type of the data that the event will provide
519
- */
520
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
521
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
522
- hasListeners(name:string):boolean;
570
+ export interface RefreshToken {
571
+ get bytes():string;
572
+ get expiry():number;
573
+ }
574
+ export interface JoinableTable {
575
+ freeze():Promise<Table>;
576
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
523
577
  /**
524
- * Removes an event listener added to this table.
525
- * @param name -
526
- * @param callback -
527
- * @return
528
- * @typeParam T -
578
+ * @deprecated
529
579
  */
530
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
580
+ join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:object):Promise<Table>;
581
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:string):Promise<Table>;
582
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
583
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
584
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
531
585
  }
532
- /**
533
- * Common interface for various ways of accessing table data and formatting.
534
- *
535
- * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
536
- * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
537
- */
538
- export interface TableData {
539
- get(index:LongWrapper|number):Row;
540
- getData(index:LongWrapper|number, column:Column):any;
541
- getFormat(index:LongWrapper|number, column:Column):Format;
542
- get columns():Array<Column>;
543
- get rows():Array<unknown>;
586
+ export interface ColumnGroup {
587
+ get name():string|null;
588
+ get children():string[]|null;
589
+ get color():string|null;
544
590
  }
545
591
  export interface TreeViewportData extends TableData {
546
592
  get offset():number;
547
593
  get columns():Array<Column>;
548
594
  get rows():Array<TreeRow>;
549
595
  }
550
- export interface LayoutHints {
551
- readonly searchDisplayMode?:SearchDisplayModeType|null;
552
596
 
553
- get hiddenColumns():string[]|null;
554
- get frozenColumns():string[]|null;
555
- get columnGroups():ColumnGroup[]|null;
556
- get areSavedLayoutsAllowed():boolean;
557
- get frontColumns():string[];
558
- get backColumns():string[]|null;
559
- }
560
- /**
561
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
562
- * table column.
563
- */
564
- export interface ColumnStatistics {
597
+ export class IdeSession implements HasEventHandling {
598
+ static readonly EVENT_COMMANDSTARTED:string;
599
+ static readonly EVENT_REQUEST_FAILED:string;
600
+
601
+ protected constructor();
602
+
565
603
  /**
566
- * Gets the type of formatting that should be used for given statistic.
567
- * <p>
568
- * the format type for a statistic. A null return value means that the column formatting should be used.
569
- * @param name - the display name of the statistic
570
- * @return String
604
+ * Load the named table, with columns and size information already fully populated.
605
+ * @param name -
606
+ * @param applyPreviewColumns - optional boolean
607
+ * @return {@link Promise} of {@link dh.Table}
571
608
  */
572
- getType(name:string):string;
609
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
573
610
  /**
574
- * Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
575
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
576
- * than 19 unique values.
577
- * @return Map of String double
611
+ * Load the named Figure, including its tables and tablemaps as needed.
612
+ * @param name -
613
+ * @return promise of dh.plot.Figure
578
614
  */
579
- get uniqueValues():Map<string, number>;
615
+ getFigure(name:string):Promise<dh.plot.Figure>;
580
616
  /**
581
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
582
- * <p>
583
- * A map of each statistic's name to its value.
584
- * @return Map of String and Object
617
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
618
+ * size is presently not available until the viewport is first set.
619
+ * @param name -
620
+ * @return {@link Promise} of {@link dh.TreeTable}
585
621
  */
586
- get statisticsMap():Map<string, object>;
587
- }
588
- export interface WorkerHeapInfo {
622
+ getTreeTable(name:string):Promise<TreeTable>;
623
+ getHierarchicalTable(name:string):Promise<TreeTable>;
624
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
625
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
589
626
  /**
590
- * Total heap size available for this worker.
591
- */
592
- get totalHeapSize():number;
593
- get freeMemory():number;
594
- get maximumHeapSize():number;
595
- }
596
-
597
- /**
598
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
599
- */
600
- export class BigIntegerWrapper {
601
- protected constructor();
602
-
603
- static ofString(str:string):BigIntegerWrapper;
604
- asNumber():number;
605
- valueOf():string;
606
- toString():string;
607
- }
608
-
609
- /**
610
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
611
- * some options, JS applications can run code on the server, and interact with available exportable objects.
612
- */
613
- export class IdeConnection implements HasEventHandling {
614
- /**
615
- * @deprecated
616
- */
617
- static readonly HACK_CONNECTION_FAILURE:string;
618
- static readonly EVENT_DISCONNECT:string;
619
- static readonly EVENT_RECONNECT:string;
620
- static readonly EVENT_SHUTDOWN:string;
621
-
622
- /**
623
- * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
624
- * @param serverUrl - The url used when connecting to the server. Read-only.
625
- * @param connectOptions - Optional Object
626
- * @param fromJava - Optional boolean
627
- * @deprecated
628
- */
629
- constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
630
-
631
- /**
632
- * closes the current connection, releasing any resources on the server or client.
633
- */
634
- close():void;
635
- running():Promise<IdeConnection>;
636
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
637
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
638
- /**
639
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
640
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
641
- * log messages as are presently available.
642
- * @param callback -
643
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
644
- */
645
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
646
- startSession(type:string):Promise<IdeSession>;
647
- getConsoleTypes():Promise<Array<string>>;
648
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
649
- }
650
-
651
- /**
652
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
653
- * this type TableMap.
654
- * @deprecated
655
- */
656
- export class TableMap {
657
- static readonly EVENT_KEYADDED:string;
658
- static readonly EVENT_DISCONNECT:string;
659
- static readonly EVENT_RECONNECT:string;
660
- static readonly EVENT_RECONNECTFAILED:string;
661
-
662
- protected constructor();
663
- }
664
-
665
- /**
666
- * Deprecated for use in Deephaven Core.
667
- * @deprecated
668
- */
669
- export class Client {
670
- static readonly EVENT_REQUEST_FAILED:string;
671
- static readonly EVENT_REQUEST_STARTED:string;
672
- static readonly EVENT_REQUEST_SUCCEEDED:string;
673
-
674
- constructor();
675
- }
676
-
677
- export class CustomColumn {
678
- static readonly TYPE_FORMAT_COLOR:string;
679
- static readonly TYPE_FORMAT_NUMBER:string;
680
- static readonly TYPE_FORMAT_DATE:string;
681
- static readonly TYPE_NEW:string;
682
-
683
- protected constructor();
684
-
685
- valueOf():string;
686
- toString():string;
687
- /**
688
- * The expression to evaluate this custom column.
689
- * @return String
690
- */
691
- get expression():string;
692
- /**
693
- * The name of the column to use.
694
- * @return String
695
- */
696
- get name():string;
697
- /**
698
- * Type of custom column. One of
699
- *
700
- * <ul>
701
- * <li>FORMAT_COLOR</li>
702
- * <li>FORMAT_NUMBER</li>
703
- * <li>FORMAT_DATE</li>
704
- * <li>NEW</li>
705
- * </ul>
706
- * @return String
707
- */
708
- get type():string;
709
- }
710
-
711
- export class DateWrapper extends LongWrapper {
712
- protected constructor();
713
-
714
- static ofJsDate(date:Date):DateWrapper;
715
- asDate():Date;
716
- }
717
-
718
- export class IdeSession implements HasEventHandling {
719
- static readonly EVENT_COMMANDSTARTED:string;
720
- static readonly EVENT_REQUEST_FAILED:string;
721
-
722
- protected constructor();
723
-
724
- /**
725
- * Load the named table, with columns and size information already fully populated.
726
- * @param name -
727
- * @param applyPreviewColumns - optional boolean
728
- * @return {@link Promise} of {@link dh.Table}
729
- */
730
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
731
- /**
732
- * Load the named Figure, including its tables and tablemaps as needed.
733
- * @param name -
734
- * @return promise of dh.plot.Figure
735
- */
736
- getFigure(name:string):Promise<dh.plot.Figure>;
737
- /**
738
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
739
- * size is presently not available until the viewport is first set.
740
- * @param name -
741
- * @return {@link Promise} of {@link dh.TreeTable}
742
- */
743
- getTreeTable(name:string):Promise<TreeTable>;
744
- getHierarchicalTable(name:string):Promise<TreeTable>;
745
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
746
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
747
- /**
748
- * Merges the given tables into a single table. Assumes all tables have the same structure.
749
- * @param tables -
750
- * @return {@link Promise} of {@link dh.Table}
627
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
628
+ * @param tables -
629
+ * @return {@link Promise} of {@link dh.Table}
751
630
  */
752
631
  mergeTables(tables:Table[]):Promise<Table>;
753
632
  bindTableToVariable(table:Table, name:string):Promise<void>;
@@ -783,91 +662,283 @@ export namespace dh {
783
662
  }
784
663
 
785
664
  /**
786
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
787
- * roll-up table.
665
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
788
666
  */
789
- export class RollupConfig {
790
- /**
791
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
792
- */
793
- groupingColumns:Array<String>;
794
- /**
795
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
796
- * roll-up table.
797
- */
798
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
799
- /**
800
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
801
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
802
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
803
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
804
- */
805
- includeConstituents:boolean;
806
- includeOriginalColumns?:boolean|null;
807
- /**
808
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
809
- */
810
- includeDescriptions:boolean;
811
-
812
- constructor();
813
- }
814
-
815
- export class LongWrapper {
667
+ export class BigIntegerWrapper {
816
668
  protected constructor();
817
669
 
818
- static ofString(str:string):LongWrapper;
670
+ static ofString(str:string):BigIntegerWrapper;
819
671
  asNumber():number;
820
672
  valueOf():string;
821
673
  toString():string;
822
674
  }
823
675
 
824
676
  /**
825
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
826
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
827
- * methods return a new Sort instance.
677
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
678
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
679
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
680
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
681
+ * instance.
828
682
  */
829
- export class Sort {
830
- static readonly ASCENDING:string;
831
- static readonly DESCENDING:string;
832
- static readonly REVERSE:string;
833
-
683
+ export class FilterValue {
834
684
  protected constructor();
835
685
 
836
686
  /**
837
- * Builds a Sort instance to sort values in ascending order.
838
- * @return {@link dh.Sort}
687
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
688
+ * {@link TableData.get} for DateTime values. To create
689
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
690
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
691
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
692
+ * @param input - the number to wrap as a FilterValue
693
+ * @return an immutable FilterValue that can be built into a filter
839
694
  */
840
- asc():Sort;
695
+ static ofNumber(input:LongWrapper|number):FilterValue;
841
696
  /**
842
- * Builds a Sort instance to sort values in descending order.
843
- * @return {@link dh.Sort}
697
+ * a filter condition checking if the current value is equal to the given parameter
698
+ * @param term -
699
+ * @return {@link dh.FilterCondition}
844
700
  */
845
- desc():Sort;
701
+ eq(term:FilterValue):FilterCondition;
846
702
  /**
847
- * Builds a Sort instance which takes the absolute value before applying order.
848
- * @return {@link dh.Sort}
703
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
704
+ * vs lower case
705
+ * @param term -
706
+ * @return {@link dh.FilterCondition}
849
707
  */
850
- abs():Sort;
851
- toString():string;
708
+ eqIgnoreCase(term:FilterValue):FilterCondition;
852
709
  /**
853
- * True if the absolute value of the column should be used when sorting; defaults to false.
854
- * @return boolean
710
+ * a filter condition checking if the current value is not equal to the given parameter
711
+ * @param term -
712
+ * @return {@link dh.FilterCondition}
855
713
  */
856
- get isAbs():boolean;
714
+ notEq(term:FilterValue):FilterCondition;
857
715
  /**
858
- * The column which is sorted.
859
- * @return {@link dh.Column}
716
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
717
+ * upper vs lower case
718
+ * @param term -
719
+ * @return {@link dh.FilterCondition}
860
720
  */
861
- get column():Column;
721
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
862
722
  /**
863
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
864
- * @return String
723
+ * a filter condition checking if the current value is greater than the given parameter
724
+ * @param term -
725
+ * @return {@link dh.FilterCondition}
865
726
  */
866
- get direction():string;
867
- }
868
-
869
- /**
870
- * Provides access to data in a table. Note that several methods present their response through Promises. This allows
727
+ greaterThan(term:FilterValue):FilterCondition;
728
+ /**
729
+ * a filter condition checking if the current value is less than the given parameter
730
+ * @param term -
731
+ * @return {@link dh.FilterCondition}
732
+ */
733
+ lessThan(term:FilterValue):FilterCondition;
734
+ /**
735
+ * a filter condition checking if the current value is greater than or equal to the given parameter
736
+ * @param term -
737
+ * @return {@link dh.FilterCondition}
738
+ */
739
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
740
+ /**
741
+ * a filter condition checking if the current value is less than or equal to the given parameter
742
+ * @param term -
743
+ * @return {@link dh.FilterCondition}
744
+ */
745
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
746
+ /**
747
+ * a filter condition checking if the current value is in the given set of values
748
+ * @param terms -
749
+ * @return {@link dh.FilterCondition}
750
+ */
751
+ in(terms:FilterValue[]):FilterCondition;
752
+ /**
753
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
754
+ * lower case
755
+ * @param terms -
756
+ * @return {@link dh.FilterCondition}
757
+ */
758
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
759
+ /**
760
+ * a filter condition checking that the current value is not in the given set of values
761
+ * @param terms -
762
+ * @return {@link dh.FilterCondition}
763
+ */
764
+ notIn(terms:FilterValue[]):FilterCondition;
765
+ /**
766
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
767
+ * upper vs lower case
768
+ * @param terms -
769
+ * @return {@link dh.FilterCondition}
770
+ */
771
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
772
+ /**
773
+ * a filter condition checking if the given value contains the given string value
774
+ * @param term -
775
+ * @return {@link dh.FilterCondition}
776
+ */
777
+ contains(term:FilterValue):FilterCondition;
778
+ /**
779
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
780
+ * lower case
781
+ * @param term -
782
+ * @return {@link dh.FilterCondition}
783
+ */
784
+ containsIgnoreCase(term:FilterValue):FilterCondition;
785
+ /**
786
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
787
+ * use Java regex syntax
788
+ * @param pattern -
789
+ * @return {@link dh.FilterCondition}
790
+ */
791
+ matches(pattern:FilterValue):FilterCondition;
792
+ /**
793
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
794
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
795
+ * @param pattern -
796
+ * @return {@link dh.FilterCondition}
797
+ */
798
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
799
+ /**
800
+ * a filter condition checking if the current value is a true boolean
801
+ * @return {@link dh.FilterCondition}
802
+ */
803
+ isTrue():FilterCondition;
804
+ /**
805
+ * a filter condition checking if the current value is a false boolean
806
+ * @return {@link dh.FilterCondition}
807
+ */
808
+ isFalse():FilterCondition;
809
+ /**
810
+ * a filter condition checking if the current value is a null value
811
+ * @return {@link dh.FilterCondition}
812
+ */
813
+ isNull():FilterCondition;
814
+ /**
815
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
816
+ * functions that can be invoked on a String:
817
+ * <ul>
818
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
819
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
820
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
821
+ * regular expression</li>
822
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
823
+ * <p>
824
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
825
+ * </p>
826
+ * </li>
827
+ * </ul>
828
+ * @param method -
829
+ * @param args -
830
+ * @return
831
+ */
832
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
833
+ toString():string;
834
+ /**
835
+ * Constructs a string for the filter API from the given parameter.
836
+ * @param input -
837
+ * @return
838
+ */
839
+ static ofString(input:any):FilterValue;
840
+ /**
841
+ * Constructs a boolean for the filter API from the given parameter.
842
+ * @param b -
843
+ * @return
844
+ */
845
+ static ofBoolean(b:boolean):FilterValue;
846
+ }
847
+
848
+
849
+ /**
850
+ * A Widget represents a server side object that sends one or more responses to the client. The client can then
851
+ * interpret these responses to see what to render, or how to respond.
852
+ * <p>
853
+ * Most custom object types result in a single response being sent to the client, often with other exported objects, but
854
+ * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
855
+ * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
856
+ * object type, the client code that handles the payloads is expected to know what to expect. See
857
+ * {@link dh.WidgetMessageDetails} for more information.
858
+ * <p>
859
+ * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
860
+ * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
861
+ * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
862
+ * can close, and after close no more messages will be processed. There can be some latency in closing locally while
863
+ * remote messages are still pending - it is up to implementations of plugins to handle this case.
864
+ * <p>
865
+ * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
866
+ * What it does handle however, is allowing those messages to include references to server-side objects with those
867
+ * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
868
+ * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
869
+ * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
870
+ * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
871
+ * entirely to the plugin. Messages will arrive in the order they were sent.
872
+ * <p>
873
+ * This can suggest several patterns for how plugins operate:
874
+ * <ul>
875
+ * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
876
+ * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
877
+ * `pandas.DataFrame` will result in a widget that only contains a static
878
+ * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
879
+ * provided to the JS API consumer.</li>
880
+ * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
881
+ * which provided them. One concrete example of this could have been
882
+ * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
883
+ * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
884
+ * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
885
+ * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
886
+ * instance, so when the widget goes away, those objects should be released as well. This is also an example of
887
+ * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
888
+ * an internal table instance.</li>
889
+ * </ul>
890
+ *
891
+ * Handling server objects in messages also has more than one potential pattern that can be used:
892
+ * <ul>
893
+ * <li>One object per message - the message clearly is about that object, no other details required.</li>
894
+ * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
895
+ * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
896
+ * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
897
+ * be used, which columns should be mapped to each axis.</li>
898
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
899
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
900
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
901
+ * without the server somehow signaling that it will never reference that export again.</li>
902
+ * </ul>
903
+ */
904
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
905
+ static readonly EVENT_MESSAGE:string;
906
+ static readonly EVENT_CLOSE:string;
907
+
908
+ protected constructor();
909
+
910
+ /**
911
+ * Ends the client connection to the server.
912
+ */
913
+ close():void;
914
+ getDataAsBase64():string;
915
+ getDataAsU8():Uint8Array;
916
+ getDataAsString():string;
917
+ /**
918
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
919
+ * @param msg - string/buffer/view instance that represents data to send
920
+ * @param references - an array of objects that can be safely sent to the server
921
+ */
922
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
923
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
924
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
925
+ hasListeners(name:string):boolean;
926
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
927
+ /**
928
+ *
929
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
930
+ * them when finished using them.
931
+ */
932
+ get exportedObjects():WidgetExportedObject[];
933
+ /**
934
+ *
935
+ * @return the type of this widget
936
+ */
937
+ get type():string;
938
+ }
939
+
940
+ /**
941
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
871
942
  * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
872
943
  * inform the UI right away that they have taken place.
873
944
  */
@@ -1232,315 +1303,268 @@ export namespace dh {
1232
1303
  static reverse():Sort;
1233
1304
  }
1234
1305
 
1306
+ export class Ide {
1307
+ constructor();
1308
+
1309
+ /**
1310
+ * @deprecated
1311
+ */
1312
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1313
+ /**
1314
+ * @deprecated
1315
+ */
1316
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1317
+ }
1235
1318
 
1236
1319
  /**
1237
- * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
1238
- * mechanism, and so reimplemented here.
1239
- * <p>
1240
- * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
1241
- * <p>
1242
- * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
1243
- * operations are performed, but encourage the client code to re-set them to the desired position.
1244
- * <p>
1245
- * The table size will be -1 until a viewport has been fetched.
1246
- * <p>
1247
- * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
1248
- * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
1249
- * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
1250
- * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
1251
- * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
1252
- * the viewport).
1253
- * <p>
1254
- * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
1255
- * and count of children at each level of the hierarchy, and differences in the data that is available.
1256
- * <p>
1257
- * <ul>
1258
- * <li>There is no {@link Table.totalSize | totalSize} property.</li>
1259
- * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
1260
- * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
1261
- * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
1262
- * new operation is pending.</li>
1263
- * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
1264
- * custom columns applied, and the TreeTable can be recreated.</li>
1265
- * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
1266
- * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
1267
- * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
1268
- * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
1269
- * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
1270
- * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
1271
- * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
1272
- * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
1273
- * where {@link TreeRow.hasChildren} is false will be different from usual.</li>
1274
- * </ul>
1320
+ * Deprecated for use in Deephaven Core.
1321
+ * @deprecated
1275
1322
  */
1276
- export class TreeTable implements HasEventHandling {
1323
+ export class Client {
1324
+ static readonly EVENT_REQUEST_FAILED:string;
1325
+ static readonly EVENT_REQUEST_STARTED:string;
1326
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1327
+
1328
+ constructor();
1329
+ }
1330
+
1331
+ export class LongWrapper {
1332
+ protected constructor();
1333
+
1334
+ static ofString(str:string):LongWrapper;
1335
+ asNumber():number;
1336
+ valueOf():string;
1337
+ toString():string;
1338
+ }
1339
+
1340
+ /**
1341
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1342
+ *
1343
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1344
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1345
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1346
+ */
1347
+ export class TreeTableConfig {
1277
1348
  /**
1278
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1349
+ * The column representing the unique ID for each item
1279
1350
  */
1280
- static readonly EVENT_UPDATED:string;
1351
+ idColumn:string;
1281
1352
  /**
1282
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1353
+ * The column representing the parent ID for each item
1283
1354
  */
1284
- static readonly EVENT_DISCONNECT:string;
1355
+ parentColumn:string;
1285
1356
  /**
1286
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1357
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1287
1358
  */
1288
- static readonly EVENT_RECONNECT:string;
1359
+ promoteOrphansToRoot:boolean;
1360
+
1361
+ constructor();
1362
+ }
1363
+
1364
+ /**
1365
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1366
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1367
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1368
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1369
+ * of <b>TotalsTableConfig</b> will be supplied.
1370
+ *
1371
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1372
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1373
+ * expected formats.
1374
+ */
1375
+ export class TotalsTableConfig {
1289
1376
  /**
1290
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1377
+ * @deprecated
1291
1378
  */
1292
- static readonly EVENT_RECONNECTFAILED:string;
1379
+ static readonly COUNT:string;
1293
1380
  /**
1294
- * event.detail is the currently visible viewport data based on the active viewport configuration.
1381
+ * @deprecated
1295
1382
  */
1296
- static readonly EVENT_REQUEST_FAILED:string;
1297
- readonly description?:string|null;
1298
-
1299
- protected constructor();
1300
-
1383
+ static readonly MIN:string;
1301
1384
  /**
1302
- * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
1303
- * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
1304
- * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
1305
- * boolean parameter.
1306
- * @param row -
1307
- * @param expandDescendants -
1385
+ * @deprecated
1308
1386
  */
1309
- expand(row:TreeRow|number, expandDescendants?:boolean):void;
1387
+ static readonly MAX:string;
1310
1388
  /**
1311
- * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
1312
- * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
1313
- * @param row -
1389
+ * @deprecated
1314
1390
  */
1315
- collapse(row:TreeRow|number):void;
1391
+ static readonly SUM:string;
1316
1392
  /**
1317
- * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
1318
- * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
1319
- * is true, then its children will also be expanded.
1320
- * @param row -
1321
- * @param isExpanded -
1322
- * @param expandDescendants -
1393
+ * @deprecated
1323
1394
  */
1324
- setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
1325
- expandAll():void;
1326
- collapseAll():void;
1395
+ static readonly ABS_SUM:string;
1327
1396
  /**
1328
- * true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
1329
- * is available
1330
- * @param row -
1331
- * @return boolean
1397
+ * @deprecated
1332
1398
  */
1333
- isExpanded(row:TreeRow|number):boolean;
1334
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
1335
- getViewportData():Promise<TreeViewportData>;
1399
+ static readonly VAR:string;
1336
1400
  /**
1337
- * Indicates that the table will no longer be used, and server resources can be freed.
1401
+ * @deprecated
1338
1402
  */
1339
- close():void;
1340
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1403
+ static readonly AVG:string;
1341
1404
  /**
1342
- * Applies the given sort to all levels of the tree. Returns the previous sort in use.
1343
- * @param sort -
1344
- * @return {@link dh.Sort} array
1405
+ * @deprecated
1345
1406
  */
1346
- applySort(sort:Sort[]):Array<Sort>;
1407
+ static readonly STD:string;
1347
1408
  /**
1348
- * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
1349
- * node will be visible as well even if that parent node would not normally be visible due to the filter's
1350
- * condition. Returns the previous sort in use.
1351
- * @param filter -
1352
- * @return {@link dh.FilterCondition} array
1409
+ * @deprecated
1353
1410
  */
1354
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1411
+ static readonly FIRST:string;
1355
1412
  /**
1356
- * a column with the given name, or throws an exception if it cannot be found
1357
- * @param key -
1358
- * @return {@link dh.Column}
1413
+ * @deprecated
1359
1414
  */
1360
- findColumn(key:string):Column;
1415
+ static readonly LAST:string;
1361
1416
  /**
1362
- * an array with all of the named columns in order, or throws an exception if one cannot be found.
1363
- * @param keys -
1364
- * @return {@link dh.Column} array
1417
+ * @deprecated
1365
1418
  */
1366
- findColumns(keys:string[]):Column[];
1419
+ static readonly SKIP:string;
1367
1420
  /**
1368
- * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
1369
- * values for the given columns in the source table:
1370
- * <ul>
1371
- * <li>Rollups may make no sense, since values are aggregated.</li>
1372
- * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
1373
- * the tree.</li>
1374
- * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1375
- * in the resulting table.</li>
1376
- * </ul>
1421
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1377
1422
  */
1378
- selectDistinct(columns:Column[]):Promise<Table>;
1379
- getTotalsTableConfig():Promise<TotalsTableConfig>;
1380
- getTotalsTable(config?:object):Promise<TotalsTable>;
1381
- getGrandTotalsTable(config?:object):Promise<TotalsTable>;
1423
+ showTotalsByDefault:boolean;
1382
1424
  /**
1383
- * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1384
- * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1385
- * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1386
- * state is also not copied.
1387
- * @return Promise of dh.TreeTable
1425
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1388
1426
  */
1389
- copy():Promise<TreeTable>;
1427
+ showGrandTotalsByDefault:boolean;
1390
1428
  /**
1391
- * The current filter configuration of this Tree Table.
1392
- * @return {@link dh.FilterCondition} array
1429
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1393
1430
  */
1394
- get filter():Array<FilterCondition>;
1431
+ defaultOperation:AggregationOperationType;
1395
1432
  /**
1396
- * True if this is a roll-up and will provide the original rows that make up each grouping.
1397
- * @return boolean
1433
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1434
+ * Table. If a column is omitted, the defaultOperation is used.
1398
1435
  */
1399
- get includeConstituents():boolean;
1400
- get groupedColumns():Array<Column>;
1436
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
1401
1437
  /**
1402
- * True if this table has been closed.
1403
- * @return boolean
1438
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1439
+ * these columns. See also `Table.selectDistinct`.
1404
1440
  */
1405
- get isClosed():boolean;
1441
+ groupBy:Array<string>;
1442
+
1443
+ constructor();
1444
+
1445
+ toString():string;
1446
+ }
1447
+
1448
+ /**
1449
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1450
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1451
+ * methods return a new Sort instance.
1452
+ */
1453
+ export class Sort {
1454
+ static readonly ASCENDING:string;
1455
+ static readonly DESCENDING:string;
1456
+ static readonly REVERSE:string;
1457
+
1458
+ protected constructor();
1459
+
1406
1460
  /**
1407
- * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1408
- * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1409
- * when considering collapse/expand states).
1410
- * @return double
1461
+ * Builds a Sort instance to sort values in ascending order.
1462
+ * @return {@link dh.Sort}
1411
1463
  */
1412
- get size():number;
1464
+ asc():Sort;
1413
1465
  /**
1414
- * The columns that can be shown in this Tree Table.
1415
- * @return {@link dh.Column} array
1466
+ * Builds a Sort instance to sort values in descending order.
1467
+ * @return {@link dh.Sort}
1416
1468
  */
1417
- get columns():Array<Column>;
1469
+ desc():Sort;
1418
1470
  /**
1419
- * The current sort configuration of this Tree Table
1420
- * @return {@link dh.Sort} array.
1471
+ * Builds a Sort instance which takes the absolute value before applying order.
1472
+ * @return {@link dh.Sort}
1421
1473
  */
1422
- get sort():Array<Sort>;
1474
+ abs():Sort;
1475
+ toString():string;
1423
1476
  /**
1424
- * True if this table may receive updates from the server, including size changed events, updated events after
1425
- * initial snapshot.
1477
+ * True if the absolute value of the column should be used when sorting; defaults to false.
1426
1478
  * @return boolean
1427
1479
  */
1428
- get isRefreshing():boolean;
1480
+ get isAbs():boolean;
1429
1481
  /**
1430
- * Listen for events on this object.
1431
- * @param name - the name of the event to listen for
1432
- * @param callback - a function to call when the event occurs
1433
- * @return Returns a cleanup function.
1434
- * @typeParam T - the type of the data that the event will provide
1482
+ * The column which is sorted.
1483
+ * @return {@link dh.Column}
1435
1484
  */
1436
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1437
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1438
- hasListeners(name:string):boolean;
1485
+ get column():Column;
1439
1486
  /**
1440
- * Removes an event listener added to this table.
1441
- * @param name -
1442
- * @param callback -
1443
- * @return
1444
- * @typeParam T -
1487
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1488
+ * @return String
1445
1489
  */
1446
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1490
+ get direction():string;
1447
1491
  }
1448
1492
 
1449
1493
  /**
1450
- * A js type for operating on input tables.
1494
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1495
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1451
1496
  *
1452
- * Represents a User Input Table, which can have data added to it from other sources.
1497
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1498
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1499
+ * forward data to it.
1453
1500
  *
1454
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1455
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1456
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1457
- * before sending the next operation.
1458
- *
1459
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1460
- *
1461
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1462
- * object.
1501
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1502
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1503
+ * viewports to make it less expensive to compute for large tables.
1463
1504
  */
1464
- export class InputTable {
1465
- protected constructor();
1466
-
1467
- /**
1468
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1469
- * property at that name and validate it can be put into the given column type.
1470
- * @param row -
1471
- * @param userTimeZone -
1472
- * @return Promise of dh.InputTable
1473
- */
1474
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1475
- /**
1476
- * Add multiple rows to a table.
1477
- * @param rows -
1478
- * @param userTimeZone -
1479
- * @return Promise of dh.InputTable
1480
- */
1481
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1482
- /**
1483
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1484
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1485
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1486
- * resolved to the same InputTable instance this method was called upon once the server returns.
1487
- * @param tableToAdd -
1488
- * @return Promise of dh.InputTable
1489
- */
1490
- addTable(tableToAdd:Table):Promise<InputTable>;
1491
- /**
1492
- * Add multiple tables to this Input Table.
1493
- * @param tablesToAdd -
1494
- * @return Promise of dh.InputTable
1495
- */
1496
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
1497
- /**
1498
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1499
- * @param tableToDelete -
1500
- * @return Promise of dh.InputTable
1501
- */
1502
- deleteTable(tableToDelete:Table):Promise<InputTable>;
1503
- /**
1504
- * Delete multiple tables from this Input Table.
1505
- * @param tablesToDelete -
1506
- * @return
1507
- */
1508
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1509
- /**
1510
- * A list of the key columns, by name
1511
- * @return String array.
1512
- */
1513
- get keys():string[];
1514
- /**
1515
- * A list of the value columns, by name
1516
- * @return String array.
1517
- */
1518
- get values():string[];
1505
+ export class TableSubscription implements HasEventHandling {
1519
1506
  /**
1520
- * A list of the key Column objects
1521
- * @return {@link dh.Column} array.
1507
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1508
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1509
+ * allowing access to the entire range of items currently in the subscribed columns.
1522
1510
  */
1523
- get keyColumns():Column[];
1511
+ static readonly EVENT_UPDATED:string;
1512
+
1513
+ protected constructor();
1514
+
1524
1515
  /**
1525
- * A list of the value Column objects
1526
- * @return {@link dh.Column} array.
1516
+ * Stops the subscription on the server.
1527
1517
  */
1528
- get valueColumns():Column[];
1518
+ close():void;
1519
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1520
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1521
+ hasListeners(name:string):boolean;
1522
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1529
1523
  /**
1530
- * The source table for this Input Table
1531
- * @return dh.table
1524
+ * The columns that were subscribed to when this subscription was created
1525
+ * @return {@link dh.Column}
1532
1526
  */
1533
- get table():Table;
1527
+ get columns():Array<Column>;
1534
1528
  }
1535
1529
 
1536
1530
  /**
1537
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1538
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1531
+ * Event fired when a command is issued from the client.
1539
1532
  */
1540
- export class ConnectOptions {
1541
- headers:{ [key: string]: string; };
1533
+ export class CommandInfo {
1534
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1542
1535
 
1543
- constructor();
1536
+ get result():Promise<dh.ide.CommandResult>;
1537
+ get code():string;
1538
+ }
1539
+
1540
+ /**
1541
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1542
+ * this type TableMap.
1543
+ * @deprecated
1544
+ */
1545
+ export class TableMap {
1546
+ static readonly EVENT_KEYADDED:string;
1547
+ static readonly EVENT_DISCONNECT:string;
1548
+ static readonly EVENT_RECONNECT:string;
1549
+ static readonly EVENT_RECONNECTFAILED:string;
1550
+
1551
+ protected constructor();
1552
+ }
1553
+
1554
+ export class DateWrapper extends LongWrapper {
1555
+ protected constructor();
1556
+
1557
+ static ofJsDate(date:Date):DateWrapper;
1558
+ asDate():Date;
1559
+ }
1560
+
1561
+ export class QueryInfo {
1562
+ static readonly EVENT_TABLE_OPENED:string;
1563
+ static readonly EVENT_DISCONNECT:string;
1564
+ static readonly EVENT_RECONNECT:string;
1565
+ static readonly EVENT_CONNECT:string;
1566
+
1567
+ protected constructor();
1544
1568
  }
1545
1569
 
1546
1570
  export class LoginCredentials {
@@ -1582,133 +1606,218 @@ export namespace dh {
1582
1606
  }
1583
1607
 
1584
1608
  /**
1585
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1609
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1610
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1611
+ * instance.
1586
1612
  */
1587
- export class BigDecimalWrapper {
1613
+ export class FilterCondition {
1588
1614
  protected constructor();
1589
1615
 
1590
- static ofString(value:string):BigDecimalWrapper;
1591
- asNumber():number;
1592
- valueOf():string;
1593
- toString():string;
1594
- }
1595
-
1596
- /**
1597
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1598
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1599
- *
1600
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1601
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1602
- * forward data to it.
1603
- *
1604
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1605
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1606
- * viewports to make it less expensive to compute for large tables.
1607
- */
1608
- export class TableSubscription implements HasEventHandling {
1609
1616
  /**
1610
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1611
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1612
- * allowing access to the entire range of items currently in the subscribed columns.
1617
+ * the opposite of this condition
1618
+ * @return FilterCondition
1613
1619
  */
1614
- static readonly EVENT_UPDATED:string;
1615
-
1616
- protected constructor();
1617
-
1620
+ not():FilterCondition;
1618
1621
  /**
1619
- * Stops the subscription on the server.
1622
+ * a condition representing the current condition logically ANDed with the other parameters
1623
+ * @param filters -
1624
+ * @return FilterCondition
1620
1625
  */
1621
- close():void;
1622
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1623
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1624
- hasListeners(name:string):boolean;
1625
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1626
+ and(...filters:FilterCondition[]):FilterCondition;
1626
1627
  /**
1627
- * The columns that were subscribed to when this subscription was created
1628
- * @return {@link dh.Column}
1628
+ * a condition representing the current condition logically ORed with the other parameters
1629
+ * @param filters -
1630
+ * @return FilterCondition.
1631
+ */
1632
+ or(...filters:FilterCondition[]):FilterCondition;
1633
+ /**
1634
+ * a string suitable for debugging showing the details of this condition.
1635
+ * @return String.
1629
1636
  */
1637
+ toString():string;
1630
1638
  get columns():Array<Column>;
1639
+ /**
1640
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1641
+ * functions:
1642
+ * <ul>
1643
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1644
+ * than the third</li>
1645
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1646
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1647
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1648
+ * "not a number"</i></li>
1649
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1650
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1651
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1652
+ * expression</li>
1653
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1654
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1655
+ * <p>
1656
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1657
+ * method should be used in other cases
1658
+ * </p>
1659
+ * </li>
1660
+ * </ul>
1661
+ * @param function -
1662
+ * @param args -
1663
+ * @return dh.FilterCondition
1664
+ */
1665
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1666
+ /**
1667
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
1668
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1669
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1670
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1671
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1672
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1673
+ * {@link dh.Column.filter}).
1674
+ * @param value -
1675
+ * @param columns -
1676
+ * @return dh.FilterCondition
1677
+ */
1678
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1631
1679
  }
1632
1680
 
1633
1681
  /**
1634
- * Event fired when a command is issued from the client.
1682
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1683
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1684
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1635
1685
  */
1636
- export class CommandInfo {
1637
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1638
-
1639
- get result():Promise<dh.ide.CommandResult>;
1640
- get code():string;
1641
- }
1686
+ export class RangeSet {
1687
+ protected constructor();
1642
1688
 
1643
- /**
1644
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1645
- * the server to get each Table. All tables will have the same structure.
1646
- */
1647
- export class PartitionedTable implements HasEventHandling {
1689
+ static ofRange(first:number, last:number):RangeSet;
1690
+ static ofItems(rows:number[]):RangeSet;
1691
+ static ofRanges(ranges:RangeSet[]):RangeSet;
1692
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1648
1693
  /**
1649
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1694
+ * a new iterator over all indexes in this collection.
1695
+ * @return Iterator of {@link dh.LongWrapper}
1650
1696
  */
1651
- static readonly EVENT_KEYADDED:string;
1697
+ iterator():Iterator<LongWrapper>;
1652
1698
  /**
1653
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1654
- */
1655
- static readonly EVENT_DISCONNECT:string;
1699
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1700
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1701
+ * property each time through a loop).
1702
+ * @return double
1703
+ */
1704
+ get size():number;
1705
+ }
1706
+
1707
+ /**
1708
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1709
+ * roll-up table.
1710
+ */
1711
+ export class RollupConfig {
1656
1712
  /**
1657
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1713
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1658
1714
  */
1659
- static readonly EVENT_RECONNECT:string;
1715
+ groupingColumns:Array<String>;
1660
1716
  /**
1661
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1717
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1718
+ * roll-up table.
1662
1719
  */
1663
- static readonly EVENT_RECONNECTFAILED:string;
1720
+ aggregations:{ [key: string]: Array<AggregationOperationType>; };
1721
+ /**
1722
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1723
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1724
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1725
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1726
+ */
1727
+ includeConstituents:boolean;
1728
+ includeOriginalColumns?:boolean|null;
1729
+ /**
1730
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1731
+ */
1732
+ includeDescriptions:boolean;
1733
+
1734
+ constructor();
1735
+ }
1736
+
1737
+ /**
1738
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1739
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1740
+ */
1741
+ export class ConnectOptions {
1742
+ headers:{ [key: string]: string; };
1743
+
1744
+ constructor();
1745
+ }
1746
+
1747
+ export class CustomColumn {
1748
+ static readonly TYPE_FORMAT_COLOR:string;
1749
+ static readonly TYPE_FORMAT_NUMBER:string;
1750
+ static readonly TYPE_FORMAT_DATE:string;
1751
+ static readonly TYPE_NEW:string;
1664
1752
 
1665
1753
  protected constructor();
1666
1754
 
1667
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1668
- /**
1669
- * Fetch the table with the given key.
1670
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
1671
- * @return Promise of dh.Table
1672
- */
1673
- getTable(key:object):Promise<Table>;
1755
+ valueOf():string;
1756
+ toString():string;
1674
1757
  /**
1675
- * Open a new table that is the result of merging all constituent tables. See
1676
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
1677
- * @return A merged representation of the constituent tables.
1758
+ * The expression to evaluate this custom column.
1759
+ * @return String
1678
1760
  */
1679
- getMergedTable():Promise<Table>;
1761
+ get expression():string;
1680
1762
  /**
1681
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
1682
- * for <b>keyadded</b> will ensure no keys are missed.
1683
- * @return Set of Object
1763
+ * The name of the column to use.
1764
+ * @return String
1684
1765
  */
1685
- getKeys():Set<object>;
1766
+ get name():string;
1686
1767
  /**
1687
- * Fetch a table containing all the valid keys of the partitioned table.
1688
- * @return Promise of a Table
1768
+ * Type of custom column. One of
1769
+ *
1770
+ * <ul>
1771
+ * <li>FORMAT_COLOR</li>
1772
+ * <li>FORMAT_NUMBER</li>
1773
+ * <li>FORMAT_DATE</li>
1774
+ * <li>NEW</li>
1775
+ * </ul>
1776
+ * @return String
1689
1777
  */
1690
- getKeyTable():Promise<Table>;
1778
+ get type():string;
1779
+ }
1780
+
1781
+ /**
1782
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1783
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
1784
+ */
1785
+ export class IdeConnection implements HasEventHandling {
1691
1786
  /**
1692
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
1693
- * will not affect tables in use.
1787
+ * @deprecated
1694
1788
  */
1695
- close():void;
1789
+ static readonly HACK_CONNECTION_FAILURE:string;
1790
+ static readonly EVENT_DISCONNECT:string;
1791
+ static readonly EVENT_RECONNECT:string;
1792
+ static readonly EVENT_SHUTDOWN:string;
1793
+
1696
1794
  /**
1697
- * The count of known keys.
1698
- * @return int
1795
+ * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1796
+ * @param serverUrl - The url used when connecting to the server. Read-only.
1797
+ * @param connectOptions - Optional Object
1798
+ * @param fromJava - Optional boolean
1799
+ * @deprecated
1699
1800
  */
1700
- get size():number;
1801
+ constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1802
+
1701
1803
  /**
1702
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
1703
- * non-key columns.
1704
- * @return Array of Column
1804
+ * closes the current connection, releasing any resources on the server or client.
1705
1805
  */
1706
- get columns():Column[];
1806
+ close():void;
1807
+ running():Promise<IdeConnection>;
1808
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1809
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1707
1810
  /**
1708
- * An array of all the key columns that the tables are partitioned by.
1709
- * @return Array of Column
1811
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1812
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1813
+ * log messages as are presently available.
1814
+ * @param callback -
1815
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1710
1816
  */
1711
- get keyColumns():Column[];
1817
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1818
+ startSession(type:string):Promise<IdeSession>;
1819
+ getConsoleTypes():Promise<Array<string>>;
1820
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1712
1821
  /**
1713
1822
  * Listen for events on this object.
1714
1823
  * @param name - the name of the event to listen for
@@ -1730,180 +1839,102 @@ export namespace dh {
1730
1839
  }
1731
1840
 
1732
1841
  /**
1733
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1734
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1735
- * instance.
1842
+ * A js type for operating on input tables.
1843
+ *
1844
+ * Represents a User Input Table, which can have data added to it from other sources.
1845
+ *
1846
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1847
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1848
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1849
+ * before sending the next operation.
1850
+ *
1851
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1852
+ *
1853
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1854
+ * object.
1736
1855
  */
1737
- export class FilterCondition {
1856
+ export class InputTable {
1738
1857
  protected constructor();
1739
1858
 
1740
1859
  /**
1741
- * the opposite of this condition
1742
- * @return FilterCondition
1860
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1861
+ * property at that name and validate it can be put into the given column type.
1862
+ * @param row -
1863
+ * @param userTimeZone -
1864
+ * @return Promise of dh.InputTable
1743
1865
  */
1744
- not():FilterCondition;
1866
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1745
1867
  /**
1746
- * a condition representing the current condition logically ANDed with the other parameters
1747
- * @param filters -
1748
- * @return FilterCondition
1868
+ * Add multiple rows to a table.
1869
+ * @param rows -
1870
+ * @param userTimeZone -
1871
+ * @return Promise of dh.InputTable
1749
1872
  */
1750
- and(...filters:FilterCondition[]):FilterCondition;
1873
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1751
1874
  /**
1752
- * a condition representing the current condition logically ORed with the other parameters
1753
- * @param filters -
1754
- * @return FilterCondition.
1875
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1876
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1877
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1878
+ * resolved to the same InputTable instance this method was called upon once the server returns.
1879
+ * @param tableToAdd -
1880
+ * @return Promise of dh.InputTable
1755
1881
  */
1756
- or(...filters:FilterCondition[]):FilterCondition;
1882
+ addTable(tableToAdd:Table):Promise<InputTable>;
1757
1883
  /**
1758
- * a string suitable for debugging showing the details of this condition.
1759
- * @return String.
1884
+ * Add multiple tables to this Input Table.
1885
+ * @param tablesToAdd -
1886
+ * @return Promise of dh.InputTable
1760
1887
  */
1761
- toString():string;
1762
- get columns():Array<Column>;
1888
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
1763
1889
  /**
1764
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1765
- * functions:
1766
- * <ul>
1767
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1768
- * than the third</li>
1769
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1770
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1771
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1772
- * "not a number"</i></li>
1773
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1774
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1775
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1776
- * expression</li>
1777
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1778
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1779
- * <p>
1780
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1781
- * method should be used in other cases
1782
- * </p>
1783
- * </li>
1784
- * </ul>
1785
- * @param function -
1786
- * @param args -
1787
- * @return dh.FilterCondition
1890
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1891
+ * @param tableToDelete -
1892
+ * @return Promise of dh.InputTable
1788
1893
  */
1789
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1894
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
1790
1895
  /**
1791
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1792
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1793
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1794
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1795
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1796
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1797
- * {@link dh.Column.filter}).
1798
- * @param value -
1799
- * @param columns -
1800
- * @return dh.FilterCondition
1896
+ * Delete multiple tables from this Input Table.
1897
+ * @param tablesToDelete -
1898
+ * @return
1801
1899
  */
1802
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1803
- }
1804
-
1805
- /**
1806
- * A Widget represents a server side object that sends one or more responses to the client. The client can then
1807
- * interpret these responses to see what to render, or how to respond.
1808
- * <p>
1809
- * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1810
- * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1811
- * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1812
- * object type, the client code that handles the payloads is expected to know what to expect. See
1813
- * {@link dh.WidgetMessageDetails} for more information.
1814
- * <p>
1815
- * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1816
- * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1817
- * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1818
- * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1819
- * remote messages are still pending - it is up to implementations of plugins to handle this case.
1820
- * <p>
1821
- * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1822
- * What it does handle however, is allowing those messages to include references to server-side objects with those
1823
- * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1824
- * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1825
- * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1826
- * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1827
- * entirely to the plugin. Messages will arrive in the order they were sent.
1828
- * <p>
1829
- * This can suggest several patterns for how plugins operate:
1830
- * <ul>
1831
- * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1832
- * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1833
- * `pandas.DataFrame` will result in a widget that only contains a static
1834
- * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1835
- * provided to the JS API consumer.</li>
1836
- * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1837
- * which provided them. One concrete example of this could have been
1838
- * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1839
- * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1840
- * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1841
- * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1842
- * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1843
- * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1844
- * an internal table instance.</li>
1845
- * </ul>
1846
- *
1847
- * Handling server objects in messages also has more than one potential pattern that can be used:
1848
- * <ul>
1849
- * <li>One object per message - the message clearly is about that object, no other details required.</li>
1850
- * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1851
- * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1852
- * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1853
- * be used, which columns should be mapped to each axis.</li>
1854
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1855
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1856
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1857
- * without the server somehow signaling that it will never reference that export again.</li>
1858
- * </ul>
1859
- */
1860
- export class Widget implements WidgetMessageDetails, HasEventHandling {
1861
- static readonly EVENT_MESSAGE:string;
1862
- static readonly EVENT_CLOSE:string;
1863
-
1864
- protected constructor();
1865
-
1900
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1866
1901
  /**
1867
- * Ends the client connection to the server.
1902
+ * A list of the key columns, by name
1903
+ * @return String array.
1868
1904
  */
1869
- close():void;
1870
- getDataAsBase64():string;
1871
- getDataAsU8():Uint8Array;
1872
- getDataAsString():string;
1905
+ get keys():string[];
1873
1906
  /**
1874
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1875
- * @param msg - string/buffer/view instance that represents data to send
1876
- * @param references - an array of objects that can be safely sent to the server
1907
+ * A list of the value columns, by name
1908
+ * @return String array.
1877
1909
  */
1878
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1879
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1880
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1881
- hasListeners(name:string):boolean;
1882
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1910
+ get values():string[];
1883
1911
  /**
1884
- *
1885
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1886
- * them when finished using them.
1912
+ * A list of the key Column objects
1913
+ * @return {@link dh.Column} array.
1887
1914
  */
1888
- get exportedObjects():WidgetExportedObject[];
1915
+ get keyColumns():Column[];
1889
1916
  /**
1890
- *
1891
- * @return the type of this widget
1917
+ * A list of the value Column objects
1918
+ * @return {@link dh.Column} array.
1892
1919
  */
1893
- get type():string;
1920
+ get valueColumns():Column[];
1921
+ /**
1922
+ * The source table for this Input Table
1923
+ * @return dh.table
1924
+ */
1925
+ get table():Table;
1894
1926
  }
1895
1927
 
1896
- export class Ide {
1897
- constructor();
1928
+ /**
1929
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1930
+ */
1931
+ export class BigDecimalWrapper {
1932
+ protected constructor();
1898
1933
 
1899
- /**
1900
- * @deprecated
1901
- */
1902
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1903
- /**
1904
- * @deprecated
1905
- */
1906
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1934
+ static ofString(value:string):BigDecimalWrapper;
1935
+ asNumber():number;
1936
+ valueOf():string;
1937
+ toString():string;
1907
1938
  }
1908
1939
 
1909
1940
  /**
@@ -1998,327 +2029,307 @@ export namespace dh {
1998
2029
  }
1999
2030
 
2000
2031
  /**
2001
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
2002
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
2003
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
2004
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
2005
- * of <b>TotalsTableConfig</b> will be supplied.
2006
- *
2007
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
2008
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
2009
- * expected formats.
2032
+ * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
2033
+ * mechanism, and so reimplemented here.
2034
+ * <p>
2035
+ * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
2036
+ * <p>
2037
+ * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
2038
+ * operations are performed, but encourage the client code to re-set them to the desired position.
2039
+ * <p>
2040
+ * The table size will be -1 until a viewport has been fetched.
2041
+ * <p>
2042
+ * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
2043
+ * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
2044
+ * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
2045
+ * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
2046
+ * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
2047
+ * the viewport).
2048
+ * <p>
2049
+ * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
2050
+ * and count of children at each level of the hierarchy, and differences in the data that is available.
2051
+ * <p>
2052
+ * <ul>
2053
+ * <li>There is no {@link Table.totalSize | totalSize} property.</li>
2054
+ * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
2055
+ * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
2056
+ * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
2057
+ * new operation is pending.</li>
2058
+ * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
2059
+ * custom columns applied, and the TreeTable can be recreated.</li>
2060
+ * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
2061
+ * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
2062
+ * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
2063
+ * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
2064
+ * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
2065
+ * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
2066
+ * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
2067
+ * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
2068
+ * where {@link TreeRow.hasChildren} is false will be different from usual.</li>
2069
+ * </ul>
2010
2070
  */
2011
- export class TotalsTableConfig {
2012
- /**
2013
- * @deprecated
2014
- */
2015
- static readonly COUNT:string;
2016
- /**
2017
- * @deprecated
2018
- */
2019
- static readonly MIN:string;
2020
- /**
2021
- * @deprecated
2022
- */
2023
- static readonly MAX:string;
2024
- /**
2025
- * @deprecated
2026
- */
2027
- static readonly SUM:string;
2028
- /**
2029
- * @deprecated
2030
- */
2031
- static readonly ABS_SUM:string;
2032
- /**
2033
- * @deprecated
2034
- */
2035
- static readonly VAR:string;
2036
- /**
2037
- * @deprecated
2038
- */
2039
- static readonly AVG:string;
2040
- /**
2041
- * @deprecated
2042
- */
2043
- static readonly STD:string;
2044
- /**
2045
- * @deprecated
2046
- */
2047
- static readonly FIRST:string;
2048
- /**
2049
- * @deprecated
2050
- */
2051
- static readonly LAST:string;
2052
- /**
2053
- * @deprecated
2054
- */
2055
- static readonly SKIP:string;
2071
+ export class TreeTable implements HasEventHandling {
2056
2072
  /**
2057
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
2073
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
2058
2074
  */
2059
- showTotalsByDefault:boolean;
2075
+ static readonly EVENT_UPDATED:string;
2060
2076
  /**
2061
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
2077
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
2062
2078
  */
2063
- showGrandTotalsByDefault:boolean;
2079
+ static readonly EVENT_DISCONNECT:string;
2064
2080
  /**
2065
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
2081
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
2066
2082
  */
2067
- defaultOperation:AggregationOperationType;
2083
+ static readonly EVENT_RECONNECT:string;
2068
2084
  /**
2069
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
2070
- * Table. If a column is omitted, the defaultOperation is used.
2085
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
2071
2086
  */
2072
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
2087
+ static readonly EVENT_RECONNECTFAILED:string;
2073
2088
  /**
2074
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
2075
- * these columns. See also `Table.selectDistinct`.
2089
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
2076
2090
  */
2077
- groupBy:Array<string>;
2078
-
2079
- constructor();
2080
-
2081
- toString():string;
2082
- }
2091
+ static readonly EVENT_REQUEST_FAILED:string;
2092
+ readonly description?:string|null;
2083
2093
 
2084
- /**
2085
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
2086
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
2087
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
2088
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
2089
- * instance.
2090
- */
2091
- export class FilterValue {
2092
2094
  protected constructor();
2093
2095
 
2094
2096
  /**
2095
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
2096
- * {@link TableData.get} for DateTime values. To create
2097
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
2098
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
2099
- * 64-bit long integer, use {@link LongWrapper.ofString}.
2100
- * @param input - the number to wrap as a FilterValue
2101
- * @return an immutable FilterValue that can be built into a filter
2102
- */
2103
- static ofNumber(input:LongWrapper|number):FilterValue;
2104
- /**
2105
- * a filter condition checking if the current value is equal to the given parameter
2106
- * @param term -
2107
- * @return {@link dh.FilterCondition}
2108
- */
2109
- eq(term:FilterValue):FilterCondition;
2110
- /**
2111
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
2112
- * vs lower case
2113
- * @param term -
2114
- * @return {@link dh.FilterCondition}
2115
- */
2116
- eqIgnoreCase(term:FilterValue):FilterCondition;
2117
- /**
2118
- * a filter condition checking if the current value is not equal to the given parameter
2119
- * @param term -
2120
- * @return {@link dh.FilterCondition}
2097
+ * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
2098
+ * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
2099
+ * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
2100
+ * boolean parameter.
2101
+ * @param row -
2102
+ * @param expandDescendants -
2121
2103
  */
2122
- notEq(term:FilterValue):FilterCondition;
2104
+ expand(row:TreeRow|number, expandDescendants?:boolean):void;
2123
2105
  /**
2124
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
2125
- * upper vs lower case
2126
- * @param term -
2127
- * @return {@link dh.FilterCondition}
2106
+ * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
2107
+ * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
2108
+ * @param row -
2128
2109
  */
2129
- notEqIgnoreCase(term:FilterValue):FilterCondition;
2110
+ collapse(row:TreeRow|number):void;
2130
2111
  /**
2131
- * a filter condition checking if the current value is greater than the given parameter
2132
- * @param term -
2133
- * @return {@link dh.FilterCondition}
2112
+ * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
2113
+ * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
2114
+ * is true, then its children will also be expanded.
2115
+ * @param row -
2116
+ * @param isExpanded -
2117
+ * @param expandDescendants -
2134
2118
  */
2135
- greaterThan(term:FilterValue):FilterCondition;
2119
+ setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
2120
+ expandAll():void;
2121
+ collapseAll():void;
2136
2122
  /**
2137
- * a filter condition checking if the current value is less than the given parameter
2138
- * @param term -
2139
- * @return {@link dh.FilterCondition}
2123
+ * true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
2124
+ * is available
2125
+ * @param row -
2126
+ * @return boolean
2140
2127
  */
2141
- lessThan(term:FilterValue):FilterCondition;
2128
+ isExpanded(row:TreeRow|number):boolean;
2129
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
2130
+ getViewportData():Promise<TreeViewportData>;
2142
2131
  /**
2143
- * a filter condition checking if the current value is greater than or equal to the given parameter
2144
- * @param term -
2145
- * @return {@link dh.FilterCondition}
2132
+ * Indicates that the table will no longer be used, and server resources can be freed.
2146
2133
  */
2147
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
2134
+ close():void;
2135
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2148
2136
  /**
2149
- * a filter condition checking if the current value is less than or equal to the given parameter
2150
- * @param term -
2151
- * @return {@link dh.FilterCondition}
2137
+ * Applies the given sort to all levels of the tree. Returns the previous sort in use.
2138
+ * @param sort -
2139
+ * @return {@link dh.Sort} array
2152
2140
  */
2153
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
2141
+ applySort(sort:Sort[]):Array<Sort>;
2154
2142
  /**
2155
- * a filter condition checking if the current value is in the given set of values
2156
- * @param terms -
2157
- * @return {@link dh.FilterCondition}
2143
+ * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
2144
+ * node will be visible as well even if that parent node would not normally be visible due to the filter's
2145
+ * condition. Returns the previous sort in use.
2146
+ * @param filter -
2147
+ * @return {@link dh.FilterCondition} array
2158
2148
  */
2159
- in(terms:FilterValue[]):FilterCondition;
2149
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
2160
2150
  /**
2161
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
2162
- * lower case
2163
- * @param terms -
2164
- * @return {@link dh.FilterCondition}
2151
+ * a column with the given name, or throws an exception if it cannot be found
2152
+ * @param key -
2153
+ * @return {@link dh.Column}
2165
2154
  */
2166
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
2155
+ findColumn(key:string):Column;
2167
2156
  /**
2168
- * a filter condition checking that the current value is not in the given set of values
2169
- * @param terms -
2170
- * @return {@link dh.FilterCondition}
2157
+ * an array with all of the named columns in order, or throws an exception if one cannot be found.
2158
+ * @param keys -
2159
+ * @return {@link dh.Column} array
2171
2160
  */
2172
- notIn(terms:FilterValue[]):FilterCondition;
2161
+ findColumns(keys:string[]):Column[];
2173
2162
  /**
2174
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
2175
- * upper vs lower case
2176
- * @param terms -
2177
- * @return {@link dh.FilterCondition}
2163
+ * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
2164
+ * values for the given columns in the source table:
2165
+ * <ul>
2166
+ * <li>Rollups may make no sense, since values are aggregated.</li>
2167
+ * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
2168
+ * the tree.</li>
2169
+ * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
2170
+ * in the resulting table.</li>
2171
+ * </ul>
2178
2172
  */
2179
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
2173
+ selectDistinct(columns:Column[]):Promise<Table>;
2174
+ getTotalsTableConfig():Promise<TotalsTableConfig>;
2175
+ getTotalsTable(config?:object):Promise<TotalsTable>;
2176
+ getGrandTotalsTable(config?:object):Promise<TotalsTable>;
2180
2177
  /**
2181
- * a filter condition checking if the given value contains the given string value
2182
- * @param term -
2183
- * @return {@link dh.FilterCondition}
2178
+ * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
2179
+ * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
2180
+ * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
2181
+ * state is also not copied.
2182
+ * @return Promise of dh.TreeTable
2184
2183
  */
2185
- contains(term:FilterValue):FilterCondition;
2184
+ copy():Promise<TreeTable>;
2186
2185
  /**
2187
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
2188
- * lower case
2189
- * @param term -
2190
- * @return {@link dh.FilterCondition}
2186
+ * The current filter configuration of this Tree Table.
2187
+ * @return {@link dh.FilterCondition} array
2191
2188
  */
2192
- containsIgnoreCase(term:FilterValue):FilterCondition;
2189
+ get filter():Array<FilterCondition>;
2193
2190
  /**
2194
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
2195
- * use Java regex syntax
2196
- * @param pattern -
2197
- * @return {@link dh.FilterCondition}
2191
+ * True if this is a roll-up and will provide the original rows that make up each grouping.
2192
+ * @return boolean
2198
2193
  */
2199
- matches(pattern:FilterValue):FilterCondition;
2194
+ get includeConstituents():boolean;
2195
+ get groupedColumns():Array<Column>;
2200
2196
  /**
2201
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
2202
- * differences of upper vs lower case. Regex patterns use Java regex syntax
2203
- * @param pattern -
2204
- * @return {@link dh.FilterCondition}
2197
+ * True if this table has been closed.
2198
+ * @return boolean
2205
2199
  */
2206
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
2200
+ get isClosed():boolean;
2207
2201
  /**
2208
- * a filter condition checking if the current value is a true boolean
2209
- * @return {@link dh.FilterCondition}
2202
+ * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
2203
+ * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
2204
+ * when considering collapse/expand states).
2205
+ * @return double
2210
2206
  */
2211
- isTrue():FilterCondition;
2207
+ get size():number;
2212
2208
  /**
2213
- * a filter condition checking if the current value is a false boolean
2214
- * @return {@link dh.FilterCondition}
2209
+ * The columns that can be shown in this Tree Table.
2210
+ * @return {@link dh.Column} array
2215
2211
  */
2216
- isFalse():FilterCondition;
2212
+ get columns():Array<Column>;
2217
2213
  /**
2218
- * a filter condition checking if the current value is a null value
2219
- * @return {@link dh.FilterCondition}
2214
+ * The current sort configuration of this Tree Table
2215
+ * @return {@link dh.Sort} array.
2220
2216
  */
2221
- isNull():FilterCondition;
2217
+ get sort():Array<Sort>;
2222
2218
  /**
2223
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
2224
- * functions that can be invoked on a String:
2225
- * <ul>
2226
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
2227
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
2228
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
2229
- * regular expression</li>
2230
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
2231
- * <p>
2232
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
2233
- * </p>
2234
- * </li>
2235
- * </ul>
2236
- * @param method -
2237
- * @param args -
2238
- * @return
2239
- */
2240
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
2241
- toString():string;
2219
+ * True if this table may receive updates from the server, including size changed events, updated events after
2220
+ * initial snapshot.
2221
+ * @return boolean
2222
+ */
2223
+ get isRefreshing():boolean;
2242
2224
  /**
2243
- * Constructs a string for the filter API from the given parameter.
2244
- * @param input -
2245
- * @return
2225
+ * Listen for events on this object.
2226
+ * @param name - the name of the event to listen for
2227
+ * @param callback - a function to call when the event occurs
2228
+ * @return Returns a cleanup function.
2229
+ * @typeParam T - the type of the data that the event will provide
2246
2230
  */
2247
- static ofString(input:any):FilterValue;
2231
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2232
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2233
+ hasListeners(name:string):boolean;
2248
2234
  /**
2249
- * Constructs a boolean for the filter API from the given parameter.
2250
- * @param b -
2235
+ * Removes an event listener added to this table.
2236
+ * @param name -
2237
+ * @param callback -
2251
2238
  * @return
2239
+ * @typeParam T -
2252
2240
  */
2253
- static ofBoolean(b:boolean):FilterValue;
2241
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2254
2242
  }
2255
2243
 
2256
2244
  /**
2257
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
2258
- *
2259
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
2260
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
2261
- * value can be provided describing the strategy the engine should use when grouping the rows.
2245
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
2246
+ * the server to get each Table. All tables will have the same structure.
2262
2247
  */
2263
- export class TreeTableConfig {
2248
+ export class PartitionedTable implements HasEventHandling {
2264
2249
  /**
2265
- * The column representing the unique ID for each item
2250
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2266
2251
  */
2267
- idColumn:string;
2252
+ static readonly EVENT_KEYADDED:string;
2268
2253
  /**
2269
- * The column representing the parent ID for each item
2254
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2270
2255
  */
2271
- parentColumn:string;
2256
+ static readonly EVENT_DISCONNECT:string;
2272
2257
  /**
2273
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
2258
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2274
2259
  */
2275
- promoteOrphansToRoot:boolean;
2276
-
2277
- constructor();
2278
- }
2260
+ static readonly EVENT_RECONNECT:string;
2261
+ /**
2262
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2263
+ */
2264
+ static readonly EVENT_RECONNECTFAILED:string;
2279
2265
 
2280
- /**
2281
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
2282
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
2283
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
2284
- */
2285
- export class RangeSet {
2286
2266
  protected constructor();
2287
2267
 
2288
- static ofRange(first:number, last:number):RangeSet;
2289
- static ofItems(rows:number[]):RangeSet;
2290
- static ofRanges(ranges:RangeSet[]):RangeSet;
2291
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
2268
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2292
2269
  /**
2293
- * a new iterator over all indexes in this collection.
2294
- * @return Iterator of {@link dh.LongWrapper}
2270
+ * Fetch the table with the given key.
2271
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
2272
+ * @return Promise of dh.Table
2295
2273
  */
2296
- iterator():Iterator<LongWrapper>;
2274
+ getTable(key:object):Promise<Table>;
2297
2275
  /**
2298
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
2299
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
2300
- * property each time through a loop).
2301
- * @return double
2276
+ * Open a new table that is the result of merging all constituent tables. See
2277
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
2278
+ * @return A merged representation of the constituent tables.
2279
+ */
2280
+ getMergedTable():Promise<Table>;
2281
+ /**
2282
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
2283
+ * for <b>keyadded</b> will ensure no keys are missed.
2284
+ * @return Set of Object
2285
+ */
2286
+ getKeys():Set<object>;
2287
+ /**
2288
+ * Fetch a table containing all the valid keys of the partitioned table.
2289
+ * @return Promise of a Table
2290
+ */
2291
+ getKeyTable():Promise<Table>;
2292
+ /**
2293
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
2294
+ * will not affect tables in use.
2295
+ */
2296
+ close():void;
2297
+ /**
2298
+ * The count of known keys.
2299
+ * @return int
2302
2300
  */
2303
2301
  get size():number;
2302
+ /**
2303
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2304
+ * non-key columns.
2305
+ * @return Array of Column
2306
+ */
2307
+ get columns():Column[];
2308
+ /**
2309
+ * An array of all the key columns that the tables are partitioned by.
2310
+ * @return Array of Column
2311
+ */
2312
+ get keyColumns():Column[];
2313
+ /**
2314
+ * Listen for events on this object.
2315
+ * @param name - the name of the event to listen for
2316
+ * @param callback - a function to call when the event occurs
2317
+ * @return Returns a cleanup function.
2318
+ * @typeParam T - the type of the data that the event will provide
2319
+ */
2320
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2321
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2322
+ hasListeners(name:string):boolean;
2323
+ /**
2324
+ * Removes an event listener added to this table.
2325
+ * @param name -
2326
+ * @param callback -
2327
+ * @return
2328
+ * @typeParam T -
2329
+ */
2330
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2304
2331
  }
2305
2332
 
2306
- export class QueryInfo {
2307
- static readonly EVENT_TABLE_OPENED:string;
2308
- static readonly EVENT_DISCONNECT:string;
2309
- static readonly EVENT_RECONNECT:string;
2310
- static readonly EVENT_CONNECT:string;
2311
-
2312
- protected constructor();
2313
- }
2314
-
2315
-
2316
- type SearchDisplayModeType = string;
2317
- export class SearchDisplayMode {
2318
- static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2319
- static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2320
- static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2321
- }
2322
2333
 
2323
2334
  /**
2324
2335
  * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
@@ -2341,16 +2352,6 @@ export namespace dh {
2341
2352
  static readonly SKIP:AggregationOperationType;
2342
2353
  }
2343
2354
 
2344
- type ValueTypeType = string;
2345
- export class ValueType {
2346
- static readonly STRING:ValueTypeType;
2347
- static readonly NUMBER:ValueTypeType;
2348
- static readonly DOUBLE:ValueTypeType;
2349
- static readonly LONG:ValueTypeType;
2350
- static readonly DATETIME:ValueTypeType;
2351
- static readonly BOOLEAN:ValueTypeType;
2352
- }
2353
-
2354
2355
  /**
2355
2356
  * A set of string constants that can be used to describe the different objects the JS API can export.
2356
2357
  */
@@ -2367,42 +2368,27 @@ export namespace dh {
2367
2368
  static readonly TREEMAP:VariableTypeType;
2368
2369
  }
2369
2370
 
2371
+ type ValueTypeType = string;
2372
+ export class ValueType {
2373
+ static readonly STRING:ValueTypeType;
2374
+ static readonly NUMBER:ValueTypeType;
2375
+ static readonly DOUBLE:ValueTypeType;
2376
+ static readonly LONG:ValueTypeType;
2377
+ static readonly DATETIME:ValueTypeType;
2378
+ static readonly BOOLEAN:ValueTypeType;
2379
+ }
2380
+
2381
+ type SearchDisplayModeType = string;
2382
+ export class SearchDisplayMode {
2383
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2384
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2385
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2386
+ }
2387
+
2370
2388
  }
2371
2389
 
2372
2390
  export namespace dh.ide {
2373
2391
 
2374
- /**
2375
- * Specifies a type and either id or name (but not both).
2376
- */
2377
- export interface VariableDescriptor {
2378
- type:string;
2379
- id?:string|null;
2380
- name?:string|null;
2381
- }
2382
- /**
2383
- * Describes changes in the current set of variables in the script session. Note that variables that changed value
2384
- * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2385
- * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2386
- * new types.
2387
- */
2388
- export interface VariableChanges {
2389
- /**
2390
- *
2391
- * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2392
- * different type.
2393
- */
2394
- get removed():Array<VariableDefinition>;
2395
- /**
2396
- *
2397
- * @return The variables that were created by this operation, or have a new type.
2398
- */
2399
- get created():Array<VariableDefinition>;
2400
- /**
2401
- *
2402
- * @return The variables that changed value during this operation.
2403
- */
2404
- get updated():Array<VariableDefinition>;
2405
- }
2406
2392
  /**
2407
2393
  * A format to describe a variable available to be read from the server. Application fields are optional, and only
2408
2394
  * populated when a variable is provided by application mode.
@@ -2445,40 +2431,72 @@ export namespace dh.ide {
2445
2431
  get applicationName():string;
2446
2432
  }
2447
2433
  /**
2448
- * Indicates the result of code run on the server.
2434
+ * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2435
+ * server.
2449
2436
  */
2450
- export interface CommandResult {
2437
+ export interface LogItem {
2451
2438
  /**
2452
- * Describes changes made in the course of this command.
2453
- * @return {@link dh.ide.VariableChanges}.
2439
+ * The level of the log message, enabling the client to ignore messages.
2440
+ * @return String
2454
2441
  */
2455
- get changes():VariableChanges;
2442
+ get logLevel():string;
2456
2443
  /**
2457
- * If the command failed, the error message will be provided here.
2444
+ * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2445
+ * @return double
2446
+ */
2447
+ get micros():number;
2448
+ /**
2449
+ * The log message written on the server.
2458
2450
  * @return String
2459
2451
  */
2460
- get error():string;
2452
+ get message():string;
2461
2453
  }
2462
2454
  /**
2463
- * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2464
- * server.
2455
+ * Specifies a type and either id or name (but not both).
2465
2456
  */
2466
- export interface LogItem {
2457
+ export interface VariableDescriptor {
2458
+ type:string;
2459
+ id?:string|null;
2460
+ name?:string|null;
2461
+ }
2462
+ /**
2463
+ * Describes changes in the current set of variables in the script session. Note that variables that changed value
2464
+ * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2465
+ * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2466
+ * new types.
2467
+ */
2468
+ export interface VariableChanges {
2467
2469
  /**
2468
- * The level of the log message, enabling the client to ignore messages.
2469
- * @return String
2470
+ *
2471
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2472
+ * different type.
2470
2473
  */
2471
- get logLevel():string;
2474
+ get removed():Array<VariableDefinition>;
2475
+ /**
2476
+ *
2477
+ * @return The variables that were created by this operation, or have a new type.
2478
+ */
2479
+ get created():Array<VariableDefinition>;
2480
+ /**
2481
+ *
2482
+ * @return The variables that changed value during this operation.
2483
+ */
2484
+ get updated():Array<VariableDefinition>;
2485
+ }
2486
+ /**
2487
+ * Indicates the result of code run on the server.
2488
+ */
2489
+ export interface CommandResult {
2472
2490
  /**
2473
- * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2474
- * @return double
2491
+ * Describes changes made in the course of this command.
2492
+ * @return {@link dh.ide.VariableChanges}.
2475
2493
  */
2476
- get micros():number;
2494
+ get changes():VariableChanges;
2477
2495
  /**
2478
- * The log message written on the server.
2496
+ * If the command failed, the error message will be provided here.
2479
2497
  * @return String
2480
2498
  */
2481
- get message():string;
2499
+ get error():string;
2482
2500
  }
2483
2501
  }
2484
2502
 
@@ -2751,35 +2769,53 @@ export namespace dh.i18n {
2751
2769
 
2752
2770
  export namespace dh.plot {
2753
2771
 
2754
- export interface FigureDataUpdatedEvent {
2755
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2756
- get series():Series[];
2757
- }
2758
- export interface OneClick {
2759
- setValueForColumn(columnName:string, value:any):void;
2760
- getValueForColumn(columName:string):any;
2761
- get requireAllFiltersToDisplay():boolean;
2762
- get columns():dh.Column[];
2763
- }
2764
2772
  /**
2765
- * Describes how to access and display data required within a series.
2773
+ * Provides access to the data for displaying in a figure.
2766
2774
  */
2767
- export interface SeriesDataSource {
2775
+ export interface Series {
2776
+ readonly isLinesVisible?:boolean|null;
2777
+ readonly pointLabelFormat?:string|null;
2778
+ readonly yToolTipPattern?:string|null;
2779
+ readonly shapeSize?:number|null;
2780
+ readonly xToolTipPattern?:string|null;
2781
+ readonly isShapesVisible?:boolean|null;
2782
+
2783
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
2768
2784
  /**
2769
- * the type of data stored in the underlying table's Column.
2770
- * @return String
2785
+ * Disable updates for this Series.
2771
2786
  */
2772
- get columnType():string;
2787
+ unsubscribe():void;
2788
+ get shape():string;
2773
2789
  /**
2774
- * the axis that this source should be drawn on.
2775
- * @return dh.plot.Axis
2790
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2791
+ * the axis.
2792
+ * @return {@link dh.plot.SeriesDataSource}
2776
2793
  */
2777
- get axis():Axis;
2794
+ get sources():SeriesDataSource[];
2795
+ get lineColor():string;
2778
2796
  /**
2779
- * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
2797
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2780
2798
  * @return int
2781
2799
  */
2782
- get type():SourceTypeType;
2800
+ get plotStyle():SeriesPlotStyleType;
2801
+ get oneClick():OneClick;
2802
+ get gradientVisible():boolean;
2803
+ get shapeColor():string;
2804
+ /**
2805
+ * The name for this series.
2806
+ * @return String
2807
+ */
2808
+ get name():string;
2809
+ /**
2810
+ * indicates that this series belongs to a MultiSeries, null otherwise
2811
+ * @return dh.plot.MultiSeries
2812
+ */
2813
+ get multiSeries():MultiSeries;
2814
+ get shapeLabel():string;
2815
+ }
2816
+ export interface FigureDataUpdatedEvent {
2817
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2818
+ get series():Series[];
2783
2819
  }
2784
2820
  /**
2785
2821
  * Describes a template that will be used to make new series instances when a new table added to a plotBy.
@@ -2797,6 +2833,26 @@ export namespace dh.plot {
2797
2833
  get plotStyle():SeriesPlotStyleType;
2798
2834
  }
2799
2835
  /**
2836
+ * Describes how to access and display data required within a series.
2837
+ */
2838
+ export interface SeriesDataSource {
2839
+ /**
2840
+ * the type of data stored in the underlying table's Column.
2841
+ * @return String
2842
+ */
2843
+ get columnType():string;
2844
+ /**
2845
+ * the axis that this source should be drawn on.
2846
+ * @return dh.plot.Axis
2847
+ */
2848
+ get axis():Axis;
2849
+ /**
2850
+ * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
2851
+ * @return int
2852
+ */
2853
+ get type():SourceTypeType;
2854
+ }
2855
+ /**
2800
2856
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
2801
2857
  * may be shared between Series instances.
2802
2858
  */
@@ -2864,108 +2920,11 @@ export namespace dh.plot {
2864
2920
  get formatType():AxisFormatTypeType;
2865
2921
  get minRange():number;
2866
2922
  }
2867
- /**
2868
- * Provides access to the data for displaying in a figure.
2869
- */
2870
- export interface Series {
2871
- readonly isLinesVisible?:boolean|null;
2872
- readonly pointLabelFormat?:string|null;
2873
- readonly yToolTipPattern?:string|null;
2874
- readonly shapeSize?:number|null;
2875
- readonly xToolTipPattern?:string|null;
2876
- readonly isShapesVisible?:boolean|null;
2877
-
2878
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
2879
- /**
2880
- * Disable updates for this Series.
2881
- */
2882
- unsubscribe():void;
2883
- get shape():string;
2884
- /**
2885
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2886
- * the axis.
2887
- * @return {@link dh.plot.SeriesDataSource}
2888
- */
2889
- get sources():SeriesDataSource[];
2890
- get lineColor():string;
2891
- /**
2892
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2893
- * @return int
2894
- */
2895
- get plotStyle():SeriesPlotStyleType;
2896
- get oneClick():OneClick;
2897
- get gradientVisible():boolean;
2898
- get shapeColor():string;
2899
- /**
2900
- * The name for this series.
2901
- * @return String
2902
- */
2903
- get name():string;
2904
- /**
2905
- * indicates that this series belongs to a MultiSeries, null otherwise
2906
- * @return dh.plot.MultiSeries
2907
- */
2908
- get multiSeries():MultiSeries;
2909
- get shapeLabel():string;
2910
- }
2911
-
2912
- export class DownsampleOptions {
2913
- /**
2914
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
2915
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
2916
- * series.subscribe().
2917
- */
2918
- static MAX_SERIES_SIZE:number;
2919
- /**
2920
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
2921
- * downsampling disabled, the series will not load data.
2922
- */
2923
- static MAX_SUBSCRIPTION_SIZE:number;
2924
- /**
2925
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
2926
- * axes are configured.
2927
- */
2928
- static readonly DEFAULT:DownsampleOptions;
2929
- /**
2930
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
2931
- * the limit of MAX_SUBSCRIPTION_SIZE.
2932
- */
2933
- static readonly DISABLE:DownsampleOptions;
2934
-
2935
- protected constructor();
2936
- }
2937
-
2938
- export class FigureFetchError {
2939
- error:object;
2940
- errors:Array<string>;
2941
-
2942
- protected constructor();
2943
- }
2944
-
2945
- export class SeriesDescriptor {
2946
- plotStyle:string;
2947
- name?:string|null;
2948
- linesVisible?:boolean|null;
2949
- shapesVisible?:boolean|null;
2950
- gradientVisible?:boolean|null;
2951
- lineColor?:string|null;
2952
- pointLabelFormat?:string|null;
2953
- xToolTipPattern?:string|null;
2954
- yToolTipPattern?:string|null;
2955
- shapeLabel?:string|null;
2956
- shapeSize?:number|null;
2957
- shapeColor?:string|null;
2958
- shape?:string|null;
2959
- dataSources:Array<SourceDescriptor>;
2960
-
2961
- constructor();
2962
- }
2963
-
2964
- export class FigureSourceException {
2965
- table:dh.Table;
2966
- source:SeriesDataSource;
2967
-
2968
- protected constructor();
2923
+ export interface OneClick {
2924
+ setValueForColumn(columnName:string, value:any):void;
2925
+ getValueForColumn(columName:string):any;
2926
+ get requireAllFiltersToDisplay():boolean;
2927
+ get columns():dh.Column[];
2969
2928
  }
2970
2929
 
2971
2930
  export class ChartDescriptor {
@@ -2985,6 +2944,37 @@ export namespace dh.plot {
2985
2944
  constructor();
2986
2945
  }
2987
2946
 
2947
+ export class AxisDescriptor {
2948
+ formatType:string;
2949
+ type:string;
2950
+ position:string;
2951
+ log?:boolean|null;
2952
+ label?:string|null;
2953
+ labelFont?:string|null;
2954
+ ticksFont?:string|null;
2955
+ formatPattern?:string|null;
2956
+ color?:string|null;
2957
+ minRange?:number|null;
2958
+ maxRange?:number|null;
2959
+ minorTicksVisible?:boolean|null;
2960
+ majorTicksVisible?:boolean|null;
2961
+ minorTickCount?:number|null;
2962
+ gapBetweenMajorTicks?:number|null;
2963
+ majorTickLocations?:Array<number>|null;
2964
+ tickLabelAngle?:number|null;
2965
+ invert?:boolean|null;
2966
+ isTimeAxis?:boolean|null;
2967
+
2968
+ constructor();
2969
+ }
2970
+
2971
+ export class FigureFetchError {
2972
+ error:object;
2973
+ errors:Array<string>;
2974
+
2975
+ protected constructor();
2976
+ }
2977
+
2988
2978
  /**
2989
2979
  * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
2990
2980
  * underlying table, but also support a mapping function to let client code translate data in some way for display and
@@ -2998,34 +2988,8 @@ export namespace dh.plot {
2998
2988
  /**
2999
2989
  * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3000
2990
  * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3001
- */
3002
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3003
- }
3004
-
3005
- export class SourceDescriptor {
3006
- axis:AxisDescriptor;
3007
- table:dh.Table;
3008
- columnName:string;
3009
- type:string;
3010
-
3011
- constructor();
3012
- }
3013
-
3014
- /**
3015
- * A descriptor used with JsFigureFactory.create to create a figure from JS.
3016
- */
3017
- export class FigureDescriptor {
3018
- title?:string|null;
3019
- titleFont?:string|null;
3020
- titleColor?:string|null;
3021
- isResizable?:boolean|null;
3022
- isDefaultTheme?:boolean|null;
3023
- updateInterval?:number|null;
3024
- cols?:number|null;
3025
- rows?:number|null;
3026
- charts:Array<ChartDescriptor>;
3027
-
3028
- constructor();
2991
+ */
2992
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3029
2993
  }
3030
2994
 
3031
2995
  export class SeriesDataSourceException {
@@ -3079,30 +3043,41 @@ export namespace dh.plot {
3079
3043
  get multiSeries():MultiSeries[];
3080
3044
  }
3081
3045
 
3082
- export class AxisDescriptor {
3083
- formatType:string;
3046
+ export class SourceDescriptor {
3047
+ axis:AxisDescriptor;
3048
+ table:dh.Table;
3049
+ columnName:string;
3084
3050
  type:string;
3085
- position:string;
3086
- log?:boolean|null;
3087
- label?:string|null;
3088
- labelFont?:string|null;
3089
- ticksFont?:string|null;
3090
- formatPattern?:string|null;
3091
- color?:string|null;
3092
- minRange?:number|null;
3093
- maxRange?:number|null;
3094
- minorTicksVisible?:boolean|null;
3095
- majorTicksVisible?:boolean|null;
3096
- minorTickCount?:number|null;
3097
- gapBetweenMajorTicks?:number|null;
3098
- majorTickLocations?:Array<number>|null;
3099
- tickLabelAngle?:number|null;
3100
- invert?:boolean|null;
3101
- isTimeAxis?:boolean|null;
3102
3051
 
3103
3052
  constructor();
3104
3053
  }
3105
3054
 
3055
+ export class DownsampleOptions {
3056
+ /**
3057
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3058
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3059
+ * series.subscribe().
3060
+ */
3061
+ static MAX_SERIES_SIZE:number;
3062
+ /**
3063
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3064
+ * downsampling disabled, the series will not load data.
3065
+ */
3066
+ static MAX_SUBSCRIPTION_SIZE:number;
3067
+ /**
3068
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3069
+ * axes are configured.
3070
+ */
3071
+ static readonly DEFAULT:DownsampleOptions;
3072
+ /**
3073
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3074
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3075
+ */
3076
+ static readonly DISABLE:DownsampleOptions;
3077
+
3078
+ protected constructor();
3079
+ }
3080
+
3106
3081
  /**
3107
3082
  * Provides the details for a figure.
3108
3083
  *
@@ -3223,23 +3198,50 @@ export namespace dh.plot {
3223
3198
  static create(config:FigureDescriptor):Promise<Figure>;
3224
3199
  }
3225
3200
 
3201
+ export class FigureSourceException {
3202
+ table:dh.Table;
3203
+ source:SeriesDataSource;
3226
3204
 
3227
- type SeriesPlotStyleType = number;
3228
- export class SeriesPlotStyle {
3229
- static readonly BAR:SeriesPlotStyleType;
3230
- static readonly STACKED_BAR:SeriesPlotStyleType;
3231
- static readonly LINE:SeriesPlotStyleType;
3232
- static readonly AREA:SeriesPlotStyleType;
3233
- static readonly STACKED_AREA:SeriesPlotStyleType;
3234
- static readonly PIE:SeriesPlotStyleType;
3235
- static readonly HISTOGRAM:SeriesPlotStyleType;
3236
- static readonly OHLC:SeriesPlotStyleType;
3237
- static readonly SCATTER:SeriesPlotStyleType;
3238
- static readonly STEP:SeriesPlotStyleType;
3239
- static readonly ERROR_BAR:SeriesPlotStyleType;
3240
- static readonly TREEMAP:SeriesPlotStyleType;
3205
+ protected constructor();
3206
+ }
3207
+
3208
+ /**
3209
+ * A descriptor used with JsFigureFactory.create to create a figure from JS.
3210
+ */
3211
+ export class FigureDescriptor {
3212
+ title?:string|null;
3213
+ titleFont?:string|null;
3214
+ titleColor?:string|null;
3215
+ isResizable?:boolean|null;
3216
+ isDefaultTheme?:boolean|null;
3217
+ updateInterval?:number|null;
3218
+ cols?:number|null;
3219
+ rows?:number|null;
3220
+ charts:Array<ChartDescriptor>;
3221
+
3222
+ constructor();
3223
+ }
3224
+
3225
+ export class SeriesDescriptor {
3226
+ plotStyle:string;
3227
+ name?:string|null;
3228
+ linesVisible?:boolean|null;
3229
+ shapesVisible?:boolean|null;
3230
+ gradientVisible?:boolean|null;
3231
+ lineColor?:string|null;
3232
+ pointLabelFormat?:string|null;
3233
+ xToolTipPattern?:string|null;
3234
+ yToolTipPattern?:string|null;
3235
+ shapeLabel?:string|null;
3236
+ shapeSize?:number|null;
3237
+ shapeColor?:string|null;
3238
+ shape?:string|null;
3239
+ dataSources:Array<SourceDescriptor>;
3240
+
3241
+ constructor();
3241
3242
  }
3242
3243
 
3244
+
3243
3245
  type AxisFormatTypeType = number;
3244
3246
  export class AxisFormatType {
3245
3247
  static readonly CATEGORY:AxisFormatTypeType;
@@ -3255,6 +3257,47 @@ export namespace dh.plot {
3255
3257
  static readonly NONE:AxisPositionType;
3256
3258
  }
3257
3259
 
3260
+ /**
3261
+ * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3262
+ * those series should be rendered.
3263
+ */
3264
+ type ChartTypeType = number;
3265
+ export class ChartType {
3266
+ static readonly XY:ChartTypeType;
3267
+ static readonly PIE:ChartTypeType;
3268
+ static readonly OHLC:ChartTypeType;
3269
+ static readonly CATEGORY:ChartTypeType;
3270
+ static readonly XYZ:ChartTypeType;
3271
+ static readonly CATEGORY_3D:ChartTypeType;
3272
+ static readonly TREEMAP:ChartTypeType;
3273
+ }
3274
+
3275
+ type AxisTypeType = number;
3276
+ export class AxisType {
3277
+ static readonly X:AxisTypeType;
3278
+ static readonly Y:AxisTypeType;
3279
+ static readonly SHAPE:AxisTypeType;
3280
+ static readonly SIZE:AxisTypeType;
3281
+ static readonly LABEL:AxisTypeType;
3282
+ static readonly COLOR:AxisTypeType;
3283
+ }
3284
+
3285
+ type SeriesPlotStyleType = number;
3286
+ export class SeriesPlotStyle {
3287
+ static readonly BAR:SeriesPlotStyleType;
3288
+ static readonly STACKED_BAR:SeriesPlotStyleType;
3289
+ static readonly LINE:SeriesPlotStyleType;
3290
+ static readonly AREA:SeriesPlotStyleType;
3291
+ static readonly STACKED_AREA:SeriesPlotStyleType;
3292
+ static readonly PIE:SeriesPlotStyleType;
3293
+ static readonly HISTOGRAM:SeriesPlotStyleType;
3294
+ static readonly OHLC:SeriesPlotStyleType;
3295
+ static readonly SCATTER:SeriesPlotStyleType;
3296
+ static readonly STEP:SeriesPlotStyleType;
3297
+ static readonly ERROR_BAR:SeriesPlotStyleType;
3298
+ static readonly TREEMAP:SeriesPlotStyleType;
3299
+ }
3300
+
3258
3301
  /**
3259
3302
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3260
3303
  * 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
@@ -3284,56 +3327,10 @@ export namespace dh.plot {
3284
3327
  static readonly HOVER_TEXT:SourceTypeType;
3285
3328
  }
3286
3329
 
3287
- type AxisTypeType = number;
3288
- export class AxisType {
3289
- static readonly X:AxisTypeType;
3290
- static readonly Y:AxisTypeType;
3291
- static readonly SHAPE:AxisTypeType;
3292
- static readonly SIZE:AxisTypeType;
3293
- static readonly LABEL:AxisTypeType;
3294
- static readonly COLOR:AxisTypeType;
3295
- }
3296
-
3297
- /**
3298
- * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3299
- * those series should be rendered.
3300
- */
3301
- type ChartTypeType = number;
3302
- export class ChartType {
3303
- static readonly XY:ChartTypeType;
3304
- static readonly PIE:ChartTypeType;
3305
- static readonly OHLC:ChartTypeType;
3306
- static readonly CATEGORY:ChartTypeType;
3307
- static readonly XYZ:ChartTypeType;
3308
- static readonly CATEGORY_3D:ChartTypeType;
3309
- static readonly TREEMAP:ChartTypeType;
3310
- }
3311
-
3312
3330
  }
3313
3331
 
3314
3332
  export namespace dh.lsp {
3315
3333
 
3316
- export class TextEdit {
3317
- range:Range;
3318
- text:string;
3319
-
3320
- constructor();
3321
- }
3322
-
3323
- export class MarkupContent {
3324
- kind:string;
3325
- value:string;
3326
-
3327
- constructor();
3328
- }
3329
-
3330
- export class Hover {
3331
- contents:MarkupContent;
3332
- range:Range;
3333
-
3334
- constructor();
3335
- }
3336
-
3337
3334
  export class Range {
3338
3335
  start:Position;
3339
3336
  end:Position;
@@ -3343,10 +3340,19 @@ export namespace dh.lsp {
3343
3340
  isInside(innerStart:Position, innerEnd:Position):boolean;
3344
3341
  }
3345
3342
 
3346
- export class TextDocumentContentChangeEvent {
3347
- range:Range;
3348
- rangeLength:number;
3349
- text:string;
3343
+ export class CompletionItem {
3344
+ label:string;
3345
+ kind:number;
3346
+ detail:string;
3347
+ documentation:MarkupContent;
3348
+ deprecated:boolean;
3349
+ preselect:boolean;
3350
+ textEdit:TextEdit;
3351
+ sortText:string;
3352
+ filterText:string;
3353
+ insertTextFormat:number;
3354
+ additionalTextEdits:Array<TextEdit>;
3355
+ commitCharacters:Array<string>;
3350
3356
 
3351
3357
  constructor();
3352
3358
  }
@@ -3364,35 +3370,47 @@ export namespace dh.lsp {
3364
3370
  copy():Position;
3365
3371
  }
3366
3372
 
3367
- export class SignatureInformation {
3373
+ export class ParameterInformation {
3368
3374
  label:string;
3369
3375
  documentation:MarkupContent;
3370
- parameters:Array<ParameterInformation>;
3371
- activeParameter:number;
3372
3376
 
3373
3377
  constructor();
3374
3378
  }
3375
3379
 
3376
- export class ParameterInformation {
3377
- label:string;
3378
- documentation:MarkupContent;
3380
+ export class TextEdit {
3381
+ range:Range;
3382
+ text:string;
3379
3383
 
3380
3384
  constructor();
3381
3385
  }
3382
3386
 
3383
- export class CompletionItem {
3387
+ export class Hover {
3388
+ contents:MarkupContent;
3389
+ range:Range;
3390
+
3391
+ constructor();
3392
+ }
3393
+
3394
+ export class MarkupContent {
3395
+ kind:string;
3396
+ value:string;
3397
+
3398
+ constructor();
3399
+ }
3400
+
3401
+ export class TextDocumentContentChangeEvent {
3402
+ range:Range;
3403
+ rangeLength:number;
3404
+ text:string;
3405
+
3406
+ constructor();
3407
+ }
3408
+
3409
+ export class SignatureInformation {
3384
3410
  label:string;
3385
- kind:number;
3386
- detail:string;
3387
3411
  documentation:MarkupContent;
3388
- deprecated:boolean;
3389
- preselect:boolean;
3390
- textEdit:TextEdit;
3391
- sortText:string;
3392
- filterText:string;
3393
- insertTextFormat:number;
3394
- additionalTextEdits:Array<TextEdit>;
3395
- commitCharacters:Array<string>;
3412
+ parameters:Array<ParameterInformation>;
3413
+ activeParameter:number;
3396
3414
 
3397
3415
  constructor();
3398
3416
  }