@deephaven/jsapi-types 1.0.0-dev0.36.0 → 1.0.0-dev0.36.2

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 +1479 -1443
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  // Minimum TypeScript Version: 4.3
2
2
  // Generated using com.vertispan.tsdefs.doclet.TsDoclet
3
3
 
4
- export interface IIterableResult<T> {
5
- value:T;
6
- done:boolean;
7
- }
8
4
  /**
9
5
  * This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
10
6
  * returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
@@ -15,8 +11,28 @@ export interface Iterator<T> {
15
11
  hasNext():boolean;
16
12
  next():IIterableResult<T>;
17
13
  }
14
+ export interface IIterableResult<T> {
15
+ value:T;
16
+ done:boolean;
17
+ }
18
18
  export namespace dh.storage {
19
19
 
20
+ /**
21
+ * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
22
+ * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
23
+ * be used.
24
+ */
25
+ export class FileContents {
26
+ protected constructor();
27
+
28
+ static blob(blob:Blob):FileContents;
29
+ static text(...text:string[]):FileContents;
30
+ static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
31
+ text():Promise<string>;
32
+ arrayBuffer():Promise<ArrayBuffer>;
33
+ get etag():string;
34
+ }
35
+
20
36
  /**
21
37
  * Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
22
38
  */
@@ -90,22 +106,6 @@ export namespace dh.storage {
90
106
  get dirname():string;
91
107
  }
92
108
 
93
- /**
94
- * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
95
- * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
96
- * be used.
97
- */
98
- export class FileContents {
99
- protected constructor();
100
-
101
- static blob(blob:Blob):FileContents;
102
- static text(...text:string[]):FileContents;
103
- static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
104
- text():Promise<string>;
105
- arrayBuffer():Promise<ArrayBuffer>;
106
- get etag():string;
107
- }
108
-
109
109
 
110
110
  type ItemTypeType = string;
