@deephaven/jsapi-types 41.5.0 → 41.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +1718 -1718
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -118,149 +118,12 @@ export namespace dh.storage {
118
118
  export namespace dh {
119
119
 
120
120
  /**
121
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
122
- */
123
- export interface LocalTimeWrapper {
124
- valueOf():string;
125
- getHour():number;
126
- getMinute():number;
127
- getSecond():number;
128
- getNano():number;
129
- toString():string;
130
- }
131
- /**
132
- * Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
133
- * ViewportData also contains the offset to this data, so that the actual row number may be determined.
134
- * <p>
135
- * For viewport subscriptions, it is not necessary to read with the key, only with the position.
136
- * <p>
137
- * Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
138
- * scrolling without going to the server.
139
- */
140
- export interface ViewportData extends TableData {
141
- /**
142
- * Reads a row object from the viewport, based on its position in the table.
143
- */
144
- get(index:LongWrapper|number):ViewportRow;
145
- getData(index:LongWrapper|number, column:Column):any;
146
- getFormat(index:LongWrapper|number, column:Column):Format;
147
- /**
148
- * The position of the first returned row within the table.
149
- */
150
- get offset():number;
151
- get columns():Array<Column>;
152
- get rows():Array<ViewportRow>;
153
- }
154
- /**
155
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
156
- * request the viewport again.
157
- */
158
- export interface ViewportRow extends Row {
159
- get(column:Column):any;
160
- getFormat(column:Column):Format;
161
- get index():LongWrapper;
162
- }
163
- /**
164
- * Options for requesting a snapshot of a table.
165
- */
166
- export interface SnapshotOptions extends DataOptions {
167
- /**
168
- * If true, the snapshot will be filled starting from the end of the table, where 0 is the last row of the
169
- * table. Default is false.
170
- */
171
- isReverseViewport?:boolean|null;
172
- /**
173
- * The rows to include in the snapshot. This can be either a {@link dh.RangeSet} or a single range with
174
- * `first` and `last` properties.
175
- */
176
- rows:RangeSet|SimpleRange;
177
- }
178
- /**
179
- * Options for requesting a full-table subscription to a table.
180
- */
181
- export interface SubscriptionOptions extends DataOptions {
182
- /**
183
- * Minimum interval between updates, in milliseconds. If not specified, the server default will be used,
184
- * typically 1000ms.
185
- * <p>
186
- * Note that setting this to smaller values will not necessarily result in more frequent updates - the server
187
- * may not propagate updates that frequently, or there may be no updates to propagate.
188
- */
189
- updateIntervalMs?:number|null;
190
- }
191
- /**
192
- * Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
193
- * details about the event.
194
- * @typeParam T - the type of the event detail
195
- */
196
- export interface Event<T> {
197
- get detail():T;
198
- get type():string;
199
- }
200
- export interface RefreshToken {
201
- get bytes():string;
202
- get expiry():number;
203
- }
204
- /**
205
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
206
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
207
- *
208
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
209
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
210
- * backwards compatibility and to better follow JS expectations.
211
- */
212
- export interface WidgetMessageDetails {
213
- /**
214
- * Returns the data from this message as a base64-encoded string.
215
- */
216
- getDataAsBase64():string;
217
- /**
218
- * Returns the data from this message as a Uint8Array.
219
- */
220
- getDataAsU8():Uint8Array;
221
- /**
222
- * Returns the data from this message as a utf-8 string.
223
- */
224
- getDataAsString():string;
225
- /**
226
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
227
- * objects, and should close them when no longer needed.
228
- */
229
- get exportedObjects():WidgetExportedObject[];
230
- }
231
- /**
232
- * Options for requesting a preview of columns when requesting table data. The two properties
233
- * {@link dh.convertArrayToString} and {@link dh.array} are mutually exclusive.
234
- */
235
- export interface PreviewOptions {
236
- /**
237
- * If true, any array columns will be converted to strings for preview purposes. This is the legacy behavior.
238
- */
239
- convertArrayToString?:boolean|null;
240
- /**
241
- * Specifies the length of the array to serialize. If the array is longer than this length, one extra element
242
- * will be included - the client is expected to truncate the array and append "..." to indicate that there are
243
- * additional elements. Negative values indicate that the values should be counted from the end of the array
244
- * rather than the beginning. Zero or null indicate that the entire array should be serialized. The default is
245
- * null.
246
- */
247
- array?:number|null;
248
- }
249
- /**
250
- * Similar to {@link dh.ViewportData}, but with additional properties to reflect
251
- * the tree structure.
121
+ * Simple range consisting only of start and end numbers. Will be migrated to deephaven-core in the near future, and
122
+ * subsequently removed from this the coreplus namespace.
252
123
  */
253
- export interface TreeViewportData extends TableData {
254
- get(index:LongWrapper|number):TreeRow;
255
- getData(index:LongWrapper|number, column:Column):any;
256
- getFormat(index:LongWrapper|number, column:Column):Format;
257
- get treeSize():number;
258
- /**
259
- * The position of the first returned row within the tree.
260
- */
261
- get offset():number;
262
- get columns():Array<Column>;
263
- get rows():Array<TreeRow>;
124
+ export interface SimpleRange {
125
+ first:number;
126
+ last:number;
264
127
  }
265
128
  /**
266
129
  * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
@@ -416,6 +279,30 @@ export namespace dh {
416
279
  */
417
280
  get isRefreshing():boolean;
418
281
  }
282
+ export interface WorkerHeapInfo {
283
+ /**
284
+ * Total heap size available for this worker.
285
+ */
286
+ get totalHeapSize():number;
287
+ get freeMemory():number;
288
+ get maximumHeapSize():number;
289
+ }
290
+ /**
291
+ * Similar to {@link dh.ViewportData}, but with additional properties to reflect
292
+ * the tree structure.
293
+ */
294
+ export interface TreeViewportData extends TableData {
295
+ get(index:LongWrapper|number):TreeRow;
296
+ getData(index:LongWrapper|number, column:Column):any;
297
+ getFormat(index:LongWrapper|number, column:Column):Format;
298
+ get treeSize():number;
299
+ /**
300
+ * The position of the first returned row within the tree.
301
+ */
302
+ get offset():number;
303
+ get columns():Array<Column>;
304
+ get rows():Array<TreeRow>;
305
+ }
419
306
  /**
420
307
  * Options for requesting a viewport subscription to a table.
421
308
  */
@@ -431,16 +318,6 @@ export namespace dh {
431
318
  */
432
319
  rows:RangeSet|SimpleRange;
433
320
  }
434
- export interface LayoutHints {
435
- readonly searchDisplayMode?:SearchDisplayModeType|null;
436
-
437
- get hiddenColumns():string[]|null;
438
- get frozenColumns():string[]|null;
439
- get columnGroups():ColumnGroup[]|null;
440
- get areSavedLayoutsAllowed():boolean;
441
- get frontColumns():string[]|null;
442
- get backColumns():string[]|null;
443
- }
444
321
  /**
445
322
  * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
446
323
  * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
@@ -473,62 +350,117 @@ export namespace dh {
473
350
  */
474
351
  close():void;
475
352
  }
476
- export interface HasEventHandling {
477
- /**
478
- * Listen for events on this object.
479
- * @param name - the name of the event to listen for
480
- * @param callback - a function to call when the event occurs
481
- * @return Returns a cleanup function.
482
- * @typeParam T - the type of the data that the event will provide
483
- */
484
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
485
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
486
- hasListeners(name:string):boolean;
487
- /**
488
- * Removes an event listener added to this table.
489
- * @param name -
490
- * @param callback -
491
- * @return
492
- * @typeParam T -
493
- */
494
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
495
- }
496
353
  /**
497
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
498
- * columns) either by index, or scanning the complete present index.
499
- * <p>
500
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading all
501
- * data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
502
- * in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
503
- * options should be considered.
504
- * <p>
505
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
506
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
507
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
508
- * specific rows or cells out of the table.
354
+ * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
355
+ * {@link dh.TotalsTable}.
509
356
  */
510
- export interface SubscriptionTableData extends TableData {
511
- get fullIndex():RangeSet;
512
- /**
513
- * The ordered set of row indexes removed since the last update
514
- * @return the rangeset of removed rows
515
- */
516
- get removed():RangeSet;
357
+ export interface JoinableTable {
358
+ freeze():Promise<Table>;
359
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
517
360
  /**
518
- * The ordered set of row indexes added since the last update.
519
- * @return the rangeset of rows added
361
+ * Joins this table to the provided table, using one of the specified join types:
362
+ * <ul>
363
+ * <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
364
+ * provided matching rule.</li>
365
+ * <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
366
+ * tables.</li>
367
+ * <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
368
+ * with errors if there is not exactly one.</li>
369
+ * <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
370
+ * with nulls if there is no match or errors if there are multiple matches.</li>
371
+ * </ul>
372
+ *
373
+ * Note that <code>Left</code> join is not supported here, unlike DHE.
374
+ * <p>
375
+ * See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
376
+ * more guidance on picking a join operation.
377
+ * @deprecated Instead, call the specific method for the join type.
378
+ * @param joinType - The type of join to perform, see the list above.
379
+ * @param rightTable - The table to match to values in this table
380
+ * @param columnsToMatch - Columns that should match
381
+ * @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
382
+ * @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
383
+ * @return a promise that will resolve to the joined table
520
384
  */
521
- get added():RangeSet;
522
- get columns():Array<Column>;
385
+ join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
523
386
  /**
524
- * The ordered set of row indexes updated since the last update
525
- * @return the rnageset of modified rows
526
- */
527
- get modified():RangeSet;
387
+ * Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
388
+ * row from the right table.
389
+ * <p>
390
+ * The `asOfMatchRule` value can be one of:
391
+ * <ul>
392
+ * <li>LESS_THAN_EQUAL</li>
393
+ * <li>LESS_THAN</li>
394
+ * <li>GREATER_THAN_EQUAL</li>
395
+ * <li>GREATER_THAN</li>
396
+ * </ul>
397
+ * @param rightTable - the table to match to values in this table
398
+ * @param columnsToMatch - the columns that should match, according to the asOfMatchRole
399
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
400
+ * columns
401
+ * @param asOfMatchRule - the match rule to use, see above
402
+ * @return a promise that will resolve to the joined table
403
+ */
404
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
528
405
  /**
529
- * A lazily computed array of all rows available on the client.
406
+ * a promise that will be resolved with the newly created table holding the results of the specified cross join
407
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
408
+ * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
409
+ * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
410
+ * @param rightTable - the table to match to values in this table
411
+ * @param columnsToMatch - the columns that should match exactly
412
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
413
+ * columns
414
+ * @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
415
+ * server select a value
416
+ * @return a promise that will resolve to the joined table
530
417
  */
531
- get rows():Array<Row>;
418
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
419
+ /**
420
+ * a promise that will be resolved with the newly created table holding the results of the specified exact join
421
+ * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
422
+ * table being added to the output.
423
+ * @param rightTable - the table to match to values in this table
424
+ * @param columnsToMatch - the columns that should match exactly
425
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
426
+ * columns
427
+ * @return a promise that will resolve to the joined table
428
+ */
429
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
430
+ /**
431
+ * a promise that will be resolved with the newly created table holding the results of the specified natural join
432
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
433
+ * right table being added to the output.
434
+ * @param rightTable - the table to match to values in this table
435
+ * @param columnsToMatch - the columns that should match exactly
436
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
437
+ * columns
438
+ * @return a promise that will resolve to the joined table
439
+ */
440
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
441
+ }
442
+ /**
443
+ * Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
444
+ * ViewportData also contains the offset to this data, so that the actual row number may be determined.
445
+ * <p>
446
+ * For viewport subscriptions, it is not necessary to read with the key, only with the position.
447
+ * <p>
448
+ * Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
449
+ * scrolling without going to the server.
450
+ */
451
+ export interface ViewportData extends TableData {
452
+ /**
453
+ * Reads a row object from the viewport, based on its position in the table.
454
+ */
455
+ get(index:LongWrapper|number):ViewportRow;
456
+ getData(index:LongWrapper|number, column:Column):any;
457
+ getFormat(index:LongWrapper|number, column:Column):Format;
458
+ /**
459
+ * The position of the first returned row within the table.
460
+ */
461
+ get offset():number;
462
+ get columns():Array<Column>;
463
+ get rows():Array<ViewportRow>;
532
464
  }
533
465
  /**
534
466
  * Row implementation that also provides additional read-only properties. represents visible rows in the table, but
@@ -558,6 +490,21 @@ export namespace dh {
558
490
  get index():LongWrapper;
559
491
  }
560
492
  /**
493
+ * Options for requesting a snapshot of a table.
494
+ */
495
+ export interface SnapshotOptions extends DataOptions {
496
+ /**
497
+ * If true, the snapshot will be filled starting from the end of the table, where 0 is the last row of the
498
+ * table. Default is false.
499
+ */
500
+ isReverseViewport?:boolean|null;
501
+ /**
502
+ * The rows to include in the snapshot. This can be either a {@link dh.RangeSet} or a single range with
503
+ * `first` and `last` properties.
504
+ */
505
+ rows:RangeSet|SimpleRange;
506
+ }
507
+ /**
561
508
  * Represents statistics for a given table column.
562
509
  */
563
510
  export interface ColumnStatistics {
@@ -585,44 +532,6 @@ export namespace dh {
585
532
  get statisticsMap():Map<string, object>;
586
533
  }
587
534
  /**
588
- * Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
589
- * not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
590
- * event, or re-request the viewport data.
591
- */
592
- export interface Row {
593
- get(column:Column):any;
594
- getFormat(column:Column):Format;
595
- get index():LongWrapper;
596
- }
597
- /**
598
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
599
- */
600
- export interface LocalDateWrapper {
601
- valueOf():string;
602
- getYear():number;
603
- getMonthValue():number;
604
- getDayOfMonth():number;
605
- toString():string;
606
- }
607
- /**
608
- * Options for requesting table data, either as a snapshot or a subscription. See subtypes for more specific options:
609
- * <ul>
610
- * <li>{@link dh.SnapshotOptions} for snapshot-specific options</li>
611
- * <li>{@link dh.SubscriptionOptions} for full-table subscription-specific options</li>
612
- * <li>{@link dh.ViewportSubscriptionOptions} for viewport subscription-specific options</li>
613
- * </ul>
614
- */
615
- export interface DataOptions {
616
- /**
617
- * Optional preview instructions for columns in the table data.
618
- */
619
- previewOptions?:PreviewOptions|null;
620
- /**
621
- * Required property to indicate which columns should be included in the table data.
622
- */
623
- columns:Array<Column>;
624
- }
625
- /**
626
535
  * Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
627
536
  * on tables, data in trees, and snapshots.
628
537
  * <p>
@@ -657,308 +566,169 @@ export namespace dh {
657
566
  */
658
567
  get rows():Array<Row>;
659
568
  }
660
- export interface ColumnGroup {
661
- get name():string|null;
662
- get children():string[]|null;
663
- get color():string|null;
569
+ /**
570
+ * Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
571
+ * not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
572
+ * event, or re-request the viewport data.
573
+ */
574
+ export interface Row {
575
+ get(column:Column):any;
576
+ getFormat(column:Column):Format;
577
+ get index():LongWrapper;
664
578
  }
665
579
  /**
666
- * Simple range consisting only of start and end numbers. Will be migrated to deephaven-core in the near future, and
667
- * subsequently removed from this the coreplus namespace.
580
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
668
581
  */
669
- export interface SimpleRange {
670
- first:number;
671
- last:number;
582
+ export interface LocalTimeWrapper {
583
+ valueOf():string;
584
+ getHour():number;
585
+ getMinute():number;
586
+ getSecond():number;
587
+ getNano():number;
588
+ toString():string;
672
589
  }
673
- export interface WorkerHeapInfo {
674
- /**
675
- * Total heap size available for this worker.
676
- */
677
- get totalHeapSize():number;
678
- get freeMemory():number;
679
- get maximumHeapSize():number;
590
+ export interface LayoutHints {
591
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
592
+
593
+ get hiddenColumns():string[]|null;
594
+ get frozenColumns():string[]|null;
595
+ get columnGroups():ColumnGroup[]|null;
596
+ get areSavedLayoutsAllowed():boolean;
597
+ get frontColumns():string[]|null;
598
+ get backColumns():string[]|null;
680
599
  }
681
600
  /**
682
- * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
683
- * {@link dh.TotalsTable}.
601
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
602
+ * columns) either by index, or scanning the complete present index.
603
+ * <p>
604
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading all
605
+ * data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
606
+ * in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
607
+ * options should be considered.
608
+ * <p>
609
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
610
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
611
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
612
+ * specific rows or cells out of the table.
684
613
  */
685
- export interface JoinableTable {
686
- freeze():Promise<Table>;
687
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
614
+ export interface SubscriptionTableData extends TableData {
615
+ get fullIndex():RangeSet;
688
616
  /**
689
- * Joins this table to the provided table, using one of the specified join types:
690
- * <ul>
691
- * <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
692
- * provided matching rule.</li>
693
- * <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
694
- * tables.</li>
695
- * <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
696
- * with errors if there is not exactly one.</li>
697
- * <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
698
- * with nulls if there is no match or errors if there are multiple matches.</li>
699
- * </ul>
700
- *
701
- * Note that <code>Left</code> join is not supported here, unlike DHE.
702
- * <p>
703
- * See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
704
- * more guidance on picking a join operation.
705
- * @deprecated Instead, call the specific method for the join type.
706
- * @param joinType - The type of join to perform, see the list above.
707
- * @param rightTable - The table to match to values in this table
708
- * @param columnsToMatch - Columns that should match
709
- * @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
710
- * @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
711
- * @return a promise that will resolve to the joined table
617
+ * The ordered set of row indexes removed since the last update
618
+ * @return the rangeset of removed rows
712
619
  */
713
- join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
620
+ get removed():RangeSet;
714
621
  /**
715
- * Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
716
- * row from the right table.
717
- * <p>
718
- * The `asOfMatchRule` value can be one of:
719
- * <ul>
720
- * <li>LESS_THAN_EQUAL</li>
721
- * <li>LESS_THAN</li>
722
- * <li>GREATER_THAN_EQUAL</li>
723
- * <li>GREATER_THAN</li>
724
- * </ul>
725
- * @param rightTable - the table to match to values in this table
726
- * @param columnsToMatch - the columns that should match, according to the asOfMatchRole
727
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
728
- * columns
729
- * @param asOfMatchRule - the match rule to use, see above
730
- * @return a promise that will resolve to the joined table
622
+ * The ordered set of row indexes added since the last update.
623
+ * @return the rangeset of rows added
731
624
  */
732
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
625
+ get added():RangeSet;
626
+ get columns():Array<Column>;
733
627
  /**
734
- * a promise that will be resolved with the newly created table holding the results of the specified cross join
735
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
736
- * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
737
- * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
738
- * @param rightTable - the table to match to values in this table
739
- * @param columnsToMatch - the columns that should match exactly
740
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
741
- * columns
742
- * @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
743
- * server select a value
744
- * @return a promise that will resolve to the joined table
628
+ * The ordered set of row indexes updated since the last update
629
+ * @return the rnageset of modified rows
745
630
  */
746
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
631
+ get modified():RangeSet;
747
632
  /**
748
- * a promise that will be resolved with the newly created table holding the results of the specified exact join
749
- * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
750
- * table being added to the output.
751
- * @param rightTable - the table to match to values in this table
752
- * @param columnsToMatch - the columns that should match exactly
753
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
754
- * columns
755
- * @return a promise that will resolve to the joined table
756
- */
757
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
758
- /**
759
- * a promise that will be resolved with the newly created table holding the results of the specified natural join
760
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
761
- * right table being added to the output.
762
- * @param rightTable - the table to match to values in this table
763
- * @param columnsToMatch - the columns that should match exactly
764
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
765
- * columns
766
- * @return a promise that will resolve to the joined table
633
+ * A lazily computed array of all rows available on the client.
767
634
  */
768
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
635
+ get rows():Array<Row>;
636
+ }
637
+ export interface RefreshToken {
638
+ get bytes():string;
639
+ get expiry():number;
640
+ }
641
+ export interface ColumnGroup {
642
+ get name():string|null;
643
+ get children():string[]|null;
644
+ get color():string|null;
769
645
  }
770
646
  /**
771
- * This object may be pooled internally or discarded and not updated. Do not retain references to it.
647
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
648
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
649
+ *
650
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
651
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
652
+ * backwards compatibility and to better follow JS expectations.
772
653
  */
773
- export interface Format {
654
+ export interface WidgetMessageDetails {
774
655
  /**
775
- * The format string to apply to the value of this cell.
776
- * @return String
656
+ * Returns the data from this message as a base64-encoded string.
777
657
  */
778
- readonly formatString?:string|null;
658
+ getDataAsBase64():string;
779
659
  /**
780
- * Color to apply to the cell's background, in <b>#rrggbb</b> format.
781
- * @return String
660
+ * Returns the data from this message as a Uint8Array.
782
661
  */
783
- readonly backgroundColor?:string|null;
662
+ getDataAsU8():Uint8Array;
784
663
  /**
785
- * Color to apply to the text, in <b>#rrggbb</b> format.
786
- * @return String
664
+ * Returns the data from this message as a utf-8 string.
787
665
  */
788
- readonly color?:string|null;
666
+ getDataAsString():string;
789
667
  /**
790
- *
791
- * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
668
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
669
+ * objects, and should close them when no longer needed.
792
670
  */
793
- readonly numberFormat?:string|null;
671
+ get exportedObjects():WidgetExportedObject[];
794
672
  }
795
-
796
673
  /**
797
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
798
- * roll-up table.
674
+ * Options for requesting table data, either as a snapshot or a subscription. See subtypes for more specific options:
675
+ * <ul>
676
+ * <li>{@link dh.SnapshotOptions} for snapshot-specific options</li>
677
+ * <li>{@link dh.SubscriptionOptions} for full-table subscription-specific options</li>
678
+ * <li>{@link dh.ViewportSubscriptionOptions} for viewport subscription-specific options</li>
679
+ * </ul>
799
680
  */
800
- export class RollupConfig {
801
- /**
802
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
803
- */
804
- groupingColumns:Array<String>;
805
- /**
806
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
807
- * roll-up table.
808
- */
809
- aggregations:{ [key: string]: Array<string>; };
681
+ export interface DataOptions {
810
682
  /**
811
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
812
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
813
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
814
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
683
+ * Optional preview instructions for columns in the table data.
815
684
  */
816
- includeConstituents:boolean;
817
- includeOriginalColumns?:boolean|null;
685
+ previewOptions?:PreviewOptions|null;
818
686
  /**
819
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
687
+ * Required property to indicate which columns should be included in the table data.
820
688
  */
821
- includeDescriptions:boolean;
822
-
823
- constructor();
824
- }
825
-
826
- export class DateWrapper extends LongWrapper {
827
- protected constructor();
828
-
829
- static ofJsDate(date:Date):DateWrapper;
830
- asDate():Date;
831
- }
832
-
833
- export class LongWrapper {
834
- protected constructor();
835
-
836
- static ofString(str:string):LongWrapper;
837
- asNumber():number;
838
- valueOf():string;
839
- toString():string;
689
+ columns:Array<Column>;
840
690
  }
841
-
842
691
  /**
843
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
844
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
845
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
692
+ * Options for requesting a full-table subscription to a table.
846
693
  */
847
- export class RangeSet {
848
- protected constructor();
849
-
850
- static ofRange(first:number, last:number):RangeSet;
851
- static ofItems(rows:number[]):RangeSet;
852
- static ofRanges(ranges:RangeSet[]):RangeSet;
853
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
854
- /**
855
- * a new iterator over all indexes in this collection.
856
- * @return Iterator of {@link dh.LongWrapper}
857
- */
858
- iterator():Iterator<LongWrapper>;
694
+ export interface SubscriptionOptions extends DataOptions {
859
695
  /**
860
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
861
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
862
- * property each time through a loop).
863
- * @return double
696
+ * Minimum interval between updates, in milliseconds. If not specified, the server default will be used,
697
+ * typically 1000ms.
698
+ * <p>
699
+ * Note that setting this to smaller values will not necessarily result in more frequent updates - the server
700
+ * may not propagate updates that frequently, or there may be no updates to propagate.
864
701
  */
865
- get size():number;
702
+ updateIntervalMs?:number|null;
866
703
  }
867
-
868
704
  /**
869
- * Deprecated for use in Deephaven Core.
870
- * @deprecated
705
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
706
+ * request the viewport again.
871
707
  */
872
- export class Client {
873
- static readonly EVENT_REQUEST_FAILED:string;
874
- static readonly EVENT_REQUEST_STARTED:string;
875
- static readonly EVENT_REQUEST_SUCCEEDED:string;
876
-
877
- constructor();
878
- }
879
-
880
- export class LoginCredentials {
881
- type?:string|null;
882
- username?:string|null;
883
- token?:string|null;
884
-
885
- constructor();
708
+ export interface ViewportRow extends Row {
709
+ get(column:Column):any;
710
+ getFormat(column:Column):Format;
711
+ get index():LongWrapper;
886
712
  }
887
-
888
713
  /**
889
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
890
- * the server to get each Table. All tables will have the same structure.
714
+ * Options for requesting a preview of columns when requesting table data. The two properties
715
+ * {@link dh.convertArrayToString} and {@link dh.array} are mutually exclusive.
891
716
  */
892
- export class PartitionedTable implements HasEventHandling {
893
- /**
894
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
895
- */
896
- static readonly EVENT_KEYADDED:string;
897
- /**
898
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
899
- */
900
- static readonly EVENT_DISCONNECT:string;
901
- /**
902
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
903
- */
904
- static readonly EVENT_RECONNECT:string;
905
- /**
906
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
907
- */
908
- static readonly EVENT_RECONNECTFAILED:string;
909
-
910
- protected constructor();
911
-
912
- /**
913
- * Fetch the table with the given key. If the key does not exist, returns `null`.
914
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
915
- * @return Promise of dh.Table, or `null` if the key does not exist.
916
- */
917
- getTable(key:object):Promise<Table|undefined|null>;
918
- /**
919
- * Open a new table that is the result of merging all constituent tables. See
920
- * {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
921
- * @return A merged representation of the constituent tables.
922
- */
923
- getMergedTable():Promise<Table>;
924
- /**
925
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
926
- * for <b>keyadded</b> will ensure no keys are missed.
927
- * @return Set of Object
928
- */
929
- getKeys():Set<object>;
930
- /**
931
- * Fetch a table containing all the valid keys of the partitioned table.
932
- * @return Promise of a Table
933
- * @deprecated
934
- */
935
- getKeyTable():Promise<Table>;
936
- /**
937
- * Fetch the underlying base table of the partitioned table.
938
- * @return Promise of a Table
939
- */
940
- getBaseTable():Promise<Table>;
941
- /**
942
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
943
- * will not affect tables in use.
944
- */
945
- close():void;
946
- /**
947
- * The count of known keys.
948
- * @return int
949
- */
950
- get size():number;
717
+ export interface PreviewOptions {
951
718
  /**
952
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
953
- * non-key columns.
954
- * @return Array of Column
719
+ * If true, any array columns will be converted to strings for preview purposes. This is the legacy behavior.
955
720
  */
956
- get columns():Column[];
721
+ convertArrayToString?:boolean|null;
957
722
  /**
958
- * An array of all the key columns that the tables are partitioned by.
959
- * @return Array of Column
723
+ * Specifies the length of the array to serialize. If the array is longer than this length, one extra element
724
+ * will be included - the client is expected to truncate the array and append "..." to indicate that there are
725
+ * additional elements. Negative values indicate that the values should be counted from the end of the array
726
+ * rather than the beginning. Zero or null indicate that the entire array should be serialized. The default is
727
+ * null.
960
728
  */
961
- get keyColumns():Column[];
729
+ array?:number|null;
730
+ }
731
+ export interface HasEventHandling {
962
732
  /**
963
733
  * Listen for events on this object.
964
734
  * @param name - the name of the event to listen for
@@ -978,379 +748,49 @@ export namespace dh {
978
748
  */
979
749
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
980
750
  }
981
-
982
751
  /**
983
- * Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
752
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it.
984
753
  */
985
- export class ConnectOptions {
754
+ export interface Format {
986
755
  /**
987
- * Optional map of http header names and values to send to the server with each request.
756
+ * The format string to apply to the value of this cell.
757
+ * @return String
988
758
  */
989
- headers?:{ [key: string]: string; }|null;
759
+ readonly formatString?:string|null;
990
760
  /**
991
- * True to enable debug logging. At this time, only enables logging for gRPC calls.
992
- */
993
- debug?:boolean|null;
994
- /**
995
- * Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
996
- * of `fetch`. Ignored if {@link dh.transportFactory} is set.
997
- * <p>
998
- * Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
999
- */
1000
- useWebsockets?:boolean|null;
1001
- /**
1002
- * The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
1003
- * {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
1004
- * <p>
1005
- * Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
1006
- * `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
1007
- * https, it will use fetch, otherwise it will use websockets.
1008
- */
1009
- transportFactory?:dh.grpc.GrpcTransportFactory|null;
1010
-
1011
- constructor();
1012
- }
1013
-
1014
- /**
1015
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1016
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1017
- * <p>
1018
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1019
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1020
- * forward data to it.
1021
- * <p>
1022
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1023
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1024
- * viewports to make it less expensive to compute for large tables.
1025
- */
1026
- export class TableSubscription implements HasEventHandling {
1027
- protected constructor();
1028
-
1029
- static createTableSubscription(options:SubscriptionOptions, existingTable:Table):TableSubscription;
1030
- /**
1031
- * Updates the subscription to use the given columns and update interval.
1032
- * @param columns - the new columns to subscribe to
1033
- * @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
1034
- */
1035
- changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
1036
- /**
1037
- * Update the options for this viewport subscription. This cannot alter the update interval or preview options.
1038
- * @param options - the subscription options
1039
- */
1040
- update(options:SubscriptionOptions):void;
1041
- get columns():Array<Column>;
1042
- /**
1043
- * Stops the subscription on the server.
1044
- */
1045
- close():void;
1046
- /**
1047
- * Listen for events on this object.
1048
- * @param name - the name of the event to listen for
1049
- * @param callback - a function to call when the event occurs
1050
- * @return Returns a cleanup function.
1051
- * @typeParam T - the type of the data that the event will provide
1052
- */
1053
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1054
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1055
- hasListeners(name:string):boolean;
1056
- /**
1057
- * Removes an event listener added to this table.
1058
- * @param name -
1059
- * @param callback -
1060
- * @return
1061
- * @typeParam T -
1062
- */
1063
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1064
- }
1065
-
1066
- /**
1067
- * A Widget represents a server side object that sends one or more responses to the client. The client can then
1068
- * interpret these responses to see what to render, or how to respond.
1069
- * <p>
1070
- * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1071
- * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1072
- * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1073
- * object type, the client code that handles the payloads is expected to know what to expect. See
1074
- * {@link dh.WidgetMessageDetails} for more information.
1075
- * <p>
1076
- * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1077
- * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1078
- * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1079
- * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1080
- * remote messages are still pending - it is up to implementations of plugins to handle this case.
1081
- * <p>
1082
- * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1083
- * What it does handle however, is allowing those messages to include references to server-side objects with those
1084
- * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1085
- * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1086
- * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1087
- * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1088
- * entirely to the plugin. Messages will arrive in the order they were sent.
1089
- * <p>
1090
- * This can suggest several patterns for how plugins operate:
1091
- * <ul>
1092
- * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1093
- * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1094
- * `pandas.DataFrame` will result in a widget that only contains a static
1095
- * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1096
- * provided to the JS API consumer.</li>
1097
- * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1098
- * which provided them. One concrete example of this could have been
1099
- * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1100
- * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1101
- * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1102
- * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1103
- * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1104
- * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1105
- * an internal table instance.</li>
1106
- * </ul>
1107
- *
1108
- * Handling server objects in messages also has more than one potential pattern that can be used:
1109
- * <ul>
1110
- * <li>One object per message - the message clearly is about that object, no other details required.</li>
1111
- * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1112
- * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1113
- * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1114
- * be used, which columns should be mapped to each axis.</li>
1115
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1116
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1117
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1118
- * without the server somehow signaling that it will never reference that export again.</li>
1119
- * </ul>
1120
- */
1121
- export class Widget implements WidgetMessageDetails, HasEventHandling {
1122
- static readonly EVENT_MESSAGE:string;
1123
- static readonly EVENT_CLOSE:string;
1124
-
1125
- protected constructor();
1126
-
1127
- /**
1128
- * Ends the client connection to the server.
1129
- */
1130
- close():void;
1131
- getDataAsBase64():string;
1132
- getDataAsU8():Uint8Array;
1133
- getDataAsString():string;
1134
- /**
1135
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1136
- * @param msg - string/buffer/view instance that represents data to send
1137
- * @param references - an array of objects that can be safely sent to the server
761
+ * Color to apply to the cell's background, in <b>#rrggbb</b> format.
762
+ * @return String
1138
763
  */
1139
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1140
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1141
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1142
- hasListeners(name:string):boolean;
1143
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
764
+ readonly backgroundColor?:string|null;
1144
765
  /**
1145
- *
1146
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1147
- * them when finished using them.
766
+ * Color to apply to the text, in <b>#rrggbb</b> format.
767
+ * @return String
1148
768
  */
1149
- get exportedObjects():WidgetExportedObject[];
769
+ readonly color?:string|null;
1150
770
  /**
1151
771
  *
1152
- * @return the type of this widget
1153
- */
1154
- get type():string;
1155
- }
1156
-
1157
-
1158
- /**
1159
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1160
- * this type TableMap.
1161
- * @deprecated
1162
- */
1163
- export class TableMap {
1164
- static readonly EVENT_KEYADDED:string;
1165
- static readonly EVENT_DISCONNECT:string;
1166
- static readonly EVENT_RECONNECT:string;
1167
- static readonly EVENT_RECONNECTFAILED:string;
1168
-
1169
- protected constructor();
1170
- }
1171
-
1172
- export class CoreClient implements HasEventHandling {
1173
- static readonly EVENT_CONNECT:string;
1174
- static readonly EVENT_DISCONNECT:string;
1175
- static readonly EVENT_RECONNECT:string;
1176
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1177
- static readonly EVENT_REQUEST_FAILED:string;
1178
- static readonly EVENT_REQUEST_STARTED:string;
1179
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1180
- /**
1181
- * @deprecated
1182
- */
1183
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1184
- static readonly LOGIN_TYPE_PASSWORD:string;
1185
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1186
-
1187
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1188
-
1189
- running():Promise<CoreClient>;
1190
- getServerUrl():string;
1191
- getAuthConfigValues():Promise<string[][]>;
1192
- login(credentials:LoginCredentials):Promise<void>;
1193
- relogin(token:RefreshToken):Promise<void>;
1194
- onConnected(timeoutInMillis?:number):Promise<void>;
1195
- getServerConfigValues():Promise<string[][]>;
1196
- getStorageService():dh.storage.StorageService;
1197
- getAsIdeConnection():Promise<IdeConnection>;
1198
- disconnect():void;
1199
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1200
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1201
- hasListeners(name:string):boolean;
1202
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1203
- }
1204
-
1205
- /**
1206
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1207
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1208
- * instance.
1209
- */
1210
- export class FilterCondition {
1211
- protected constructor();
1212
-
1213
- /**
1214
- * the opposite of this condition
1215
- * @return FilterCondition
1216
- */
1217
- not():FilterCondition;
1218
- /**
1219
- * a condition representing the current condition logically ANDed with the other parameters
1220
- * @param filters -
1221
- * @return FilterCondition
1222
- */
1223
- and(...filters:FilterCondition[]):FilterCondition;
1224
- /**
1225
- * a condition representing the current condition logically ORed with the other parameters
1226
- * @param filters -
1227
- * @return FilterCondition.
1228
- */
1229
- or(...filters:FilterCondition[]):FilterCondition;
1230
- /**
1231
- * a string suitable for debugging showing the details of this condition.
1232
- * @return String.
1233
- */
1234
- toString():string;
1235
- get columns():Array<Column>;
1236
- /**
1237
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1238
- * functions:
1239
- * <ul>
1240
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1241
- * than the third</li>
1242
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1243
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1244
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1245
- * "not a number"</i></li>
1246
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1247
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1248
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1249
- * expression</li>
1250
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1251
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1252
- * <p>
1253
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1254
- * method should be used in other cases
1255
- * </p>
1256
- * </li>
1257
- * </ul>
1258
- * @param function -
1259
- * @param args -
1260
- * @return dh.FilterCondition
1261
- */
1262
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1263
- /**
1264
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1265
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1266
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1267
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1268
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1269
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1270
- * {@link dh.Column.filter}).
1271
- * @param value -
1272
- * @param columns -
1273
- * @return dh.FilterCondition
1274
- */
1275
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1276
- }
1277
-
1278
- export class QueryInfo {
1279
- static readonly EVENT_TABLE_OPENED:string;
1280
- static readonly EVENT_DISCONNECT:string;
1281
- static readonly EVENT_RECONNECT:string;
1282
- static readonly EVENT_CONNECT:string;
1283
-
1284
- protected constructor();
1285
- }
1286
-
1287
- /**
1288
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1289
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1290
- * methods return a new Sort instance.
1291
- */
1292
- export class Sort {
1293
- static readonly ASCENDING:string;
1294
- static readonly DESCENDING:string;
1295
- static readonly REVERSE:string;
1296
-
1297
- protected constructor();
1298
-
1299
- /**
1300
- * Builds a Sort instance to sort values in ascending order.
1301
- * @return {@link dh.Sort}
1302
- */
1303
- asc():Sort;
1304
- /**
1305
- * Builds a Sort instance to sort values in descending order.
1306
- * @return {@link dh.Sort}
1307
- */
1308
- desc():Sort;
1309
- /**
1310
- * Builds a Sort instance which takes the absolute value before applying order.
1311
- * @return {@link dh.Sort}
1312
- */
1313
- abs():Sort;
1314
- toString():string;
1315
- /**
1316
- * True if the absolute value of the column should be used when sorting; defaults to false.
1317
- * @return boolean
1318
- */
1319
- get isAbs():boolean;
1320
- /**
1321
- * The column which is sorted.
1322
- * @return {@link dh.Column}
1323
- */
1324
- get column():Column;
1325
- /**
1326
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1327
- * @return String
772
+ * @deprecated Prefer formatString. Number format string to apply to the value in this cell.
1328
773
  */
1329
- get direction():string;
774
+ readonly numberFormat?:string|null;
1330
775
  }
1331
-
1332
776
  /**
1333
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1334
- *
1335
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1336
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1337
- * value can be provided describing the strategy the engine should use when grouping the rows.
1338
- */
1339
- export class TreeTableConfig {
1340
- /**
1341
- * The column representing the unique ID for each item
1342
- */
1343
- idColumn:string;
1344
- /**
1345
- * The column representing the parent ID for each item
1346
- */
1347
- parentColumn:string;
1348
- /**
1349
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1350
- */
1351
- promoteOrphansToRoot:boolean;
1352
-
1353
- constructor();
777
+ * Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
778
+ * details about the event.
779
+ * @typeParam T - the type of the event detail
780
+ */
781
+ export interface Event<T> {
782
+ get detail():T;
783
+ get type():string;
784
+ }
785
+ /**
786
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
787
+ */
788
+ export interface LocalDateWrapper {
789
+ valueOf():string;
790
+ getYear():number;
791
+ getMonthValue():number;
792
+ getDayOfMonth():number;
793
+ toString():string;
1354
794
  }
1355
795
 
1356
796
  /**
@@ -1583,176 +1023,280 @@ export namespace dh {
1583
1023
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1584
1024
  }
1585
1025
 
1026
+
1586
1027
  /**
1587
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1588
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1589
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1590
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
1591
- * instance.
1028
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
1592
1029
  */
1593
- export class FilterValue {
1030
+ export class BigIntegerWrapper {
1031
+ protected constructor();
1032
+
1033
+ static ofString(str:string):BigIntegerWrapper;
1034
+ asNumber():number;
1035
+ valueOf():string;
1036
+ toString():string;
1037
+ equals(o:object):boolean;
1038
+ hashCode():number;
1039
+ }
1040
+
1041
+ /**
1042
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
1043
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
1044
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
1045
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
1046
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
1047
+ */
1048
+ export class TableViewportSubscription implements HasEventHandling {
1594
1049
  protected constructor();
1595
1050
 
1596
1051
  /**
1597
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1598
- * {@link TableData.get} for DateTime values. To create
1599
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1600
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1601
- * 64-bit long integer, use {@link LongWrapper.ofString}.
1602
- * @param input - the number to wrap as a FilterValue
1603
- * @return an immutable FilterValue that can be built into a filter
1052
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
1053
+ * @param firstRow -
1054
+ * @param lastRow -
1055
+ * @param columns -
1056
+ * @param updateIntervalMs -
1057
+ * @deprecated use {@link #update(Object)} instead
1604
1058
  */
1605
- static ofNumber(input:LongWrapper|number):FilterValue;
1059
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
1606
1060
  /**
1607
- * a filter condition checking if the current value is equal to the given parameter
1608
- * @param term -
1609
- * @return {@link dh.FilterCondition}
1061
+ * Update the options for this viewport subscription. This cannot alter the update interval or preview options.
1062
+ * @param options - the subscription options
1610
1063
  */
1611
- eq(term:FilterValue):FilterCondition;
1064
+ update(options:ViewportSubscriptionOptions):void;
1612
1065
  /**
1613
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1614
- * vs lower case
1615
- * @param term -
1616
- * @return {@link dh.FilterCondition}
1066
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
1617
1067
  */
1618
- eqIgnoreCase(term:FilterValue):FilterCondition;
1068
+ close():void;
1619
1069
  /**
1620
- * a filter condition checking if the current value is not equal to the given parameter
1621
- * @param term -
1622
- * @return {@link dh.FilterCondition}
1070
+ * Gets the data currently visible in this viewport
1071
+ * @return Promise of {@link dh.TableData}.
1623
1072
  */
1624
- notEq(term:FilterValue):FilterCondition;
1073
+ getViewportData():Promise<ViewportData>;
1625
1074
  /**
1626
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1627
- * upper vs lower case
1628
- * @param term -
1629
- * @return {@link dh.FilterCondition}
1075
+ *
1076
+ * @deprecated Use {@link JsTable#createSnapshot(Object)} instead
1630
1077
  */
1631
- notEqIgnoreCase(term:FilterValue):FilterCondition;
1078
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
1632
1079
  /**
1633
- * a filter condition checking if the current value is greater than the given parameter
1634
- * @param term -
1635
- * @return {@link dh.FilterCondition}
1080
+ * Listen for events on this object.
1081
+ * @param name - the name of the event to listen for
1082
+ * @param callback - a function to call when the event occurs
1083
+ * @return Returns a cleanup function.
1084
+ * @typeParam T - the type of the data that the event will provide
1636
1085
  */
1637
- greaterThan(term:FilterValue):FilterCondition;
1086
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1087
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1088
+ hasListeners(name:string):boolean;
1638
1089
  /**
1639
- * a filter condition checking if the current value is less than the given parameter
1640
- * @param term -
1641
- * @return {@link dh.FilterCondition}
1090
+ * Removes an event listener added to this table.
1091
+ * @param name -
1092
+ * @param callback -
1093
+ * @return
1094
+ * @typeParam T -
1642
1095
  */
1643
- lessThan(term:FilterValue):FilterCondition;
1096
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1097
+ }
1098
+
1099
+ /**
1100
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1101
+ * this type TableMap.
1102
+ * @deprecated
1103
+ */
1104
+ export class TableMap {
1105
+ static readonly EVENT_KEYADDED:string;
1106
+ static readonly EVENT_DISCONNECT:string;
1107
+ static readonly EVENT_RECONNECT:string;
1108
+ static readonly EVENT_RECONNECTFAILED:string;
1109
+
1110
+ protected constructor();
1111
+ }
1112
+
1113
+ /**
1114
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1115
+ * column.
1116
+ */
1117
+ export class Column {
1644
1118
  /**
1645
- * a filter condition checking if the current value is greater than or equal to the given parameter
1646
- * @param term -
1647
- * @return {@link dh.FilterCondition}
1119
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1120
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1121
+ * @return String
1648
1122
  */
1649
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1123
+ readonly constituentType?:string|null;
1124
+ readonly description?:string|null;
1125
+
1126
+ protected constructor();
1127
+
1650
1128
  /**
1651
- * a filter condition checking if the current value is less than or equal to the given parameter
1652
- * @param term -
1653
- * @return {@link dh.FilterCondition}
1129
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
1130
+ * @param row -
1131
+ * @return Any
1654
1132
  */
1655
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
1133
+ get(row:Row):any;
1134
+ getFormat(row:Row):Format;
1656
1135
  /**
1657
- * a filter condition checking if the current value is in the given set of values
1658
- * @param terms -
1659
- * @return {@link dh.FilterCondition}
1136
+ * Creates a sort builder object, to be used when sorting by this column.
1137
+ * @return {@link dh.Sort}
1660
1138
  */
1661
- in(terms:FilterValue[]):FilterCondition;
1139
+ sort():Sort;
1662
1140
  /**
1663
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1664
- * lower case
1665
- * @param terms -
1666
- * @return {@link dh.FilterCondition}
1141
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1142
+ * operation, or as a builder to create a filter operation.
1143
+ * @return {@link dh.FilterValue}
1667
1144
  */
1668
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
1145
+ filter():FilterValue;
1669
1146
  /**
1670
- * a filter condition checking that the current value is not in the given set of values
1671
- * @param terms -
1672
- * @return {@link dh.FilterCondition}
1147
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1148
+ * @param expression -
1149
+ * @return {@link dh.CustomColumn}
1150
+ */
1151
+ formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1152
+ /**
1153
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1154
+ * @param expression -
1155
+ * @return {@link dh.CustomColumn}
1156
+ */
1157
+ formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1158
+ /**
1159
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1160
+ * @param expression -
1161
+ * @return {@link dh.CustomColumn}
1162
+ */
1163
+ formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1164
+ toString():string;
1165
+ /**
1166
+ * Label for this column.
1167
+ * @return String
1168
+ */
1169
+ get name():string;
1170
+ /**
1171
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
1172
+ * {@link Table.uncoalesced}.
1173
+ * @return true if the column is a partition column
1174
+ */
1175
+ get isPartitionColumn():boolean;
1176
+ /**
1177
+ *
1178
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1179
+ * @return int
1180
+ */
1181
+ get index():number;
1182
+ get isSortable():boolean;
1183
+ /**
1184
+ * Type of the row data that can be found in this column.
1185
+ * @return String
1186
+ */
1187
+ get type():string;
1188
+ /**
1189
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1190
+ * table using <b>applyCustomColumns</b> with the parameters specified.
1191
+ * @param expression -
1192
+ * @param options -
1193
+ * @return {@link dh.CustomColumn}
1194
+ */
1195
+ static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1196
+ /**
1197
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1198
+ * @param name -
1199
+ * @param expression -
1200
+ * @param options -
1201
+ * @return {@link dh.CustomColumn}
1202
+ */
1203
+ static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1204
+ }
1205
+
1206
+ /**
1207
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1208
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1209
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1210
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1211
+ * of <b>TotalsTableConfig</b> will be supplied.
1212
+ *
1213
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1214
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1215
+ * expected formats.
1216
+ */
1217
+ export class TotalsTableConfig {
1218
+ /**
1219
+ * @deprecated
1220
+ */
1221
+ static readonly COUNT:string;
1222
+ /**
1223
+ * @deprecated
1224
+ */
1225
+ static readonly MIN:string;
1226
+ /**
1227
+ * @deprecated
1228
+ */
1229
+ static readonly MAX:string;
1230
+ /**
1231
+ * @deprecated
1232
+ */
1233
+ static readonly SUM:string;
1234
+ /**
1235
+ * @deprecated
1673
1236
  */
1674
- notIn(terms:FilterValue[]):FilterCondition;
1237
+ static readonly ABS_SUM:string;
1675
1238
  /**
1676
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1677
- * upper vs lower case
1678
- * @param terms -
1679
- * @return {@link dh.FilterCondition}
1239
+ * @deprecated
1680
1240
  */
1681
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1241
+ static readonly VAR:string;
1682
1242
  /**
1683
- * a filter condition checking if the given value contains the given string value
1684
- * @param term -
1685
- * @return {@link dh.FilterCondition}
1243
+ * @deprecated
1686
1244
  */
1687
- contains(term:FilterValue):FilterCondition;
1245
+ static readonly AVG:string;
1688
1246
  /**
1689
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1690
- * lower case
1691
- * @param term -
1692
- * @return {@link dh.FilterCondition}
1247
+ * @deprecated
1693
1248
  */
1694
- containsIgnoreCase(term:FilterValue):FilterCondition;
1249
+ static readonly STD:string;
1695
1250
  /**
1696
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1697
- * use Java regex syntax
1698
- * @param pattern -
1699
- * @return {@link dh.FilterCondition}
1251
+ * @deprecated
1700
1252
  */
1701
- matches(pattern:FilterValue):FilterCondition;
1253
+ static readonly FIRST:string;
1702
1254
  /**
1703
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1704
- * differences of upper vs lower case. Regex patterns use Java regex syntax
1705
- * @param pattern -
1706
- * @return {@link dh.FilterCondition}
1255
+ * @deprecated
1707
1256
  */
1708
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1257
+ static readonly LAST:string;
1709
1258
  /**
1710
- * a filter condition checking if the current value is a true boolean
1711
- * @return {@link dh.FilterCondition}
1259
+ * @deprecated
1712
1260
  */
1713
- isTrue():FilterCondition;
1261
+ static readonly SKIP:string;
1714
1262
  /**
1715
- * a filter condition checking if the current value is a false boolean
1716
- * @return {@link dh.FilterCondition}
1263
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1717
1264
  */
1718
- isFalse():FilterCondition;
1265
+ showTotalsByDefault:boolean;
1719
1266
  /**
1720
- * a filter condition checking if the current value is a null value
1721
- * @return {@link dh.FilterCondition}
1267
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1722
1268
  */
1723
- isNull():FilterCondition;
1269
+ showGrandTotalsByDefault:boolean;
1724
1270
  /**
1725
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1726
- * functions that can be invoked on a String:
1727
- * <ul>
1728
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1729
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1730
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1731
- * regular expression</li>
1732
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1733
- * <p>
1734
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1735
- * </p>
1736
- * </li>
1737
- * </ul>
1738
- * @param method -
1739
- * @param args -
1740
- * @return
1271
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1741
1272
  */
1742
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
1743
- toString():string;
1273
+ defaultOperation:AggregationOperationType;
1744
1274
  /**
1745
- * Constructs a string for the filter API from the given parameter.
1746
- * @param input -
1747
- * @return
1275
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1276
+ * Table. If a column is omitted, the defaultOperation is used.
1748
1277
  */
1749
- static ofString(input:any):FilterValue;
1278
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
1750
1279
  /**
1751
- * Constructs a boolean for the filter API from the given parameter.
1752
- * @param b -
1753
- * @return
1280
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1281
+ * these columns. See also `Table.selectDistinct`.
1754
1282
  */
1755
- static ofBoolean(b:boolean):FilterValue;
1283
+ groupBy:Array<string>;
1284
+
1285
+ constructor();
1286
+
1287
+ toString():string;
1288
+ }
1289
+
1290
+ /**
1291
+ * Deprecated for use in Deephaven Core.
1292
+ * @deprecated
1293
+ */
1294
+ export class Client {
1295
+ static readonly EVENT_REQUEST_FAILED:string;
1296
+ static readonly EVENT_REQUEST_STARTED:string;
1297
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1298
+
1299
+ constructor();
1756
1300
  }
1757
1301
 
1758
1302
  /**
@@ -1843,58 +1387,178 @@ export namespace dh {
1843
1387
  }
1844
1388
 
1845
1389
  /**
1846
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1390
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1391
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1392
+ * instance.
1847
1393
  */
1848
- export class BigDecimalWrapper {
1394
+ export class FilterCondition {
1849
1395
  protected constructor();
1850
1396
 
1851
- static ofString(value:string):BigDecimalWrapper;
1852
- asNumber():number;
1853
- valueOf():string;
1397
+ /**
1398
+ * the opposite of this condition
1399
+ * @return FilterCondition
1400
+ */
1401
+ not():FilterCondition;
1402
+ /**
1403
+ * a condition representing the current condition logically ANDed with the other parameters
1404
+ * @param filters -
1405
+ * @return FilterCondition
1406
+ */
1407
+ and(...filters:FilterCondition[]):FilterCondition;
1408
+ /**
1409
+ * a condition representing the current condition logically ORed with the other parameters
1410
+ * @param filters -
1411
+ * @return FilterCondition.
1412
+ */
1413
+ or(...filters:FilterCondition[]):FilterCondition;
1414
+ /**
1415
+ * a string suitable for debugging showing the details of this condition.
1416
+ * @return String.
1417
+ */
1854
1418
  toString():string;
1855
- equals(o:object):boolean;
1856
- hashCode():number;
1419
+ get columns():Array<Column>;
1420
+ /**
1421
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1422
+ * functions:
1423
+ * <ul>
1424
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1425
+ * than the third</li>
1426
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1427
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1428
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1429
+ * "not a number"</i></li>
1430
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1431
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1432
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1433
+ * expression</li>
1434
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1435
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1436
+ * <p>
1437
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1438
+ * method should be used in other cases
1439
+ * </p>
1440
+ * </li>
1441
+ * </ul>
1442
+ * @param function -
1443
+ * @param args -
1444
+ * @return dh.FilterCondition
1445
+ */
1446
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1447
+ /**
1448
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
1449
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1450
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1451
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1452
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1453
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1454
+ * {@link dh.Column.filter}).
1455
+ * @param value -
1456
+ * @param columns -
1457
+ * @return dh.FilterCondition
1458
+ */
1459
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1460
+ }
1461
+
1462
+ export class CoreClient implements HasEventHandling {
1463
+ static readonly EVENT_CONNECT:string;
1464
+ static readonly EVENT_DISCONNECT:string;
1465
+ static readonly EVENT_RECONNECT:string;
1466
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1467
+ static readonly EVENT_REQUEST_FAILED:string;
1468
+ static readonly EVENT_REQUEST_STARTED:string;
1469
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1470
+ /**
1471
+ * @deprecated
1472
+ */
1473
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1474
+ static readonly LOGIN_TYPE_PASSWORD:string;
1475
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
1476
+
1477
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
1478
+
1479
+ running():Promise<CoreClient>;
1480
+ getServerUrl():string;
1481
+ getAuthConfigValues():Promise<string[][]>;
1482
+ login(credentials:LoginCredentials):Promise<void>;
1483
+ relogin(token:RefreshToken):Promise<void>;
1484
+ onConnected(timeoutInMillis?:number):Promise<void>;
1485
+ getServerConfigValues():Promise<string[][]>;
1486
+ getStorageService():dh.storage.StorageService;
1487
+ getAsIdeConnection():Promise<IdeConnection>;
1488
+ disconnect():void;
1489
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1490
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1491
+ hasListeners(name:string):boolean;
1492
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1493
+ }
1494
+
1495
+ export class LoginCredentials {
1496
+ type?:string|null;
1497
+ username?:string|null;
1498
+ token?:string|null;
1499
+
1500
+ constructor();
1857
1501
  }
1858
1502
 
1859
1503
  /**
1860
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
1861
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
1862
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
1863
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
1864
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
1504
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1505
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1506
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1507
+ */
1508
+ export class RangeSet {
1509
+ protected constructor();
1510
+
1511
+ static ofRange(first:number, last:number):RangeSet;
1512
+ static ofItems(rows:number[]):RangeSet;
1513
+ static ofRanges(ranges:RangeSet[]):RangeSet;
1514
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1515
+ /**
1516
+ * a new iterator over all indexes in this collection.
1517
+ * @return Iterator of {@link dh.LongWrapper}
1518
+ */
1519
+ iterator():Iterator<LongWrapper>;
1520
+ /**
1521
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1522
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1523
+ * property each time through a loop).
1524
+ * @return double
1525
+ */
1526
+ get size():number;
1527
+ }
1528
+
1529
+ /**
1530
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1531
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1532
+ * <p>
1533
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1534
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1535
+ * forward data to it.
1536
+ * <p>
1537
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1538
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1539
+ * viewports to make it less expensive to compute for large tables.
1865
1540
  */
1866
- export class TableViewportSubscription implements HasEventHandling {
1541
+ export class TableSubscription implements HasEventHandling {
1867
1542
  protected constructor();
1868
1543
 
1544
+ static createTableSubscription(options:SubscriptionOptions, existingTable:Table):TableSubscription;
1869
1545
  /**
1870
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
1871
- * @param firstRow -
1872
- * @param lastRow -
1873
- * @param columns -
1874
- * @param updateIntervalMs -
1875
- * @deprecated use {@link #update(Object)} instead
1546
+ * Updates the subscription to use the given columns and update interval.
1547
+ * @param columns - the new columns to subscribe to
1548
+ * @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
1876
1549
  */
1877
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
1550
+ changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
1878
1551
  /**
1879
1552
  * Update the options for this viewport subscription. This cannot alter the update interval or preview options.
1880
1553
  * @param options - the subscription options
1881
1554
  */
1882
- update(options:ViewportSubscriptionOptions):void;
1555
+ update(options:SubscriptionOptions):void;
1556
+ get columns():Array<Column>;
1883
1557
  /**
1884
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
1558
+ * Stops the subscription on the server.
1885
1559
  */
1886
1560
  close():void;
1887
1561
  /**
1888
- * Gets the data currently visible in this viewport
1889
- * @return Promise of {@link dh.TableData}.
1890
- */
1891
- getViewportData():Promise<ViewportData>;
1892
- /**
1893
- *
1894
- * @deprecated Use {@link JsTable#createSnapshot(Object)} instead
1895
- */
1896
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
1897
- /**
1898
1562
  * Listen for events on this object.
1899
1563
  * @param name - the name of the event to listen for
1900
1564
  * @param callback - a function to call when the event occurs
@@ -1914,12 +1578,56 @@ export namespace dh {
1914
1578
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1915
1579
  }
1916
1580
 
1917
- export class IdeSession implements HasEventHandling {
1918
- static readonly EVENT_COMMANDSTARTED:string;
1919
- static readonly EVENT_REQUEST_FAILED:string;
1581
+ /**
1582
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1583
+ * roll-up table.
1584
+ */
1585
+ export class RollupConfig {
1586
+ /**
1587
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1588
+ */
1589
+ groupingColumns:Array<String>;
1590
+ /**
1591
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1592
+ * roll-up table.
1593
+ */
1594
+ aggregations:{ [key: string]: Array<string>; };
1595
+ /**
1596
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1597
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1598
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1599
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1600
+ */
1601
+ includeConstituents:boolean;
1602
+ includeOriginalColumns?:boolean|null;
1603
+ /**
1604
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1605
+ */
1606
+ includeDescriptions:boolean;
1607
+
1608
+ constructor();
1609
+ }
1610
+
1611
+ /**
1612
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1613
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
1614
+ */
1615
+ export class IdeConnection implements HasEventHandling {
1616
+ /**
1617
+ * @deprecated
1618
+ */
1619
+ static readonly HACK_CONNECTION_FAILURE:string;
1620
+ static readonly EVENT_DISCONNECT:string;
1621
+ static readonly EVENT_RECONNECT:string;
1622
+ static readonly EVENT_SHUTDOWN:string;
1920
1623
 
1921
1624
  protected constructor();
1922
1625
 
1626
+ /**
1627
+ * Closes the current connection, releasing any resources on the server or client.
1628
+ */
1629
+ close():void;
1630
+ running():Promise<IdeConnection>;
1923
1631
  /**
1924
1632
  * Load the named table, with columns and size information already fully populated.
1925
1633
  * @param name - the name of the table to fetch
@@ -1928,32 +1636,10 @@ export namespace dh {
1928
1636
  * @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
1929
1637
  */
1930
1638
  getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
1931
- /**
1932
- * Load the named Figure, including its tables and tablemaps as needed.
1933
- * @param name -
1934
- * @return promise of dh.plot.Figure
1935
- */
1936
- getFigure(name:string):Promise<dh.plot.Figure>;
1937
- /**
1938
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
1939
- * size is presently not available until the viewport is first set.
1940
- * @param name -
1941
- * @return {@link Promise} of {@link dh.TreeTable}
1942
- */
1943
- getTreeTable(name:string):Promise<TreeTable>;
1944
- getHierarchicalTable(name:string):Promise<TreeTable>;
1945
- getPartitionedTable(name:string):Promise<PartitionedTable>;
1946
1639
  getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1947
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1948
- /**
1949
- * Merges the given tables into a single table. Assumes all tables have the same structure.
1950
- * @param tables -
1951
- * @return {@link Promise} of {@link dh.Table}
1952
- */
1953
- mergeTables(tables:Table[]):Promise<Table>;
1954
- bindTableToVariable(table:Table, name:string):Promise<void>;
1640
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1955
1641
  /**
1956
- * Makes the `object` available to another user or another client on this same server which knows the value of
1642
+ * Makes an `object` available to another user or another client on this same server which knows the value of
1957
1643
  * the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
1958
1644
  * which knows this value can read the same object.
1959
1645
  * <p>
@@ -1982,298 +1668,522 @@ export namespace dh {
1982
1668
  * @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
1983
1669
  */
1984
1670
  getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
1985
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1986
- close():void;
1987
- runCode(code:string):Promise<dh.ide.CommandResult>;
1988
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1989
- openDocument(params:object):void;
1990
- changeDocument(params:object):void;
1991
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
1992
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
1993
- getHover(params:object):Promise<dh.lsp.Hover>;
1994
- closeDocument(params:object):void;
1671
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1995
1672
  /**
1996
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
1997
- * values will be null.
1998
- * @param size -
1673
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
1674
+ * @param tables -
1999
1675
  * @return {@link Promise} of {@link dh.Table}
2000
1676
  */
2001
- emptyTable(size:number):Promise<Table>;
1677
+ mergeTables(tables:Table[]):Promise<Table>;
2002
1678
  /**
2003
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2004
- * the table will be populated with the interval from the specified date until now.
2005
- * @param periodNanos -
2006
- * @param startTime -
2007
- * @return {@link Promise} of {@link dh.Table}
1679
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1680
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1681
+ * log messages as are presently available.
1682
+ * @param callback -
1683
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1684
+ */
1685
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1686
+ startSession(type:string):Promise<IdeSession>;
1687
+ getConsoleTypes():Promise<Array<string>>;
1688
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1689
+ /**
1690
+ * Listen for events on this object.
1691
+ * @param name - the name of the event to listen for
1692
+ * @param callback - a function to call when the event occurs
1693
+ * @return Returns a cleanup function.
1694
+ * @typeParam T - the type of the data that the event will provide
2008
1695
  */
2009
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2010
1696
  addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2011
1697
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2012
1698
  hasListeners(name:string):boolean;
1699
+ /**
1700
+ * Removes an event listener added to this table.
1701
+ * @param name -
1702
+ * @param callback -
1703
+ * @return
1704
+ * @typeParam T -
1705
+ */
2013
1706
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2014
1707
  }
2015
1708
 
2016
- /**
2017
- * Event fired when a command is issued from the client.
2018
- */
2019
- export class CommandInfo {
2020
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1709
+ export class QueryInfo {
1710
+ static readonly EVENT_TABLE_OPENED:string;
1711
+ static readonly EVENT_DISCONNECT:string;
1712
+ static readonly EVENT_RECONNECT:string;
1713
+ static readonly EVENT_CONNECT:string;
2021
1714
 
2022
- get result():Promise<dh.ide.CommandResult>;
2023
- get code():string;
1715
+ protected constructor();
2024
1716
  }
2025
1717
 
2026
- export class CustomColumn {
2027
- static readonly TYPE_FORMAT_COLOR:string;
2028
- static readonly TYPE_FORMAT_NUMBER:string;
2029
- static readonly TYPE_FORMAT_DATE:string;
2030
- static readonly TYPE_NEW:string;
2031
-
1718
+ /**
1719
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1720
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1721
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1722
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1723
+ * instance.
1724
+ */
1725
+ export class FilterValue {
2032
1726
  protected constructor();
2033
1727
 
2034
- valueOf():string;
2035
- toString():string;
2036
- static from(columnInfo:string):CustomColumn;
2037
1728
  /**
2038
- * The expression to evaluate this custom column.
2039
- * @return String
1729
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1730
+ * {@link TableData.get} for DateTime values. To create
1731
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1732
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1733
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1734
+ * @param input - the number to wrap as a FilterValue
1735
+ * @return an immutable FilterValue that can be built into a filter
2040
1736
  */
2041
- get expression():string;
1737
+ static ofNumber(input:LongWrapper|number):FilterValue;
1738
+ /**
1739
+ * a filter condition checking if the current value is equal to the given parameter
1740
+ * @param term -
1741
+ * @return {@link dh.FilterCondition}
1742
+ */
1743
+ eq(term:FilterValue):FilterCondition;
1744
+ /**
1745
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1746
+ * vs lower case
1747
+ * @param term -
1748
+ * @return {@link dh.FilterCondition}
1749
+ */
1750
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1751
+ /**
1752
+ * a filter condition checking if the current value is not equal to the given parameter
1753
+ * @param term -
1754
+ * @return {@link dh.FilterCondition}
1755
+ */
1756
+ notEq(term:FilterValue):FilterCondition;
1757
+ /**
1758
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1759
+ * upper vs lower case
1760
+ * @param term -
1761
+ * @return {@link dh.FilterCondition}
1762
+ */
1763
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1764
+ /**
1765
+ * a filter condition checking if the current value is greater than the given parameter
1766
+ * @param term -
1767
+ * @return {@link dh.FilterCondition}
1768
+ */
1769
+ greaterThan(term:FilterValue):FilterCondition;
1770
+ /**
1771
+ * a filter condition checking if the current value is less than the given parameter
1772
+ * @param term -
1773
+ * @return {@link dh.FilterCondition}
1774
+ */
1775
+ lessThan(term:FilterValue):FilterCondition;
1776
+ /**
1777
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1778
+ * @param term -
1779
+ * @return {@link dh.FilterCondition}
1780
+ */
1781
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1782
+ /**
1783
+ * a filter condition checking if the current value is less than or equal to the given parameter
1784
+ * @param term -
1785
+ * @return {@link dh.FilterCondition}
1786
+ */
1787
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1788
+ /**
1789
+ * a filter condition checking if the current value is in the given set of values
1790
+ * @param terms -
1791
+ * @return {@link dh.FilterCondition}
1792
+ */
1793
+ in(terms:FilterValue[]):FilterCondition;
1794
+ /**
1795
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1796
+ * lower case
1797
+ * @param terms -
1798
+ * @return {@link dh.FilterCondition}
1799
+ */
1800
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
2042
1801
  /**
2043
- * The name of the column to use.
2044
- * @return String
1802
+ * a filter condition checking that the current value is not in the given set of values
1803
+ * @param terms -
1804
+ * @return {@link dh.FilterCondition}
2045
1805
  */
2046
- get name():string;
1806
+ notIn(terms:FilterValue[]):FilterCondition;
2047
1807
  /**
2048
- * The options for this custom column.
2049
- * @return CustomColumOptions
1808
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1809
+ * upper vs lower case
1810
+ * @param terms -
1811
+ * @return {@link dh.FilterCondition}
2050
1812
  */
2051
- get options():CustomColumnOptions;
1813
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
2052
1814
  /**
2053
- * Type of custom column. One of
2054
- *
2055
- * <ul>
2056
- * <li>FORMAT_COLOR</li>
2057
- * <li>FORMAT_NUMBER</li>
2058
- * <li>FORMAT_DATE</li>
2059
- * <li>NEW</li>
2060
- * </ul>
2061
- * @return String
1815
+ * a filter condition checking if the given value contains the given string value
1816
+ * @param term -
1817
+ * @return {@link dh.FilterCondition}
2062
1818
  */
2063
- get type():string;
2064
- }
2065
-
2066
- /**
2067
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
2068
- * column.
2069
- */
2070
- export class Column {
1819
+ contains(term:FilterValue):FilterCondition;
2071
1820
  /**
2072
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
2073
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
2074
- * @return String
1821
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1822
+ * lower case
1823
+ * @param term -
1824
+ * @return {@link dh.FilterCondition}
2075
1825
  */
2076
- readonly constituentType?:string|null;
2077
- readonly description?:string|null;
2078
-
2079
- protected constructor();
2080
-
1826
+ containsIgnoreCase(term:FilterValue):FilterCondition;
2081
1827
  /**
2082
- * the value for this column in the given row. Type will be consistent with the type of the Column.
2083
- * @param row -
2084
- * @return Any
1828
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1829
+ * use Java regex syntax
1830
+ * @param pattern -
1831
+ * @return {@link dh.FilterCondition}
2085
1832
  */
2086
- get(row:Row):any;
2087
- getFormat(row:Row):Format;
1833
+ matches(pattern:FilterValue):FilterCondition;
2088
1834
  /**
2089
- * Creates a sort builder object, to be used when sorting by this column.
2090
- * @return {@link dh.Sort}
1835
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1836
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1837
+ * @param pattern -
1838
+ * @return {@link dh.FilterCondition}
2091
1839
  */
2092
- sort():Sort;
1840
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
2093
1841
  /**
2094
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
2095
- * operation, or as a builder to create a filter operation.
2096
- * @return {@link dh.FilterValue}
1842
+ * a filter condition checking if the current value is a true boolean
1843
+ * @return {@link dh.FilterCondition}
2097
1844
  */
2098
- filter():FilterValue;
1845
+ isTrue():FilterCondition;
2099
1846
  /**
2100
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
2101
- * @param expression -
2102
- * @return {@link dh.CustomColumn}
1847
+ * a filter condition checking if the current value is a false boolean
1848
+ * @return {@link dh.FilterCondition}
2103
1849
  */
2104
- formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1850
+ isFalse():FilterCondition;
2105
1851
  /**
2106
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2107
- * @param expression -
2108
- * @return {@link dh.CustomColumn}
1852
+ * a filter condition checking if the current value is a null value
1853
+ * @return {@link dh.FilterCondition}
2109
1854
  */
2110
- formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1855
+ isNull():FilterCondition;
2111
1856
  /**
2112
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2113
- * @param expression -
2114
- * @return {@link dh.CustomColumn}
1857
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1858
+ * functions that can be invoked on a String:
1859
+ * <ul>
1860
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1861
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1862
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1863
+ * regular expression</li>
1864
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1865
+ * <p>
1866
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1867
+ * </p>
1868
+ * </li>
1869
+ * </ul>
1870
+ * @param method -
1871
+ * @param args -
1872
+ * @return
2115
1873
  */
2116
- formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1874
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
2117
1875
  toString():string;
2118
1876
  /**
2119
- * Label for this column.
2120
- * @return String
1877
+ * Constructs a string for the filter API from the given parameter.
1878
+ * @param input -
1879
+ * @return
2121
1880
  */
2122
- get name():string;
1881
+ static ofString(input:any):FilterValue;
2123
1882
  /**
2124
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
2125
- * {@link Table.uncoalesced}.
2126
- * @return true if the column is a partition column
1883
+ * Constructs a boolean for the filter API from the given parameter.
1884
+ * @param b -
1885
+ * @return
2127
1886
  */
2128
- get isPartitionColumn():boolean;
1887
+ static ofBoolean(b:boolean):FilterValue;
1888
+ }
1889
+
1890
+ /**
1891
+ * A Widget represents a server side object that sends one or more responses to the client. The client can then
1892
+ * interpret these responses to see what to render, or how to respond.
1893
+ * <p>
1894
+ * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1895
+ * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1896
+ * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1897
+ * object type, the client code that handles the payloads is expected to know what to expect. See
1898
+ * {@link dh.WidgetMessageDetails} for more information.
1899
+ * <p>
1900
+ * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1901
+ * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1902
+ * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1903
+ * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1904
+ * remote messages are still pending - it is up to implementations of plugins to handle this case.
1905
+ * <p>
1906
+ * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1907
+ * What it does handle however, is allowing those messages to include references to server-side objects with those
1908
+ * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1909
+ * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1910
+ * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1911
+ * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1912
+ * entirely to the plugin. Messages will arrive in the order they were sent.
1913
+ * <p>
1914
+ * This can suggest several patterns for how plugins operate:
1915
+ * <ul>
1916
+ * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1917
+ * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1918
+ * `pandas.DataFrame` will result in a widget that only contains a static
1919
+ * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1920
+ * provided to the JS API consumer.</li>
1921
+ * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1922
+ * which provided them. One concrete example of this could have been
1923
+ * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1924
+ * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1925
+ * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1926
+ * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1927
+ * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1928
+ * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1929
+ * an internal table instance.</li>
1930
+ * </ul>
1931
+ *
1932
+ * Handling server objects in messages also has more than one potential pattern that can be used:
1933
+ * <ul>
1934
+ * <li>One object per message - the message clearly is about that object, no other details required.</li>
1935
+ * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1936
+ * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1937
+ * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1938
+ * be used, which columns should be mapped to each axis.</li>
1939
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1940
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1941
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1942
+ * without the server somehow signaling that it will never reference that export again.</li>
1943
+ * </ul>
1944
+ */
1945
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
1946
+ static readonly EVENT_MESSAGE:string;
1947
+ static readonly EVENT_CLOSE:string;
1948
+
1949
+ protected constructor();
1950
+
2129
1951
  /**
2130
- *
2131
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
2132
- * @return int
1952
+ * Ends the client connection to the server.
2133
1953
  */
2134
- get index():number;
2135
- get isSortable():boolean;
1954
+ close():void;
1955
+ getDataAsBase64():string;
1956
+ getDataAsU8():Uint8Array;
1957
+ getDataAsString():string;
2136
1958
  /**
2137
- * Type of the row data that can be found in this column.
2138
- * @return String
1959
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1960
+ * @param msg - string/buffer/view instance that represents data to send
1961
+ * @param references - an array of objects that can be safely sent to the server
2139
1962
  */
2140
- get type():string;
1963
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1964
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1965
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1966
+ hasListeners(name:string):boolean;
1967
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2141
1968
  /**
2142
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
2143
- * table using <b>applyCustomColumns</b> with the parameters specified.
2144
- * @param expression -
2145
- * @param options -
2146
- * @return {@link dh.CustomColumn}
1969
+ *
1970
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1971
+ * them when finished using them.
2147
1972
  */
2148
- static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1973
+ get exportedObjects():WidgetExportedObject[];
2149
1974
  /**
2150
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2151
- * @param name -
2152
- * @param expression -
2153
- * @param options -
2154
- * @return {@link dh.CustomColumn}
1975
+ *
1976
+ * @return the type of this widget
2155
1977
  */
2156
- static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
1978
+ get type():string;
2157
1979
  }
2158
1980
 
2159
1981
  /**
2160
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
2161
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
2162
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
2163
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
2164
- * of <b>TotalsTableConfig</b> will be supplied.
2165
- *
2166
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
2167
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
2168
- * expected formats.
1982
+ * Options for custom columns.
2169
1983
  */
2170
- export class TotalsTableConfig {
1984
+ export class CustomColumnOptions {
2171
1985
  /**
2172
- * @deprecated
1986
+ * When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
1987
+ * nodes.
2173
1988
  */
2174
- static readonly COUNT:string;
1989
+ rollupNodeType?:RollupNodeTypeType|null;
1990
+
1991
+ constructor();
1992
+ }
1993
+
1994
+ /**
1995
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1996
+ * the server to get each Table. All tables will have the same structure.
1997
+ */
1998
+ export class PartitionedTable implements HasEventHandling {
2175
1999
  /**
2176
- * @deprecated
2000
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2177
2001
  */
2178
- static readonly MIN:string;
2002
+ static readonly EVENT_KEYADDED:string;
2179
2003
  /**
2180
- * @deprecated
2004
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2181
2005
  */
2182
- static readonly MAX:string;
2006
+ static readonly EVENT_DISCONNECT:string;
2183
2007
  /**
2184
- * @deprecated
2008
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2185
2009
  */
2186
- static readonly SUM:string;
2010
+ static readonly EVENT_RECONNECT:string;
2187
2011
  /**
2188
- * @deprecated
2012
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2189
2013
  */
2190
- static readonly ABS_SUM:string;
2014
+ static readonly EVENT_RECONNECTFAILED:string;
2015
+
2016
+ protected constructor();
2017
+
2191
2018
  /**
2192
- * @deprecated
2019
+ * Fetch the table with the given key. If the key does not exist, returns `null`.
2020
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
2021
+ * @return Promise of dh.Table, or `null` if the key does not exist.
2193
2022
  */
2194
- static readonly VAR:string;
2023
+ getTable(key:object):Promise<Table|undefined|null>;
2195
2024
  /**
2196
- * @deprecated
2025
+ * Open a new table that is the result of merging all constituent tables. See
2026
+ * {@link io.deephaven.engine.table.PartitionedTable.merge} for details.
2027
+ * @return A merged representation of the constituent tables.
2197
2028
  */
2198
- static readonly AVG:string;
2029
+ getMergedTable():Promise<Table>;
2199
2030
  /**
2200
- * @deprecated
2031
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
2032
+ * for <b>keyadded</b> will ensure no keys are missed.
2033
+ * @return Set of Object
2201
2034
  */
2202
- static readonly STD:string;
2035
+ getKeys():Set<object>;
2203
2036
  /**
2037
+ * Fetch a table containing all the valid keys of the partitioned table.
2038
+ * @return Promise of a Table
2204
2039
  * @deprecated
2205
2040
  */
2206
- static readonly FIRST:string;
2041
+ getKeyTable():Promise<Table>;
2207
2042
  /**
2208
- * @deprecated
2043
+ * Fetch the underlying base table of the partitioned table.
2044
+ * @return Promise of a Table
2209
2045
  */
2210
- static readonly LAST:string;
2046
+ getBaseTable():Promise<Table>;
2211
2047
  /**
2212
- * @deprecated
2048
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
2049
+ * will not affect tables in use.
2213
2050
  */
2214
- static readonly SKIP:string;
2051
+ close():void;
2215
2052
  /**
2216
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
2053
+ * The count of known keys.
2054
+ * @return int
2217
2055
  */
2218
- showTotalsByDefault:boolean;
2056
+ get size():number;
2219
2057
  /**
2220
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
2058
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2059
+ * non-key columns.
2060
+ * @return Array of Column
2221
2061
  */
2222
- showGrandTotalsByDefault:boolean;
2062
+ get columns():Column[];
2223
2063
  /**
2224
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
2064
+ * An array of all the key columns that the tables are partitioned by.
2065
+ * @return Array of Column
2225
2066
  */
2226
- defaultOperation:AggregationOperationType;
2067
+ get keyColumns():Column[];
2227
2068
  /**
2228
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
2229
- * Table. If a column is omitted, the defaultOperation is used.
2069
+ * Listen for events on this object.
2070
+ * @param name - the name of the event to listen for
2071
+ * @param callback - a function to call when the event occurs
2072
+ * @return Returns a cleanup function.
2073
+ * @typeParam T - the type of the data that the event will provide
2230
2074
  */
2231
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
2075
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2076
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2077
+ hasListeners(name:string):boolean;
2232
2078
  /**
2233
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
2234
- * these columns. See also `Table.selectDistinct`.
2079
+ * Removes an event listener added to this table.
2080
+ * @param name -
2081
+ * @param callback -
2082
+ * @return
2083
+ * @typeParam T -
2235
2084
  */
2236
- groupBy:Array<string>;
2085
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2086
+ }
2237
2087
 
2238
- constructor();
2088
+ export class DateWrapper extends LongWrapper {
2089
+ protected constructor();
2239
2090
 
2240
- toString():string;
2091
+ static ofJsDate(date:Date):DateWrapper;
2092
+ asDate():Date;
2241
2093
  }
2242
2094
 
2243
- /**
2244
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
2245
- */
2246
- export class BigIntegerWrapper {
2095
+ export class LongWrapper {
2247
2096
  protected constructor();
2248
2097
 
2249
- static ofString(str:string):BigIntegerWrapper;
2098
+ static ofString(str:string):LongWrapper;
2250
2099
  asNumber():number;
2251
2100
  valueOf():string;
2252
2101
  toString():string;
2253
- equals(o:object):boolean;
2254
- hashCode():number;
2255
2102
  }
2256
2103
 
2257
2104
  /**
2258
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
2259
- * some options, JS applications can run code on the server, and interact with available exportable objects.
2105
+ * Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
2260
2106
  */
2261
- export class IdeConnection implements HasEventHandling {
2107
+ export class ConnectOptions {
2262
2108
  /**
2263
- * @deprecated
2109
+ * Optional map of http header names and values to send to the server with each request.
2264
2110
  */
2265
- static readonly HACK_CONNECTION_FAILURE:string;
2266
- static readonly EVENT_DISCONNECT:string;
2267
- static readonly EVENT_RECONNECT:string;
2268
- static readonly EVENT_SHUTDOWN:string;
2111
+ headers?:{ [key: string]: string; }|null;
2112
+ /**
2113
+ * True to enable debug logging. At this time, only enables logging for gRPC calls.
2114
+ */
2115
+ debug?:boolean|null;
2116
+ /**
2117
+ * Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
2118
+ * of `fetch`. Ignored if {@link dh.transportFactory} is set.
2119
+ * <p>
2120
+ * Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
2121
+ */
2122
+ useWebsockets?:boolean|null;
2123
+ /**
2124
+ * The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
2125
+ * {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
2126
+ * <p>
2127
+ * Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
2128
+ * `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
2129
+ * https, it will use fetch, otherwise it will use websockets.
2130
+ */
2131
+ transportFactory?:dh.grpc.GrpcTransportFactory|null;
2132
+
2133
+ constructor();
2134
+ }
2135
+
2136
+ /**
2137
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2138
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2139
+ * methods return a new Sort instance.
2140
+ */
2141
+ export class Sort {
2142
+ static readonly ASCENDING:string;
2143
+ static readonly DESCENDING:string;
2144
+ static readonly REVERSE:string;
2269
2145
 
2270
2146
  protected constructor();
2271
2147
 
2272
2148
  /**
2273
- * Closes the current connection, releasing any resources on the server or client.
2149
+ * Builds a Sort instance to sort values in ascending order.
2150
+ * @return {@link dh.Sort}
2274
2151
  */
2275
- close():void;
2276
- running():Promise<IdeConnection>;
2152
+ asc():Sort;
2153
+ /**
2154
+ * Builds a Sort instance to sort values in descending order.
2155
+ * @return {@link dh.Sort}
2156
+ */
2157
+ desc():Sort;
2158
+ /**
2159
+ * Builds a Sort instance which takes the absolute value before applying order.
2160
+ * @return {@link dh.Sort}
2161
+ */
2162
+ abs():Sort;
2163
+ toString():string;
2164
+ /**
2165
+ * True if the absolute value of the column should be used when sorting; defaults to false.
2166
+ * @return boolean
2167
+ */
2168
+ get isAbs():boolean;
2169
+ /**
2170
+ * The column which is sorted.
2171
+ * @return {@link dh.Column}
2172
+ */
2173
+ get column():Column;
2174
+ /**
2175
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2176
+ * @return String
2177
+ */
2178
+ get direction():string;
2179
+ }
2180
+
2181
+ export class IdeSession implements HasEventHandling {
2182
+ static readonly EVENT_COMMANDSTARTED:string;
2183
+ static readonly EVENT_REQUEST_FAILED:string;
2184
+
2185
+ protected constructor();
2186
+
2277
2187
  /**
2278
2188
  * Load the named table, with columns and size information already fully populated.
2279
2189
  * @param name - the name of the table to fetch
@@ -2282,10 +2192,32 @@ export namespace dh {
2282
2192
  * @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
2283
2193
  */
2284
2194
  getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2195
+ /**
2196
+ * Load the named Figure, including its tables and tablemaps as needed.
2197
+ * @param name -
2198
+ * @return promise of dh.plot.Figure
2199
+ */
2200
+ getFigure(name:string):Promise<dh.plot.Figure>;
2201
+ /**
2202
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2203
+ * size is presently not available until the viewport is first set.
2204
+ * @param name -
2205
+ * @return {@link Promise} of {@link dh.TreeTable}
2206
+ */
2207
+ getTreeTable(name:string):Promise<TreeTable>;
2208
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2209
+ getPartitionedTable(name:string):Promise<PartitionedTable>;
2285
2210
  getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2286
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2211
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2287
2212
  /**
2288
- * Makes an `object` available to another user or another client on this same server which knows the value of
2213
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2214
+ * @param tables -
2215
+ * @return {@link Promise} of {@link dh.Table}
2216
+ */
2217
+ mergeTables(tables:Table[]):Promise<Table>;
2218
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2219
+ /**
2220
+ * Makes the `object` available to another user or another client on this same server which knows the value of
2289
2221
  * the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
2290
2222
  * which knows this value can read the same object.
2291
2223
  * <p>
@@ -2314,55 +2246,99 @@ export namespace dh {
2314
2246
  * @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
2315
2247
  */
2316
2248
  getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
2317
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2249
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2250
+ close():void;
2251
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2252
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2253
+ openDocument(params:object):void;
2254
+ changeDocument(params:object):void;
2255
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2256
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2257
+ getHover(params:object):Promise<dh.lsp.Hover>;
2258
+ closeDocument(params:object):void;
2259
+ /**
2260
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2261
+ * values will be null.
2262
+ * @param size -
2263
+ * @return {@link Promise} of {@link dh.Table}
2264
+ */
2265
+ emptyTable(size:number):Promise<Table>;
2266
+ /**
2267
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2268
+ * the table will be populated with the interval from the specified date until now.
2269
+ * @param periodNanos -
2270
+ * @param startTime -
2271
+ * @return {@link Promise} of {@link dh.Table}
2272
+ */
2273
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2274
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2275
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2276
+ hasListeners(name:string):boolean;
2277
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2278
+ }
2279
+
2280
+ /**
2281
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
2282
+ */
2283
+ export class BigDecimalWrapper {
2284
+ protected constructor();
2285
+
2286
+ static ofString(value:string):BigDecimalWrapper;
2287
+ asNumber():number;
2288
+ valueOf():string;
2289
+ toString():string;
2290
+ equals(o:object):boolean;
2291
+ hashCode():number;
2292
+ }
2293
+
2294
+ export class CustomColumn {
2295
+ static readonly TYPE_FORMAT_COLOR:string;
2296
+ static readonly TYPE_FORMAT_NUMBER:string;
2297
+ static readonly TYPE_FORMAT_DATE:string;
2298
+ static readonly TYPE_NEW:string;
2299
+
2300
+ protected constructor();
2301
+
2302
+ valueOf():string;
2303
+ toString():string;
2304
+ static from(columnInfo:string):CustomColumn;
2318
2305
  /**
2319
- * Merges the given tables into a single table. Assumes all tables have the same structure.
2320
- * @param tables -
2321
- * @return {@link Promise} of {@link dh.Table}
2306
+ * The expression to evaluate this custom column.
2307
+ * @return String
2322
2308
  */
2323
- mergeTables(tables:Table[]):Promise<Table>;
2309
+ get expression():string;
2324
2310
  /**
2325
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
2326
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
2327
- * log messages as are presently available.
2328
- * @param callback -
2329
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
2311
+ * The name of the column to use.
2312
+ * @return String
2330
2313
  */
2331
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2332
- startSession(type:string):Promise<IdeSession>;
2333
- getConsoleTypes():Promise<Array<string>>;
2334
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
2314
+ get name():string;
2335
2315
  /**
2336
- * Listen for events on this object.
2337
- * @param name - the name of the event to listen for
2338
- * @param callback - a function to call when the event occurs
2339
- * @return Returns a cleanup function.
2340
- * @typeParam T - the type of the data that the event will provide
2316
+ * The options for this custom column.
2317
+ * @return CustomColumOptions
2341
2318
  */
2342
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2343
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2344
- hasListeners(name:string):boolean;
2319
+ get options():CustomColumnOptions;
2345
2320
  /**
2346
- * Removes an event listener added to this table.
2347
- * @param name -
2348
- * @param callback -
2349
- * @return
2350
- * @typeParam T -
2321
+ * Type of custom column. One of
2322
+ *
2323
+ * <ul>
2324
+ * <li>FORMAT_COLOR</li>
2325
+ * <li>FORMAT_NUMBER</li>
2326
+ * <li>FORMAT_DATE</li>
2327
+ * <li>NEW</li>
2328
+ * </ul>
2329
+ * @return String
2351
2330
  */
2352
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2331
+ get type():string;
2353
2332
  }
2354
2333
 
2355
2334
  /**
2356
- * Options for custom columns.
2335
+ * Event fired when a command is issued from the client.
2357
2336
  */
2358
- export class CustomColumnOptions {
2359
- /**
2360
- * When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
2361
- * nodes.
2362
- */
2363
- rollupNodeType?:RollupNodeTypeType|null;
2337
+ export class CommandInfo {
2338
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
2364
2339
 
2365
- constructor();
2340
+ get result():Promise<dh.ide.CommandResult>;
2341
+ get code():string;
2366
2342
  }
2367
2343
 
2368
2344
  /**
@@ -2751,34 +2727,45 @@ export namespace dh {
2751
2727
  static reverse():Sort;
2752
2728
  }
2753
2729
 
2730
+ /**
2731
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
2732
+ *
2733
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
2734
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
2735
+ * value can be provided describing the strategy the engine should use when grouping the rows.
2736
+ */
2737
+ export class TreeTableConfig {
2738
+ /**
2739
+ * The column representing the unique ID for each item
2740
+ */
2741
+ idColumn:string;
2742
+ /**
2743
+ * The column representing the parent ID for each item
2744
+ */
2745
+ parentColumn:string;
2746
+ /**
2747
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
2748
+ */
2749
+ promoteOrphansToRoot:boolean;
2754
2750
 
2755
- type SearchDisplayModeType = string;
2756
- export class SearchDisplayMode {
2757
- static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2758
- static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2759
- static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2751
+ constructor();
2760
2752
  }
2761
2753
 
2754
+
2762
2755
  /**
2763
- * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
2756
+ * A set of string constants that can be used to describe the different objects the JS API can export.
2764
2757
  */
2765
- type AggregationOperationType = string;
2766
- export class AggregationOperation {
2767
- static readonly COUNT:AggregationOperationType;
2768
- static readonly COUNT_DISTINCT:AggregationOperationType;
2769
- static readonly DISTINCT:AggregationOperationType;
2770
- static readonly MIN:AggregationOperationType;
2771
- static readonly MAX:AggregationOperationType;
2772
- static readonly SUM:AggregationOperationType;
2773
- static readonly ABS_SUM:AggregationOperationType;
2774
- static readonly VAR:AggregationOperationType;
2775
- static readonly AVG:AggregationOperationType;
2776
- static readonly MEDIAN:AggregationOperationType;
2777
- static readonly STD:AggregationOperationType;
2778
- static readonly FIRST:AggregationOperationType;
2779
- static readonly LAST:AggregationOperationType;
2780
- static readonly UNIQUE:AggregationOperationType;
2781
- static readonly SKIP:AggregationOperationType;
2758
+ type VariableTypeType = string;
2759
+ export class VariableType {
2760
+ static readonly TABLE:VariableTypeType;
2761
+ static readonly TREETABLE:VariableTypeType;
2762
+ static readonly HIERARCHICALTABLE:VariableTypeType;
2763
+ static readonly TABLEMAP:VariableTypeType;
2764
+ static readonly PARTITIONEDTABLE:VariableTypeType;
2765
+ static readonly FIGURE:VariableTypeType;
2766
+ static readonly OTHERWIDGET:VariableTypeType;
2767
+ static readonly PANDAS:VariableTypeType;
2768
+ static readonly TREEMAP:VariableTypeType;
2782
2769
  }
2783
2770
 
2784
2771
  type ValueTypeType = string;
@@ -2791,6 +2778,13 @@ export namespace dh {
2791
2778
  static readonly BOOLEAN:ValueTypeType;
2792
2779
  }
2793
2780
 
2781
+ type SearchDisplayModeType = string;
2782
+ export class SearchDisplayMode {
2783
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2784
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2785
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2786
+ }
2787
+
2794
2788
  /**
2795
2789
  * Describes the type of node in a rollup table.
2796
2790
  */
@@ -2801,19 +2795,25 @@ export namespace dh {
2801
2795
  }
2802
2796
 
2803
2797
  /**
2804
- * A set of string constants that can be used to describe the different objects the JS API can export.
2798
+ * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
2805
2799
  */
2806
- type VariableTypeType = string;
2807
- export class VariableType {
2808
- static readonly TABLE:VariableTypeType;
2809
- static readonly TREETABLE:VariableTypeType;
2810
- static readonly HIERARCHICALTABLE:VariableTypeType;
2811
- static readonly TABLEMAP:VariableTypeType;
2812
- static readonly PARTITIONEDTABLE:VariableTypeType;
2813
- static readonly FIGURE:VariableTypeType;
2814
- static readonly OTHERWIDGET:VariableTypeType;
2815
- static readonly PANDAS:VariableTypeType;
2816
- static readonly TREEMAP:VariableTypeType;
2800
+ type AggregationOperationType = string;
2801
+ export class AggregationOperation {
2802
+ static readonly COUNT:AggregationOperationType;
2803
+ static readonly COUNT_DISTINCT:AggregationOperationType;
2804
+ static readonly DISTINCT:AggregationOperationType;
2805
+ static readonly MIN:AggregationOperationType;
2806
+ static readonly MAX:AggregationOperationType;
2807
+ static readonly SUM:AggregationOperationType;
2808
+ static readonly ABS_SUM:AggregationOperationType;
2809
+ static readonly VAR:AggregationOperationType;
2810
+ static readonly AVG:AggregationOperationType;
2811
+ static readonly MEDIAN:AggregationOperationType;
2812
+ static readonly STD:AggregationOperationType;
2813
+ static readonly FIRST:AggregationOperationType;
2814
+ static readonly LAST:AggregationOperationType;
2815
+ static readonly UNIQUE:AggregationOperationType;
2816
+ static readonly SKIP:AggregationOperationType;
2817
2817
  }
2818
2818
 
2819
2819
  }
@@ -2821,45 +2821,37 @@ export namespace dh {
2821
2821
  export namespace dh.ide {
2822
2822
 
2823
2823
  /**
2824
- * A format to describe a variable available to be read from the server. Application fields are optional, and only
2825
- * populated when a variable is provided by application mode.
2826
- * <p>
2827
- * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
2824
+ * Indicates the result of code run on the server.
2828
2825
  */
2829
- export interface VariableDefinition {
2830
- get name():string;
2831
- /**
2832
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2833
- * reasonable to put in the title
2834
- * @return String
2835
- */
2836
- get description():string;
2837
- /**
2838
- * An opaque identifier for this variable
2839
- * @return String
2840
- */
2841
- get id():string;
2826
+ export interface CommandResult {
2842
2827
  /**
2843
- * The type of the variable, one of <b>dh.VariableType</b>
2844
- * @return dh.VariableType.
2828
+ * Describes changes made in the course of this command.
2829
+ * @return {@link dh.ide.VariableChanges}.
2845
2830
  */
2846
- get type():dh.VariableTypeType;
2831
+ get changes():VariableChanges;
2847
2832
  /**
2848
- * The name of the variable, to be used when rendering it to a user
2833
+ * If the command failed, the error message will be provided here.
2849
2834
  * @return String
2850
2835
  */
2851
- get title():string;
2836
+ get error():string;
2852
2837
  /**
2853
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2854
- * reasonable to put in the title
2855
- * @return String
2838
+ * The timestamp when the command finished running.
2839
+ * @return DateWrapper
2856
2840
  */
2857
- get applicationId():string;
2841
+ get endTimestamp():dh.DateWrapper;
2858
2842
  /**
2859
- * The name of the application which provided this variable
2860
- * @return String
2843
+ * The timestamp when the command started running.
2844
+ * @return DateWrapper
2861
2845
  */
2862
- get applicationName():string;
2846
+ get startTimestamp():dh.DateWrapper;
2847
+ }
2848
+ /**
2849
+ * Specifies a type and either id or name (but not both).
2850
+ */
2851
+ export interface VariableDescriptor {
2852
+ type:string;
2853
+ id?:string|null;
2854
+ name?:string|null;
2863
2855
  }
2864
2856
  /**
2865
2857
  * Describes changes in the current set of variables in the script session. Note that variables that changed value
@@ -2886,58 +2878,66 @@ export namespace dh.ide {
2886
2878
  get updated():Array<VariableDefinition>;
2887
2879
  }
2888
2880
  /**
2889
- * Indicates the result of code run on the server.
2881
+ * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2882
+ * server.
2890
2883
  */
2891
- export interface CommandResult {
2884
+ export interface LogItem {
2892
2885
  /**
2893
- * Describes changes made in the course of this command.
2894
- * @return {@link dh.ide.VariableChanges}.
2886
+ * The level of the log message, enabling the client to ignore messages.
2887
+ * @return String
2895
2888
  */
2896
- get changes():VariableChanges;
2889
+ get logLevel():string;
2897
2890
  /**
2898
- * If the command failed, the error message will be provided here.
2891
+ * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2892
+ * @return double
2893
+ */
2894
+ get micros():number;
2895
+ /**
2896
+ * The log message written on the server.
2899
2897
  * @return String
2900
2898
  */
2901
- get error():string;
2899
+ get message():string;
2900
+ }
2901
+ /**
2902
+ * A format to describe a variable available to be read from the server. Application fields are optional, and only
2903
+ * populated when a variable is provided by application mode.
2904
+ * <p>
2905
+ * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
2906
+ */
2907
+ export interface VariableDefinition {
2908
+ get name():string;
2902
2909
  /**
2903
- * The timestamp when the command finished running.
2904
- * @return DateWrapper
2910
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2911
+ * reasonable to put in the title
2912
+ * @return String
2905
2913
  */
2906
- get endTimestamp():dh.DateWrapper;
2914
+ get description():string;
2915
+ /**
2916
+ * An opaque identifier for this variable
2917
+ * @return String
2918
+ */
2919
+ get id():string;
2907
2920
  /**
2908
- * The timestamp when the command started running.
2909
- * @return DateWrapper
2921
+ * The type of the variable, one of <b>dh.VariableType</b>
2922
+ * @return dh.VariableType.
2910
2923
  */
2911
- get startTimestamp():dh.DateWrapper;
2912
- }
2913
- /**
2914
- * Specifies a type and either id or name (but not both).
2915
- */
2916
- export interface VariableDescriptor {
2917
- type:string;
2918
- id?:string|null;
2919
- name?:string|null;
2920
- }
2921
- /**
2922
- * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2923
- * server.
2924
- */
2925
- export interface LogItem {
2924
+ get type():dh.VariableTypeType;
2926
2925
  /**
2927
- * The level of the log message, enabling the client to ignore messages.
2926
+ * The name of the variable, to be used when rendering it to a user
2928
2927
  * @return String
2929
2928
  */
2930
- get logLevel():string;
2929
+ get title():string;
2931
2930
  /**
2932
- * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2933
- * @return double
2931
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2932
+ * reasonable to put in the title
2933
+ * @return String
2934
2934
  */
2935
- get micros():number;
2935
+ get applicationId():string;
2936
2936
  /**
2937
- * The log message written on the server.
2937
+ * The name of the application which provided this variable
2938
2938
  * @return String
2939
2939
  */
2940
- get message():string;
2940
+ get applicationName():string;
2941
2941
  }
2942
2942
  }
2943
2943
 
@@ -3017,117 +3017,6 @@ export namespace dh.grpc {
3017
3017
 
3018
3018
  export namespace dh.i18n {
3019
3019
 
3020
- /**
3021
- * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
3022
- * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
3023
- * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
3024
- * instance.
3025
- *
3026
- *
3027
- * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
3028
- * return the same details:
3029
- *
3030
- * <ul>
3031
- * <li>GMT/UTC</li>
3032
- * <li>Asia/Tokyo</li>
3033
- * <li>Asia/Seoul</li>
3034
- * <li>Asia/Hong_Kong</li>
3035
- * <li>Asia/Singapore</li>
3036
- * <li>Asia/Calcutta/Asia/Kolkata</li>
3037
- * <li>Europe/Berlin</li>
3038
- * <li>Europe/London</li>
3039
- * <li>America/Sao_Paulo</li>
3040
- * <li>America/St_Johns</li>
3041
- * <li>America/Halifax</li>
3042
- * <li>America/New_York</li>
3043
- * <li>America/Chicago</li>
3044
- * <li>America/Denver</li>
3045
- * <li>America/Los_Angeles</li>
3046
- * <li>America/Anchorage</li>
3047
- * <li>Pacific/Honolulu</li>
3048
- * </ul>
3049
- *
3050
- * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
3051
- *
3052
- * <ul>
3053
- * <li>UTC</li>
3054
- * <li>GMT</li>
3055
- * <li>Z</li>
3056
- * <li>NY</li>
3057
- * <li>ET</li>
3058
- * <li>EST</li>
3059
- * <li>EDT</li>
3060
- * <li>MN</li>
3061
- * <li>CT</li>
3062
- * <li>CST</li>
3063
- * <li>CDT</li>
3064
- * <li>MT</li>
3065
- * <li>MST</li>
3066
- * <li>MDT</li>
3067
- * <li>PT</li>
3068
- * <li>PST</li>
3069
- * <li>PDT</li>
3070
- * <li>HI</li>
3071
- * <li>HST</li>
3072
- * <li>HDT</li>
3073
- * <li>BT</li>
3074
- * <li>BRST</li>
3075
- * <li>BRT</li>
3076
- * <li>KR</li>
3077
- * <li>KST</li>
3078
- * <li>HK</li>
3079
- * <li>HKT</li>
3080
- * <li>JP</li>
3081
- * <li>JST</li>
3082
- * <li>AT</li>
3083
- * <li>AST</li>
3084
- * <li>ADT</li>
3085
- * <li>NF</li>
3086
- * <li>NST</li>
3087
- * <li>NDT</li>
3088
- * <li>AL</li>
3089
- * <li>AKST</li>
3090
- * <li>AKDT</li>
3091
- * <li>IN</li>
3092
- * <li>IST</li>
3093
- * <li>CE</li>
3094
- * <li>CET</li>
3095
- * <li>CEST</li>
3096
- * <li>SG</li>
3097
- * <li>SGT</li>
3098
- * <li>LON</li>
3099
- * <li>BST</li>
3100
- * <li>MOS</li>
3101
- * <li>SHG</li>
3102
- * <li>CH</li>
3103
- * <li>NL</li>
3104
- * <li>TW</li>
3105
- * <li>SYD</li>
3106
- * <li>AEST</li>
3107
- * <li>AEDT</li>
3108
- * </ul>
3109
- */
3110
- export class TimeZone {
3111
- protected constructor();
3112
-
3113
- /**
3114
- * Factory method which creates timezone instances from one of the supported keys.
3115
- * @param tzCode -
3116
- * @return dh.i18n.TimeZone
3117
- */
3118
- static getTimeZone(tzCode:string):TimeZone;
3119
- /**
3120
- * the standard offset of this timezone, in minutes
3121
- * @return int
3122
- */
3123
- get standardOffset():number;
3124
- /**
3125
- * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
3126
- * @return String
3127
- */
3128
- get id():string;
3129
- }
3130
-
3131
3020
  /**
3132
3021
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
3133
3022
  * additional 6 decimal places after the rest of the number.
@@ -3263,46 +3152,138 @@ export namespace dh.i18n {
3263
3152
  * @param number -
3264
3153
  * @return String
3265
3154
  */
3266
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
3155
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
3156
+ /**
3157
+ * Parses the given text using this instance's pattern into a JS Number.
3158
+ * @param text -
3159
+ * @return double
3160
+ */
3161
+ parse(text:string):number;
3162
+ /**
3163
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
3164
+ * @param number -
3165
+ * @return String
3166
+ */
3167
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
3168
+ toString():string;
3169
+ }
3170
+
3171
+
3172
+ /**
3173
+ * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
3174
+ * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
3175
+ * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
3176
+ * instance.
3177
+ *
3178
+ *
3179
+ * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
3180
+ * return the same details:
3181
+ *
3182
+ * <ul>
3183
+ * <li>GMT/UTC</li>
3184
+ * <li>Asia/Tokyo</li>
3185
+ * <li>Asia/Seoul</li>
3186
+ * <li>Asia/Hong_Kong</li>
3187
+ * <li>Asia/Singapore</li>
3188
+ * <li>Asia/Calcutta/Asia/Kolkata</li>
3189
+ * <li>Europe/Berlin</li>
3190
+ * <li>Europe/London</li>
3191
+ * <li>America/Sao_Paulo</li>
3192
+ * <li>America/St_Johns</li>
3193
+ * <li>America/Halifax</li>
3194
+ * <li>America/New_York</li>
3195
+ * <li>America/Chicago</li>
3196
+ * <li>America/Denver</li>
3197
+ * <li>America/Los_Angeles</li>
3198
+ * <li>America/Anchorage</li>
3199
+ * <li>Pacific/Honolulu</li>
3200
+ * </ul>
3201
+ *
3202
+ * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
3203
+ *
3204
+ * <ul>
3205
+ * <li>UTC</li>
3206
+ * <li>GMT</li>
3207
+ * <li>Z</li>
3208
+ * <li>NY</li>
3209
+ * <li>ET</li>
3210
+ * <li>EST</li>
3211
+ * <li>EDT</li>
3212
+ * <li>MN</li>
3213
+ * <li>CT</li>
3214
+ * <li>CST</li>
3215
+ * <li>CDT</li>
3216
+ * <li>MT</li>
3217
+ * <li>MST</li>
3218
+ * <li>MDT</li>
3219
+ * <li>PT</li>
3220
+ * <li>PST</li>
3221
+ * <li>PDT</li>
3222
+ * <li>HI</li>
3223
+ * <li>HST</li>
3224
+ * <li>HDT</li>
3225
+ * <li>BT</li>
3226
+ * <li>BRST</li>
3227
+ * <li>BRT</li>
3228
+ * <li>KR</li>
3229
+ * <li>KST</li>
3230
+ * <li>HK</li>
3231
+ * <li>HKT</li>
3232
+ * <li>JP</li>
3233
+ * <li>JST</li>
3234
+ * <li>AT</li>
3235
+ * <li>AST</li>
3236
+ * <li>ADT</li>
3237
+ * <li>NF</li>
3238
+ * <li>NST</li>
3239
+ * <li>NDT</li>
3240
+ * <li>AL</li>
3241
+ * <li>AKST</li>
3242
+ * <li>AKDT</li>
3243
+ * <li>IN</li>
3244
+ * <li>IST</li>
3245
+ * <li>CE</li>
3246
+ * <li>CET</li>
3247
+ * <li>CEST</li>
3248
+ * <li>SG</li>
3249
+ * <li>SGT</li>
3250
+ * <li>LON</li>
3251
+ * <li>BST</li>
3252
+ * <li>MOS</li>
3253
+ * <li>SHG</li>
3254
+ * <li>CH</li>
3255
+ * <li>NL</li>
3256
+ * <li>TW</li>
3257
+ * <li>SYD</li>
3258
+ * <li>AEST</li>
3259
+ * <li>AEDT</li>
3260
+ * </ul>
3261
+ */
3262
+ export class TimeZone {
3263
+ protected constructor();
3264
+
3265
+ /**
3266
+ * Factory method which creates timezone instances from one of the supported keys.
3267
+ * @param tzCode -
3268
+ * @return dh.i18n.TimeZone
3269
+ */
3270
+ static getTimeZone(tzCode:string):TimeZone;
3267
3271
  /**
3268
- * Parses the given text using this instance's pattern into a JS Number.
3269
- * @param text -
3270
- * @return double
3272
+ * the standard offset of this timezone, in minutes
3273
+ * @return int
3271
3274
  */
3272
- parse(text:string):number;
3275
+ get standardOffset():number;
3273
3276
  /**
3274
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
3275
- * @param number -
3277
+ * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
3276
3278
  * @return String
3277
3279
  */
3278
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
3279
- toString():string;
3280
+ get id():string;
3280
3281
  }
3281
3282
 
3282
-
3283
3283
  }
3284
3284
 
3285
3285
  export namespace dh.plot {
3286
3286
 
3287
- export interface FigureDataUpdatedEvent {
3288
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
3289
- get series():Series[];
3290
- }
3291
- /**
3292
- * Describes a template that will be used to make new series instances when a new table added to a plotBy.
3293
- */
3294
- export interface MultiSeries {
3295
- /**
3296
- * The name for this multi-series.
3297
- * @return String
3298
- */
3299
- get name():string;
3300
- /**
3301
- * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
3302
- * @return int
3303
- */
3304
- get plotStyle():SeriesPlotStyleType;
3305
- }
3306
3287
  /**
3307
3288
  * Describes how to access and display data required within a series.
3308
3289
  */
@@ -3323,6 +3304,10 @@ export namespace dh.plot {
3323
3304
  */
3324
3305
  get type():SourceTypeType;
3325
3306
  }
3307
+ export interface FigureDataUpdatedEvent {
3308
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
3309
+ get series():Series[];
3310
+ }
3326
3311
  export interface OneClick {
3327
3312
  setValueForColumn(columnName:string, value:any):void;
3328
3313
  getValueForColumn(columName:string):any;
@@ -3330,6 +3315,65 @@ export namespace dh.plot {
3330
3315
  get columns():dh.Column[];
3331
3316
  }
3332
3317
  /**
3318
+ * Provides access to the data for displaying in a figure.
3319
+ */
3320
+ export interface Series {
3321
+ readonly isLinesVisible?:boolean|null;
3322
+ readonly pointLabelFormat?:string|null;
3323
+ readonly yToolTipPattern?:string|null;
3324
+ readonly shapeSize?:number|null;
3325
+ readonly xToolTipPattern?:string|null;
3326
+ readonly isShapesVisible?:boolean|null;
3327
+
3328
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
3329
+ /**
3330
+ * Disable updates for this Series.
3331
+ */
3332
+ unsubscribe():void;
3333
+ get shape():string;
3334
+ /**
3335
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
3336
+ * the axis.
3337
+ * @return {@link dh.plot.SeriesDataSource}
3338
+ */
3339
+ get sources():SeriesDataSource[];
3340
+ get lineColor():string;
3341
+ /**
3342
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
3343
+ * @return int
3344
+ */
3345
+ get plotStyle():SeriesPlotStyleType;
3346
+ get oneClick():OneClick;
3347
+ get gradientVisible():boolean;
3348
+ get shapeColor():string;
3349
+ /**
3350
+ * The name for this series.
3351
+ * @return String
3352
+ */
3353
+ get name():string;
3354
+ /**
3355
+ * indicates that this series belongs to a MultiSeries, null otherwise
3356
+ * @return dh.plot.MultiSeries
3357
+ */
3358
+ get multiSeries():MultiSeries;
3359
+ get shapeLabel():string;
3360
+ }
3361
+ /**
3362
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
3363
+ */
3364
+ export interface MultiSeries {
3365
+ /**
3366
+ * The name for this multi-series.
3367
+ * @return String
3368
+ */
3369
+ get name():string;
3370
+ /**
3371
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
3372
+ * @return int
3373
+ */
3374
+ get plotStyle():SeriesPlotStyleType;
3375
+ }
3376
+ /**
3333
3377
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
3334
3378
  * may be shared between Series instances.
3335
3379
  */
@@ -3397,80 +3441,6 @@ export namespace dh.plot {
3397
3441
  get formatType():AxisFormatTypeType;
3398
3442
  get minRange():number;
3399
3443
  }
3400
- /**
3401
- * Provides access to the data for displaying in a figure.
3402
- */
3403
- export interface Series {
3404
- readonly isLinesVisible?:boolean|null;
3405
- readonly pointLabelFormat?:string|null;
3406
- readonly yToolTipPattern?:string|null;
3407
- readonly shapeSize?:number|null;
3408
- readonly xToolTipPattern?:string|null;
3409
- readonly isShapesVisible?:boolean|null;
3410
-
3411
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
3412
- /**
3413
- * Disable updates for this Series.
3414
- */
3415
- unsubscribe():void;
3416
- get shape():string;
3417
- /**
3418
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
3419
- * the axis.
3420
- * @return {@link dh.plot.SeriesDataSource}
3421
- */
3422
- get sources():SeriesDataSource[];
3423
- get lineColor():string;
3424
- /**
3425
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
3426
- * @return int
3427
- */
3428
- get plotStyle():SeriesPlotStyleType;
3429
- get oneClick():OneClick;
3430
- get gradientVisible():boolean;
3431
- get shapeColor():string;
3432
- /**
3433
- * The name for this series.
3434
- * @return String
3435
- */
3436
- get name():string;
3437
- /**
3438
- * indicates that this series belongs to a MultiSeries, null otherwise
3439
- * @return dh.plot.MultiSeries
3440
- */
3441
- get multiSeries():MultiSeries;
3442
- get shapeLabel():string;
3443
- }
3444
-
3445
- export class SourceDescriptor {
3446
- axis:AxisDescriptor;
3447
- table:dh.Table;
3448
- columnName:string;
3449
- type:string;
3450
-
3451
- constructor();
3452
- }
3453
-
3454
- export class FigureSourceException {
3455
- table:dh.Table;
3456
- source:SeriesDataSource;
3457
-
3458
- protected constructor();
3459
- }
3460
-
3461
- export class SeriesDataSourceException {
3462
- protected constructor();
3463
-
3464
- get source():SeriesDataSource;
3465
- get message():string;
3466
- }
3467
-
3468
- export class FigureFetchError {
3469
- error:object;
3470
- errors:Array<string>;
3471
-
3472
- protected constructor();
3473
- }
3474
3444
 
3475
3445
  /**
3476
3446
  * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
@@ -3489,44 +3459,6 @@ export namespace dh.plot {
3489
3459
  removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3490
3460
  }
3491
3461
 
3492
- /**
3493
- * Helper class for plot downsampling methods.
3494
- */
3495
- export class Downsample {
3496
- protected constructor();
3497
-
3498
- /**
3499
- * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3500
- * the same visual fidelity as the original table, but with fewer rows.
3501
- * @param table - The table to downsample.
3502
- * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3503
- * @param yCols - The names of the Y columns to downsample.
3504
- * @param width - The width of the visible area in pixels.
3505
- * @param xRange - The visible range as `[start, end]` or null to always use all data.
3506
- * @return A promise that resolves to the downsampled table.
3507
- */
3508
- static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3509
- }
3510
-
3511
- export class SeriesDescriptor {
3512
- plotStyle:string;
3513
- name?:string|null;
3514
- linesVisible?:boolean|null;
3515
- shapesVisible?:boolean|null;
3516
- gradientVisible?:boolean|null;
3517
- lineColor?:string|null;
3518
- pointLabelFormat?:string|null;
3519
- xToolTipPattern?:string|null;
3520
- yToolTipPattern?:string|null;
3521
- shapeLabel?:string|null;
3522
- shapeSize?:number|null;
3523
- shapeColor?:string|null;
3524
- shape?:string|null;
3525
- dataSources:Array<SourceDescriptor>;
3526
-
3527
- constructor();
3528
- }
3529
-
3530
3462
  /**
3531
3463
  * Provides the details for a figure.
3532
3464
  *
@@ -3637,14 +3569,75 @@ export namespace dh.plot {
3637
3569
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
3638
3570
  hasListeners(name:string):boolean;
3639
3571
  /**
3640
- * Removes an event listener added to this table.
3641
- * @param name -
3642
- * @param callback -
3643
- * @return
3644
- * @typeParam T -
3572
+ * Removes an event listener added to this table.
3573
+ * @param name -
3574
+ * @param callback -
3575
+ * @return
3576
+ * @typeParam T -
3577
+ */
3578
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3579
+ static create(config:FigureDescriptor):Promise<Figure>;
3580
+ }
3581
+
3582
+ export class FigureSourceException {
3583
+ table:dh.Table;
3584
+ source:SeriesDataSource;
3585
+
3586
+ protected constructor();
3587
+ }
3588
+
3589
+ export class SeriesDescriptor {
3590
+ plotStyle:string;
3591
+ name?:string|null;
3592
+ linesVisible?:boolean|null;
3593
+ shapesVisible?:boolean|null;
3594
+ gradientVisible?:boolean|null;
3595
+ lineColor?:string|null;
3596
+ pointLabelFormat?:string|null;
3597
+ xToolTipPattern?:string|null;
3598
+ yToolTipPattern?:string|null;
3599
+ shapeLabel?:string|null;
3600
+ shapeSize?:number|null;
3601
+ shapeColor?:string|null;
3602
+ shape?:string|null;
3603
+ dataSources:Array<SourceDescriptor>;
3604
+
3605
+ constructor();
3606
+ }
3607
+
3608
+ export class SourceDescriptor {
3609
+ axis:AxisDescriptor;
3610
+ table:dh.Table;
3611
+ columnName:string;
3612
+ type:string;
3613
+
3614
+ constructor();
3615
+ }
3616
+
3617
+ export class FigureFetchError {
3618
+ error:object;
3619
+ errors:Array<string>;
3620
+
3621
+ protected constructor();
3622
+ }
3623
+
3624
+ /**
3625
+ * Helper class for plot downsampling methods.
3626
+ */
3627
+ export class Downsample {
3628
+ protected constructor();
3629
+
3630
+ /**
3631
+ * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3632
+ * the same visual fidelity as the original table, but with fewer rows.
3633
+ * @param table - The table to downsample.
3634
+ * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3635
+ * @param yCols - The names of the Y columns to downsample.
3636
+ * @param width - The width of the visible area in pixels.
3637
+ * @param xRange - The visible range as `[start, end]` or null to always use all data.
3638
+ * @return A promise that resolves to the downsampled table.
3645
3639
  */
3646
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3647
- static create(config:FigureDescriptor):Promise<Figure>;
3640
+ static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3648
3641
  }
3649
3642
 
3650
3643
  export class ChartDescriptor {
@@ -3664,23 +3657,6 @@ export namespace dh.plot {
3664
3657
  constructor();
3665
3658
  }
3666
3659
 
3667
- /**
3668
- * A descriptor used with JsFigureFactory.create to create a figure from JS.
3669
- */
3670
- export class FigureDescriptor {
3671
- title?:string|null;
3672
- titleFont?:string|null;
3673
- titleColor?:string|null;
3674
- isResizable?:boolean|null;
3675
- isDefaultTheme?:boolean|null;
3676
- updateInterval?:number|null;
3677
- cols?:number|null;
3678
- rows?:number|null;
3679
- charts:Array<ChartDescriptor>;
3680
-
3681
- constructor();
3682
- }
3683
-
3684
3660
  /**
3685
3661
  * Provide the details for a chart.
3686
3662
  */
@@ -3725,26 +3701,19 @@ export namespace dh.plot {
3725
3701
  get multiSeries():MultiSeries[];
3726
3702
  }
3727
3703
 
3728
- export class AxisDescriptor {
3729
- formatType:string;
3730
- type:string;
3731
- position:string;
3732
- log?:boolean|null;
3733
- label?:string|null;
3734
- labelFont?:string|null;
3735
- ticksFont?:string|null;
3736
- formatPattern?:string|null;
3737
- color?:string|null;
3738
- minRange?:number|null;
3739
- maxRange?:number|null;
3740
- minorTicksVisible?:boolean|null;
3741
- majorTicksVisible?:boolean|null;
3742
- minorTickCount?:number|null;
3743
- gapBetweenMajorTicks?:number|null;
3744
- majorTickLocations?:Array<number>|null;
3745
- tickLabelAngle?:number|null;
3746
- invert?:boolean|null;
3747
- isTimeAxis?:boolean|null;
3704
+ /**
3705
+ * A descriptor used with JsFigureFactory.create to create a figure from JS.
3706
+ */
3707
+ export class FigureDescriptor {
3708
+ title?:string|null;
3709
+ titleFont?:string|null;
3710
+ titleColor?:string|null;
3711
+ isResizable?:boolean|null;
3712
+ isDefaultTheme?:boolean|null;
3713
+ updateInterval?:number|null;
3714
+ cols?:number|null;
3715
+ rows?:number|null;
3716
+ charts:Array<ChartDescriptor>;
3748
3717
 
3749
3718
  constructor();
3750
3719
  }
@@ -3775,6 +3744,37 @@ export namespace dh.plot {
3775
3744
  protected constructor();
3776
3745
  }
3777
3746
 
3747
+ export class AxisDescriptor {
3748
+ formatType:string;
3749
+ type:string;
3750
+ position:string;
3751
+ log?:boolean|null;
3752
+ label?:string|null;
3753
+ labelFont?:string|null;
3754
+ ticksFont?:string|null;
3755
+ formatPattern?:string|null;
3756
+ color?:string|null;
3757
+ minRange?:number|null;
3758
+ maxRange?:number|null;
3759
+ minorTicksVisible?:boolean|null;
3760
+ majorTicksVisible?:boolean|null;
3761
+ minorTickCount?:number|null;
3762
+ gapBetweenMajorTicks?:number|null;
3763
+ majorTickLocations?:Array<number>|null;
3764
+ tickLabelAngle?:number|null;
3765
+ invert?:boolean|null;
3766
+ isTimeAxis?:boolean|null;
3767
+
3768
+ constructor();
3769
+ }
3770
+
3771
+ export class SeriesDataSourceException {
3772
+ protected constructor();
3773
+
3774
+ get source():SeriesDataSource;
3775
+ get message():string;
3776
+ }
3777
+
3778
3778
 
3779
3779
  /**
3780
3780
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
@@ -3805,14 +3805,20 @@ export namespace dh.plot {
3805
3805
  static readonly HOVER_TEXT:SourceTypeType;
3806
3806
  }
3807
3807
 
3808
- type AxisTypeType = number;
3809
- export class AxisType {
3810
- static readonly X:AxisTypeType;
3811
- static readonly Y:AxisTypeType;
3812
- static readonly SHAPE:AxisTypeType;
3813
- static readonly SIZE:AxisTypeType;
3814
- static readonly LABEL:AxisTypeType;
3815
- static readonly COLOR:AxisTypeType;
3808
+ type SeriesPlotStyleType = number;
3809
+ export class SeriesPlotStyle {
3810
+ static readonly BAR:SeriesPlotStyleType;
3811
+ static readonly STACKED_BAR:SeriesPlotStyleType;
3812
+ static readonly LINE:SeriesPlotStyleType;
3813
+ static readonly AREA:SeriesPlotStyleType;
3814
+ static readonly STACKED_AREA:SeriesPlotStyleType;
3815
+ static readonly PIE:SeriesPlotStyleType;
3816
+ static readonly HISTOGRAM:SeriesPlotStyleType;
3817
+ static readonly OHLC:SeriesPlotStyleType;
3818
+ static readonly SCATTER:SeriesPlotStyleType;
3819
+ static readonly STEP:SeriesPlotStyleType;
3820
+ static readonly ERROR_BAR:SeriesPlotStyleType;
3821
+ static readonly TREEMAP:SeriesPlotStyleType;
3816
3822
  }
3817
3823
 
3818
3824
  /**
@@ -3845,55 +3851,69 @@ export namespace dh.plot {
3845
3851
  static readonly NUMBER:AxisFormatTypeType;
3846
3852
  }
3847
3853
 
3848
- type SeriesPlotStyleType = number;
3849
- export class SeriesPlotStyle {
3850
- static readonly BAR:SeriesPlotStyleType;
3851
- static readonly STACKED_BAR:SeriesPlotStyleType;
3852
- static readonly LINE:SeriesPlotStyleType;
3853
- static readonly AREA:SeriesPlotStyleType;
3854
- static readonly STACKED_AREA:SeriesPlotStyleType;
3855
- static readonly PIE:SeriesPlotStyleType;
3856
- static readonly HISTOGRAM:SeriesPlotStyleType;
3857
- static readonly OHLC:SeriesPlotStyleType;
3858
- static readonly SCATTER:SeriesPlotStyleType;
3859
- static readonly STEP:SeriesPlotStyleType;
3860
- static readonly ERROR_BAR:SeriesPlotStyleType;
3861
- static readonly TREEMAP:SeriesPlotStyleType;
3854
+ type AxisTypeType = number;
3855
+ export class AxisType {
3856
+ static readonly X:AxisTypeType;
3857
+ static readonly Y:AxisTypeType;
3858
+ static readonly SHAPE:AxisTypeType;
3859
+ static readonly SIZE:AxisTypeType;
3860
+ static readonly LABEL:AxisTypeType;
3861
+ static readonly COLOR:AxisTypeType;
3862
3862
  }
3863
3863
 
3864
3864
  }
3865
3865
 
3866
3866
  export namespace dh.lsp {
3867
3867
 
3868
- export class Range {
3869
- start:Position;
3870
- end:Position;
3868
+ export class CompletionItem {
3869
+ label:string;
3870
+ kind:number;
3871
+ detail:string;
3872
+ documentation:MarkupContent;
3873
+ deprecated:boolean;
3874
+ preselect:boolean;
3875
+ textEdit:TextEdit;
3876
+ sortText:string;
3877
+ filterText:string;
3878
+ insertTextFormat:number;
3879
+ additionalTextEdits:Array<TextEdit>;
3880
+ commitCharacters:Array<string>;
3871
3881
 
3872
3882
  constructor();
3873
-
3874
- isInside(innerStart:Position, innerEnd:Position):boolean;
3875
3883
  }
3876
3884
 
3877
- export class TextDocumentContentChangeEvent {
3885
+ export class TextEdit {
3878
3886
  range:Range;
3879
- rangeLength:number;
3880
3887
  text:string;
3881
3888
 
3882
3889
  constructor();
3883
3890
  }
3884
3891
 
3885
- export class SignatureInformation {
3892
+ export class Position {
3893
+ line:number;
3894
+ character:number;
3895
+
3896
+ constructor();
3897
+
3898
+ lessThan(start:Position):boolean;
3899
+ lessOrEqual(start:Position):boolean;
3900
+ greaterThan(end:Position):boolean;
3901
+ greaterOrEqual(end:Position):boolean;
3902
+ copy():Position;
3903
+ }
3904
+
3905
+ export class ParameterInformation {
3886
3906
  label:string;
3887
3907
  documentation:MarkupContent;
3888
- parameters:Array<ParameterInformation>;
3889
- activeParameter:number;
3890
3908
 
3891
3909
  constructor();
3892
3910
  }
3893
3911
 
3894
- export class Hover {
3895
- contents:MarkupContent;
3896
- range:Range;
3912
+ export class SignatureInformation {
3913
+ label:string;
3914
+ documentation:MarkupContent;
3915
+ parameters:Array<ParameterInformation>;
3916
+ activeParameter:number;
3897
3917
 
3898
3918
  constructor();
3899
3919
  }
@@ -3905,54 +3925,38 @@ export namespace dh.lsp {
3905
3925
  constructor();
3906
3926
  }
3907
3927
 
3908
- export class CompletionItem {
3909
- label:string;
3910
- kind:number;
3911
- detail:string;
3912
- documentation:MarkupContent;
3913
- deprecated:boolean;
3914
- preselect:boolean;
3915
- textEdit:TextEdit;
3916
- sortText:string;
3917
- filterText:string;
3918
- insertTextFormat:number;
3919
- additionalTextEdits:Array<TextEdit>;
3920
- commitCharacters:Array<string>;
3921
-
3922
- constructor();
3923
- }
3924
-
3925
- export class TextEdit {
3928
+ export class Hover {
3929
+ contents:MarkupContent;
3926
3930
  range:Range;
3927
- text:string;
3928
3931
 
3929
3932
  constructor();
3930
3933
  }
3931
3934
 
3932
- export class ParameterInformation {
3933
- label:string;
3934
- documentation:MarkupContent;
3935
+ export class Range {
3936
+ start:Position;
3937
+ end:Position;
3935
3938
 
3936
3939
  constructor();
3940
+
3941
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3937
3942
  }
3938
3943
 
3939
- export class Position {
3940
- line:number;
3941
- character:number;
3944
+ export class TextDocumentContentChangeEvent {
3945
+ range:Range;
3946
+ rangeLength:number;
3947
+ text:string;
3942
3948
 
3943
3949
  constructor();
3944
-
3945
- lessThan(start:Position):boolean;
3946
- lessOrEqual(start:Position):boolean;
3947
- greaterThan(end:Position):boolean;
3948
- greaterOrEqual(end:Position):boolean;
3949
- copy():Position;
3950
3950
  }
3951
3951
 
3952
3952
  }
3953
3953
 
3954
3954
  export namespace dh.calendar {
3955
3955
 
3956
+ export interface BusinessPeriod {
3957
+ get close():string;
3958
+ get open():string;
3959
+ }
3956
3960
  /**
3957
3961
  * Defines a calendar with business hours and holidays.
3958
3962
  */
@@ -3995,10 +3999,6 @@ export namespace dh.calendar {
3995
3999
  */
3996
4000
  get businessPeriods():Array<BusinessPeriod>;
3997
4001
  }
3998
- export interface BusinessPeriod {
3999
- get close():string;
4000
- get open():string;
4001
- }
4002
4002
 
4003
4003
  type DayOfWeekType = string;
4004
4004
  export class DayOfWeek {