111
111
  export class ItemType {
@@ -117,10 +117,30 @@ export namespace dh.storage {
117
117
 
118
118
  export namespace dh {
119
119
 
120
- export interface ColumnGroup {
121
- get name():string|null;
122
- get children():string[]|null;
123
- get color():string|null;
120
+ /**
121
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table,
122
+ * but with additional properties to reflect the tree structure.
123
+ */
124
+ export interface TreeRow extends ViewportRow {
125
+ /**
126
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
127
+ * rows below this one with a greater depth than this one
128
+ * @return boolean
129
+ */
130
+ get isExpanded():boolean;
131
+ /**
132
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
133
+ * row and its expand/collapse icon
134
+ * @return int
135
+ */
136
+ get depth():number;
137
+ /**
138
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when
139
+ * the table updates, depending on the table's configuration
140
+ * @return boolean
141
+ */
142
+ get hasChildren():boolean;
143
+ get index():LongWrapper;
124
144
  }
125
145
  /**
126
146
  * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
@@ -252,6 +272,38 @@ export namespace dh {
252
272
  get isRefreshing():boolean;
253
273
  }
254
274
  /**
275
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
276
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
277
+ * are correctly freed.
278
+ */
279
+ export interface WidgetExportedObject {
280
+ /**
281
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
282
+ * null, this object cannot be fetched, but can be passed to the server, such as via
283
+ * {@link Widget.sendMessage}.
284
+ * @return the string type of this server-side object, or null.
285
+ */
286
+ readonly type?:string|null;
287
+
288
+ /**
289
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
290
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
291
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
292
+ */
293
+ reexport():Promise<WidgetExportedObject>;
294
+ /**
295
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
296
+ * the same instance.
297
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
298
+ */
299
+ fetch():Promise<any>;
300
+ /**
301
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
302
+ * exist that also use that object. Should not be called after fetch() has been invoked.
303
+ */
304
+ close():void;
305
+ }
306
+ /**
255
307
  * Common interface for various ways of accessing table data and formatting.
256
308
  *
257
309
  * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
@@ -264,60 +316,40 @@ export namespace dh {
264
316
  get columns():Array<Column>;
265
317
  get rows():Array<Row>;
266
318
  }
267
- export interface LayoutHints {
268
- readonly searchDisplayMode?:SearchDisplayModeType|null;
269
-
270
- get hiddenColumns():string[]|null;
271
- get frozenColumns():string[]|null;
272
- get columnGroups():ColumnGroup[]|null;
273
- get areSavedLayoutsAllowed():boolean;
274
- get frontColumns():string[]|null;
275
- get backColumns():string[]|null;
319
+ /**
320
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
321
+ */
322
+ export interface LocalDateWrapper {
323
+ valueOf():string;
324
+ getYear():number;
325
+ getMonthValue():number;
326
+ getDayOfMonth():number;
327
+ toString():string;
276
328
  }
277
329
  /**
278
- * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
279
- * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
280
- * <p>
281
- * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
282
- * server. The setViewport method can be used to adjust this table instead of creating a new one.
283
- * <p>
284
- * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
285
- * to the underlying handle and accumulated data.
286
- * <p>
287
- * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
288
- * the idea then that the caller did not actually use this type. This means that for every exported method (which then
289
- * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
290
- * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
291
- * deems it no longer in use.
292
- * <p>
293
- * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
294
- * true), providing a way to stop the server from streaming updates to the client.
295
- *
296
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
297
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
298
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
299
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
300
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
330
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it.
301
331
  */
302
- export interface TableViewportSubscription extends HasEventHandling {
332
+ export interface Format {
303
333
  /**
304
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
305
- * @param firstRow -
306
- * @param lastRow -
307
- * @param columns -
308
- * @param updateIntervalMs -
334
+ * The format string to apply to the value of this cell.
335
+ * @return String
309
336
  */
310
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
337
+ readonly formatString?:string|null;
311
338
  /**
312
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
339
+ * Color to apply to the cell's background, in <b>#rrggbb</b> format.
340
+ * @return String
313
341
  */
314
- close():void;
342
+ readonly backgroundColor?:string|null;
315
343
  /**
316
- * Gets the data currently visible in this viewport
317
- * @return Promise of {@link dh.TableData}.
344
+ * Color to apply to the text, in <b>#rrggbb</b> format.
345
+ * @return String
318
346
  */
319
- getViewportData():Promise<TableData>;
320
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
347
+ readonly color?:string|null;
348
+ /**
349
+ *
350
+ * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
351
+ */
352
+ readonly numberFormat?:string|null;
321
353
  }
322
354
  export interface WorkerHeapInfo {
323
355
  /**
@@ -327,6 +359,21 @@ export namespace dh {
327
359
  get freeMemory():number;
328
360
  get maximumHeapSize():number;
329
361
  }
362
+ export interface TreeViewportData extends TableData {
363
+ get offset():number;
364
+ get columns():Array<Column>;
365
+ get rows():Array<TreeRow>;
366
+ }
367
+ export interface LayoutHints {
368
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
369
+
370
+ get hiddenColumns():string[]|null;
371
+ get frozenColumns():string[]|null;
372
+ get columnGroups():ColumnGroup[]|null;
373
+ get areSavedLayoutsAllowed():boolean;
374
+ get frontColumns():string[]|null;
375
+ get backColumns():string[]|null;
376
+ }
330
377
  /**
331
378
  * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
332
379
  * in columns) either by index, or scanning the complete present index.
@@ -361,35 +408,82 @@ export namespace dh {
361
408
  get modified():RangeSet;
362
409
  get rows():Array<Row>;
363
410
  }
364
- export interface RefreshToken {
365
- get bytes():string;
366
- get expiry():number;
411
+ /**
412
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
413
+ */
414
+ export interface LocalTimeWrapper {
415
+ valueOf():string;
416
+ getHour():number;
417
+ getMinute():number;
418
+ getSecond():number;
419
+ getNano():number;
420
+ toString():string;
367
421
  }
368
422
  /**
369
- * This object may be pooled internally or discarded and not updated. Do not retain references to it.
423
+ * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
424
+ * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
425
+ * <p>
426
+ * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
427
+ * server. The setViewport method can be used to adjust this table instead of creating a new one.
428
+ * <p>
429
+ * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
430
+ * to the underlying handle and accumulated data.
431
+ * <p>
432
+ * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
433
+ * the idea then that the caller did not actually use this type. This means that for every exported method (which then
434
+ * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
435
+ * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
436
+ * deems it no longer in use.
437
+ * <p>
438
+ * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
439
+ * true), providing a way to stop the server from streaming updates to the client.
440
+ *
441
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
442
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
443
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
444
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
445
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
370
446
  */
371
- export interface Format {
447
+ export interface TableViewportSubscription extends HasEventHandling {
372
448
  /**
373
- * The format string to apply to the value of this cell.
374
- * @return String
449
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
450
+ * @param firstRow -
451
+ * @param lastRow -
452
+ * @param columns -
453
+ * @param updateIntervalMs -
375
454
  */
376
- readonly formatString?:string|null;
455
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
377
456
  /**
378
- * Color to apply to the cell's background, in <b>#rrggbb</b> format.
379
- * @return String
457
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
380
458
  */
381
- readonly backgroundColor?:string|null;
459
+ close():void;
382
460
  /**
383
- * Color to apply to the text, in <b>#rrggbb</b> format.
384
- * @return String
461
+ * Gets the data currently visible in this viewport
462
+ * @return Promise of {@link dh.TableData}.
385
463
  */
386
- readonly color?:string|null;
464
+ getViewportData():Promise<TableData>;
465
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
466
+ }
467
+ export interface HasEventHandling {
387
468
  /**
388
- *
389
- * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
469
+ * Listen for events on this object.
470
+ * @param name - the name of the event to listen for
471
+ * @param callback - a function to call when the event occurs
472
+ * @return Returns a cleanup function.
473
+ * @typeParam T - the type of the data that the event will provide
390
474
  */
391
- readonly numberFormat?:string|null;
392
- }
475
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
476
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
477
+ hasListeners(name:string):boolean;
478
+ /**
479
+ * Removes an event listener added to this table.
480
+ * @param name -
481
+ * @param callback -
482
+ * @return
483
+ * @typeParam T -
484
+ */
485
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
486
+ }
393
487
  /**
394
488
  * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
395
489
  * {@link dh.TotalsTable}.
@@ -480,49 +574,44 @@ export namespace dh {
480
574
  naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
481
575
  }
482
576
  /**
483
- * Row implementation that also provides additional read-only properties. represents visible rows in the table,
484
- * but with additional properties to reflect the tree structure.
577
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
578
+ * the viewport again.
485
579
  */
486
- export interface TreeRow extends ViewportRow {
487
- /**
488
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
489
- * rows below this one with a greater depth than this one
490
- * @return boolean
491
- */
492
- get isExpanded():boolean;
493
- /**
494
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
495
- * row and its expand/collapse icon
496
- * @return int
497
- */
498
- get depth():number;
499
- /**
500
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when
501
- * the table updates, depending on the table's configuration
502
- * @return boolean
503
- */
504
- get hasChildren():boolean;
580
+ export interface ViewportRow extends Row {
505
581
  get index():LongWrapper;
506
582
  }
507
- export interface HasEventHandling {
583
+ export interface ColumnGroup {
584
+ get name():string|null;
585
+ get children():string[]|null;
586
+ get color():string|null;
587
+ }
588
+ /**
589
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
590
+ * table column.
591
+ */
592
+ export interface ColumnStatistics {
508
593
  /**
509
- * Listen for events on this object.
510
- * @param name - the name of the event to listen for
511
- * @param callback - a function to call when the event occurs
512
- * @return Returns a cleanup function.
513
- * @typeParam T - the type of the data that the event will provide
594
+ * Gets the type of formatting that should be used for given statistic.
595
+ * <p>
596
+ * the format type for a statistic. A null return value means that the column formatting should be used.
597
+ * @param name - the display name of the statistic
598
+ * @return String
514
599
  */
515
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
516
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
517
- hasListeners(name:string):boolean;
600
+ getType(name:string):string;
518
601
  /**
519
- * Removes an event listener added to this table.
520
- * @param name -
521
- * @param callback -
522
- * @return
523
- * @typeParam T -
602
+ * 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
603
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
604
+ * than 19 unique values.
605
+ * @return Map of String double
524
606
  */
525
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
607
+ get uniqueValues():Map<string, number>;
608
+ /**
609
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
610
+ * <p>
611
+ * A map of each statistic's name to its value.
612
+ * @return Map of String and Object
613
+ */
614
+ get statisticsMap():Map<string, object>;
526
615
  }
527
616
  /**
528
617
  * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
@@ -546,11 +635,6 @@ export namespace dh {
546
635
  */
547
636
  get rows():Array<ViewportRow>;
548
637
  }
549
- export interface Row {
550
- get(column:Column):any;
551
- getFormat(column:Column):Format;
552
- get index():LongWrapper;
553
- }
554
638
  /**
555
639
  * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
556
640
  * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
@@ -578,190 +662,229 @@ export namespace dh {
578
662
  */
579
663
  get exportedObjects():WidgetExportedObject[];
580
664
  }
581
- /**
582
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
583
- * the viewport again.
584
- */
585
- export interface ViewportRow extends Row {
586
- get index():LongWrapper;
665
+ export interface RefreshToken {
666
+ get bytes():string;
667
+ get expiry():number;
587
668
  }
588
- /**
589
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
590
- */
591
- export interface LocalTimeWrapper {
592
- valueOf():string;
593
- getHour():number;
594
- getMinute():number;
595
- getSecond():number;
596
- getNano():number;
597
- toString():string;
669
+ export interface Row {
670
+ get(column:Column):any;
671
+ getFormat(column:Column):Format;
672
+ get index():LongWrapper;
598
673
  }
674
+
599
675
  /**
600
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
601
- * table column.
676
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
677
+ * the server to get each Table. All tables will have the same structure.
602
678
  */
603
- export interface ColumnStatistics {
679
+ export class PartitionedTable implements HasEventHandling {
604
680
  /**
605
- * Gets the type of formatting that should be used for given statistic.
606
- * <p>
607
- * the format type for a statistic. A null return value means that the column formatting should be used.
608
- * @param name - the display name of the statistic
609
- * @return String
681
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
610
682
  */
611
- getType(name:string):string;
683
+ static readonly EVENT_KEYADDED:string;
612
684
  /**
613
- * 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
614
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
615
- * than 19 unique values.
616
- * @return Map of String double
685
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
617
686
  */
618
- get uniqueValues():Map<string, number>;
687
+ static readonly EVENT_DISCONNECT:string;
619
688
  /**
620
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
621
- * <p>
622
- * A map of each statistic's name to its value.
623
- * @return Map of String and Object
689
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
624
690
  */
625
- get statisticsMap():Map<string, object>;
626
- }
627
- /**
628
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
629
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
630
- * are correctly freed.
631
- */
632
- export interface WidgetExportedObject {
691
+ static readonly EVENT_RECONNECT:string;
633
692
  /**
634
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
635
- * null, this object cannot be fetched, but can be passed to the server, such as via
636
- * {@link Widget.sendMessage}.
637
- * @return the string type of this server-side object, or null.
693
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
638
694
  */
639
- readonly type?:string|null;
695
+ static readonly EVENT_RECONNECTFAILED:string;
696
+
697
+ protected constructor();
640
698
 
699
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
641
700
  /**
642
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
643
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
644
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
701
+ * Fetch the table with the given key. If the key does not exist, returns `null`.
702
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
703
+ * @return Promise of dh.Table, or `null` if the key does not exist.
645
704
  */
646
- reexport():Promise<WidgetExportedObject>;
705
+ getTable(key:object):Promise<Table|undefined|null>;
647
706
  /**
648
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
649
- * the same instance.
650
- * @return a promise that will resolve to a client side object that represents the reference on the server.
707
+ * Open a new table that is the result of merging all constituent tables. See
708
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
709
+ * @return A merged representation of the constituent tables.
651
710
  */
652
- fetch():Promise<any>;
711
+ getMergedTable():Promise<Table>;
653
712
  /**
654
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
655
- * exist that also use that object. Should not be called after fetch() has been invoked.
713
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
714
+ * for <b>keyadded</b> will ensure no keys are missed.
715
+ * @return Set of Object
656
716
  */
657
- close():void;
658
- }
659
- export interface TreeViewportData extends TableData {
660
- get offset():number;
661
- get columns():Array<Column>;
662
- get rows():Array<TreeRow>;
663
- }
664
- /**
665
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
666
- */
667
- export interface LocalDateWrapper {
668
- valueOf():string;
669
- getYear():number;
670
- getMonthValue():number;
671
- getDayOfMonth():number;
672
- toString():string;
673
- }
674
-
675
- export class LoginCredentials {
676
- type?:string|null;
677
- username?:string|null;
678
- token?:string|null;
679
-
680
- constructor();
681
- }
682
-
683
- /**
684
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
685
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
686
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
687
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
688
- * of <b>TotalsTableConfig</b> will be supplied.
689
- *
690
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
691
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
692
- * expected formats.
693
- */
694
- export class TotalsTableConfig {
717
+ getKeys():Set<object>;
695
718
  /**
719
+ * Fetch a table containing all the valid keys of the partitioned table.
720
+ * @return Promise of a Table
696
721
  * @deprecated
697
722
  */
698
- static readonly COUNT:string;
723
+ getKeyTable():Promise<Table>;
699
724
  /**
700
- * @deprecated
725
+ * Fetch the underlying base table of the partitioned table.
726
+ * @return Promise of a Table
701
727
  */
702
- static readonly MIN:string;
728
+ getBaseTable():Promise<Table>;
703
729
  /**
704
- * @deprecated
730
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
731
+ * will not affect tables in use.
705
732
  */
706
- static readonly MAX:string;
733
+ close():void;
707
734
  /**
708
- * @deprecated
735
+ * The count of known keys.
736
+ * @return int
709
737
  */
710
- static readonly SUM:string;
738
+ get size():number;
711
739
  /**
712
- * @deprecated
740
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
741
+ * non-key columns.
742
+ * @return Array of Column
713
743
  */
714
- static readonly ABS_SUM:string;
744
+ get columns():Column[];
715
745
  /**
716
- * @deprecated
746
+ * An array of all the key columns that the tables are partitioned by.
747
+ * @return Array of Column
717
748
  */
718
- static readonly VAR:string;
749
+ get keyColumns():Column[];
719
750
  /**
720
- * @deprecated
751
+ * Listen for events on this object.
752
+ * @param name - the name of the event to listen for
753
+ * @param callback - a function to call when the event occurs
754
+ * @return Returns a cleanup function.
755
+ * @typeParam T - the type of the data that the event will provide
721
756
  */
722
- static readonly AVG:string;
757
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
758
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
759
+ hasListeners(name:string):boolean;
723
760
  /**
724
- * @deprecated
725
- */
726
- static readonly STD:string;
761
+ * Removes an event listener added to this table.
762
+ * @param name -
763
+ * @param callback -
764
+ * @return
765
+ * @typeParam T -
766
+ */
767
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
768
+ }
769
+
770
+ export class QueryInfo {
771
+ static readonly EVENT_TABLE_OPENED:string;
772
+ static readonly EVENT_DISCONNECT:string;
773
+ static readonly EVENT_RECONNECT:string;
774
+ static readonly EVENT_CONNECT:string;
775
+
776
+ protected constructor();
777
+ }
778
+
779
+ /**
780
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
781
+ */
782
+ export class BigIntegerWrapper {
783
+ protected constructor();
784
+
785
+ static ofString(str:string):BigIntegerWrapper;
786
+ asNumber():number;
787
+ valueOf():string;
788
+ toString():string;
789
+ }
790
+
791
+ /**
792
+ * A js type for operating on input tables.
793
+ *
794
+ * Represents a User Input Table, which can have data added to it from other sources.
795
+ *
796
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
797
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
798
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
799
+ * before sending the next operation.
800
+ *
801
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
802
+ *
803
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
804
+ * object.
805
+ */
806
+ export class InputTable {
807
+ protected constructor();
808
+
727
809
  /**
728
- * @deprecated
810
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
811
+ * property at that name and validate it can be put into the given column type.
812
+ * @param row -
813
+ * @param userTimeZone -
814
+ * @return Promise of dh.InputTable
729
815
  */
730
- static readonly FIRST:string;
816
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
731
817
  /**
732
- * @deprecated
818
+ * Add multiple rows to a table.
819
+ * @param rows -
820
+ * @param userTimeZone -
821
+ * @return Promise of dh.InputTable
733
822
  */
734
- static readonly LAST:string;
823
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
735
824
  /**
736
- * @deprecated
825
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
826
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
827
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
828
+ * resolved to the same InputTable instance this method was called upon once the server returns.
829
+ * @param tableToAdd -
830
+ * @return Promise of dh.InputTable
737
831
  */
738
- static readonly SKIP:string;
832
+ addTable(tableToAdd:Table):Promise<InputTable>;
739
833
  /**
740
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
834
+ * Add multiple tables to this Input Table.
835
+ * @param tablesToAdd -
836
+ * @return Promise of dh.InputTable
741
837
  */
742
- showTotalsByDefault:boolean;
838
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
743
839
  /**
744
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
840
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
841
+ * @param tableToDelete -
842
+ * @return Promise of dh.InputTable
745
843
  */
746
- showGrandTotalsByDefault:boolean;
844
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
747
845
  /**
748
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
846
+ * Delete multiple tables from this Input Table.
847
+ * @param tablesToDelete -
848
+ * @return
749
849
  */
750
- defaultOperation:AggregationOperationType;
850
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
751
851
  /**
752
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
753
- * Table. If a column is omitted, the defaultOperation is used.
852
+ * A list of the key columns, by name
853
+ * @return String array.
754
854
  */
755
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
855
+ get keys():string[];
756
856
  /**
757
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
758
- * these columns. See also `Table.selectDistinct`.
857
+ * A list of the value columns, by name
858
+ * @return String array.
759
859
  */
760
- groupBy:Array<string>;
860
+ get values():string[];
861
+ /**
862
+ * A list of the key columns.
863
+ * @return Column array.
864
+ */
865
+ get keyColumns():Column[];
866
+ /**
867
+ * A list of the value Column objects
868
+ * @return {@link dh.Column} array.
869
+ */
870
+ get valueColumns():Column[];
871
+ /**
872
+ * The source table for this Input Table
873
+ * @return dh.table
874
+ */
875
+ get table():Table;
876
+ }
761
877
 
762
- constructor();
878
+ /**
879
+ * Deprecated for use in Deephaven Core.
880
+ * @deprecated
881
+ */
882
+ export class Client {
883
+ static readonly EVENT_REQUEST_FAILED:string;
884
+ static readonly EVENT_REQUEST_STARTED:string;
885
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
763
886
 
764
- toString():string;
887
+ constructor();
765
888
  }
766
889
 
767
890
  /**
@@ -1072,110 +1195,150 @@ export namespace dh {
1072
1195
 
1073
1196
 
1074
1197
  /**
1075
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1076
- * the server to get each Table. All tables will have the same structure.
1198
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1199
+ * column.
1077
1200
  */
1078
- export class PartitionedTable implements HasEventHandling {
1079
- /**
1080
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1081
- */
1082
- static readonly EVENT_KEYADDED:string;
1083
- /**
1084
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1085
- */
1086
- static readonly EVENT_DISCONNECT:string;
1087
- /**
1088
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1089
- */
1090
- static readonly EVENT_RECONNECT:string;
1201
+ export class Column {
1091
1202
  /**
1092
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1203
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1204
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1205
+ * @return String
1093
1206
  */
1094
- static readonly EVENT_RECONNECTFAILED:string;
1207
+ readonly constituentType?:string|null;
1208
+ readonly description?:string|null;
1095
1209
 
1096
1210
  protected constructor();
1097
1211
 
1098
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1099
1212
  /**
1100
- * Fetch the table with the given key. If the key does not exist, returns `null`.
1101
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
1102
- * @return Promise of dh.Table, or `null` if the key does not exist.
1213
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
1214
+ * @param row -
1215
+ * @return Any
1103
1216
  */
1104
- getTable(key:object):Promise<Table|undefined|null>;
1217
+ get(row:Row):any;
1218
+ getFormat(row:Row):Format;
1105
1219
  /**
1106
- * Open a new table that is the result of merging all constituent tables. See
1107
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
1108
- * @return A merged representation of the constituent tables.
1220
+ * Creates a sort builder object, to be used when sorting by this column.
1221
+ * @return {@link dh.Sort}
1109
1222
  */
1110
- getMergedTable():Promise<Table>;
1223
+ sort():Sort;
1111
1224
  /**
1112
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
1113
- * for <b>keyadded</b> will ensure no keys are missed.
1114
- * @return Set of Object
1225
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1226
+ * operation, or as a builder to create a filter operation.
1227
+ * @return {@link dh.FilterValue}
1115
1228
  */
1116
- getKeys():Set<object>;
1229
+ filter():FilterValue;
1117
1230
  /**
1118
- * Fetch a table containing all the valid keys of the partitioned table.
1119
- * @return Promise of a Table
1120
- * @deprecated
1231
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1232
+ * @param expression -
1233
+ * @return {@link dh.CustomColumn}
1121
1234
  */
1122
- getKeyTable():Promise<Table>;
1235
+ formatColor(expression:string):CustomColumn;
1123
1236
  /**
1124
- * Fetch the underlying base table of the partitioned table.
1125
- * @return Promise of a Table
1237
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1238
+ * @param expression -
1239
+ * @return {@link dh.CustomColumn}
1126
1240
  */
1127
- getBaseTable():Promise<Table>;
1241
+ formatNumber(expression:string):CustomColumn;
1128
1242
  /**
1129
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
1130
- * will not affect tables in use.
1243
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1244
+ * @param expression -
1245
+ * @return {@link dh.CustomColumn}
1131
1246
  */
1132
- close():void;
1247
+ formatDate(expression:string):CustomColumn;
1248
+ toString():string;
1133
1249
  /**
1134
- * The count of known keys.
1135
- * @return int
1250
+ * Label for this column.
1251
+ * @return String
1136
1252
  */
1137
- get size():number;
1253
+ get name():string;
1138
1254
  /**
1139
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
1140
- * non-key columns.
1141
- * @return Array of Column
1255
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1256
+ * <b>isUncoalesced</b> property on <b>Table</b>)
1257
+ * @return boolean
1142
1258
  */
1143
- get columns():Column[];
1259
+ get isPartitionColumn():boolean;
1144
1260
  /**
1145
- * An array of all the key columns that the tables are partitioned by.
1146
- * @return Array of Column
1261
+ *
1262
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1263
+ * @return int
1147
1264
  */
1148
- get keyColumns():Column[];
1265
+ get index():number;
1266
+ get isSortable():boolean;
1149
1267
  /**
1150
- * Listen for events on this object.
1151
- * @param name - the name of the event to listen for
1152
- * @param callback - a function to call when the event occurs
1153
- * @return Returns a cleanup function.
1154
- * @typeParam T - the type of the data that the event will provide
1268
+ * Type of the row data that can be found in this column.
1269
+ * @return String
1155
1270
  */
1156
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1157
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1158
- hasListeners(name:string):boolean;
1271
+ get type():string;
1159
1272
  /**
1160
- * Removes an event listener added to this table.
1273
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1274
+ * table using <b>applyCustomColumns</b> with the parameters specified.
1275
+ * @param expression -
1276
+ * @return {@link dh.CustomColumn}
1277
+ */
1278
+ static formatRowColor(expression:string):CustomColumn;
1279
+ /**
1280
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1161
1281
  * @param name -
1162
- * @param callback -
1163
- * @return
1164
- * @typeParam T -
1282
+ * @param expression -
1283
+ * @return {@link dh.CustomColumn}
1165
1284
  */
1166
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1285
+ static createCustomColumn(name:string, expression:string):CustomColumn;
1167
1286
  }
1168
1287
 
1169
- /**
1170
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1171
- */
1172
- export class BigDecimalWrapper {
1173
- protected constructor();
1288
+ export class CoreClient implements HasEventHandling {
1289
+ static readonly EVENT_CONNECT:string;
1290
+ static readonly EVENT_DISCONNECT:string;
1291
+ static readonly EVENT_RECONNECT:string;
1292
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1293
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1294
+ static readonly EVENT_REQUEST_FAILED:string;
1295
+ static readonly EVENT_REQUEST_STARTED:string;
1296
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1297
+ static readonly LOGIN_TYPE_PASSWORD:string;
1298
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
1174
1299
 
1175
- static ofString(value:string):BigDecimalWrapper;
1176
- asNumber():number;
1177
- valueOf():string;
1178
- toString():string;
1300
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
1301
+
1302
+ running():Promise<CoreClient>;
1303
+ getServerUrl():string;
1304
+ getAuthConfigValues():Promise<string[][]>;
1305
+ login(credentials:LoginCredentials):Promise<void>;
1306
+ relogin(token:RefreshToken):Promise<void>;
1307
+ onConnected(timeoutInMillis?:number):Promise<void>;
1308
+ getServerConfigValues():Promise<string[][]>;
1309
+ getStorageService():dh.storage.StorageService;
1310
+ getAsIdeConnection():Promise<IdeConnection>;
1311
+ disconnect():void;
1312
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1313
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1314
+ hasListeners(name:string):boolean;
1315
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1316
+ }
1317
+
1318
+ /**
1319
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1320
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1321
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1322
+ */
1323
+ export class RangeSet {
1324
+ protected constructor();
1325
+
1326
+ static ofRange(first:number, last:number):RangeSet;
1327
+ static ofItems(rows:number[]):RangeSet;
1328
+ static ofRanges(ranges:RangeSet[]):RangeSet;
1329
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1330
+ /**
1331
+ * a new iterator over all indexes in this collection.
1332
+ * @return Iterator of {@link dh.LongWrapper}
1333
+ */
1334
+ iterator():Iterator<LongWrapper>;
1335
+ /**
1336
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1337
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1338
+ * property each time through a loop).
1339
+ * @return double
1340
+ */
1341
+ get size():number;
1179
1342
  }
1180
1343
 
1181
1344
  /**
@@ -1238,81 +1401,142 @@ export namespace dh {
1238
1401
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1239
1402
  }
1240
1403
 
1241
- export class IdeSession implements HasEventHandling {
1242
- static readonly EVENT_COMMANDSTARTED:string;
1243
- static readonly EVENT_REQUEST_FAILED:string;
1404
+ /**
1405
+ * A Widget represents a server side object that sends one or more responses to the client. The client can then
1406
+ * interpret these responses to see what to render, or how to respond.
1407
+ * <p>
1408
+ * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1409
+ * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1410
+ * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1411
+ * object type, the client code that handles the payloads is expected to know what to expect. See
1412
+ * {@link dh.WidgetMessageDetails} for more information.
1413
+ * <p>
1414
+ * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1415
+ * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1416
+ * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1417
+ * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1418
+ * remote messages are still pending - it is up to implementations of plugins to handle this case.
1419
+ * <p>
1420
+ * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1421
+ * What it does handle however, is allowing those messages to include references to server-side objects with those
1422
+ * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1423
+ * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1424
+ * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1425
+ * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1426
+ * entirely to the plugin. Messages will arrive in the order they were sent.
1427
+ * <p>
1428
+ * This can suggest several patterns for how plugins operate:
1429
+ * <ul>
1430
+ * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1431
+ * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1432
+ * `pandas.DataFrame` will result in a widget that only contains a static
1433
+ * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1434
+ * provided to the JS API consumer.</li>
1435
+ * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1436
+ * which provided them. One concrete example of this could have been
1437
+ * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1438
+ * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1439
+ * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1440
+ * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1441
+ * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1442
+ * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1443
+ * an internal table instance.</li>
1444
+ * </ul>
1445
+ *
1446
+ * Handling server objects in messages also has more than one potential pattern that can be used:
1447
+ * <ul>
1448
+ * <li>One object per message - the message clearly is about that object, no other details required.</li>
1449
+ * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1450
+ * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1451
+ * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1452
+ * be used, which columns should be mapped to each axis.</li>
1453
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1454
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1455
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1456
+ * without the server somehow signaling that it will never reference that export again.</li>
1457
+ * </ul>
1458
+ */
1459
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
1460
+ static readonly EVENT_MESSAGE:string;
1461
+ static readonly EVENT_CLOSE:string;
1244
1462
 
1245
1463
  protected constructor();
1246
1464
 
1247
1465
  /**
1248
- * Load the named table, with columns and size information already fully populated.
1249
- * @param name -
1250
- * @param applyPreviewColumns - optional boolean
1251
- * @return {@link Promise} of {@link dh.Table}
1466
+ * Ends the client connection to the server.
1252
1467
  */
1253
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
1468
+ close():void;
1469
+ getDataAsBase64():string;
1470
+ getDataAsU8():Uint8Array;
1471
+ getDataAsString():string;
1254
1472
  /**
1255
- * Load the named Figure, including its tables and tablemaps as needed.
1256
- * @param name -
1257
- * @return promise of dh.plot.Figure
1473
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1474
+ * @param msg - string/buffer/view instance that represents data to send
1475
+ * @param references - an array of objects that can be safely sent to the server
1258
1476
  */
1259
- getFigure(name:string):Promise<dh.plot.Figure>;
1477
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1478
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1479
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1480
+ hasListeners(name:string):boolean;
1481
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1260
1482
  /**
1261
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
1262
- * size is presently not available until the viewport is first set.
1263
- * @param name -
1264
- * @return {@link Promise} of {@link dh.TreeTable}
1483
+ *
1484
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1485
+ * them when finished using them.
1265
1486
  */
1266
- getTreeTable(name:string):Promise<TreeTable>;
1267
- getHierarchicalTable(name:string):Promise<TreeTable>;
1268
- getPartitionedTable(name:string):Promise<PartitionedTable>;
1269
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1270
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1487
+ get exportedObjects():WidgetExportedObject[];
1271
1488
  /**
1272
- * Merges the given tables into a single table. Assumes all tables have the same structure.
1273
- * @param tables -
1274
- * @return {@link Promise} of {@link dh.Table}
1489
+ *
1490
+ * @return the type of this widget
1275
1491
  */
1276
- mergeTables(tables:Table[]):Promise<Table>;
1277
- bindTableToVariable(table:Table, name:string):Promise<void>;
1278
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1279
- close():void;
1280
- runCode(code:string):Promise<dh.ide.CommandResult>;
1281
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1282
- openDocument(params:object):void;
1283
- changeDocument(params:object):void;
1284
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
1285
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
1286
- getHover(params:object):Promise<dh.lsp.Hover>;
1287
- closeDocument(params:object):void;
1492
+ get type():string;
1493
+ }
1494
+
1495
+ /**
1496
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1497
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1498
+ *
1499
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1500
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1501
+ * forward data to it.
1502
+ *
1503
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1504
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1505
+ * viewports to make it less expensive to compute for large tables.
1506
+ */
1507
+ export class TableSubscription implements HasEventHandling {
1288
1508
  /**
1289
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
1290
- * values will be null.
1291
- * @param size -
1292
- * @return {@link Promise} of {@link dh.Table}
1509
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1510
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1511
+ * allowing access to the entire range of items currently in the subscribed columns.
1293
1512
  */
1294
- emptyTable(size:number):Promise<Table>;
1513
+ static readonly EVENT_UPDATED:string;
1514
+
1515
+ protected constructor();
1516
+
1295
1517
  /**
1296
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
1297
- * the table will be populated with the interval from the specified date until now.
1298
- * @param periodNanos -
1299
- * @param startTime -
1300
- * @return {@link Promise} of {@link dh.Table}
1518
+ * Stops the subscription on the server.
1301
1519
  */
1302
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
1520
+ close():void;
1303
1521
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1304
1522
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1305
1523
  hasListeners(name:string):boolean;
1306
1524
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1525
+ /**
1526
+ * The columns that were subscribed to when this subscription was created
1527
+ * @return {@link dh.Column}
1528
+ */
1529
+ get columns():Array<Column>;
1307
1530
  }
1308
1531
 
1309
- export class QueryInfo {
1310
- static readonly EVENT_TABLE_OPENED:string;
1311
- static readonly EVENT_DISCONNECT:string;
1312
- static readonly EVENT_RECONNECT:string;
1313
- static readonly EVENT_CONNECT:string;
1532
+ /**
1533
+ * Event fired when a command is issued from the client.
1534
+ */
1535
+ export class CommandInfo {
1536
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1314
1537
 
1315
- protected constructor();
1538
+ get result():Promise<dh.ide.CommandResult>;
1539
+ get code():string;
1316
1540
  }
1317
1541
 
1318
1542
  /**
@@ -1339,480 +1563,410 @@ export namespace dh {
1339
1563
  constructor();
1340
1564
  }
1341
1565
 
1342
- /**
1343
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1344
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1345
- */
1346
- export class ConnectOptions {
1347
- headers:{ [key: string]: string; };
1566
+ export class LoginCredentials {
1567
+ type?:string|null;
1568
+ username?:string|null;
1569
+ token?:string|null;
1348
1570
 
1349
1571
  constructor();
1350
1572
  }
1351
1573
 
1352
- /**
1353
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1354
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1355
- * instance.
1356
- */
1357
- export class FilterCondition {
1574
+ export class LongWrapper {
1358
1575
  protected constructor();
1359
1576
 
1577
+ static ofString(str:string):LongWrapper;
1578
+ asNumber():number;
1579
+ valueOf():string;
1580
+ toString():string;
1581
+ }
1582
+
1583
+ export class Ide {
1584
+ constructor();
1585
+
1360
1586
  /**
1361
- * the opposite of this condition
1362
- * @return FilterCondition
1587
+ * @deprecated
1363
1588
  */
1364
- not():FilterCondition;
1589
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1365
1590
  /**
1366
- * a condition representing the current condition logically ANDed with the other parameters
1367
- * @param filters -
1368
- * @return FilterCondition
1591
+ * @deprecated
1369
1592
  */
1370
- and(...filters:FilterCondition[]):FilterCondition;
1593
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1594
+ }
1595
+
1596
+ /**
1597
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1598
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1599
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1600
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1601
+ * instance.
1602
+ */
1603
+ export class FilterValue {
1604
+ protected constructor();
1605
+
1371
1606
  /**
1372
- * a condition representing the current condition logically ORed with the other parameters
1373
- * @param filters -
1374
- * @return FilterCondition.
1607
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1608
+ * {@link TableData.get} for DateTime values. To create
1609
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1610
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1611
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1612
+ * @param input - the number to wrap as a FilterValue
1613
+ * @return an immutable FilterValue that can be built into a filter
1375
1614
  */
1376
- or(...filters:FilterCondition[]):FilterCondition;
1615
+ static ofNumber(input:LongWrapper|number):FilterValue;
1377
1616
  /**
1378
- * a string suitable for debugging showing the details of this condition.
1379
- * @return String.
1617
+ * a filter condition checking if the current value is equal to the given parameter
1618
+ * @param term -
1619
+ * @return {@link dh.FilterCondition}
1380
1620
  */
1381
- toString():string;
1382
- get columns():Array<Column>;
1621
+ eq(term:FilterValue):FilterCondition;
1383
1622
  /**
1384
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1385
- * functions:
1386
- * <ul>
1387
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1388
- * than the third</li>
1389
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1390
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1391
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1392
- * "not a number"</i></li>
1393
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1394
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1395
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1396
- * expression</li>
1397
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1398
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1399
- * <p>
1400
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1401
- * method should be used in other cases
1402
- * </p>
1403
- * </li>
1404
- * </ul>
1405
- * @param function -
1406
- * @param args -
1407
- * @return dh.FilterCondition
1623
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1624
+ * vs lower case
1625
+ * @param term -
1626
+ * @return {@link dh.FilterCondition}
1408
1627
  */
1409
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1628
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1410
1629
  /**
1411
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1412
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1413
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1414
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1415
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1416
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1417
- * {@link dh.Column.filter}).
1418
- * @param value -
1419
- * @param columns -
1420
- * @return dh.FilterCondition
1630
+ * a filter condition checking if the current value is not equal to the given parameter
1631
+ * @param term -
1632
+ * @return {@link dh.FilterCondition}
1421
1633
  */
1422
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1423
- }
1424
-
1425
- /**
1426
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1427
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1428
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1429
- */
1430
- export class RangeSet {
1431
- protected constructor();
1432
-
1433
- static ofRange(first:number, last:number):RangeSet;
1434
- static ofItems(rows:number[]):RangeSet;
1435
- static ofRanges(ranges:RangeSet[]):RangeSet;
1436
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1634
+ notEq(term:FilterValue):FilterCondition;
1437
1635
  /**
1438
- * a new iterator over all indexes in this collection.
1439
- * @return Iterator of {@link dh.LongWrapper}
1636
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1637
+ * upper vs lower case
1638
+ * @param term -
1639
+ * @return {@link dh.FilterCondition}
1440
1640
  */
1441
- iterator():Iterator<LongWrapper>;
1641
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1442
1642
  /**
1443
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1444
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1445
- * property each time through a loop).
1446
- * @return double
1643
+ * a filter condition checking if the current value is greater than the given parameter
1644
+ * @param term -
1645
+ * @return {@link dh.FilterCondition}
1447
1646
  */
1448
- get size():number;
1449
- }
1450
-
1451
- /**
1452
- * Event fired when a command is issued from the client.
1453
- */
1454
- export class CommandInfo {
1455
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1456
-
1457
- get result():Promise<dh.ide.CommandResult>;
1458
- get code():string;
1459
- }
1460
-
1461
- /**
1462
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1463
- * this type TableMap.
1464
- * @deprecated
1465
- */
1466
- export class TableMap {
1467
- static readonly EVENT_KEYADDED:string;
1468
- static readonly EVENT_DISCONNECT:string;
1469
- static readonly EVENT_RECONNECT:string;
1470
- static readonly EVENT_RECONNECTFAILED:string;
1471
-
1472
- protected constructor();
1473
- }
1474
-
1475
- /**
1476
- * A Widget represents a server side object that sends one or more responses to the client. The client can then
1477
- * interpret these responses to see what to render, or how to respond.
1478
- * <p>
1479
- * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1480
- * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1481
- * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1482
- * object type, the client code that handles the payloads is expected to know what to expect. See
1483
- * {@link dh.WidgetMessageDetails} for more information.
1484
- * <p>
1485
- * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1486
- * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1487
- * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1488
- * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1489
- * remote messages are still pending - it is up to implementations of plugins to handle this case.
1490
- * <p>
1491
- * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1492
- * What it does handle however, is allowing those messages to include references to server-side objects with those
1493
- * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1494
- * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1495
- * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1496
- * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1497
- * entirely to the plugin. Messages will arrive in the order they were sent.
1498
- * <p>
1499
- * This can suggest several patterns for how plugins operate:
1500
- * <ul>
1501
- * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1502
- * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1503
- * `pandas.DataFrame` will result in a widget that only contains a static
1504
- * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1505
- * provided to the JS API consumer.</li>
1506
- * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1507
- * which provided them. One concrete example of this could have been
1508
- * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1509
- * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1510
- * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1511
- * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1512
- * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1513
- * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1514
- * an internal table instance.</li>
1515
- * </ul>
1516
- *
1517
- * Handling server objects in messages also has more than one potential pattern that can be used:
1518
- * <ul>
1519
- * <li>One object per message - the message clearly is about that object, no other details required.</li>
1520
- * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1521
- * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1522
- * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1523
- * be used, which columns should be mapped to each axis.</li>
1524
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1525
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1526
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1527
- * without the server somehow signaling that it will never reference that export again.</li>
1528
- * </ul>
1529
- */
1530
- export class Widget implements WidgetMessageDetails, HasEventHandling {
1531
- static readonly EVENT_MESSAGE:string;
1532
- static readonly EVENT_CLOSE:string;
1533
-
1534
- protected constructor();
1535
-
1647
+ greaterThan(term:FilterValue):FilterCondition;
1536
1648
  /**
1537
- * Ends the client connection to the server.
1649
+ * a filter condition checking if the current value is less than the given parameter
1650
+ * @param term -
1651
+ * @return {@link dh.FilterCondition}
1538
1652
  */
1539
- close():void;
1540
- getDataAsBase64():string;
1541
- getDataAsU8():Uint8Array;
1542
- getDataAsString():string;
1653
+ lessThan(term:FilterValue):FilterCondition;
1543
1654
  /**
1544
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1545
- * @param msg - string/buffer/view instance that represents data to send
1546
- * @param references - an array of objects that can be safely sent to the server
1655
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1656
+ * @param term -
1657
+ * @return {@link dh.FilterCondition}
1547
1658
  */
1548
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1549
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1550
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1551
- hasListeners(name:string):boolean;
1552
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1659
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1553
1660
  /**
1554
- *
1555
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1556
- * them when finished using them.
1661
+ * a filter condition checking if the current value is less than or equal to the given parameter
1662
+ * @param term -
1663
+ * @return {@link dh.FilterCondition}
1557
1664
  */
1558
- get exportedObjects():WidgetExportedObject[];
1665
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1559
1666
  /**
1560
- *
1561
- * @return the type of this widget
1667
+ * a filter condition checking if the current value is in the given set of values
1668
+ * @param terms -
1669
+ * @return {@link dh.FilterCondition}
1562
1670
  */
1563
- get type():string;
1671
+ in(terms:FilterValue[]):FilterCondition;
1672
+ /**
1673
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1674
+ * lower case
1675
+ * @param terms -
1676
+ * @return {@link dh.FilterCondition}
1677
+ */
1678
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
1679
+ /**
1680
+ * a filter condition checking that the current value is not in the given set of values
1681
+ * @param terms -
1682
+ * @return {@link dh.FilterCondition}
1683
+ */
1684
+ notIn(terms:FilterValue[]):FilterCondition;
1685
+ /**
1686
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1687
+ * upper vs lower case
1688
+ * @param terms -
1689
+ * @return {@link dh.FilterCondition}
1690
+ */
1691
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1692
+ /**
1693
+ * a filter condition checking if the given value contains the given string value
1694
+ * @param term -
1695
+ * @return {@link dh.FilterCondition}
1696
+ */
1697
+ contains(term:FilterValue):FilterCondition;
1698
+ /**
1699
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1700
+ * lower case
1701
+ * @param term -
1702
+ * @return {@link dh.FilterCondition}
1703
+ */
1704
+ containsIgnoreCase(term:FilterValue):FilterCondition;
1705
+ /**
1706
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1707
+ * use Java regex syntax
1708
+ * @param pattern -
1709
+ * @return {@link dh.FilterCondition}
1710
+ */
1711
+ matches(pattern:FilterValue):FilterCondition;
1712
+ /**
1713
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1714
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1715
+ * @param pattern -
1716
+ * @return {@link dh.FilterCondition}
1717
+ */
1718
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1719
+ /**
1720
+ * a filter condition checking if the current value is a true boolean
1721
+ * @return {@link dh.FilterCondition}
1722
+ */
1723
+ isTrue():FilterCondition;
1724
+ /**
1725
+ * a filter condition checking if the current value is a false boolean
1726
+ * @return {@link dh.FilterCondition}
1727
+ */
1728
+ isFalse():FilterCondition;
1729
+ /**
1730
+ * a filter condition checking if the current value is a null value
1731
+ * @return {@link dh.FilterCondition}
1732
+ */
1733
+ isNull():FilterCondition;
1734
+ /**
1735
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1736
+ * functions that can be invoked on a String:
1737
+ * <ul>
1738
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1739
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1740
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1741
+ * regular expression</li>
1742
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1743
+ * <p>
1744
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1745
+ * </p>
1746
+ * </li>
1747
+ * </ul>
1748
+ * @param method -
1749
+ * @param args -
1750
+ * @return
1751
+ */
1752
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
1753
+ toString():string;
1754
+ /**
1755
+ * Constructs a string for the filter API from the given parameter.
1756
+ * @param input -
1757
+ * @return
1758
+ */
1759
+ static ofString(input:any):FilterValue;
1760
+ /**
1761
+ * Constructs a boolean for the filter API from the given parameter.
1762
+ * @param b -
1763
+ * @return
1764
+ */
1765
+ static ofBoolean(b:boolean):FilterValue;
1766
+ }
1767
+
1768
+ export class DateWrapper extends LongWrapper {
1769
+ protected constructor();
1770
+
1771
+ static ofJsDate(date:Date):DateWrapper;
1772
+ asDate():Date;
1564
1773
  }
1565
1774
 
1566
1775
  /**
1567
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1568
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1569
- * methods return a new Sort instance.
1776
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1777
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1778
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1779
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1780
+ * of <b>TotalsTableConfig</b> will be supplied.
1781
+ *
1782
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1783
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1784
+ * expected formats.
1570
1785
  */
1571
- export class Sort {
1572
- static readonly ASCENDING:string;
1573
- static readonly DESCENDING:string;
1574
- static readonly REVERSE:string;
1575
-
1576
- protected constructor();
1577
-
1578
- /**
1579
- * Builds a Sort instance to sort values in ascending order.
1580
- * @return {@link dh.Sort}
1581
- */
1582
- asc():Sort;
1583
- /**
1584
- * Builds a Sort instance to sort values in descending order.
1585
- * @return {@link dh.Sort}
1586
- */
1587
- desc():Sort;
1786
+ export class TotalsTableConfig {
1588
1787
  /**
1589
- * Builds a Sort instance which takes the absolute value before applying order.
1590
- * @return {@link dh.Sort}
1788
+ * @deprecated
1591
1789
  */
1592
- abs():Sort;
1593
- toString():string;
1790
+ static readonly COUNT:string;
1594
1791
  /**
1595
- * True if the absolute value of the column should be used when sorting; defaults to false.
1596
- * @return boolean
1792
+ * @deprecated
1597
1793
  */
1598
- get isAbs():boolean;
1794
+ static readonly MIN:string;
1599
1795
  /**
1600
- * The column which is sorted.
1601
- * @return {@link dh.Column}
1796
+ * @deprecated
1602
1797
  */
1603
- get column():Column;
1798
+ static readonly MAX:string;
1604
1799
  /**
1605
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1606
- * @return String
1800
+ * @deprecated
1607
1801
  */
1608
- get direction():string;
1609
- }
1610
-
1611
- export class CustomColumn {
1612
- static readonly TYPE_FORMAT_COLOR:string;
1613
- static readonly TYPE_FORMAT_NUMBER:string;
1614
- static readonly TYPE_FORMAT_DATE:string;
1615
- static readonly TYPE_NEW:string;
1616
-
1617
- protected constructor();
1618
-
1619
- valueOf():string;
1620
- toString():string;
1802
+ static readonly SUM:string;
1621
1803
  /**
1622
- * The expression to evaluate this custom column.
1623
- * @return String
1804
+ * @deprecated
1624
1805
  */
1625
- get expression():string;
1806
+ static readonly ABS_SUM:string;
1626
1807
  /**
1627
- * The name of the column to use.
1628
- * @return String
1808
+ * @deprecated
1629
1809
  */
1630
- get name():string;
1810
+ static readonly VAR:string;
1631
1811
  /**
1632
- * Type of custom column. One of
1633
- *
1634
- * <ul>
1635
- * <li>FORMAT_COLOR</li>
1636
- * <li>FORMAT_NUMBER</li>
1637
- * <li>FORMAT_DATE</li>
1638
- * <li>NEW</li>
1639
- * </ul>
1640
- * @return String
1812
+ * @deprecated
1641
1813
  */
1642
- get type():string;
1643
- }
1644
-
1645
- export class LongWrapper {
1646
- protected constructor();
1647
-
1648
- static ofString(str:string):LongWrapper;
1649
- asNumber():number;
1650
- valueOf():string;
1651
- toString():string;
1652
- }
1653
-
1654
- export class Ide {
1655
- constructor();
1656
-
1814
+ static readonly AVG:string;
1657
1815
  /**
1658
1816
  * @deprecated
1659
1817
  */
1660
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1818
+ static readonly STD:string;
1661
1819
  /**
1662
1820
  * @deprecated
1663
1821
  */
1664
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1665
- }
1666
-
1667
- export class CoreClient implements HasEventHandling {
1668
- static readonly EVENT_CONNECT:string;
1669
- static readonly EVENT_DISCONNECT:string;
1670
- static readonly EVENT_RECONNECT:string;
1671
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1672
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1673
- static readonly EVENT_REQUEST_FAILED:string;
1674
- static readonly EVENT_REQUEST_STARTED:string;
1675
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1676
- static readonly LOGIN_TYPE_PASSWORD:string;
1677
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1678
-
1679
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1680
-
1681
- running():Promise<CoreClient>;
1682
- getServerUrl():string;
1683
- getAuthConfigValues():Promise<string[][]>;
1684
- login(credentials:LoginCredentials):Promise<void>;
1685
- relogin(token:RefreshToken):Promise<void>;
1686
- onConnected(timeoutInMillis?:number):Promise<void>;
1687
- getServerConfigValues():Promise<string[][]>;
1688
- getStorageService():dh.storage.StorageService;
1689
- getAsIdeConnection():Promise<IdeConnection>;
1690
- disconnect():void;
1691
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1692
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1693
- hasListeners(name:string):boolean;
1694
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1695
- }
1696
-
1697
- /**
1698
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1699
- * column.
1700
- */
1701
- export class Column {
1822
+ static readonly FIRST:string;
1702
1823
  /**
1703
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1704
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1705
- * @return String
1824
+ * @deprecated
1706
1825
  */
1707
- readonly constituentType?:string|null;
1708
- readonly description?:string|null;
1709
-
1710
- protected constructor();
1711
-
1826
+ static readonly LAST:string;
1712
1827
  /**
1713
- * the value for this column in the given row. Type will be consistent with the type of the Column.
1714
- * @param row -
1715
- * @return Any
1828
+ * @deprecated
1716
1829
  */
1717
- get(row:Row):any;
1718
- getFormat(row:Row):Format;
1830
+ static readonly SKIP:string;
1719
1831
  /**
1720
- * Creates a sort builder object, to be used when sorting by this column.
1721
- * @return {@link dh.Sort}
1832
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1722
1833
  */
1723
- sort():Sort;
1834
+ showTotalsByDefault:boolean;
1724
1835
  /**
1725
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1726
- * operation, or as a builder to create a filter operation.
1727
- * @return {@link dh.FilterValue}
1836
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1728
1837
  */
1729
- filter():FilterValue;
1838
+ showGrandTotalsByDefault:boolean;
1730
1839
  /**
1731
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1732
- * @param expression -
1733
- * @return {@link dh.CustomColumn}
1840
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1734
1841
  */
1735
- formatColor(expression:string):CustomColumn;
1842
+ defaultOperation:AggregationOperationType;
1736
1843
  /**
1737
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1738
- * @param expression -
1739
- * @return {@link dh.CustomColumn}
1844
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1845
+ * Table. If a column is omitted, the defaultOperation is used.
1740
1846
  */
1741
- formatNumber(expression:string):CustomColumn;
1847
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
1742
1848
  /**
1743
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1744
- * @param expression -
1745
- * @return {@link dh.CustomColumn}
1849
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1850
+ * these columns. See also `Table.selectDistinct`.
1746
1851
  */
1747
- formatDate(expression:string):CustomColumn;
1852
+ groupBy:Array<string>;
1853
+
1854
+ constructor();
1855
+
1748
1856
  toString():string;
1857
+ }
1858
+
1859
+ /**
1860
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1861
+ * roll-up table.
1862
+ */
1863
+ export class RollupConfig {
1749
1864
  /**
1750
- * Label for this column.
1751
- * @return String
1865
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1752
1866
  */
1753
- get name():string;
1867
+ groupingColumns:Array<String>;
1754
1868
  /**
1755
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1756
- * <b>isUncoalesced</b> property on <b>Table</b>)
1757
- * @return boolean
1869
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1870
+ * roll-up table.
1758
1871
  */
1759
- get isPartitionColumn():boolean;
1872
+ aggregations:{ [key: string]: Array<AggregationOperationType>; };
1760
1873
  /**
1761
- *
1762
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1763
- * @return int
1874
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1875
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1876
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1877
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1764
1878
  */
1765
- get index():number;
1766
- get isSortable():boolean;
1879
+ includeConstituents:boolean;
1880
+ includeOriginalColumns?:boolean|null;
1767
1881
  /**
1768
- * Type of the row data that can be found in this column.
1769
- * @return String
1882
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1770
1883
  */
1771
- get type():string;
1884
+ includeDescriptions:boolean;
1885
+
1886
+ constructor();
1887
+ }
1888
+
1889
+ /**
1890
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1891
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1892
+ */
1893
+ export class ConnectOptions {
1894
+ headers:{ [key: string]: string; };
1895
+
1896
+ constructor();
1897
+ }
1898
+
1899
+ /**
1900
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1901
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1902
+ * instance.
1903
+ */
1904
+ export class FilterCondition {
1905
+ protected constructor();
1906
+
1772
1907
  /**
1773
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1774
- * table using <b>applyCustomColumns</b> with the parameters specified.
1775
- * @param expression -
1776
- * @return {@link dh.CustomColumn}
1908
+ * the opposite of this condition
1909
+ * @return FilterCondition
1777
1910
  */
1778
- static formatRowColor(expression:string):CustomColumn;
1911
+ not():FilterCondition;
1779
1912
  /**
1780
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1781
- * @param name -
1782
- * @param expression -
1783
- * @return {@link dh.CustomColumn}
1913
+ * a condition representing the current condition logically ANDed with the other parameters
1914
+ * @param filters -
1915
+ * @return FilterCondition
1784
1916
  */
1785
- static createCustomColumn(name:string, expression:string):CustomColumn;
1786
- }
1787
-
1788
- /**
1789
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1790
- * roll-up table.
1791
- */
1792
- export class RollupConfig {
1917
+ and(...filters:FilterCondition[]):FilterCondition;
1793
1918
  /**
1794
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1919
+ * a condition representing the current condition logically ORed with the other parameters
1920
+ * @param filters -
1921
+ * @return FilterCondition.
1795
1922
  */
1796
- groupingColumns:Array<String>;
1923
+ or(...filters:FilterCondition[]):FilterCondition;
1797
1924
  /**
1798
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1799
- * roll-up table.
1925
+ * a string suitable for debugging showing the details of this condition.
1926
+ * @return String.
1800
1927
  */
1801
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
1928
+ toString():string;
1929
+ get columns():Array<Column>;
1802
1930
  /**
1803
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1804
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1805
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1806
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
1931
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1932
+ * functions:
1933
+ * <ul>
1934
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1935
+ * than the third</li>
1936
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1937
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1938
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1939
+ * "not a number"</i></li>
1940
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1941
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1942
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1943
+ * expression</li>
1944
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1945
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1946
+ * <p>
1947
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1948
+ * method should be used in other cases
1949
+ * </p>
1950
+ * </li>
1951
+ * </ul>
1952
+ * @param function -
1953
+ * @param args -
1954
+ * @return dh.FilterCondition
1807
1955
  */
1808
- includeConstituents:boolean;
1809
- includeOriginalColumns?:boolean|null;
1956
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1810
1957
  /**
1811
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1958
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
1959
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1960
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1961
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1962
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1963
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1964
+ * {@link dh.Column.filter}).
1965
+ * @param value -
1966
+ * @param columns -
1967
+ * @return dh.FilterCondition
1812
1968
  */
1813
- includeDescriptions:boolean;
1814
-
1815
- constructor();
1969
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1816
1970
  }
1817
1971
 
1818
1972
  /**
@@ -2030,354 +2184,179 @@ export namespace dh {
2030
2184
  }
2031
2185
 
2032
2186
  /**
2033
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
2187
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
2034
2188
  */
2035
- export class BigIntegerWrapper {
2189
+ export class BigDecimalWrapper {
2036
2190
  protected constructor();
2037
2191
 
2038
- static ofString(str:string):BigIntegerWrapper;
2192
+ static ofString(value:string):BigDecimalWrapper;
2039
2193
  asNumber():number;
2040
2194
  valueOf():string;
2041
2195
  toString():string;
2042
2196
  }
2043
2197
 
2044
2198
  /**
2045
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2046
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2047
- *
2048
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2049
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2050
- * forward data to it.
2051
- *
2052
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2053
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2054
- * viewports to make it less expensive to compute for large tables.
2055
- */
2056
- export class TableSubscription implements HasEventHandling {
2057
- /**
2058
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
2059
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
2060
- * allowing access to the entire range of items currently in the subscribed columns.
2061
- */
2062
- static readonly EVENT_UPDATED:string;
2063
-
2064
- protected constructor();
2065
-
2066
- /**
2067
- * Stops the subscription on the server.
2068
- */
2069
- close():void;
2070
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2071
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2072
- hasListeners(name:string):boolean;
2073
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2074
- /**
2075
- * The columns that were subscribed to when this subscription was created
2076
- * @return {@link dh.Column}
2077
- */
2078
- get columns():Array<Column>;
2079
- }
2080
-
2081
- /**
2082
- * Deprecated for use in Deephaven Core.
2199
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
2200
+ * this type TableMap.
2083
2201
  * @deprecated
2084
2202
  */
2085
- export class Client {
2086
- static readonly EVENT_REQUEST_FAILED:string;
2087
- static readonly EVENT_REQUEST_STARTED:string;
2088
- static readonly EVENT_REQUEST_SUCCEEDED:string;
2089
-
2090
- constructor();
2091
- }
2092
-
2093
- /**
2094
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
2095
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
2096
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
2097
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
2098
- * instance.
2099
- */
2100
- export class FilterValue {
2101
- protected constructor();
2102
-
2103
- /**
2104
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
2105
- * {@link TableData.get} for DateTime values. To create
2106
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
2107
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
2108
- * 64-bit long integer, use {@link LongWrapper.ofString}.
2109
- * @param input - the number to wrap as a FilterValue
2110
- * @return an immutable FilterValue that can be built into a filter
2111
- */
2112
- static ofNumber(input:LongWrapper|number):FilterValue;
2113
- /**
2114
- * a filter condition checking if the current value is equal to the given parameter
2115
- * @param term -
2116
- * @return {@link dh.FilterCondition}
2117
- */
2118
- eq(term:FilterValue):FilterCondition;
2119
- /**
2120
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
2121
- * vs lower case
2122
- * @param term -
2123
- * @return {@link dh.FilterCondition}
2124
- */
2125
- eqIgnoreCase(term:FilterValue):FilterCondition;
2126
- /**
2127
- * a filter condition checking if the current value is not equal to the given parameter
2128
- * @param term -
2129
- * @return {@link dh.FilterCondition}
2130
- */
2131
- notEq(term:FilterValue):FilterCondition;
2132
- /**
2133
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
2134
- * upper vs lower case
2135
- * @param term -
2136
- * @return {@link dh.FilterCondition}
2137
- */
2138
- notEqIgnoreCase(term:FilterValue):FilterCondition;
2139
- /**
2140
- * a filter condition checking if the current value is greater than the given parameter
2141
- * @param term -
2142
- * @return {@link dh.FilterCondition}
2143
- */
2144
- greaterThan(term:FilterValue):FilterCondition;
2145
- /**
2146
- * a filter condition checking if the current value is less than the given parameter
2147
- * @param term -
2148
- * @return {@link dh.FilterCondition}
2149
- */
2150
- lessThan(term:FilterValue):FilterCondition;
2151
- /**
2152
- * a filter condition checking if the current value is greater than or equal to the given parameter
2153
- * @param term -
2154
- * @return {@link dh.FilterCondition}
2155
- */
2156
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
2157
- /**
2158
- * a filter condition checking if the current value is less than or equal to the given parameter
2159
- * @param term -
2160
- * @return {@link dh.FilterCondition}
2161
- */
2162
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
2163
- /**
2164
- * a filter condition checking if the current value is in the given set of values
2165
- * @param terms -
2166
- * @return {@link dh.FilterCondition}
2167
- */
2168
- in(terms:FilterValue[]):FilterCondition;
2169
- /**
2170
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
2171
- * lower case
2172
- * @param terms -
2173
- * @return {@link dh.FilterCondition}
2174
- */
2175
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
2176
- /**
2177
- * a filter condition checking that the current value is not in the given set of values
2178
- * @param terms -
2179
- * @return {@link dh.FilterCondition}
2180
- */
2181
- notIn(terms:FilterValue[]):FilterCondition;
2182
- /**
2183
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
2184
- * upper vs lower case
2185
- * @param terms -
2186
- * @return {@link dh.FilterCondition}
2187
- */
2188
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
2189
- /**
2190
- * a filter condition checking if the given value contains the given string value
2191
- * @param term -
2192
- * @return {@link dh.FilterCondition}
2193
- */
2194
- contains(term:FilterValue):FilterCondition;
2195
- /**
2196
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
2197
- * lower case
2198
- * @param term -
2199
- * @return {@link dh.FilterCondition}
2200
- */
2201
- containsIgnoreCase(term:FilterValue):FilterCondition;
2202
- /**
2203
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
2204
- * use Java regex syntax
2205
- * @param pattern -
2206
- * @return {@link dh.FilterCondition}
2207
- */
2208
- matches(pattern:FilterValue):FilterCondition;
2209
- /**
2210
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
2211
- * differences of upper vs lower case. Regex patterns use Java regex syntax
2212
- * @param pattern -
2213
- * @return {@link dh.FilterCondition}
2214
- */
2215
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
2203
+ export class TableMap {
2204
+ static readonly EVENT_KEYADDED:string;
2205
+ static readonly EVENT_DISCONNECT:string;
2206
+ static readonly EVENT_RECONNECT:string;
2207
+ static readonly EVENT_RECONNECTFAILED:string;
2208
+
2209
+ protected constructor();
2210
+ }
2211
+
2212
+ /**
2213
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2214
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2215
+ * methods return a new Sort instance.
2216
+ */
2217
+ export class Sort {
2218
+ static readonly ASCENDING:string;
2219
+ static readonly DESCENDING:string;
2220
+ static readonly REVERSE:string;
2221
+
2222
+ protected constructor();
2223
+
2216
2224
  /**
2217
- * a filter condition checking if the current value is a true boolean
2218
- * @return {@link dh.FilterCondition}
2225
+ * Builds a Sort instance to sort values in ascending order.
2226
+ * @return {@link dh.Sort}
2219
2227
  */
2220
- isTrue():FilterCondition;
2228
+ asc():Sort;
2221
2229
  /**
2222
- * a filter condition checking if the current value is a false boolean
2223
- * @return {@link dh.FilterCondition}
2230
+ * Builds a Sort instance to sort values in descending order.
2231
+ * @return {@link dh.Sort}
2224
2232
  */
2225
- isFalse():FilterCondition;
2233
+ desc():Sort;
2226
2234
  /**
2227
- * a filter condition checking if the current value is a null value
2228
- * @return {@link dh.FilterCondition}
2235
+ * Builds a Sort instance which takes the absolute value before applying order.
2236
+ * @return {@link dh.Sort}
2229
2237
  */
2230
- isNull():FilterCondition;
2238
+ abs():Sort;
2239
+ toString():string;
2231
2240
  /**
2232
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
2233
- * functions that can be invoked on a String:
2234
- * <ul>
2235
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
2236
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
2237
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
2238
- * regular expression</li>
2239
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
2240
- * <p>
2241
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
2242
- * </p>
2243
- * </li>
2244
- * </ul>
2245
- * @param method -
2246
- * @param args -
2247
- * @return
2241
+ * True if the absolute value of the column should be used when sorting; defaults to false.
2242
+ * @return boolean
2248
2243
  */
2249
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
2250
- toString():string;
2244
+ get isAbs():boolean;
2251
2245
  /**
2252
- * Constructs a string for the filter API from the given parameter.
2253
- * @param input -
2254
- * @return
2246
+ * The column which is sorted.
2247
+ * @return {@link dh.Column}
2255
2248
  */
2256
- static ofString(input:any):FilterValue;
2249
+ get column():Column;
2257
2250
  /**
2258
- * Constructs a boolean for the filter API from the given parameter.
2259
- * @param b -
2260
- * @return
2251
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2252
+ * @return String
2261
2253
  */
2262
- static ofBoolean(b:boolean):FilterValue;
2254
+ get direction():string;
2263
2255
  }
2264
2256
 
2265
- /**
2266
- * A js type for operating on input tables.
2267
- *
2268
- * Represents a User Input Table, which can have data added to it from other sources.
2269
- *
2270
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
2271
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
2272
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
2273
- * before sending the next operation.
2274
- *
2275
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
2276
- *
2277
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
2278
- * object.
2279
- */
2280
- export class InputTable {
2257
+ export class CustomColumn {
2258
+ static readonly TYPE_FORMAT_COLOR:string;
2259
+ static readonly TYPE_FORMAT_NUMBER:string;
2260
+ static readonly TYPE_FORMAT_DATE:string;
2261
+ static readonly TYPE_NEW:string;
2262
+
2281
2263
  protected constructor();
2282
2264
 
2265
+ valueOf():string;
2266
+ toString():string;
2283
2267
  /**
2284
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
2285
- * property at that name and validate it can be put into the given column type.
2286
- * @param row -
2287
- * @param userTimeZone -
2288
- * @return Promise of dh.InputTable
2289
- */
2290
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
2291
- /**
2292
- * Add multiple rows to a table.
2293
- * @param rows -
2294
- * @param userTimeZone -
2295
- * @return Promise of dh.InputTable
2296
- */
2297
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
2298
- /**
2299
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
2300
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
2301
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
2302
- * resolved to the same InputTable instance this method was called upon once the server returns.
2303
- * @param tableToAdd -
2304
- * @return Promise of dh.InputTable
2268
+ * The expression to evaluate this custom column.
2269
+ * @return String
2305
2270
  */
2306
- addTable(tableToAdd:Table):Promise<InputTable>;
2271
+ get expression():string;
2307
2272
  /**
2308
- * Add multiple tables to this Input Table.
2309
- * @param tablesToAdd -
2310
- * @return Promise of dh.InputTable
2273
+ * The name of the column to use.
2274
+ * @return String
2311
2275
  */
2312
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
2276
+ get name():string;
2313
2277
  /**
2314
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
2315
- * @param tableToDelete -
2316
- * @return Promise of dh.InputTable
2278
+ * Type of custom column. One of
2279
+ *
2280
+ * <ul>
2281
+ * <li>FORMAT_COLOR</li>
2282
+ * <li>FORMAT_NUMBER</li>
2283
+ * <li>FORMAT_DATE</li>
2284
+ * <li>NEW</li>
2285
+ * </ul>
2286
+ * @return String
2317
2287
  */
2318
- deleteTable(tableToDelete:Table):Promise<InputTable>;
2288
+ get type():string;
2289
+ }
2290
+
2291
+ export class IdeSession implements HasEventHandling {
2292
+ static readonly EVENT_COMMANDSTARTED:string;
2293
+ static readonly EVENT_REQUEST_FAILED:string;
2294
+
2295
+ protected constructor();
2296
+
2319
2297
  /**
2320
- * Delete multiple tables from this Input Table.
2321
- * @param tablesToDelete -
2322
- * @return
2298
+ * Load the named table, with columns and size information already fully populated.
2299
+ * @param name -
2300
+ * @param applyPreviewColumns - optional boolean
2301
+ * @return {@link Promise} of {@link dh.Table}
2323
2302
  */
2324
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
2303
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2325
2304
  /**
2326
- * A list of the key columns, by name
2327
- * @return String array.
2305
+ * Load the named Figure, including its tables and tablemaps as needed.
2306
+ * @param name -
2307
+ * @return promise of dh.plot.Figure
2328
2308
  */
2329
- get keys():string[];
2309
+ getFigure(name:string):Promise<dh.plot.Figure>;
2330
2310
  /**
2331
- * A list of the value columns, by name
2332
- * @return String array.
2311
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2312
+ * size is presently not available until the viewport is first set.
2313
+ * @param name -
2314
+ * @return {@link Promise} of {@link dh.TreeTable}
2333
2315
  */
2334
- get values():string[];
2316
+ getTreeTable(name:string):Promise<TreeTable>;
2317
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2318
+ getPartitionedTable(name:string):Promise<PartitionedTable>;
2319
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2320
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2335
2321
  /**
2336
- * A list of the key columns.
2337
- * @return Column array.
2322
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2323
+ * @param tables -
2324
+ * @return {@link Promise} of {@link dh.Table}
2338
2325
  */
2339
- get keyColumns():Column[];
2326
+ mergeTables(tables:Table[]):Promise<Table>;
2327
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2328
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2329
+ close():void;
2330
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2331
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2332
+ openDocument(params:object):void;
2333
+ changeDocument(params:object):void;
2334
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2335
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2336
+ getHover(params:object):Promise<dh.lsp.Hover>;
2337
+ closeDocument(params:object):void;
2340
2338
  /**
2341
- * A list of the value Column objects
2342
- * @return {@link dh.Column} array.
2339
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2340
+ * values will be null.
2341
+ * @param size -
2342
+ * @return {@link Promise} of {@link dh.Table}
2343
2343
  */
2344
- get valueColumns():Column[];
2344
+ emptyTable(size:number):Promise<Table>;
2345
2345
  /**
2346
- * The source table for this Input Table
2347
- * @return dh.table
2346
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2347
+ * the table will be populated with the interval from the specified date until now.
2348
+ * @param periodNanos -
2349
+ * @param startTime -
2350
+ * @return {@link Promise} of {@link dh.Table}
2348
2351
  */
2349
- get table():Table;
2350
- }
2351
-
2352
- export class DateWrapper extends LongWrapper {
2353
- protected constructor();
2354
-
2355
- static ofJsDate(date:Date):DateWrapper;
2356
- asDate():Date;
2352
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2353
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2354
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2355
+ hasListeners(name:string):boolean;
2356
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2357
2357
  }
2358
2358
 
2359
2359
 
2360
- /**
2361
- * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
2362
- */
2363
- type AggregationOperationType = string;
2364
- export class AggregationOperation {
2365
- static readonly COUNT:AggregationOperationType;
2366
- static readonly COUNT_DISTINCT:AggregationOperationType;
2367
- static readonly DISTINCT:AggregationOperationType;
2368
- static readonly MIN:AggregationOperationType;
2369
- static readonly MAX:AggregationOperationType;
2370
- static readonly SUM:AggregationOperationType;
2371
- static readonly ABS_SUM:AggregationOperationType;
2372
- static readonly VAR:AggregationOperationType;
2373
- static readonly AVG:AggregationOperationType;
2374
- static readonly STD:AggregationOperationType;
2375
- static readonly FIRST:AggregationOperationType;
2376
- static readonly LAST:AggregationOperationType;
2377
- static readonly UNIQUE:AggregationOperationType;
2378
- static readonly SKIP:AggregationOperationType;
2379
- }
2380
-
2381
2360
  /**
2382
2361
  * A set of string constants that can be used to describe the different objects the JS API can export.
2383
2362
  */
@@ -2394,6 +2373,27 @@ export namespace dh {
2394
2373
  static readonly TREEMAP:VariableTypeType;
2395
2374
  }
2396
2375
 
2376
+ /**
2377
+ * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
2378
+ */
2379
+ type AggregationOperationType = string;
2380
+ export class AggregationOperation {
2381
+ static readonly COUNT:AggregationOperationType;
2382
+ static readonly COUNT_DISTINCT:AggregationOperationType;
2383
+ static readonly DISTINCT:AggregationOperationType;
2384
+ static readonly MIN:AggregationOperationType;
2385
+ static readonly MAX:AggregationOperationType;
2386
+ static readonly SUM:AggregationOperationType;
2387
+ static readonly ABS_SUM:AggregationOperationType;
2388
+ static readonly VAR:AggregationOperationType;
2389
+ static readonly AVG:AggregationOperationType;
2390
+ static readonly STD:AggregationOperationType;
2391
+ static readonly FIRST:AggregationOperationType;
2392
+ static readonly LAST:AggregationOperationType;
2393
+ static readonly UNIQUE:AggregationOperationType;
2394
+ static readonly SKIP:AggregationOperationType;
2395
+ }
2396
+
2397
2397
  type SearchDisplayModeType = string;
2398
2398
  export class SearchDisplayMode {
2399
2399
  static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
@@ -2415,29 +2415,6 @@ export namespace dh {
2415
2415
 
2416
2416
  export namespace dh.ide {
2417
2417
 
2418
- /**
2419
- * Indicates the result of code run on the server.
2420
- */
2421
- export interface CommandResult {
2422
- /**
2423
- * Describes changes made in the course of this command.
2424
- * @return {@link dh.ide.VariableChanges}.
2425
- */
2426
- get changes():VariableChanges;
2427
- /**
2428
- * If the command failed, the error message will be provided here.
2429
- * @return String
2430
- */
2431
- get error():string;
2432
- }
2433
- /**
2434
- * Specifies a type and either id or name (but not both).
2435
- */
2436
- export interface VariableDescriptor {
2437
- type:string;
2438
- id?:string|null;
2439
- name?:string|null;
2440
- }
2441
2418
  /**
2442
2419
  * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2443
2420
  * server.
@@ -2460,6 +2437,21 @@ export namespace dh.ide {
2460
2437
  get message():string;
2461
2438
  }
2462
2439
  /**
2440
+ * Indicates the result of code run on the server.
2441
+ */
2442
+ export interface CommandResult {
2443
+ /**
2444
+ * Describes changes made in the course of this command.
2445
+ * @return {@link dh.ide.VariableChanges}.
2446
+ */
2447
+ get changes():VariableChanges;
2448
+ /**
2449
+ * If the command failed, the error message will be provided here.
2450
+ * @return String
2451
+ */
2452
+ get error():string;
2453
+ }
2454
+ /**
2463
2455
  * A format to describe a variable available to be read from the server. Application fields are optional, and only
2464
2456
  * populated when a variable is provided by application mode.
2465
2457
  * <p>
@@ -2524,10 +2516,72 @@ export namespace dh.ide {
2524
2516
  */
2525
2517
  get updated():Array<VariableDefinition>;
2526
2518
  }
2519
+ /**
2520
+ * Specifies a type and either id or name (but not both).
2521
+ */
2522
+ export interface VariableDescriptor {
2523
+ type:string;
2524
+ id?:string|null;
2525
+ name?:string|null;
2526
+ }
2527
2527
  }
2528
2528
 
2529
2529
  export namespace dh.i18n {
2530
2530
 
2531
+ /**
2532
+ * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2533
+ *
2534
+ * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2535
+ * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2536
+ * BigDecimal.
2537
+ */
2538
+ export class NumberFormat {
2539
+ /**
2540
+ * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2541
+ * function, which will create and cache an instance so that later calls share the same instance.
2542
+ * @param pattern -
2543
+ */
2544
+ constructor(pattern:string);
2545
+
2546
+ /**
2547
+ * a number format instance matching the specified format. If this format has not been specified before, a new
2548
+ * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2549
+ * take advantage of caching
2550
+ * @param pattern -
2551
+ * @return dh.i18n.NumberFormat
2552
+ */
2553
+ static getFormat(pattern:string):NumberFormat;
2554
+ /**
2555
+ * Parses the given text using the cached format matching the given pattern.
2556
+ * @param pattern -
2557
+ * @param text -
2558
+ * @return double
2559
+ */
2560
+ static parse(pattern:string, text:string):number;
2561
+ /**
2562
+ * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2563
+ * format matching the given pattern string.
2564
+ * @param pattern -
2565
+ * @param number -
2566
+ * @return String
2567
+ */
2568
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2569
+ /**
2570
+ * Parses the given text using this instance's pattern into a JS Number.
2571
+ * @param text -
2572
+ * @return double
2573
+ */
2574
+ parse(text:string):number;
2575
+ /**
2576
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2577
+ * @param number -
2578
+ * @return String
2579
+ */
2580
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2581
+ toString():string;
2582
+ }
2583
+
2584
+
2531
2585
  /**
2532
2586
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
2533
2587
  * additional 6 decimal places after the rest of the number.
@@ -2626,60 +2680,6 @@ export namespace dh.i18n {
2626
2680
  toString():string;
2627
2681
  }
2628
2682
 
2629
- /**
2630
- * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2631
- *
2632
- * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2633
- * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2634
- * BigDecimal.
2635
- */
2636
- export class NumberFormat {
2637
- /**
2638
- * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2639
- * function, which will create and cache an instance so that later calls share the same instance.
2640
- * @param pattern -
2641
- */
2642
- constructor(pattern:string);
2643
-
2644
- /**
2645
- * a number format instance matching the specified format. If this format has not been specified before, a new
2646
- * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2647
- * take advantage of caching
2648
- * @param pattern -
2649
- * @return dh.i18n.NumberFormat
2650
- */
2651
- static getFormat(pattern:string):NumberFormat;
2652
- /**
2653
- * Parses the given text using the cached format matching the given pattern.
2654
- * @param pattern -
2655
- * @param text -
2656
- * @return double
2657
- */
2658
- static parse(pattern:string, text:string):number;
2659
- /**
2660
- * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2661
- * format matching the given pattern string.
2662
- * @param pattern -
2663
- * @param number -
2664
- * @return String
2665
- */
2666
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2667
- /**
2668
- * Parses the given text using this instance's pattern into a JS Number.
2669
- * @param text -
2670
- * @return double
2671
- */
2672
- parse(text:string):number;
2673
- /**
2674
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2675
- * @param number -
2676
- * @return String
2677
- */
2678
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2679
- toString():string;
2680
- }
2681
-
2682
-
2683
2683
  /**
2684
2684
  * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2685
2685
  * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
@@ -2795,20 +2795,55 @@ export namespace dh.i18n {
2795
2795
 
2796
2796
  export namespace dh.plot {
2797
2797
 
2798
+ export interface OneClick {
2799
+ setValueForColumn(columnName:string, value:any):void;
2800
+ getValueForColumn(columName:string):any;
2801
+ get requireAllFiltersToDisplay():boolean;
2802
+ get columns():dh.Column[];
2803
+ }
2798
2804
  /**
2799
- * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2805
+ * Provides access to the data for displaying in a figure.
2800
2806
  */
2801
- export interface MultiSeries {
2807
+ export interface Series {
2808
+ readonly isLinesVisible?:boolean|null;
2809
+ readonly pointLabelFormat?:string|null;
2810
+ readonly yToolTipPattern?:string|null;
2811
+ readonly shapeSize?:number|null;
2812
+ readonly xToolTipPattern?:string|null;
2813
+ readonly isShapesVisible?:boolean|null;
2814
+
2815
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
2802
2816
  /**
2803
- * The name for this multi-series.
2804
- * @return String
2817
+ * Disable updates for this Series.
2805
2818
  */
2806
- get name():string;
2819
+ unsubscribe():void;
2820
+ get shape():string;
2807
2821
  /**
2808
- * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2822
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2823
+ * the axis.
2824
+ * @return {@link dh.plot.SeriesDataSource}
2825
+ */
2826
+ get sources():SeriesDataSource[];
2827
+ get lineColor():string;
2828
+ /**
2829
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2809
2830
  * @return int
2810
2831
  */
2811
2832
  get plotStyle():SeriesPlotStyleType;
2833
+ get oneClick():OneClick;
2834
+ get gradientVisible():boolean;
2835
+ get shapeColor():string;
2836
+ /**
2837
+ * The name for this series.
2838
+ * @return String
2839
+ */
2840
+ get name():string;
2841
+ /**
2842
+ * indicates that this series belongs to a MultiSeries, null otherwise
2843
+ * @return dh.plot.MultiSeries
2844
+ */
2845
+ get multiSeries():MultiSeries;
2846
+ get shapeLabel():string;
2812
2847
  }
2813
2848
  /**
2814
2849
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
@@ -2856,81 +2891,46 @@ export namespace dh.plot {
2856
2891
  get majorTicksVisible():boolean;
2857
2892
  get ticksFont():string;
2858
2893
  /**
2859
- * The unique id for this axis.
2860
- * @return String
2861
- */
2862
- get id():string;
2863
- /**
2864
- * The position for this axis. See <b>AxisPosition</b> enum for more details.
2865
- * @return int
2866
- */
2867
- get position():AxisPositionType;
2868
- /**
2869
- * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2870
- * transform.
2871
- * @return dh.calendar.BusinessCalendar
2872
- */
2873
- get businessCalendar():dh.calendar.BusinessCalendar;
2874
- /**
2875
- * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2876
- * @return int
2877
- */
2878
- get formatType():AxisFormatTypeType;
2879
- get minRange():number;
2880
- }
2881
- export interface FigureDataUpdatedEvent {
2882
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2883
- get series():Series[];
2884
- }
2885
- export interface OneClick {
2886
- setValueForColumn(columnName:string, value:any):void;
2887
- getValueForColumn(columName:string):any;
2888
- get requireAllFiltersToDisplay():boolean;
2889
- get columns():dh.Column[];
2890
- }
2891
- /**
2892
- * Provides access to the data for displaying in a figure.
2893
- */
2894
- export interface Series {
2895
- readonly isLinesVisible?:boolean|null;
2896
- readonly pointLabelFormat?:string|null;
2897
- readonly yToolTipPattern?:string|null;
2898
- readonly shapeSize?:number|null;
2899
- readonly xToolTipPattern?:string|null;
2900
- readonly isShapesVisible?:boolean|null;
2901
-
2902
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
2894
+ * The unique id for this axis.
2895
+ * @return String
2896
+ */
2897
+ get id():string;
2903
2898
  /**
2904
- * Disable updates for this Series.
2899
+ * The position for this axis. See <b>AxisPosition</b> enum for more details.
2900
+ * @return int
2905
2901
  */
2906
- unsubscribe():void;
2907
- get shape():string;
2902
+ get position():AxisPositionType;
2908
2903
  /**
2909
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2910
- * the axis.
2911
- * @return {@link dh.plot.SeriesDataSource}
2904
+ * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2905
+ * transform.
2906
+ * @return dh.calendar.BusinessCalendar
2912
2907
  */
2913
- get sources():SeriesDataSource[];
2914
- get lineColor():string;
2908
+ get businessCalendar():dh.calendar.BusinessCalendar;
2915
2909
  /**
2916
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2910
+ * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2917
2911
  * @return int
2918
2912
  */
2919
- get plotStyle():SeriesPlotStyleType;
2920
- get oneClick():OneClick;
2921
- get gradientVisible():boolean;
2922
- get shapeColor():string;
2913
+ get formatType():AxisFormatTypeType;
2914
+ get minRange():number;
2915
+ }
2916
+ export interface FigureDataUpdatedEvent {
2917
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2918
+ get series():Series[];
2919
+ }
2920
+ /**
2921
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2922
+ */
2923
+ export interface MultiSeries {
2923
2924
  /**
2924
- * The name for this series.
2925
+ * The name for this multi-series.
2925
2926
  * @return String
2926
2927
  */
2927
2928
  get name():string;
2928
2929
  /**
2929
- * indicates that this series belongs to a MultiSeries, null otherwise
2930
- * @return dh.plot.MultiSeries
2930
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2931
+ * @return int
2931
2932
  */
2932
- get multiSeries():MultiSeries;
2933
- get shapeLabel():string;
2933
+ get plotStyle():SeriesPlotStyleType;
2934
2934
  }
2935
2935
  /**
2936
2936
  * Describes how to access and display data required within a series.
@@ -2954,92 +2954,39 @@ export namespace dh.plot {
2954
2954
  }
2955
2955
 
2956
2956
  /**
2957
- * Provide the details for a chart.
2958
- */
2959
- export class Chart implements dh.HasEventHandling {
2960
- /**
2961
- * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
2962
- */
2963
- static readonly EVENT_SERIES_ADDED:string;
2964
- /**
2965
- * The title of the chart.
2966
- * @return String
2967
- */
2968
- readonly title?:string|null;
2969
-
2970
- protected constructor();
2971
-
2972
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2973
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2974
- hasListeners(name:string):boolean;
2975
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2976
- get column():number;
2977
- get showLegend():boolean;
2978
- /**
2979
- * The axes used in this chart.
2980
- * @return dh.plot.Axis
2981
- */
2982
- get axes():Axis[];
2983
- get is3d():boolean;
2984
- get titleFont():string;
2985
- get colspan():number;
2986
- get titleColor():string;
2987
- get series():Series[];
2988
- get rowspan():number;
2989
- /**
2990
- * The type of this chart, see <b>ChartType</b> enum for more details.
2991
- * @return int
2992
- */
2993
- get chartType():ChartTypeType;
2994
- get row():number;
2995
- get legendColor():string;
2996
- get legendFont():string;
2997
- get multiSeries():MultiSeries[];
2998
- }
2999
-
3000
- export class DownsampleOptions {
3001
- /**
3002
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3003
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3004
- * series.subscribe().
3005
- */
3006
- static MAX_SERIES_SIZE:number;
3007
- /**
3008
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3009
- * downsampling disabled, the series will not load data.
3010
- */
3011
- static MAX_SUBSCRIPTION_SIZE:number;
3012
- /**
3013
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3014
- * axes are configured.
3015
- */
3016
- static readonly DEFAULT:DownsampleOptions;
3017
- /**
3018
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3019
- * the limit of MAX_SUBSCRIPTION_SIZE.
3020
- */
3021
- static readonly DISABLE:DownsampleOptions;
3022
-
3023
- protected constructor();
3024
- }
3025
-
3026
- /**
3027
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3028
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
3029
- * keep that cached as well.
2957
+ * Provides the details for a figure.
2958
+ *
2959
+ * The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
2960
+ * or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
2961
+ * being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
2962
+ * the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
2963
+ * any) to reduce the number of points sent to the client.
2964
+ *
2965
+ * Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
2966
+ * can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
2967
+ * <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
2968
+ * than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
2969
+ * <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
2970
+ * data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
2971
+ *
2972
+ * Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
2973
+ * UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
2974
+ * accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
2975
+ * that the "important" values are visible.
2976
+ *
2977
+ * Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
2978
+ * First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
2979
+ * is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
2980
+ * configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
2981
+ * the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
2982
+ * indicating to the user why data is not ready yet - when the server side process is complete,
2983
+ * <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
2984
+ * panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
2985
+ * downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
2986
+ *
2987
+ * At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
2988
+ * client-created figures.
3030
2989
  */
3031
- export class ChartData {
3032
- constructor(table:dh.Table);
3033
-
3034
- update(tableData:dh.SubscriptionTableData):void;
3035
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3036
- /**
3037
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3038
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3039
- */
3040
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3041
- }
3042
-
3043
2990
  export class Figure implements dh.HasEventHandling {
3044
2991
  /**
3045
2992
  * The title of the figure.
@@ -3083,7 +3030,8 @@ export namespace dh.plot {
3083
3030
  */
3084
3031
  static readonly EVENT_DOWNSAMPLENEEDED:string;
3085
3032
 
3086
- static create(config:FigureDescriptor):Promise<Figure>;
3033
+ protected constructor();
3034
+
3087
3035
  subscribe(forceDisableDownsample?:DownsampleOptions):void;
3088
3036
  /**
3089
3037
  * Disable updates for all series in this figure.
@@ -3122,6 +3070,7 @@ export namespace dh.plot {
3122
3070
  * @typeParam T -
3123
3071
  */
3124
3072
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3073
+ static create(config:FigureDescriptor):Promise<Figure>;
3125
3074
  }
3126
3075
 
3127
3076
  /**
@@ -3141,6 +3090,82 @@ export namespace dh.plot {
3141
3090
  constructor();
3142
3091
  }
3143
3092
 
3093
+ /**
3094
+ * Helper class for plot downsampling methods.
3095
+ */
3096
+ export class Downsample {
3097
+ protected constructor();
3098
+
3099
+ /**
3100
+ * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3101
+ * the same visual fidelity as the original table, but with fewer rows.
3102
+ * @param table - The table to downsample.
3103
+ * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3104
+ * @param yCols - The names of the Y columns to downsample.
3105
+ * @param width - The width of the visible area in pixels.
3106
+ * @param xRange - The visible range as `[start, end]` or null to always use all data.
3107
+ * @return A promise that resolves to the downsampled table.
3108
+ */
3109
+ static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3110
+ }
3111
+
3112
+ export class FigureSourceException {
3113
+ table:dh.Table;
3114
+ source:SeriesDataSource;
3115
+
3116
+ protected constructor();
3117
+ }
3118
+
3119
+ export class FigureFetchError {
3120
+ error:object;
3121
+ errors:Array<string>;
3122
+
3123
+ protected constructor();
3124
+ }
3125
+
3126
+ export class SeriesDescriptor {
3127
+ plotStyle:string;
3128
+ name?:string|null;
3129
+ linesVisible?:boolean|null;
3130
+ shapesVisible?:boolean|null;
3131
+ gradientVisible?:boolean|null;
3132
+ lineColor?:string|null;
3133
+ pointLabelFormat?:string|null;
3134
+ xToolTipPattern?:string|null;
3135
+ yToolTipPattern?:string|null;
3136
+ shapeLabel?:string|null;
3137
+ shapeSize?:number|null;
3138
+ shapeColor?:string|null;
3139
+ shape?:string|null;
3140
+ dataSources:Array<SourceDescriptor>;
3141
+
3142
+ constructor();
3143
+ }
3144
+
3145
+ export class AxisDescriptor {
3146
+ formatType:string;
3147
+ type:string;
3148
+ position:string;
3149
+ log?:boolean|null;
3150
+ label?:string|null;
3151
+ labelFont?:string|null;
3152
+ ticksFont?:string|null;
3153
+ formatPattern?:string|null;
3154
+ color?:string|null;
3155
+ minRange?:number|null;
3156
+ maxRange?:number|null;
3157
+ minorTicksVisible?:boolean|null;
3158
+ majorTicksVisible?:boolean|null;
3159
+ minorTickCount?:number|null;
3160
+ gapBetweenMajorTicks?:number|null;
3161
+ majorTickLocations?:Array<number>|null;
3162
+ tickLabelAngle?:number|null;
3163
+ invert?:boolean|null;
3164
+ isTimeAxis?:boolean|null;
3165
+
3166
+ constructor();
3167
+ }
3168
+
3144
3169
  export class ChartDescriptor {
3145
3170
  colspan?:number|null;
3146
3171
  rowspan?:number|null;
@@ -3159,29 +3184,56 @@ export namespace dh.plot {
3159
3184
  }
3160
3185
 
3161
3186
  /**
3162
- * Helper class for plot downsampling methods.
3187
+ * Provide the details for a chart.
3163
3188
  */
3164
- export class Downsample {
3189
+ export class Chart implements dh.HasEventHandling {
3190
+ /**
3191
+ * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3192
+ */
3193
+ static readonly EVENT_SERIES_ADDED:string;
3194
+ /**
3195
+ * The title of the chart.
3196
+ * @return String
3197
+ */
3198
+ readonly title?:string|null;
3199
+
3165
3200
  protected constructor();
3166
3201
 
3202
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
3203
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3204
+ hasListeners(name:string):boolean;
3205
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3206
+ get column():number;
3207
+ get showLegend():boolean;
3167
3208
  /**
3168
- * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3169
- * the same visual fidelity as the original table, but with fewer rows.
3170
- * @param table - The table to downsample.
3171
- * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3172
- * @param yCols - The names of the Y columns to downsample.
3173
- * @param width - The width of the visible area in pixels.
3174
- * @param xRange - The visible range as `[start, end]` or null to always use all data.
3175
- * @return A promise that resolves to the downsampled table.
3209
+ * The axes used in this chart.
3210
+ * @return dh.plot.Axis
3211
+ */
3212
+ get axes():Axis[];
3213
+ get is3d():boolean;
3214
+ get titleFont():string;
3215
+ get colspan():number;
3216
+ get titleColor():string;
3217
+ get series():Series[];
3218
+ get rowspan():number;
3219
+ /**
3220
+ * The type of this chart, see <b>ChartType</b> enum for more details.
3221
+ * @return int
3176
3222
  */
3177
- static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3223
+ get chartType():ChartTypeType;
3224
+ get row():number;
3225
+ get legendColor():string;
3226
+ get legendFont():string;
3227
+ get multiSeries():MultiSeries[];
3178
3228
  }
3179
3229
 
3180
- export class FigureFetchError {
3181
- error:object;
3182
- errors:Array<string>;
3230
+ export class SourceDescriptor {
3231
+ axis:AxisDescriptor;
3232
+ table:dh.Table;
3233
+ columnName:string;
3234
+ type:string;
3183
3235
 
3184
- protected constructor();
3236
+ constructor();
3185
3237
  }
3186
3238
 
3187
3239
  export class SeriesDataSourceException {
@@ -3191,65 +3243,74 @@ export namespace dh.plot {
3191
3243
  get message():string;
3192
3244
  }
3193
3245
 
3194
- export class AxisDescriptor {
3195
- formatType:string;
3196
- type:string;
3197
- position:string;
3198
- log?:boolean|null;
3199
- label?:string|null;
3200
- labelFont?:string|null;
3201
- ticksFont?:string|null;
3202
- formatPattern?:string|null;
3203
- color?:string|null;
3204
- minRange?:number|null;
3205
- maxRange?:number|null;
3206
- minorTicksVisible?:boolean|null;
3207
- majorTicksVisible?:boolean|null;
3208
- minorTickCount?:number|null;
3209
- gapBetweenMajorTicks?:number|null;
3210
- majorTickLocations?:Array<number>|null;
3211
- tickLabelAngle?:number|null;
3212
- invert?:boolean|null;
3213
- isTimeAxis?:boolean|null;
3214
-
3215
- constructor();
3216
- }
3217
-
3218
- export class SourceDescriptor {
3219
- axis:AxisDescriptor;
3220
- table:dh.Table;
3221
- columnName:string;
3222
- type:string;
3246
+ /**
3247
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3248
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3249
+ * keep that cached as well.
3250
+ */
3251
+ export class ChartData {
3252
+ constructor(table:dh.Table);
3223
3253
 
3224
- constructor();
3254
+ update(tableData:dh.SubscriptionTableData):void;
3255
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3256
+ /**
3257
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3258
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3259
+ */
3260
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3225
3261
  }
3226
3262
 
3227
- export class FigureSourceException {
3228
- table:dh.Table;
3229
- source:SeriesDataSource;
3263
+ export class DownsampleOptions {
3264
+ /**
3265
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3266
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3267
+ * series.subscribe().
3268
+ */
3269
+ static MAX_SERIES_SIZE:number;
3270
+ /**
3271
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3272
+ * downsampling disabled, the series will not load data.
3273
+ */
3274
+ static MAX_SUBSCRIPTION_SIZE:number;
3275
+ /**
3276
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3277
+ * axes are configured.
3278
+ */
3279
+ static readonly DEFAULT:DownsampleOptions;
3280
+ /**
3281
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3282
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3283
+ */
3284
+ static readonly DISABLE:DownsampleOptions;
3230
3285
 
3231
3286
  protected constructor();
3232
3287
  }
3233
3288
 
3234
- export class SeriesDescriptor {
3235
- plotStyle:string;
3236
- name?:string|null;
3237
- linesVisible?:boolean|null;
3238
- shapesVisible?:boolean|null;
3239
- gradientVisible?:boolean|null;
3240
- lineColor?:string|null;
3241
- pointLabelFormat?:string|null;
3242
- xToolTipPattern?:string|null;
3243
- yToolTipPattern?:string|null;
3244
- shapeLabel?:string|null;
3245
- shapeSize?:number|null;
3246
- shapeColor?:string|null;
3247
- shape?:string|null;
3248
- dataSources:Array<SourceDescriptor>;
3249
3289
 
3250
- constructor();
3290
+ type AxisTypeType = number;
3291
+ export class AxisType {
3292
+ static readonly X:AxisTypeType;
3293
+ static readonly Y:AxisTypeType;
3294
+ static readonly SHAPE:AxisTypeType;
3295
+ static readonly SIZE:AxisTypeType;
3296
+ static readonly LABEL:AxisTypeType;
3297
+ static readonly COLOR:AxisTypeType;
3251
3298
  }
3252
3299
 
3300
+ /**
3301
+ * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3302
+ * those series should be rendered.
3303
+ */
3304
+ type ChartTypeType = number;
3305
+ export class ChartType {
3306
+ static readonly XY:ChartTypeType;
3307
+ static readonly PIE:ChartTypeType;
3308
+ static readonly OHLC:ChartTypeType;
3309
+ static readonly CATEGORY:ChartTypeType;
3310
+ static readonly XYZ:ChartTypeType;
3311
+ static readonly CATEGORY_3D:ChartTypeType;
3312
+ static readonly TREEMAP:ChartTypeType;
3313
+ }
3253
3314
 
3254
3315
  type SeriesPlotStyleType = number;
3255
3316
  export class SeriesPlotStyle {
@@ -3267,12 +3328,6 @@ export namespace dh.plot {
3267
3328
  static readonly TREEMAP:SeriesPlotStyleType;
3268
3329
  }
3269
3330
 
3270
- type AxisFormatTypeType = number;
3271
- export class AxisFormatType {
3272
- static readonly CATEGORY:AxisFormatTypeType;
3273
- static readonly NUMBER:AxisFormatTypeType;
3274
- }
3275
-
3276
3331
  type AxisPositionType = number;
3277
3332
  export class AxisPosition {
3278
3333
  static readonly TOP:AxisPositionType;
@@ -3282,31 +3337,6 @@ export namespace dh.plot {
3282
3337
  static readonly NONE:AxisPositionType;
3283
3338
  }
3284
3339
 
3285
- type AxisTypeType = number;
3286
- export class AxisType {
3287
- static readonly X:AxisTypeType;
3288
- static readonly Y:AxisTypeType;
3289
- static readonly SHAPE:AxisTypeType;
3290
- static readonly SIZE:AxisTypeType;
3291
- static readonly LABEL:AxisTypeType;
3292
- static readonly COLOR:AxisTypeType;
3293
- }
3294
-
3295
- /**
3296
- * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3297
- * those series should be rendered.
3298
- */
3299
- type ChartTypeType = number;
3300
- export class ChartType {
3301
- static readonly XY:ChartTypeType;
3302
- static readonly PIE:ChartTypeType;
3303
- static readonly OHLC:ChartTypeType;
3304
- static readonly CATEGORY:ChartTypeType;
3305
- static readonly XYZ:ChartTypeType;
3306
- static readonly CATEGORY_3D:ChartTypeType;
3307
- static readonly TREEMAP:ChartTypeType;
3308
- }
3309
-
3310
3340
  /**
3311
3341
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3312
3342
  * item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
@@ -3336,42 +3366,48 @@ export namespace dh.plot {
3336
3366
  static readonly HOVER_TEXT:SourceTypeType;
3337
3367
  }
3338
3368
 
3369
+ type AxisFormatTypeType = number;
3370
+ export class AxisFormatType {
3371
+ static readonly CATEGORY:AxisFormatTypeType;
3372
+ static readonly NUMBER:AxisFormatTypeType;
3373
+ }
3374
+
3339
3375
  }
3340
3376
 
3341
3377
  export namespace dh.lsp {
3342
3378
 
3343
- export class MarkupContent {
3344
- kind:string;
3345
- value:string;
3346
-
3347
- constructor();
3348
- }
3349
-
3350
- export class ParameterInformation {
3379
+ export class SignatureInformation {
3351
3380
  label:string;
3352
3381
  documentation:MarkupContent;
3382
+ parameters:Array<ParameterInformation>;
3383
+ activeParameter:number;
3353
3384
 
3354
3385
  constructor();
3355
3386
  }
3356
3387
 
3357
- export class TextDocumentContentChangeEvent {
3358
- range:Range;
3359
- rangeLength:number;
3360
- text:string;
3388
+ export class Position {
3389
+ line:number;
3390
+ character:number;
3361
3391
 
3362
3392
  constructor();
3393
+
3394
+ lessThan(start:Position):boolean;
3395
+ lessOrEqual(start:Position):boolean;
3396
+ greaterThan(end:Position):boolean;
3397
+ greaterOrEqual(end:Position):boolean;
3398
+ copy():Position;
3363
3399
  }
3364
3400
 
3365
- export class Hover {
3366
- contents:MarkupContent;
3401
+ export class TextEdit {
3367
3402
  range:Range;
3403
+ text:string;
3368
3404
 
3369
3405
  constructor();
3370
3406
  }
3371
3407
 
3372
- export class TextEdit {
3373
- range:Range;
3374
- text:string;
3408
+ export class MarkupContent {
3409
+ kind:string;
3410
+ value:string;
3375
3411
 
3376
3412
  constructor();
3377
3413
  }
@@ -3385,24 +3421,17 @@ export namespace dh.lsp {
3385
3421
  isInside(innerStart:Position, innerEnd:Position):boolean;
3386
3422
  }
3387
3423
 
3388
- export class Position {
3389
- line:number;
3390
- character:number;
3424
+ export class ParameterInformation {
3425
+ label:string;
3426
+ documentation:MarkupContent;
3391
3427
 
3392
3428
  constructor();
3393
-
3394
- lessThan(start:Position):boolean;
3395
- lessOrEqual(start:Position):boolean;
3396
- greaterThan(end:Position):boolean;
3397
- greaterOrEqual(end:Position):boolean;
3398
- copy():Position;
3399
3429
  }
3400
3430
 
3401
- export class SignatureInformation {
3402
- label:string;
3403
- documentation:MarkupContent;
3404
- parameters:Array<ParameterInformation>;
3405
- activeParameter:number;
3431
+ export class TextDocumentContentChangeEvent {
3432
+ range:Range;
3433
+ rangeLength:number;
3434
+ text:string;
3406
3435
 
3407
3436
  constructor();
3408
3437
  }
@@ -3424,27 +3453,17 @@ export namespace dh.lsp {
3424
3453
  constructor();
3425
3454
  }
3426
3455
 
3427
- }
3456
+ export class Hover {
3457
+ contents:MarkupContent;
3458
+ range:Range;
3459
+
3460
+ constructor();
3461
+ }
3428
3462
 
3463
+ }
3429
3464
 
3430
3465
  export namespace dh.calendar {
3431
3466
 
3432
- export interface Holiday {
3433
- /**
3434
- * The date of the Holiday.
3435
- * @return {@link dh.LocalDateWrapper}
3436
- */
3437
- get date():dh.LocalDateWrapper;
3438
- /**
3439
- * The business periods that are open on the holiday.
3440
- * @return dh.calendar.BusinessPeriod
3441
- */
3442
- get businessPeriods():Array<BusinessPeriod>;
3443
- }
3444
- export interface BusinessPeriod {
3445
- get close():string;
3446
- get open():string;
3447
- }
3448
3467
  /**
3449
3468
  * Defines a calendar with business hours and holidays.
3450
3469
  */
@@ -3475,6 +3494,22 @@ export namespace dh.calendar {
3475
3494
  */
3476
3495
  get businessPeriods():Array<BusinessPeriod>;
3477
3496
  }
3497
+ export interface BusinessPeriod {
3498
+ get close():string;
3499
+ get open():string;
3500
+ }
3501
+ export interface Holiday {
3502
+ /**
3503
+ * The date of the Holiday.
3504
+ * @return {@link dh.LocalDateWrapper}
3505
+ */
3506
+ get date():dh.LocalDateWrapper;
3507
+ /**
3508
+ * The business periods that are open on the holiday.
3509
+ * @return dh.calendar.BusinessPeriod
3510
+ */
3511
+ get businessPeriods():Array<BusinessPeriod>;
3512
+ }
3478
3513
 
3479
3514
  type DayOfWeekType = string;
3480
3515
  export class DayOfWeek {
@@ -3490,3 +3525,4 @@ export namespace dh.calendar {
3490
3525
  }
3491
3526
 
3492
3527
  }
3528
+