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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +1814 -1814
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17,20 +17,6 @@ export interface IIterableResult<T> {
17
17
  }
18
18
  export namespace dh.storage {
19
19
 
20
- /**
21
- * Storage service metadata about files and folders.
22
- */
23
- export class ItemDetails {
24
- protected constructor();
25
-
26
- get filename():string;
27
- get basename():string;
28
- get size():number;
29
- get etag():string;
30
- get type():ItemTypeType;
31
- get dirname():string;
32
- }
33
-
34
20
  /**
35
21
  * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
36
22
  * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
@@ -105,6 +91,20 @@ export namespace dh.storage {
105
91
  createDirectory(path:string):Promise<void>;
106
92
  }
107
93
 
94
+ /**
95
+ * Storage service metadata about files and folders.
96
+ */
97
+ export class ItemDetails {
98
+ protected constructor();
99
+
100
+ get filename():string;
101
+ get basename():string;
102
+ get size():number;
103
+ get etag():string;
104
+ get type():ItemTypeType;
105
+ get dirname():string;
106
+ }
107
+
108
108
 
109
109
  type ItemTypeType = string;
110
110
  export class ItemType {
@@ -116,6 +116,17 @@ export namespace dh.storage {
116
116
 
117
117
  export namespace dh {
118
118
 
119
+ /**
120
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
121
+ */
122
+ export interface LocalTimeWrapper {
123
+ valueOf():string;
124
+ getHour():number;
125
+ getMinute():number;
126
+ getSecond():number;
127
+ getNano():number;
128
+ toString():string;
129
+ }
119
130
  /**
120
131
  * Common interface for various ways of accessing table data and formatting.
121
132
  *
@@ -130,32 +141,38 @@ export namespace dh {
130
141
  get rows():Array<Row>;
131
142
  }
132
143
  /**
133
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
134
- * table column.
144
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
145
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
146
+ *
147
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
148
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
149
+ * backwards compatibility and to better follow JS expectations.
135
150
  */
136
- export interface ColumnStatistics {
151
+ export interface WidgetMessageDetails {
137
152
  /**
138
- * Gets the type of formatting that should be used for given statistic.
139
- * <p>
140
- * the format type for a statistic. A null return value means that the column formatting should be used.
141
- * @param name - the display name of the statistic
142
- * @return String
153
+ * Returns the data from this message as a base64-encoded string.
143
154
  */
144
- getType(name:string):string;
155
+ getDataAsBase64():string;
145
156
  /**
146
- * Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
147
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
148
- * than 19 unique values.
149
- * @return Map of String double
157
+ * Returns the data from this message as a Uint8Array.
150
158
  */
151
- get uniqueValues():Map<string, number>;
159
+ getDataAsU8():Uint8Array;
152
160
  /**
153
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
154
- * <p>
155
- * A map of each statistic's name to its value.
156
- * @return Map of String and Object
161
+ * Returns the data from this message as a utf-8 string.
157
162
  */
158
- get statisticsMap():Map<string, object>;
163
+ getDataAsString():string;
164
+ /**
165
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
166
+ * objects, and should close them when no longer needed.
167
+ */
168
+ get exportedObjects():WidgetExportedObject[];
169
+ }
170
+ /**
171
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
172
+ * the viewport again.
173
+ */
174
+ export interface ViewportRow extends Row {
175
+ get index():LongWrapper;
159
176
  }
160
177
  /**
161
178
  * This object may be pooled internally or discarded and not updated. Do not retain references to it.
@@ -182,6 +199,42 @@ export namespace dh {
182
199
  */
183
200
  readonly numberFormat?:string|null;
184
201
  }
202
+ export interface JoinableTable {
203
+ freeze():Promise<Table>;
204
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
205
+ /**
206
+ * @deprecated
207
+ */
208
+ join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:object):Promise<Table>;
209
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:string):Promise<Table>;
210
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
211
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
212
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
213
+ }
214
+ export interface RefreshToken {
215
+ get bytes():string;
216
+ get expiry():number;
217
+ }
218
+ export interface ColumnGroup {
219
+ get name():string|null;
220
+ get children():string[]|null;
221
+ get color():string|null;
222
+ }
223
+ export interface LayoutHints {
224
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
225
+
226
+ get hiddenColumns():string[]|null;
227
+ get frozenColumns():string[]|null;
228
+ get columnGroups():ColumnGroup[]|null;
229
+ get areSavedLayoutsAllowed():boolean;
230
+ get frontColumns():string[]|null;
231
+ get backColumns():string[]|null;
232
+ }
233
+ export interface Row {
234
+ get(column:Column):any;
235
+ getFormat(column:Column):Format;
236
+ get index():LongWrapper;
237
+ }
185
238
  /**
186
239
  * Row implementation that also provides additional read-only properties. represents visible rows in the table,
187
240
  * but with additional properties to reflect the tree structure.
@@ -207,108 +260,81 @@ export namespace dh {
207
260
  get hasChildren():boolean;
208
261
  get index():LongWrapper;
209
262
  }
210
- export interface LayoutHints {
211
- readonly searchDisplayMode?:SearchDisplayModeType|null;
212
-
213
- get hiddenColumns():string[]|null;
214
- get frozenColumns():string[]|null;
215
- get columnGroups():ColumnGroup[]|null;
216
- get areSavedLayoutsAllowed():boolean;
217
- get frontColumns():string[]|null;
218
- get backColumns():string[]|null;
219
- }
220
- export interface Row {
221
- get(column:Column):any;
222
- getFormat(column:Column):Format;
223
- get index():LongWrapper;
224
- }
225
- /**
226
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
227
- */
228
- export interface LocalTimeWrapper {
229
- valueOf():string;
230
- getHour():number;
231
- getMinute():number;
232
- getSecond():number;
233
- getNano():number;
234
- toString():string;
263
+ export interface HasEventHandling {
264
+ /**
265
+ * Listen for events on this object.
266
+ * @param name - the name of the event to listen for
267
+ * @param callback - a function to call when the event occurs
268
+ * @return Returns a cleanup function.
269
+ * @typeParam T - the type of the data that the event will provide
270
+ */
271
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
272
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
273
+ hasListeners(name:string):boolean;
274
+ /**
275
+ * Removes an event listener added to this table.
276
+ * @param name -
277
+ * @param callback -
278
+ * @return
279
+ * @typeParam T -
280
+ */
281
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
235
282
  }
236
283
  /**
237
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
238
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
239
- * are correctly freed.
284
+ * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
285
+ * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
286
+ * for easier scrolling without going to the server.
240
287
  */
241
- export interface WidgetExportedObject {
242
- /**
243
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
244
- * null, this object cannot be fetched, but can be passed to the server, such as via
245
- * {@link Widget.sendMessage}.
246
- * @return the string type of this server-side object, or null.
247
- */
248
- readonly type?:string|null;
249
-
288
+ export interface ViewportData extends TableData {
250
289
  /**
251
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
252
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
253
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
290
+ * The index of the first returned row
291
+ * @return double
254
292
  */
255
- reexport():Promise<WidgetExportedObject>;
293
+ get offset():number;
256
294
  /**
257
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
258
- * the same instance.
259
- * @return a promise that will resolve to a client side object that represents the reference on the server.
295
+ * A list of columns describing the data types in each row
296
+ * @return {@link dh.Column} array.
260
297
  */
261
- fetch():Promise<any>;
298
+ get columns():Array<Column>;
262
299
  /**
263
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
264
- * exist that also use that object. Should not be called after fetch() has been invoked.
300
+ * An array of rows of data
301
+ * @return {@link dh.ViewportRow} array.
265
302
  */
266
- close():void;
303
+ get rows():Array<ViewportRow>;
267
304
  }
268
305
  /**
269
- * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
270
- * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
271
- * <p>
272
- * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
273
- * server. The setViewport method can be used to adjust this table instead of creating a new one.
274
- * <p>
275
- * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
276
- * to the underlying handle and accumulated data.
277
- * <p>
278
- * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
279
- * the idea then that the caller did not actually use this type. This means that for every exported method (which then
280
- * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
281
- * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
282
- * deems it no longer in use.
283
- * <p>
284
- * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
285
- * true), providing a way to stop the server from streaming updates to the client.
306
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
307
+ * in columns) either by index, or scanning the complete present index.
286
308
  *
287
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
288
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
289
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
290
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
291
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
309
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading
310
+ * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
311
+ * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
312
+ * both options should be considered.
313
+ *
314
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
315
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
316
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
317
+ * read specific rows or cells out of the table.
292
318
  */
293
- export interface TableViewportSubscription extends HasEventHandling {
319
+ export interface SubscriptionTableData extends TableData {
320
+ get fullIndex():RangeSet;
294
321
  /**
295
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
296
- * @param firstRow -
297
- * @param lastRow -
298
- * @param columns -
299
- * @param updateIntervalMs -
322
+ * The ordered set of row indexes removed since the last update
323
+ * @return dh.RangeSet
300
324
  */
301
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
325
+ get removed():RangeSet;
302
326
  /**
303
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
327
+ * The ordered set of row indexes added since the last update
328
+ * @return dh.RangeSet
304
329
  */
305
- close():void;
330
+ get added():RangeSet;
331
+ get columns():Array<Column>;
306
332
  /**
307
- * Gets the data currently visible in this viewport
308
- * @return Promise of {@link dh.TableData}.
333
+ * The ordered set of row indexes updated since the last update
334
+ * @return dh.RangeSet
309
335
  */
310
- getViewportData():Promise<TableData>;
311
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
336
+ get modified():RangeSet;
337
+ get rows():Array<Row>;
312
338
  }
313
339
  /**
314
340
  * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
@@ -439,93 +465,37 @@ export namespace dh {
439
465
  */
440
466
  get isRefreshing():boolean;
441
467
  }
442
- export interface HasEventHandling {
443
- /**
444
- * Listen for events on this object.
445
- * @param name - the name of the event to listen for
446
- * @param callback - a function to call when the event occurs
447
- * @return Returns a cleanup function.
448
- * @typeParam T - the type of the data that the event will provide
449
- */
450
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
451
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
452
- hasListeners(name:string):boolean;
453
- /**
454
- * Removes an event listener added to this table.
455
- * @param name -
456
- * @param callback -
457
- * @return
458
- * @typeParam T -
459
- */
460
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
461
- }
462
- /**
463
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
464
- * in columns) either by index, or scanning the complete present index.
465
- *
466
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading
467
- * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
468
- * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
469
- * both options should be considered.
470
- *
471
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
472
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
473
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
474
- * read specific rows or cells out of the table.
475
- */
476
- export interface SubscriptionTableData extends TableData {
477
- get fullIndex():RangeSet;
478
- /**
479
- * The ordered set of row indexes removed since the last update
480
- * @return dh.RangeSet
481
- */
482
- get removed():RangeSet;
483
- /**
484
- * The ordered set of row indexes added since the last update
485
- * @return dh.RangeSet
486
- */
487
- get added():RangeSet;
488
- get columns():Array<Column>;
489
- /**
490
- * The ordered set of row indexes updated since the last update
491
- * @return dh.RangeSet
492
- */
493
- get modified():RangeSet;
494
- get rows():Array<Row>;
495
- }
496
468
  /**
497
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
498
- * the viewport again.
499
- */
500
- export interface ViewportRow extends Row {
501
- get index():LongWrapper;
502
- }
503
- /**
504
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
505
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
506
- *
507
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
508
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
509
- * backwards compatibility and to better follow JS expectations.
469
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
470
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
471
+ * are correctly freed.
510
472
  */
511
- export interface WidgetMessageDetails {
473
+ export interface WidgetExportedObject {
512
474
  /**
513
- * Returns the data from this message as a base64-encoded string.
475
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
476
+ * null, this object cannot be fetched, but can be passed to the server, such as via
477
+ * {@link Widget.sendMessage}.
478
+ * @return the string type of this server-side object, or null.
514
479
  */
515
- getDataAsBase64():string;
480
+ readonly type?:string|null;
481
+
516
482
  /**
517
- * Returns the data from this message as a Uint8Array.
483
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
484
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
485
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
518
486
  */
519
- getDataAsU8():Uint8Array;
487
+ reexport():Promise<WidgetExportedObject>;
520
488
  /**
521
- * Returns the data from this message as a utf-8 string.
489
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
490
+ * the same instance.
491
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
522
492
  */
523
- getDataAsString():string;
493
+ fetch():Promise<any>;
524
494
  /**
525
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
526
- * objects, and should close them when no longer needed.
495
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
496
+ * exist that also use that object. Should not be called after fetch() has been invoked.
527
497
  */
528
- get exportedObjects():WidgetExportedObject[];
498
+ close():void;
529
499
  }
530
500
  /**
531
501
  * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
@@ -537,56 +507,86 @@ export namespace dh {
537
507
  getDayOfMonth():number;
538
508
  toString():string;
539
509
  }
540
- export interface WorkerHeapInfo {
510
+ /**
511
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
512
+ * table column.
513
+ */
514
+ export interface ColumnStatistics {
541
515
  /**
542
- * Total heap size available for this worker.
516
+ * Gets the type of formatting that should be used for given statistic.
517
+ * <p>
518
+ * the format type for a statistic. A null return value means that the column formatting should be used.
519
+ * @param name - the display name of the statistic
520
+ * @return String
543
521
  */
544
- get totalHeapSize():number;
545
- get freeMemory():number;
546
- get maximumHeapSize():number;
522
+ getType(name:string):string;
523
+ /**
524
+ * Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
525
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
526
+ * than 19 unique values.
527
+ * @return Map of String double
528
+ */
529
+ get uniqueValues():Map<string, number>;
530
+ /**
531
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
532
+ * <p>
533
+ * A map of each statistic's name to its value.
534
+ * @return Map of String and Object
535
+ */
536
+ get statisticsMap():Map<string, object>;
547
537
  }
548
538
  /**
549
- * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
550
- * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
551
- * for easier scrolling without going to the server.
539
+ * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
540
+ * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
541
+ * <p>
542
+ * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
543
+ * server. The setViewport method can be used to adjust this table instead of creating a new one.
544
+ * <p>
545
+ * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
546
+ * to the underlying handle and accumulated data.
547
+ * <p>
548
+ * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
549
+ * the idea then that the caller did not actually use this type. This means that for every exported method (which then
550
+ * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
551
+ * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
552
+ * deems it no longer in use.
553
+ * <p>
554
+ * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
555
+ * true), providing a way to stop the server from streaming updates to the client.
556
+ *
557
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
558
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
559
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
560
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
561
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
552
562
  */
553
- export interface ViewportData extends TableData {
563
+ export interface TableViewportSubscription extends HasEventHandling {
554
564
  /**
555
- * The index of the first returned row
556
- * @return double
565
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
566
+ * @param firstRow -
567
+ * @param lastRow -
568
+ * @param columns -
569
+ * @param updateIntervalMs -
557
570
  */
558
- get offset():number;
571
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
559
572
  /**
560
- * A list of columns describing the data types in each row
561
- * @return {@link dh.Column} array.
573
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
562
574
  */
563
- get columns():Array<Column>;
575
+ close():void;
564
576
  /**
565
- * An array of rows of data
566
- * @return {@link dh.ViewportRow} array.
577
+ * Gets the data currently visible in this viewport
578
+ * @return Promise of {@link dh.TableData}.
567
579
  */
568
- get rows():Array<ViewportRow>;
569
- }
570
- export interface RefreshToken {
571
- get bytes():string;
572
- get expiry():number;
580
+ getViewportData():Promise<TableData>;
581
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
573
582
  }
574
- export interface JoinableTable {
575
- freeze():Promise<Table>;
576
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
583
+ export interface WorkerHeapInfo {
577
584
  /**
578
- * @deprecated
585
+ * Total heap size available for this worker.
579
586
  */
580
- join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:object):Promise<Table>;
581
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:string):Promise<Table>;
582
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
583
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
584
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
585
- }
586
- export interface ColumnGroup {
587
- get name():string|null;
588
- get children():string[]|null;
589
- get color():string|null;
587
+ get totalHeapSize():number;
588
+ get freeMemory():number;
589
+ get maximumHeapSize():number;
590
590
  }
591
591
  export interface TreeViewportData extends TableData {
592
592
  get offset():number;
@@ -594,689 +594,463 @@ export namespace dh {
594
594
  get rows():Array<TreeRow>;
595
595
  }
596
596
 
597
- export class IdeSession implements HasEventHandling {
598
- static readonly EVENT_COMMANDSTARTED:string;
599
- static readonly EVENT_REQUEST_FAILED:string;
597
+ /**
598
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
599
+ */
600
+ export class BigIntegerWrapper {
601
+ protected constructor();
602
+
603
+ static ofString(str:string):BigIntegerWrapper;
604
+ asNumber():number;
605
+ valueOf():string;
606
+ toString():string;
607
+ }
600
608
 
609
+ export class DateWrapper extends LongWrapper {
610
+ protected constructor();
611
+
612
+ static ofJsDate(date:Date):DateWrapper;
613
+ asDate():Date;
614
+ }
615
+
616
+ /**
617
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
618
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
619
+ * instance.
620
+ */
621
+ export class FilterCondition {
601
622
  protected constructor();
602
623
 
603
624
  /**
604
- * Load the named table, with columns and size information already fully populated.
605
- * @param name -
606
- * @param applyPreviewColumns - optional boolean
607
- * @return {@link Promise} of {@link dh.Table}
625
+ * the opposite of this condition
626
+ * @return FilterCondition
608
627
  */
609
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
628
+ not():FilterCondition;
610
629
  /**
611
- * Load the named Figure, including its tables and tablemaps as needed.
612
- * @param name -
613
- * @return promise of dh.plot.Figure
630
+ * a condition representing the current condition logically ANDed with the other parameters
631
+ * @param filters -
632
+ * @return FilterCondition
614
633
  */
615
- getFigure(name:string):Promise<dh.plot.Figure>;
634
+ and(...filters:FilterCondition[]):FilterCondition;
616
635
  /**
617
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
618
- * size is presently not available until the viewport is first set.
619
- * @param name -
620
- * @return {@link Promise} of {@link dh.TreeTable}
636
+ * a condition representing the current condition logically ORed with the other parameters
637
+ * @param filters -
638
+ * @return FilterCondition.
621
639
  */
622
- getTreeTable(name:string):Promise<TreeTable>;
623
- getHierarchicalTable(name:string):Promise<TreeTable>;
624
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
625
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
640
+ or(...filters:FilterCondition[]):FilterCondition;
626
641
  /**
627
- * Merges the given tables into a single table. Assumes all tables have the same structure.
628
- * @param tables -
629
- * @return {@link Promise} of {@link dh.Table}
642
+ * a string suitable for debugging showing the details of this condition.
643
+ * @return String.
630
644
  */
631
- mergeTables(tables:Table[]):Promise<Table>;
632
- bindTableToVariable(table:Table, name:string):Promise<void>;
633
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
634
- close():void;
635
- runCode(code:string):Promise<dh.ide.CommandResult>;
636
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
637
- openDocument(params:object):void;
638
- changeDocument(params:object):void;
639
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
640
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
641
- getHover(params:object):Promise<dh.lsp.Hover>;
642
- closeDocument(params:object):void;
645
+ toString():string;
646
+ get columns():Array<Column>;
643
647
  /**
644
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
645
- * values will be null.
646
- * @param size -
647
- * @return {@link Promise} of {@link dh.Table}
648
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
649
+ * functions:
650
+ * <ul>
651
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
652
+ * than the third</li>
653
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
654
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
655
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
656
+ * "not a number"</i></li>
657
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
658
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
659
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
660
+ * expression</li>
661
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
662
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
663
+ * <p>
664
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
665
+ * method should be used in other cases
666
+ * </p>
667
+ * </li>
668
+ * </ul>
669
+ * @param function -
670
+ * @param args -
671
+ * @return dh.FilterCondition
648
672
  */
649
- emptyTable(size:number):Promise<Table>;
673
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
650
674
  /**
651
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
652
- * the table will be populated with the interval from the specified date until now.
653
- * @param periodNanos -
654
- * @param startTime -
655
- * @return {@link Promise} of {@link dh.Table}
675
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
676
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
677
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
678
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
679
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
680
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
681
+ * {@link dh.Column.filter}).
682
+ * @param value -
683
+ * @param columns -
684
+ * @return dh.FilterCondition
656
685
  */
657
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
658
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
659
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
660
- hasListeners(name:string):boolean;
661
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
686
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
662
687
  }
663
688
 
664
689
  /**
665
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
690
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
691
+ * this type TableMap.
692
+ * @deprecated
666
693
  */
667
- export class BigIntegerWrapper {
694
+ export class TableMap {
695
+ static readonly EVENT_KEYADDED:string;
696
+ static readonly EVENT_DISCONNECT:string;
697
+ static readonly EVENT_RECONNECT:string;
698
+ static readonly EVENT_RECONNECTFAILED:string;
699
+
668
700
  protected constructor();
701
+ }
669
702
 
670
- static ofString(str:string):BigIntegerWrapper;
671
- asNumber():number;
672
- valueOf():string;
673
- toString():string;
703
+ export class LoginCredentials {
704
+ type?:string|null;
705
+ username?:string|null;
706
+ token?:string|null;
707
+
708
+ constructor();
674
709
  }
675
710
 
676
711
  /**
677
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
678
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
679
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
680
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
681
- * instance.
712
+ * Event fired when a command is issued from the client.
682
713
  */
683
- export class FilterValue {
714
+ export class CommandInfo {
715
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
716
+
717
+ get result():Promise<dh.ide.CommandResult>;
718
+ get code():string;
719
+ }
720
+
721
+ export class CustomColumn {
722
+ static readonly TYPE_FORMAT_COLOR:string;
723
+ static readonly TYPE_FORMAT_NUMBER:string;
724
+ static readonly TYPE_FORMAT_DATE:string;
725
+ static readonly TYPE_NEW:string;
726
+
684
727
  protected constructor();
685
728
 
729
+ valueOf():string;
730
+ toString():string;
686
731
  /**
687
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
688
- * {@link TableData.get} for DateTime values. To create
689
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
690
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
691
- * 64-bit long integer, use {@link LongWrapper.ofString}.
692
- * @param input - the number to wrap as a FilterValue
693
- * @return an immutable FilterValue that can be built into a filter
732
+ * The expression to evaluate this custom column.
733
+ * @return String
694
734
  */
695
- static ofNumber(input:LongWrapper|number):FilterValue;
735
+ get expression():string;
696
736
  /**
697
- * a filter condition checking if the current value is equal to the given parameter
698
- * @param term -
699
- * @return {@link dh.FilterCondition}
737
+ * The name of the column to use.
738
+ * @return String
700
739
  */
701
- eq(term:FilterValue):FilterCondition;
740
+ get name():string;
702
741
  /**
703
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
704
- * vs lower case
705
- * @param term -
706
- * @return {@link dh.FilterCondition}
742
+ * Type of custom column. One of
743
+ *
744
+ * <ul>
745
+ * <li>FORMAT_COLOR</li>
746
+ * <li>FORMAT_NUMBER</li>
747
+ * <li>FORMAT_DATE</li>
748
+ * <li>NEW</li>
749
+ * </ul>
750
+ * @return String
707
751
  */
708
- eqIgnoreCase(term:FilterValue):FilterCondition;
752
+ get type():string;
753
+ }
754
+
755
+ /**
756
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
757
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
758
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
759
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
760
+ * of <b>TotalsTableConfig</b> will be supplied.
761
+ *
762
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
763
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
764
+ * expected formats.
765
+ */
766
+ export class TotalsTableConfig {
709
767
  /**
710
- * a filter condition checking if the current value is not equal to the given parameter
711
- * @param term -
712
- * @return {@link dh.FilterCondition}
768
+ * @deprecated
713
769
  */
714
- notEq(term:FilterValue):FilterCondition;
770
+ static readonly COUNT:string;
715
771
  /**
716
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
717
- * upper vs lower case
718
- * @param term -
719
- * @return {@link dh.FilterCondition}
772
+ * @deprecated
720
773
  */
721
- notEqIgnoreCase(term:FilterValue):FilterCondition;
774
+ static readonly MIN:string;
722
775
  /**
723
- * a filter condition checking if the current value is greater than the given parameter
724
- * @param term -
725
- * @return {@link dh.FilterCondition}
776
+ * @deprecated
726
777
  */
727
- greaterThan(term:FilterValue):FilterCondition;
778
+ static readonly MAX:string;
728
779
  /**
729
- * a filter condition checking if the current value is less than the given parameter
730
- * @param term -
731
- * @return {@link dh.FilterCondition}
780
+ * @deprecated
732
781
  */
733
- lessThan(term:FilterValue):FilterCondition;
782
+ static readonly SUM:string;
734
783
  /**
735
- * a filter condition checking if the current value is greater than or equal to the given parameter
736
- * @param term -
737
- * @return {@link dh.FilterCondition}
784
+ * @deprecated
738
785
  */
739
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
786
+ static readonly ABS_SUM:string;
740
787
  /**
741
- * a filter condition checking if the current value is less than or equal to the given parameter
742
- * @param term -
743
- * @return {@link dh.FilterCondition}
788
+ * @deprecated
744
789
  */
745
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
790
+ static readonly VAR:string;
746
791
  /**
747
- * a filter condition checking if the current value is in the given set of values
748
- * @param terms -
749
- * @return {@link dh.FilterCondition}
792
+ * @deprecated
750
793
  */
751
- in(terms:FilterValue[]):FilterCondition;
794
+ static readonly AVG:string;
752
795
  /**
753
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
754
- * lower case
755
- * @param terms -
756
- * @return {@link dh.FilterCondition}
796
+ * @deprecated
757
797
  */
758
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
798
+ static readonly STD:string;
759
799
  /**
760
- * a filter condition checking that the current value is not in the given set of values
761
- * @param terms -
762
- * @return {@link dh.FilterCondition}
800
+ * @deprecated
763
801
  */
764
- notIn(terms:FilterValue[]):FilterCondition;
802
+ static readonly FIRST:string;
765
803
  /**
766
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
767
- * upper vs lower case
768
- * @param terms -
769
- * @return {@link dh.FilterCondition}
804
+ * @deprecated
770
805
  */
771
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
806
+ static readonly LAST:string;
772
807
  /**
773
- * a filter condition checking if the given value contains the given string value
774
- * @param term -
775
- * @return {@link dh.FilterCondition}
808
+ * @deprecated
776
809
  */
777
- contains(term:FilterValue):FilterCondition;
810
+ static readonly SKIP:string;
778
811
  /**
779
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
780
- * lower case
781
- * @param term -
782
- * @return {@link dh.FilterCondition}
812
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
783
813
  */
784
- containsIgnoreCase(term:FilterValue):FilterCondition;
814
+ showTotalsByDefault:boolean;
785
815
  /**
786
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
787
- * use Java regex syntax
788
- * @param pattern -
789
- * @return {@link dh.FilterCondition}
816
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
790
817
  */
791
- matches(pattern:FilterValue):FilterCondition;
818
+ showGrandTotalsByDefault:boolean;
792
819
  /**
793
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
794
- * differences of upper vs lower case. Regex patterns use Java regex syntax
795
- * @param pattern -
796
- * @return {@link dh.FilterCondition}
820
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
797
821
  */
798
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
822
+ defaultOperation:AggregationOperationType;
799
823
  /**
800
- * a filter condition checking if the current value is a true boolean
801
- * @return {@link dh.FilterCondition}
824
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
825
+ * Table. If a column is omitted, the defaultOperation is used.
802
826
  */
803
- isTrue():FilterCondition;
804
- /**
805
- * a filter condition checking if the current value is a false boolean
806
- * @return {@link dh.FilterCondition}
807
- */
808
- isFalse():FilterCondition;
809
- /**
810
- * a filter condition checking if the current value is a null value
811
- * @return {@link dh.FilterCondition}
812
- */
813
- isNull():FilterCondition;
827
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
814
828
  /**
815
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
816
- * functions that can be invoked on a String:
817
- * <ul>
818
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
819
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
820
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
821
- * regular expression</li>
822
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
823
- * <p>
824
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
825
- * </p>
826
- * </li>
827
- * </ul>
828
- * @param method -
829
- * @param args -
830
- * @return
829
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
830
+ * these columns. See also `Table.selectDistinct`.
831
831
  */
832
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
832
+ groupBy:Array<string>;
833
+
834
+ constructor();
835
+
833
836
  toString():string;
834
- /**
835
- * Constructs a string for the filter API from the given parameter.
836
- * @param input -
837
- * @return
838
- */
839
- static ofString(input:any):FilterValue;
840
- /**
841
- * Constructs a boolean for the filter API from the given parameter.
842
- * @param b -
843
- * @return
844
- */
845
- static ofBoolean(b:boolean):FilterValue;
846
837
  }
847
838
 
848
-
849
839
  /**
850
- * A Widget represents a server side object that sends one or more responses to the client. The client can then
851
- * interpret these responses to see what to render, or how to respond.
852
- * <p>
853
- * Most custom object types result in a single response being sent to the client, often with other exported objects, but
854
- * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
855
- * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
856
- * object type, the client code that handles the payloads is expected to know what to expect. See
857
- * {@link dh.WidgetMessageDetails} for more information.
858
- * <p>
859
- * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
860
- * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
861
- * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
862
- * can close, and after close no more messages will be processed. There can be some latency in closing locally while
863
- * remote messages are still pending - it is up to implementations of plugins to handle this case.
864
- * <p>
865
- * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
866
- * What it does handle however, is allowing those messages to include references to server-side objects with those
867
- * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
868
- * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
869
- * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
870
- * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
871
- * entirely to the plugin. Messages will arrive in the order they were sent.
872
- * <p>
873
- * This can suggest several patterns for how plugins operate:
874
- * <ul>
875
- * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
876
- * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
877
- * `pandas.DataFrame` will result in a widget that only contains a static
878
- * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
879
- * provided to the JS API consumer.</li>
880
- * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
881
- * which provided them. One concrete example of this could have been
882
- * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
883
- * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
884
- * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
885
- * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
886
- * instance, so when the widget goes away, those objects should be released as well. This is also an example of
887
- * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
888
- * an internal table instance.</li>
889
- * </ul>
890
- *
891
- * Handling server objects in messages also has more than one potential pattern that can be used:
892
- * <ul>
893
- * <li>One object per message - the message clearly is about that object, no other details required.</li>
894
- * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
895
- * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
896
- * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
897
- * be used, which columns should be mapped to each axis.</li>
898
- * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
899
- * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
900
- * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
901
- * without the server somehow signaling that it will never reference that export again.</li>
902
- * </ul>
840
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
903
841
  */
904
- export class Widget implements WidgetMessageDetails, HasEventHandling {
905
- static readonly EVENT_MESSAGE:string;
906
- static readonly EVENT_CLOSE:string;
907
-
842
+ export class BigDecimalWrapper {
908
843
  protected constructor();
909
844
 
910
- /**
911
- * Ends the client connection to the server.
912
- */
913
- close():void;
914
- getDataAsBase64():string;
915
- getDataAsU8():Uint8Array;
916
- getDataAsString():string;
917
- /**
918
- * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
919
- * @param msg - string/buffer/view instance that represents data to send
920
- * @param references - an array of objects that can be safely sent to the server
921
- */
922
- sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
923
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
924
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
925
- hasListeners(name:string):boolean;
926
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
927
- /**
928
- *
929
- * @return the exported objects sent in the initial message from the server. The client is responsible for closing
930
- * them when finished using them.
931
- */
932
- get exportedObjects():WidgetExportedObject[];
933
- /**
934
- *
935
- * @return the type of this widget
936
- */
937
- get type():string;
845
+ static ofString(value:string):BigDecimalWrapper;
846
+ asNumber():number;
847
+ valueOf():string;
848
+ toString():string;
938
849
  }
939
850
 
940
851
  /**
941
- * Provides access to data in a table. Note that several methods present their response through Promises. This allows
942
- * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
943
- * inform the UI right away that they have taken place.
852
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
853
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
944
854
  */
945
- export class Table implements JoinableTable, HasEventHandling {
946
- readonly description?:string|null;
947
- readonly pluginName?:string|null;
948
- readonly layoutHints?:null|LayoutHints;
949
- static readonly EVENT_SIZECHANGED:string;
950
- static readonly EVENT_UPDATED:string;
951
- static readonly EVENT_ROWADDED:string;
952
- static readonly EVENT_ROWREMOVED:string;
953
- static readonly EVENT_ROWUPDATED:string;
954
- static readonly EVENT_SORTCHANGED:string;
955
- static readonly EVENT_FILTERCHANGED:string;
956
- static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
957
- static readonly EVENT_DISCONNECT:string;
958
- static readonly EVENT_RECONNECT:string;
959
- static readonly EVENT_RECONNECTFAILED:string;
960
- static readonly EVENT_REQUEST_FAILED:string;
961
- static readonly EVENT_REQUEST_SUCCEEDED:string;
962
- static readonly SIZE_UNCOALESCED:number;
855
+ export class ConnectOptions {
856
+ headers:{ [key: string]: string; };
963
857
 
964
- protected constructor();
858
+ constructor();
859
+ }
965
860
 
966
- batch(userCode:(arg0:unknown)=>void):Promise<Table>;
967
- /**
968
- * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
969
- * caching a returned value.
970
- * @param key -
971
- * @return {@link dh.Column}
972
- */
973
- findColumn(key:string):Column;
974
- /**
975
- * Retrieve multiple columns specified by the given names.
976
- * @param keys -
977
- * @return {@link dh.Column} array
978
- */
979
- findColumns(keys:string[]):Column[];
980
- isBlinkTable():boolean;
981
- /**
982
- * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
983
- * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
984
- * @return Promise of dh.InputTable
985
- */
986
- inputTable():Promise<InputTable>;
987
- /**
988
- * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
989
- */
990
- close():void;
991
- getAttributes():string[];
992
- /**
993
- * null if no property exists, a string if it is an easily serializable property, or a ```Promise
994
- * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
995
- * @param attributeName -
996
- * @return Object
997
- */
998
- getAttribute(attributeName:string):unknown|undefined|null;
999
- /**
1000
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
1001
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
1002
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
1003
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
1004
- * not.
1005
- * @param sort -
1006
- * @return {@link dh.Sort} array
1007
- */
1008
- applySort(sort:Sort[]):Array<Sort>;
1009
- /**
1010
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
1011
- * will immediately return the new value, but you may receive update events using the old filter before the new one
1012
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
1013
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
1014
- * will not.
1015
- * @param filter -
1016
- * @return {@link dh.FilterCondition} array
1017
- */
1018
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1019
- /**
1020
- * used when adding new filter and sort operations to the table, as long as they are present.
1021
- * @param customColumns -
1022
- * @return {@link dh.CustomColumn} array
1023
- */
1024
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
1025
- /**
1026
- * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
1027
- * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
1028
- * will result in events to be fired once data becomes available, starting with an `updated` event and a
1029
- * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
1030
- * needed.
1031
- * @param firstRow -
1032
- * @param lastRow -
1033
- * @param columns -
1034
- * @param updateIntervalMs -
1035
- * @return {@link dh.TableViewportSubscription}
1036
- */
1037
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
1038
- /**
1039
- * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
1040
- * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
1041
- * separate the lifespan of this promise from the table itself, call
1042
- * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
1043
- * @return Promise of {@link dh.TableData}
1044
- */
1045
- getViewportData():Promise<TableData>;
1046
- /**
1047
- * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
1048
- * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
1049
- * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
1050
- * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
1051
- * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
1052
- * called on it to stop it, and all events are fired from the TableSubscription instance.
1053
- * @param columns -
1054
- * @param updateIntervalMs -
1055
- * @return {@link dh.TableSubscription}
1056
- */
1057
- subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
1058
- /**
1059
- * a new table containing the distinct tuples of values from the given columns that are present in the original
1060
- * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1061
- * order of appearance of values from the original table.
1062
- * @param columns -
1063
- * @return Promise of dh.Table
1064
- */
1065
- selectDistinct(columns:Column[]):Promise<Table>;
1066
- /**
1067
- * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1068
- * @return Promise of dh.Table
1069
- */
1070
- copy():Promise<Table>;
1071
- /**
1072
- * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1073
- * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1074
- * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1075
- * called on it when not in use.
1076
- * @param config -
1077
- * @return Promise of dh.TotalsTable
1078
- */
1079
- getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
861
+ /**
862
+ * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
863
+ * mechanism, and so reimplemented here.
864
+ * <p>
865
+ * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
866
+ * <p>
867
+ * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
868
+ * operations are performed, but encourage the client code to re-set them to the desired position.
869
+ * <p>
870
+ * The table size will be -1 until a viewport has been fetched.
871
+ * <p>
872
+ * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
873
+ * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
874
+ * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
875
+ * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
876
+ * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
877
+ * the viewport).
878
+ * <p>
879
+ * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
880
+ * and count of children at each level of the hierarchy, and differences in the data that is available.
881
+ * <p>
882
+ * <ul>
883
+ * <li>There is no {@link Table.totalSize | totalSize} property.</li>
884
+ * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
885
+ * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
886
+ * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
887
+ * new operation is pending.</li>
888
+ * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
889
+ * custom columns applied, and the TreeTable can be recreated.</li>
890
+ * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
891
+ * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
892
+ * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
893
+ * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
894
+ * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
895
+ * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
896
+ * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
897
+ * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
898
+ * where {@link TreeRow.hasChildren} is false will be different from usual.</li>
899
+ * </ul>
900
+ */
901
+ export class TreeTable implements HasEventHandling {
1080
902
  /**
1081
- * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1082
- * above for more specifics.
1083
- * @param config -
1084
- * @return promise of dh.TotalsTable
903
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1085
904
  */
1086
- getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
905
+ static readonly EVENT_UPDATED:string;
1087
906
  /**
1088
- * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1089
- * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1090
- * @param configObject -
1091
- * @return Promise of dh.TreeTable
907
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1092
908
  */
1093
- rollup(configObject:RollupConfig):Promise<TreeTable>;
909
+ static readonly EVENT_DISCONNECT:string;
1094
910
  /**
1095
- * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1096
- * new `TreeTable` which must have close() called on it when not in use.
1097
- * @param configObject -
1098
- * @return Promise dh.TreeTable
911
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1099
912
  */
1100
- treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
913
+ static readonly EVENT_RECONNECT:string;
1101
914
  /**
1102
- * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1103
- * table will not update. This does not change the original table, and the new table will not have any of the client
1104
- * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1105
- * @return Promise of dh.Table
915
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1106
916
  */
1107
- freeze():Promise<Table>;
1108
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
917
+ static readonly EVENT_RECONNECTFAILED:string;
1109
918
  /**
1110
- *
1111
- * @deprecated a promise that will be resolved with a newly created table holding the results of the join operation.
1112
- * The last parameter is optional, and if not specified or empty, all columns from the right table will
1113
- * be added to the output. Callers are responsible for ensuring that there are no duplicates - a match
1114
- * pair can be passed instead of a name to specify the new name for the column. Supported `joinType`
1115
- * values (consult Deephaven's "Joining Data from Multiple Tables for more detail): "Join" <a href='https://docs.deephaven.io/latest/Content/writeQueries/tableOperations/joins.htm#Joining_Data_from_Multiple_Tables'>Joining_Data_from_Multiple_Tables</a>
1116
- * "Natural" "AJ" "ReverseAJ" "ExactJoin" "LeftJoin"
1117
- * @param joinType -
1118
- * @param rightTable -
1119
- * @param columnsToMatch -
1120
- * @param columnsToAdd -
1121
- * @param asOfMatchRule -
1122
- * @return Promise of dh.Table
919
+ * event.detail is the currently visible viewport data based on the active viewport configuration.
1123
920
  */
1124
- join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:unknown|undefined|null):Promise<Table>;
921
+ static readonly EVENT_REQUEST_FAILED:string;
922
+ readonly description?:string|null;
923
+
924
+ protected constructor();
925
+
1125
926
  /**
1126
- * a promise that will be resolved with the newly created table holding the results of the specified as-of join
1127
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1128
- * right table being added to the output. The <b>asOfMatchRule</b> is optional, defaults to <b>LESS_THAN_EQUAL</b>
1129
- *
1130
- * <p>
1131
- * the allowed values are:
1132
- * </p>
1133
- *
1134
- * <ul>
1135
- * <li>LESS_THAN_EQUAL</li>
1136
- * <li>LESS_THAN</li>
1137
- * <li>GREATER_THAN_EQUAL</li>
1138
- * <li>GREATER_THAN</li>
1139
- * </ul>
1140
- * @param rightTable -
1141
- * @param columnsToMatch -
1142
- * @param columnsToAdd -
1143
- * @param asOfMatchRule -
1144
- * @return Promise og dh.Table
927
+ * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
928
+ * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
929
+ * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
930
+ * boolean parameter.
931
+ * @param row -
932
+ * @param expandDescendants -
1145
933
  */
1146
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
934
+ expand(row:TreeRow|number, expandDescendants?:boolean):void;
1147
935
  /**
1148
- * a promise that will be resolved with the newly created table holding the results of the specified cross join
1149
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1150
- * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
1151
- * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
1152
- * @param rightTable -
1153
- * @param columnsToMatch -
1154
- * @param columnsToAdd -
1155
- * @param reserve_bits -
1156
- * @return Promise of dh.Table
936
+ * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
937
+ * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
938
+ * @param row -
1157
939
  */
1158
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
940
+ collapse(row:TreeRow|number):void;
1159
941
  /**
1160
- * a promise that will be resolved with the newly created table holding the results of the specified exact join
1161
- * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
1162
- * table being added to the output.
1163
- * @param rightTable -
1164
- * @param columnsToMatch -
1165
- * @param columnsToAdd -
1166
- * @return Promise of dh.Table
942
+ * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
943
+ * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
944
+ * is true, then its children will also be expanded.
945
+ * @param row -
946
+ * @param isExpanded -
947
+ * @param expandDescendants -
1167
948
  */
1168
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
949
+ setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
950
+ expandAll():void;
951
+ collapseAll():void;
1169
952
  /**
1170
- * a promise that will be resolved with the newly created table holding the results of the specified natural join
1171
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1172
- * right table being added to the output.
1173
- * @param rightTable -
1174
- * @param columnsToMatch -
1175
- * @param columnsToAdd -
1176
- * @return Promise of dh.Table
953
+ * true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
954
+ * is available
955
+ * @param row -
956
+ * @return boolean
1177
957
  */
1178
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1179
- byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
958
+ isExpanded(row:TreeRow|number):boolean;
959
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
960
+ getViewportData():Promise<TreeViewportData>;
1180
961
  /**
1181
- * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1182
- * keys.
1183
- * @param keys -
1184
- * @param dropKeys -
1185
- * @return Promise dh.PartitionedTable
962
+ * Indicates that the table will no longer be used, and server resources can be freed.
1186
963
  */
1187
- partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
964
+ close():void;
965
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1188
966
  /**
1189
- * a promise that will resolve to ColumnStatistics for the column of this table.
1190
- * @param column -
1191
- * @return Promise of dh.ColumnStatistics
967
+ * Applies the given sort to all levels of the tree. Returns the previous sort in use.
968
+ * @param sort -
969
+ * @return {@link dh.Sort} array
1192
970
  */
1193
- getColumnStatistics(column:Column):Promise<ColumnStatistics>;
971
+ applySort(sort:Sort[]):Array<Sort>;
1194
972
  /**
1195
- * Seek the row matching the data provided
1196
- * @param startingRow - Row to start the seek from
1197
- * @param column - Column to seek for value on
1198
- * @param valueType - Type of value provided
1199
- * @param seekValue - Value to seek
1200
- * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1201
- * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1202
- * `false`.
1203
- * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1204
- * @return A promise that resolves to the row value found.
973
+ * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
974
+ * node will be visible as well even if that parent node would not normally be visible due to the filter's
975
+ * condition. Returns the previous sort in use.
976
+ * @param filter -
977
+ * @return {@link dh.FilterCondition} array
1205
978
  */
1206
- seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1207
- toString():string;
979
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1208
980
  /**
1209
- * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1210
- * .inputTable() to add or remove data from the underlying table.
1211
- * @return boolean
981
+ * a column with the given name, or throws an exception if it cannot be found
982
+ * @param key -
983
+ * @return {@link dh.Column}
1212
984
  */
1213
- get hasInputTable():boolean;
985
+ findColumn(key:string):Column;
1214
986
  /**
1215
- * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1216
- * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1217
- * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1218
- * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
987
+ * an array with all of the named columns in order, or throws an exception if one cannot be found.
988
+ * @param keys -
1219
989
  * @return {@link dh.Column} array
1220
990
  */
1221
- get columns():Array<Column>;
1222
- /**
1223
- * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1224
- * @return dh.TotalsTableConfig
1225
- */
1226
- get totalsTableConfig():TotalsTableConfig;
1227
- /**
1228
- * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1229
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
1230
- * for the <b>sortchanged</b> event to know when to update the UI.
1231
- * @return {@link dh.Sort} array
1232
- */
1233
- get sort():Array<Sort>;
991
+ findColumns(keys:string[]):Column[];
1234
992
  /**
1235
- * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1236
- * ones. To update, call <b>applyCustomColumns()</b>.
1237
- * @return {@link dh.CustomColumn} array
993
+ * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
994
+ * values for the given columns in the source table:
995
+ * <ul>
996
+ * <li>Rollups may make no sense, since values are aggregated.</li>
997
+ * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
998
+ * the tree.</li>
999
+ * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
1000
+ * in the resulting table.</li>
1001
+ * </ul>
1238
1002
  */
1239
- get customColumns():Array<CustomColumn>;
1003
+ selectDistinct(columns:Column[]):Promise<Table>;
1004
+ getTotalsTableConfig():Promise<TotalsTableConfig>;
1005
+ getTotalsTable(config?:object):Promise<TotalsTable>;
1006
+ getGrandTotalsTable(config?:object):Promise<TotalsTable>;
1240
1007
  /**
1241
- * True if this table may receive updates from the server, including size changed events, updated events after
1242
- * initial snapshot.
1243
- * @return boolean
1008
+ * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
1009
+ * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
1010
+ * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
1011
+ * state is also not copied.
1012
+ * @return Promise of dh.TreeTable
1244
1013
  */
1245
- get isRefreshing():boolean;
1014
+ copy():Promise<TreeTable>;
1246
1015
  /**
1247
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1248
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
1249
- * for the <b>filterchanged</b> event to know when to update the UI.
1016
+ * The current filter configuration of this Tree Table.
1250
1017
  * @return {@link dh.FilterCondition} array
1251
1018
  */
1252
1019
  get filter():Array<FilterCondition>;
1253
1020
  /**
1254
- * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
1255
- * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
1256
- * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
1257
- * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
1258
- * @return double
1021
+ * True if this is a roll-up and will provide the original rows that make up each grouping.
1022
+ * @return boolean
1259
1023
  */
1260
- get totalSize():number;
1024
+ get includeConstituents():boolean;
1025
+ get groupedColumns():Array<Column>;
1261
1026
  /**
1262
- * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
1263
- * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
1264
- * property). for details).
1027
+ * True if this table has been closed.
1028
+ * @return boolean
1029
+ */
1030
+ get isClosed():boolean;
1031
+ /**
1032
+ * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1033
+ * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1034
+ * when considering collapse/expand states).
1265
1035
  * @return double
1266
1036
  */
1267
1037
  get size():number;
1268
1038
  /**
1269
- * True if this table has been closed.
1270
- * @return boolean
1039
+ * The columns that can be shown in this Tree Table.
1040
+ * @return {@link dh.Column} array
1271
1041
  */
1272
- get isClosed():boolean;
1042
+ get columns():Array<Column>;
1273
1043
  /**
1274
- * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
1275
- * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
1276
- * will be unavailable until table is coalesced.
1044
+ * The current sort configuration of this Tree Table
1045
+ * @return {@link dh.Sort} array.
1046
+ */
1047
+ get sort():Array<Sort>;
1048
+ /**
1049
+ * True if this table may receive updates from the server, including size changed events, updated events after
1050
+ * initial snapshot.
1277
1051
  * @return boolean
1278
1052
  */
1279
- get isUncoalesced():boolean;
1053
+ get isRefreshing():boolean;
1280
1054
  /**
1281
1055
  * Listen for events on this object.
1282
1056
  * @param name - the name of the event to listen for
@@ -1295,267 +1069,435 @@ export namespace dh {
1295
1069
  * @typeParam T -
1296
1070
  */
1297
1071
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1072
+ }
1073
+
1074
+
1075
+ /**
1076
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1077
+ * column.
1078
+ */
1079
+ export class Column {
1298
1080
  /**
1299
- * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
1300
- * do not support reverse.
1301
- * @return {@link dh.Sort}
1081
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1082
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1083
+ * @return String
1302
1084
  */
1303
- static reverse():Sort;
1304
- }
1085
+ readonly constituentType?:string|null;
1086
+ readonly description?:string|null;
1305
1087
 
1306
- export class Ide {
1307
- constructor();
1088
+ protected constructor();
1308
1089
 
1309
1090
  /**
1310
- * @deprecated
1091
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
1092
+ * @param row -
1093
+ * @return Any
1311
1094
  */
1312
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1095
+ get(row:Row):any;
1096
+ getFormat(row:Row):Format;
1313
1097
  /**
1314
- * @deprecated
1098
+ * Creates a sort builder object, to be used when sorting by this column.
1099
+ * @return {@link dh.Sort}
1315
1100
  */
1316
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1101
+ sort():Sort;
1102
+ /**
1103
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1104
+ * operation, or as a builder to create a filter operation.
1105
+ * @return {@link dh.FilterValue}
1106
+ */
1107
+ filter():FilterValue;
1108
+ /**
1109
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1110
+ * @param expression -
1111
+ * @return {@link dh.CustomColumn}
1112
+ */
1113
+ formatColor(expression:string):CustomColumn;
1114
+ /**
1115
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1116
+ * @param expression -
1117
+ * @return {@link dh.CustomColumn}
1118
+ */
1119
+ formatNumber(expression:string):CustomColumn;
1120
+ /**
1121
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1122
+ * @param expression -
1123
+ * @return {@link dh.CustomColumn}
1124
+ */
1125
+ formatDate(expression:string):CustomColumn;
1126
+ toString():string;
1127
+ /**
1128
+ * Label for this column.
1129
+ * @return String
1130
+ */
1131
+ get name():string;
1132
+ /**
1133
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1134
+ * <b>isUncoalesced</b> property on <b>Table</b>)
1135
+ * @return boolean
1136
+ */
1137
+ get isPartitionColumn():boolean;
1138
+ /**
1139
+ *
1140
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1141
+ * @return int
1142
+ */
1143
+ get index():number;
1144
+ get isSortable():boolean;
1145
+ /**
1146
+ * Type of the row data that can be found in this column.
1147
+ * @return String
1148
+ */
1149
+ get type():string;
1150
+ /**
1151
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1152
+ * table using <b>applyCustomColumns</b> with the parameters specified.
1153
+ * @param expression -
1154
+ * @return {@link dh.CustomColumn}
1155
+ */
1156
+ static formatRowColor(expression:string):CustomColumn;
1157
+ /**
1158
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1159
+ * @param name -
1160
+ * @param expression -
1161
+ * @return {@link dh.CustomColumn}
1162
+ */
1163
+ static createCustomColumn(name:string, expression:string):CustomColumn;
1317
1164
  }
1318
1165
 
1319
1166
  /**
1320
- * Deprecated for use in Deephaven Core.
1321
- * @deprecated
1167
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1168
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1169
+ *
1170
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1171
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1172
+ * forward data to it.
1173
+ *
1174
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1175
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1176
+ * viewports to make it less expensive to compute for large tables.
1322
1177
  */
1323
- export class Client {
1178
+ export class TableSubscription implements HasEventHandling {
1179
+ /**
1180
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1181
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1182
+ * allowing access to the entire range of items currently in the subscribed columns.
1183
+ */
1184
+ static readonly EVENT_UPDATED:string;
1185
+
1186
+ protected constructor();
1187
+
1188
+ /**
1189
+ * Stops the subscription on the server.
1190
+ */
1191
+ close():void;
1192
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1193
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1194
+ hasListeners(name:string):boolean;
1195
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1196
+ /**
1197
+ * The columns that were subscribed to when this subscription was created
1198
+ * @return {@link dh.Column}
1199
+ */
1200
+ get columns():Array<Column>;
1201
+ }
1202
+
1203
+ export class CoreClient implements HasEventHandling {
1204
+ static readonly EVENT_CONNECT:string;
1205
+ static readonly EVENT_DISCONNECT:string;
1206
+ static readonly EVENT_RECONNECT:string;
1207
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1208
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1324
1209
  static readonly EVENT_REQUEST_FAILED:string;
1325
1210
  static readonly EVENT_REQUEST_STARTED:string;
1326
1211
  static readonly EVENT_REQUEST_SUCCEEDED:string;
1212
+ static readonly LOGIN_TYPE_PASSWORD:string;
1213
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
1327
1214
 
1328
- constructor();
1329
- }
1330
-
1331
- export class LongWrapper {
1332
- protected constructor();
1215
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
1333
1216
 
1334
- static ofString(str:string):LongWrapper;
1335
- asNumber():number;
1336
- valueOf():string;
1337
- toString():string;
1217
+ running():Promise<CoreClient>;
1218
+ getServerUrl():string;
1219
+ getAuthConfigValues():Promise<string[][]>;
1220
+ login(credentials:LoginCredentials):Promise<void>;
1221
+ relogin(token:RefreshToken):Promise<void>;
1222
+ onConnected(timeoutInMillis?:number):Promise<void>;
1223
+ getServerConfigValues():Promise<string[][]>;
1224
+ getStorageService():dh.storage.StorageService;
1225
+ getAsIdeConnection():Promise<IdeConnection>;
1226
+ disconnect():void;
1227
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1228
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1229
+ hasListeners(name:string):boolean;
1230
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1338
1231
  }
1339
1232
 
1340
1233
  /**
1341
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1342
- *
1343
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1344
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1345
- * value can be provided describing the strategy the engine should use when grouping the rows.
1234
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1235
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1236
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1237
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1238
+ * instance.
1346
1239
  */
1347
- export class TreeTableConfig {
1240
+ export class FilterValue {
1241
+ protected constructor();
1242
+
1348
1243
  /**
1349
- * The column representing the unique ID for each item
1244
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1245
+ * {@link TableData.get} for DateTime values. To create
1246
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1247
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1248
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1249
+ * @param input - the number to wrap as a FilterValue
1250
+ * @return an immutable FilterValue that can be built into a filter
1350
1251
  */
1351
- idColumn:string;
1252
+ static ofNumber(input:LongWrapper|number):FilterValue;
1352
1253
  /**
1353
- * The column representing the parent ID for each item
1254
+ * a filter condition checking if the current value is equal to the given parameter
1255
+ * @param term -
1256
+ * @return {@link dh.FilterCondition}
1354
1257
  */
1355
- parentColumn:string;
1258
+ eq(term:FilterValue):FilterCondition;
1356
1259
  /**
1357
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1260
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1261
+ * vs lower case
1262
+ * @param term -
1263
+ * @return {@link dh.FilterCondition}
1358
1264
  */
1359
- promoteOrphansToRoot:boolean;
1360
-
1361
- constructor();
1362
- }
1363
-
1364
- /**
1365
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1366
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1367
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1368
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1369
- * of <b>TotalsTableConfig</b> will be supplied.
1370
- *
1371
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1372
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1373
- * expected formats.
1374
- */
1375
- export class TotalsTableConfig {
1265
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1376
1266
  /**
1377
- * @deprecated
1267
+ * a filter condition checking if the current value is not equal to the given parameter
1268
+ * @param term -
1269
+ * @return {@link dh.FilterCondition}
1270
+ */
1271
+ notEq(term:FilterValue):FilterCondition;
1272
+ /**
1273
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1274
+ * upper vs lower case
1275
+ * @param term -
1276
+ * @return {@link dh.FilterCondition}
1277
+ */
1278
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1279
+ /**
1280
+ * a filter condition checking if the current value is greater than the given parameter
1281
+ * @param term -
1282
+ * @return {@link dh.FilterCondition}
1378
1283
  */
1379
- static readonly COUNT:string;
1284
+ greaterThan(term:FilterValue):FilterCondition;
1380
1285
  /**
1381
- * @deprecated
1286
+ * a filter condition checking if the current value is less than the given parameter
1287
+ * @param term -
1288
+ * @return {@link dh.FilterCondition}
1382
1289
  */
1383
- static readonly MIN:string;
1290
+ lessThan(term:FilterValue):FilterCondition;
1384
1291
  /**
1385
- * @deprecated
1292
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1293
+ * @param term -
1294
+ * @return {@link dh.FilterCondition}
1386
1295
  */
1387
- static readonly MAX:string;
1296
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1388
1297
  /**
1389
- * @deprecated
1298
+ * a filter condition checking if the current value is less than or equal to the given parameter
1299
+ * @param term -
1300
+ * @return {@link dh.FilterCondition}
1390
1301
  */
1391
- static readonly SUM:string;
1302
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1392
1303
  /**
1393
- * @deprecated
1304
+ * a filter condition checking if the current value is in the given set of values
1305
+ * @param terms -
1306
+ * @return {@link dh.FilterCondition}
1394
1307
  */
1395
- static readonly ABS_SUM:string;
1308
+ in(terms:FilterValue[]):FilterCondition;
1396
1309
  /**
1397
- * @deprecated
1310
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1311
+ * lower case
1312
+ * @param terms -
1313
+ * @return {@link dh.FilterCondition}
1398
1314
  */
1399
- static readonly VAR:string;
1315
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
1400
1316
  /**
1401
- * @deprecated
1317
+ * a filter condition checking that the current value is not in the given set of values
1318
+ * @param terms -
1319
+ * @return {@link dh.FilterCondition}
1402
1320
  */
1403
- static readonly AVG:string;
1321
+ notIn(terms:FilterValue[]):FilterCondition;
1404
1322
  /**
1405
- * @deprecated
1323
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1324
+ * upper vs lower case
1325
+ * @param terms -
1326
+ * @return {@link dh.FilterCondition}
1406
1327
  */
1407
- static readonly STD:string;
1328
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1408
1329
  /**
1409
- * @deprecated
1330
+ * a filter condition checking if the given value contains the given string value
1331
+ * @param term -
1332
+ * @return {@link dh.FilterCondition}
1410
1333
  */
1411
- static readonly FIRST:string;
1334
+ contains(term:FilterValue):FilterCondition;
1412
1335
  /**
1413
- * @deprecated
1336
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1337
+ * lower case
1338
+ * @param term -
1339
+ * @return {@link dh.FilterCondition}
1414
1340
  */
1415
- static readonly LAST:string;
1341
+ containsIgnoreCase(term:FilterValue):FilterCondition;
1416
1342
  /**
1417
- * @deprecated
1343
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1344
+ * use Java regex syntax
1345
+ * @param pattern -
1346
+ * @return {@link dh.FilterCondition}
1418
1347
  */
1419
- static readonly SKIP:string;
1348
+ matches(pattern:FilterValue):FilterCondition;
1420
1349
  /**
1421
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1350
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1351
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1352
+ * @param pattern -
1353
+ * @return {@link dh.FilterCondition}
1422
1354
  */
1423
- showTotalsByDefault:boolean;
1355
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1424
1356
  /**
1425
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1357
+ * a filter condition checking if the current value is a true boolean
1358
+ * @return {@link dh.FilterCondition}
1426
1359
  */
1427
- showGrandTotalsByDefault:boolean;
1360
+ isTrue():FilterCondition;
1428
1361
  /**
1429
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1362
+ * a filter condition checking if the current value is a false boolean
1363
+ * @return {@link dh.FilterCondition}
1430
1364
  */
1431
- defaultOperation:AggregationOperationType;
1365
+ isFalse():FilterCondition;
1432
1366
  /**
1433
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1434
- * Table. If a column is omitted, the defaultOperation is used.
1367
+ * a filter condition checking if the current value is a null value
1368
+ * @return {@link dh.FilterCondition}
1435
1369
  */
1436
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
1370
+ isNull():FilterCondition;
1437
1371
  /**
1438
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1439
- * these columns. See also `Table.selectDistinct`.
1372
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1373
+ * functions that can be invoked on a String:
1374
+ * <ul>
1375
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1376
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1377
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1378
+ * regular expression</li>
1379
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1380
+ * <p>
1381
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1382
+ * </p>
1383
+ * </li>
1384
+ * </ul>
1385
+ * @param method -
1386
+ * @param args -
1387
+ * @return
1440
1388
  */
1441
- groupBy:Array<string>;
1442
-
1443
- constructor();
1444
-
1389
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
1445
1390
  toString():string;
1391
+ /**
1392
+ * Constructs a string for the filter API from the given parameter.
1393
+ * @param input -
1394
+ * @return
1395
+ */
1396
+ static ofString(input:any):FilterValue;
1397
+ /**
1398
+ * Constructs a boolean for the filter API from the given parameter.
1399
+ * @param b -
1400
+ * @return
1401
+ */
1402
+ static ofBoolean(b:boolean):FilterValue;
1446
1403
  }
1447
1404
 
1448
1405
  /**
1449
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1450
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1451
- * methods return a new Sort instance.
1406
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
1407
+ * the server to get each Table. All tables will have the same structure.
1452
1408
  */
1453
- export class Sort {
1454
- static readonly ASCENDING:string;
1455
- static readonly DESCENDING:string;
1456
- static readonly REVERSE:string;
1457
-
1458
- protected constructor();
1459
-
1409
+ export class PartitionedTable implements HasEventHandling {
1460
1410
  /**
1461
- * Builds a Sort instance to sort values in ascending order.
1462
- * @return {@link dh.Sort}
1411
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1463
1412
  */
1464
- asc():Sort;
1413
+ static readonly EVENT_KEYADDED:string;
1465
1414
  /**
1466
- * Builds a Sort instance to sort values in descending order.
1467
- * @return {@link dh.Sort}
1415
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1468
1416
  */
1469
- desc():Sort;
1417
+ static readonly EVENT_DISCONNECT:string;
1470
1418
  /**
1471
- * Builds a Sort instance which takes the absolute value before applying order.
1472
- * @return {@link dh.Sort}
1419
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1473
1420
  */
1474
- abs():Sort;
1475
- toString():string;
1421
+ static readonly EVENT_RECONNECT:string;
1476
1422
  /**
1477
- * True if the absolute value of the column should be used when sorting; defaults to false.
1478
- * @return boolean
1423
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1479
1424
  */
1480
- get isAbs():boolean;
1425
+ static readonly EVENT_RECONNECTFAILED:string;
1426
+
1427
+ protected constructor();
1428
+
1429
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1481
1430
  /**
1482
- * The column which is sorted.
1483
- * @return {@link dh.Column}
1431
+ * Fetch the table with the given key.
1432
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
1433
+ * @return Promise of dh.Table
1484
1434
  */
1485
- get column():Column;
1435
+ getTable(key:object):Promise<Table>;
1486
1436
  /**
1487
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1488
- * @return String
1437
+ * Open a new table that is the result of merging all constituent tables. See
1438
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
1439
+ * @return A merged representation of the constituent tables.
1489
1440
  */
1490
- get direction():string;
1491
- }
1492
-
1493
- /**
1494
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1495
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1496
- *
1497
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1498
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1499
- * forward data to it.
1500
- *
1501
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1502
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1503
- * viewports to make it less expensive to compute for large tables.
1504
- */
1505
- export class TableSubscription implements HasEventHandling {
1441
+ getMergedTable():Promise<Table>;
1506
1442
  /**
1507
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1508
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1509
- * allowing access to the entire range of items currently in the subscribed columns.
1443
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
1444
+ * for <b>keyadded</b> will ensure no keys are missed.
1445
+ * @return Set of Object
1510
1446
  */
1511
- static readonly EVENT_UPDATED:string;
1512
-
1513
- protected constructor();
1514
-
1447
+ getKeys():Set<object>;
1515
1448
  /**
1516
- * Stops the subscription on the server.
1449
+ * Fetch a table containing all the valid keys of the partitioned table.
1450
+ * @return Promise of a Table
1451
+ */
1452
+ getKeyTable():Promise<Table>;
1453
+ /**
1454
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
1455
+ * will not affect tables in use.
1517
1456
  */
1518
1457
  close():void;
1519
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1520
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1521
- hasListeners(name:string):boolean;
1522
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1523
1458
  /**
1524
- * The columns that were subscribed to when this subscription was created
1525
- * @return {@link dh.Column}
1459
+ * The count of known keys.
1460
+ * @return int
1526
1461
  */
1527
- get columns():Array<Column>;
1528
- }
1529
-
1530
- /**
1531
- * Event fired when a command is issued from the client.
1532
- */
1533
- export class CommandInfo {
1534
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1535
-
1536
- get result():Promise<dh.ide.CommandResult>;
1537
- get code():string;
1538
- }
1539
-
1540
- /**
1541
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1542
- * this type TableMap.
1543
- * @deprecated
1544
- */
1545
- export class TableMap {
1546
- static readonly EVENT_KEYADDED:string;
1547
- static readonly EVENT_DISCONNECT:string;
1548
- static readonly EVENT_RECONNECT:string;
1549
- static readonly EVENT_RECONNECTFAILED:string;
1550
-
1551
- protected constructor();
1462
+ get size():number;
1463
+ /**
1464
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
1465
+ * non-key columns.
1466
+ * @return Array of Column
1467
+ */
1468
+ get columns():Column[];
1469
+ /**
1470
+ * An array of all the key columns that the tables are partitioned by.
1471
+ * @return Array of Column
1472
+ */
1473
+ get keyColumns():Column[];
1474
+ /**
1475
+ * Listen for events on this object.
1476
+ * @param name - the name of the event to listen for
1477
+ * @param callback - a function to call when the event occurs
1478
+ * @return Returns a cleanup function.
1479
+ * @typeParam T - the type of the data that the event will provide
1480
+ */
1481
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1482
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1483
+ hasListeners(name:string):boolean;
1484
+ /**
1485
+ * Removes an event listener added to this table.
1486
+ * @param name -
1487
+ * @param callback -
1488
+ * @return
1489
+ * @typeParam T -
1490
+ */
1491
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1552
1492
  }
1553
1493
 
1554
- export class DateWrapper extends LongWrapper {
1494
+ export class LongWrapper {
1555
1495
  protected constructor();
1556
1496
 
1557
- static ofJsDate(date:Date):DateWrapper;
1558
- asDate():Date;
1497
+ static ofString(str:string):LongWrapper;
1498
+ asNumber():number;
1499
+ valueOf():string;
1500
+ toString():string;
1559
1501
  }
1560
1502
 
1561
1503
  export class QueryInfo {
@@ -1567,115 +1509,194 @@ export namespace dh {
1567
1509
  protected constructor();
1568
1510
  }
1569
1511
 
1570
- export class LoginCredentials {
1571
- type?:string|null;
1572
- username?:string|null;
1573
- token?:string|null;
1512
+ /**
1513
+ * Deprecated for use in Deephaven Core.
1514
+ * @deprecated
1515
+ */
1516
+ export class Client {
1517
+ static readonly EVENT_REQUEST_FAILED:string;
1518
+ static readonly EVENT_REQUEST_STARTED:string;
1519
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1574
1520
 
1575
1521
  constructor();
1576
1522
  }
1577
1523
 
1578
- export class CoreClient implements HasEventHandling {
1579
- static readonly EVENT_CONNECT:string;
1580
- static readonly EVENT_DISCONNECT:string;
1581
- static readonly EVENT_RECONNECT:string;
1582
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1583
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1584
- static readonly EVENT_REQUEST_FAILED:string;
1585
- static readonly EVENT_REQUEST_STARTED:string;
1586
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1587
- static readonly LOGIN_TYPE_PASSWORD:string;
1588
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1524
+ /**
1525
+ * A Widget represents a server side object that sends one or more responses to the client. The client can then
1526
+ * interpret these responses to see what to render, or how to respond.
1527
+ * <p>
1528
+ * Most custom object types result in a single response being sent to the client, often with other exported objects, but
1529
+ * some will have streamed responses, and allow the client to send follow-up requests of its own. This class's API is
1530
+ * backwards compatible, but as such does not offer a way to tell the difference between a streaming or non-streaming
1531
+ * object type, the client code that handles the payloads is expected to know what to expect. See
1532
+ * {@link dh.WidgetMessageDetails} for more information.
1533
+ * <p>
1534
+ * When the promise that returns this object resolves, it will have the first response assigned to its fields. Later
1535
+ * responses from the server will be emitted as "message" events. When the connection with the server ends, the "close"
1536
+ * event will be emitted. In this way, the connection will behave roughly in the same way as a WebSocket - either side
1537
+ * can close, and after close no more messages will be processed. There can be some latency in closing locally while
1538
+ * remote messages are still pending - it is up to implementations of plugins to handle this case.
1539
+ * <p>
1540
+ * Also like WebSockets, the plugin API doesn't define how to serialize messages, and just handles any binary payloads.
1541
+ * What it does handle however, is allowing those messages to include references to server-side objects with those
1542
+ * payloads. Those server side objects might be tables or other built-in types in the Deephaven JS API, or could be
1543
+ * objects usable through their own plugins. They also might have no plugin at all, allowing the client to hold a
1544
+ * reference to them and pass them back to the server, either to the current plugin instance, or through another API.
1545
+ * The `Widget` type does not specify how those objects should be used or their lifecycle, but leaves that
1546
+ * entirely to the plugin. Messages will arrive in the order they were sent.
1547
+ * <p>
1548
+ * This can suggest several patterns for how plugins operate:
1549
+ * <ul>
1550
+ * <li>The plugin merely exists to transport some other object to the client. This can be useful for objects which can
1551
+ * easily be translated to some other type (like a Table) when the user clicks on it. An example of this is
1552
+ * `pandas.DataFrame` will result in a widget that only contains a static
1553
+ * {@link dh.Table}. Presently, the widget is immediately closed, and only the Table is
1554
+ * provided to the JS API consumer.</li>
1555
+ * <li>The plugin provides references to Tables and other objects, and those objects can live longer than the object
1556
+ * which provided them. One concrete example of this could have been
1557
+ * {@link dh.PartitionedTable} when fetching constituent tables, but it was implemented
1558
+ * before bidirectional plugins were implemented. Another example of this is plugins that serve as a "factory", giving
1559
+ * the user access to table manipulation/creation methods not supported by gRPC or the JS API.</li>
1560
+ * <li>The plugin provides reference to Tables and other objects that only make sense within the context of the widget
1561
+ * instance, so when the widget goes away, those objects should be released as well. This is also an example of
1562
+ * {@link dh.PartitionedTable}, as the partitioned table tracks creation of new keys through
1563
+ * an internal table instance.</li>
1564
+ * </ul>
1565
+ *
1566
+ * Handling server objects in messages also has more than one potential pattern that can be used:
1567
+ * <ul>
1568
+ * <li>One object per message - the message clearly is about that object, no other details required.</li>
1569
+ * <li>Objects indexed within their message - as each message comes with a list of objects, those objects can be
1570
+ * referenced within the payload by index. This is roughly how {@link dh.plot.Figure}
1571
+ * behaves, where the figure descriptor schema includes an index for each created series, describing which table should
1572
+ * be used, which columns should be mapped to each axis.</li>
1573
+ * <li>Objects indexed since widget creation - each message would append its objects to a list created when the widget
1574
+ * was first made, and any new exports that arrive in a new message would be appended to that list. Then, subsequent
1575
+ * messages can reference objects already sent. This imposes a limitation where the client cannot release any exports
1576
+ * without the server somehow signaling that it will never reference that export again.</li>
1577
+ * </ul>
1578
+ */
1579
+ export class Widget implements WidgetMessageDetails, HasEventHandling {
1580
+ static readonly EVENT_MESSAGE:string;
1581
+ static readonly EVENT_CLOSE:string;
1589
1582
 
1590
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1583
+ protected constructor();
1591
1584
 
1592
- running():Promise<CoreClient>;
1593
- getServerUrl():string;
1594
- getAuthConfigValues():Promise<string[][]>;
1595
- login(credentials:LoginCredentials):Promise<void>;
1596
- relogin(token:RefreshToken):Promise<void>;
1597
- onConnected(timeoutInMillis?:number):Promise<void>;
1598
- getServerConfigValues():Promise<string[][]>;
1599
- getStorageService():dh.storage.StorageService;
1600
- getAsIdeConnection():Promise<IdeConnection>;
1601
- disconnect():void;
1585
+ /**
1586
+ * Ends the client connection to the server.
1587
+ */
1588
+ close():void;
1589
+ getDataAsBase64():string;
1590
+ getDataAsU8():Uint8Array;
1591
+ getDataAsString():string;
1592
+ /**
1593
+ * Sends a string/bytes payload to the server, along with references to objects that exist on the server.
1594
+ * @param msg - string/buffer/view instance that represents data to send
1595
+ * @param references - an array of objects that can be safely sent to the server
1596
+ */
1597
+ sendMessage(msg:string|ArrayBuffer|ArrayBufferView, references?:Array<Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable>):void;
1602
1598
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1603
1599
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1604
1600
  hasListeners(name:string):boolean;
1605
1601
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1602
+ /**
1603
+ *
1604
+ * @return the exported objects sent in the initial message from the server. The client is responsible for closing
1605
+ * them when finished using them.
1606
+ */
1607
+ get exportedObjects():WidgetExportedObject[];
1608
+ /**
1609
+ *
1610
+ * @return the type of this widget
1611
+ */
1612
+ get type():string;
1606
1613
  }
1607
1614
 
1608
1615
  /**
1609
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1610
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1611
- * instance.
1616
+ * A js type for operating on input tables.
1617
+ *
1618
+ * Represents a User Input Table, which can have data added to it from other sources.
1619
+ *
1620
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1621
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1622
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1623
+ * before sending the next operation.
1624
+ *
1625
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1626
+ *
1627
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1628
+ * object.
1612
1629
  */
1613
- export class FilterCondition {
1630
+ export class InputTable {
1614
1631
  protected constructor();
1615
1632
 
1616
1633
  /**
1617
- * the opposite of this condition
1618
- * @return FilterCondition
1634
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1635
+ * property at that name and validate it can be put into the given column type.
1636
+ * @param row -
1637
+ * @param userTimeZone -
1638
+ * @return Promise of dh.InputTable
1619
1639
  */
1620
- not():FilterCondition;
1640
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1621
1641
  /**
1622
- * a condition representing the current condition logically ANDed with the other parameters
1623
- * @param filters -
1624
- * @return FilterCondition
1642
+ * Add multiple rows to a table.
1643
+ * @param rows -
1644
+ * @param userTimeZone -
1645
+ * @return Promise of dh.InputTable
1625
1646
  */
1626
- and(...filters:FilterCondition[]):FilterCondition;
1647
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1627
1648
  /**
1628
- * a condition representing the current condition logically ORed with the other parameters
1629
- * @param filters -
1630
- * @return FilterCondition.
1649
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1650
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1651
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1652
+ * resolved to the same InputTable instance this method was called upon once the server returns.
1653
+ * @param tableToAdd -
1654
+ * @return Promise of dh.InputTable
1631
1655
  */
1632
- or(...filters:FilterCondition[]):FilterCondition;
1656
+ addTable(tableToAdd:Table):Promise<InputTable>;
1633
1657
  /**
1634
- * a string suitable for debugging showing the details of this condition.
1635
- * @return String.
1658
+ * Add multiple tables to this Input Table.
1659
+ * @param tablesToAdd -
1660
+ * @return Promise of dh.InputTable
1636
1661
  */
1637
- toString():string;
1638
- get columns():Array<Column>;
1662
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
1639
1663
  /**
1640
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1641
- * functions:
1642
- * <ul>
1643
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1644
- * than the third</li>
1645
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1646
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1647
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1648
- * "not a number"</i></li>
1649
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1650
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1651
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1652
- * expression</li>
1653
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1654
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1655
- * <p>
1656
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1657
- * method should be used in other cases
1658
- * </p>
1659
- * </li>
1660
- * </ul>
1661
- * @param function -
1662
- * @param args -
1663
- * @return dh.FilterCondition
1664
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1665
+ * @param tableToDelete -
1666
+ * @return Promise of dh.InputTable
1664
1667
  */
1665
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1668
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
1666
1669
  /**
1667
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1668
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1669
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1670
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1671
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1672
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1673
- * {@link dh.Column.filter}).
1674
- * @param value -
1675
- * @param columns -
1676
- * @return dh.FilterCondition
1670
+ * Delete multiple tables from this Input Table.
1671
+ * @param tablesToDelete -
1672
+ * @return
1673
+ */
1674
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1675
+ /**
1676
+ * A list of the key columns, by name
1677
+ * @return String array.
1678
+ */
1679
+ get keys():string[];
1680
+ /**
1681
+ * A list of the value columns, by name
1682
+ * @return String array.
1683
+ */
1684
+ get values():string[];
1685
+ /**
1686
+ * A list of the key Column objects
1687
+ * @return {@link dh.Column} array.
1688
+ */
1689
+ get keyColumns():Column[];
1690
+ /**
1691
+ * A list of the value Column objects
1692
+ * @return {@link dh.Column} array.
1677
1693
  */
1678
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1694
+ get valueColumns():Column[];
1695
+ /**
1696
+ * The source table for this Input Table
1697
+ * @return dh.table
1698
+ */
1699
+ get table():Table;
1679
1700
  }
1680
1701
 
1681
1702
  /**
@@ -1704,78 +1725,17 @@ export namespace dh {
1704
1725
  get size():number;
1705
1726
  }
1706
1727
 
1707
- /**
1708
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1709
- * roll-up table.
1710
- */
1711
- export class RollupConfig {
1712
- /**
1713
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1714
- */
1715
- groupingColumns:Array<String>;
1716
- /**
1717
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1718
- * roll-up table.
1719
- */
1720
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
1721
- /**
1722
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1723
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1724
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1725
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
1726
- */
1727
- includeConstituents:boolean;
1728
- includeOriginalColumns?:boolean|null;
1729
- /**
1730
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1731
- */
1732
- includeDescriptions:boolean;
1733
-
1734
- constructor();
1735
- }
1736
-
1737
- /**
1738
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1739
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1740
- */
1741
- export class ConnectOptions {
1742
- headers:{ [key: string]: string; };
1743
-
1728
+ export class Ide {
1744
1729
  constructor();
1745
- }
1746
-
1747
- export class CustomColumn {
1748
- static readonly TYPE_FORMAT_COLOR:string;
1749
- static readonly TYPE_FORMAT_NUMBER:string;
1750
- static readonly TYPE_FORMAT_DATE:string;
1751
- static readonly TYPE_NEW:string;
1752
1730
 
1753
- protected constructor();
1754
-
1755
- valueOf():string;
1756
- toString():string;
1757
- /**
1758
- * The expression to evaluate this custom column.
1759
- * @return String
1760
- */
1761
- get expression():string;
1762
1731
  /**
1763
- * The name of the column to use.
1764
- * @return String
1732
+ * @deprecated
1765
1733
  */
1766
- get name():string;
1734
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1767
1735
  /**
1768
- * Type of custom column. One of
1769
- *
1770
- * <ul>
1771
- * <li>FORMAT_COLOR</li>
1772
- * <li>FORMAT_NUMBER</li>
1773
- * <li>FORMAT_DATE</li>
1774
- * <li>NEW</li>
1775
- * </ul>
1776
- * @return String
1736
+ * @deprecated
1777
1737
  */
1778
- get type():string;
1738
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1779
1739
  }
1780
1740
 
1781
1741
  /**
@@ -1839,388 +1799,444 @@ export namespace dh {
1839
1799
  }
1840
1800
 
1841
1801
  /**
1842
- * A js type for operating on input tables.
1843
- *
1844
- * Represents a User Input Table, which can have data added to it from other sources.
1845
- *
1846
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1847
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1848
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1849
- * before sending the next operation.
1850
- *
1851
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1802
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1852
1803
  *
1853
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1854
- * object.
1804
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1805
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1806
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1855
1807
  */
1856
- export class InputTable {
1857
- protected constructor();
1858
-
1808
+ export class TreeTableConfig {
1859
1809
  /**
1860
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1861
- * property at that name and validate it can be put into the given column type.
1862
- * @param row -
1863
- * @param userTimeZone -
1864
- * @return Promise of dh.InputTable
1810
+ * The column representing the unique ID for each item
1865
1811
  */
1866
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1812
+ idColumn:string;
1867
1813
  /**
1868
- * Add multiple rows to a table.
1869
- * @param rows -
1870
- * @param userTimeZone -
1871
- * @return Promise of dh.InputTable
1814
+ * The column representing the parent ID for each item
1872
1815
  */
1873
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1816
+ parentColumn:string;
1874
1817
  /**
1875
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1876
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1877
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1878
- * resolved to the same InputTable instance this method was called upon once the server returns.
1879
- * @param tableToAdd -
1880
- * @return Promise of dh.InputTable
1818
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1881
1819
  */
1882
- addTable(tableToAdd:Table):Promise<InputTable>;
1820
+ promoteOrphansToRoot:boolean;
1821
+
1822
+ constructor();
1823
+ }
1824
+
1825
+ /**
1826
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1827
+ * roll-up table.
1828
+ */
1829
+ export class RollupConfig {
1883
1830
  /**
1884
- * Add multiple tables to this Input Table.
1885
- * @param tablesToAdd -
1886
- * @return Promise of dh.InputTable
1831
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1887
1832
  */
1888
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
1833
+ groupingColumns:Array<String>;
1889
1834
  /**
1890
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1891
- * @param tableToDelete -
1892
- * @return Promise of dh.InputTable
1835
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1836
+ * roll-up table.
1893
1837
  */
1894
- deleteTable(tableToDelete:Table):Promise<InputTable>;
1838
+ aggregations:{ [key: string]: Array<AggregationOperationType>; };
1895
1839
  /**
1896
- * Delete multiple tables from this Input Table.
1897
- * @param tablesToDelete -
1898
- * @return
1840
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1841
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1842
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1843
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1899
1844
  */
1900
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1845
+ includeConstituents:boolean;
1846
+ includeOriginalColumns?:boolean|null;
1901
1847
  /**
1902
- * A list of the key columns, by name
1903
- * @return String array.
1848
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1904
1849
  */
1905
- get keys():string[];
1850
+ includeDescriptions:boolean;
1851
+
1852
+ constructor();
1853
+ }
1854
+
1855
+ /**
1856
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1857
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1858
+ * methods return a new Sort instance.
1859
+ */
1860
+ export class Sort {
1861
+ static readonly ASCENDING:string;
1862
+ static readonly DESCENDING:string;
1863
+ static readonly REVERSE:string;
1864
+
1865
+ protected constructor();
1866
+
1906
1867
  /**
1907
- * A list of the value columns, by name
1908
- * @return String array.
1868
+ * Builds a Sort instance to sort values in ascending order.
1869
+ * @return {@link dh.Sort}
1909
1870
  */
1910
- get values():string[];
1871
+ asc():Sort;
1911
1872
  /**
1912
- * A list of the key Column objects
1913
- * @return {@link dh.Column} array.
1873
+ * Builds a Sort instance to sort values in descending order.
1874
+ * @return {@link dh.Sort}
1914
1875
  */
1915
- get keyColumns():Column[];
1876
+ desc():Sort;
1916
1877
  /**
1917
- * A list of the value Column objects
1918
- * @return {@link dh.Column} array.
1878
+ * Builds a Sort instance which takes the absolute value before applying order.
1879
+ * @return {@link dh.Sort}
1919
1880
  */
1920
- get valueColumns():Column[];
1881
+ abs():Sort;
1882
+ toString():string;
1921
1883
  /**
1922
- * The source table for this Input Table
1923
- * @return dh.table
1884
+ * True if the absolute value of the column should be used when sorting; defaults to false.
1885
+ * @return boolean
1924
1886
  */
1925
- get table():Table;
1887
+ get isAbs():boolean;
1888
+ /**
1889
+ * The column which is sorted.
1890
+ * @return {@link dh.Column}
1891
+ */
1892
+ get column():Column;
1893
+ /**
1894
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1895
+ * @return String
1896
+ */
1897
+ get direction():string;
1926
1898
  }
1927
1899
 
1928
1900
  /**
1929
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1901
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
1902
+ * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
1903
+ * inform the UI right away that they have taken place.
1930
1904
  */
1931
- export class BigDecimalWrapper {
1932
- protected constructor();
1905
+ export class Table implements JoinableTable, HasEventHandling {
1906
+ readonly description?:string|null;
1907
+ readonly pluginName?:string|null;
1908
+ readonly layoutHints?:null|LayoutHints;
1909
+ static readonly EVENT_SIZECHANGED:string;
1910
+ static readonly EVENT_UPDATED:string;
1911
+ static readonly EVENT_ROWADDED:string;
1912
+ static readonly EVENT_ROWREMOVED:string;
1913
+ static readonly EVENT_ROWUPDATED:string;
1914
+ static readonly EVENT_SORTCHANGED:string;
1915
+ static readonly EVENT_FILTERCHANGED:string;
1916
+ static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
1917
+ static readonly EVENT_DISCONNECT:string;
1918
+ static readonly EVENT_RECONNECT:string;
1919
+ static readonly EVENT_RECONNECTFAILED:string;
1920
+ static readonly EVENT_REQUEST_FAILED:string;
1921
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1922
+ static readonly SIZE_UNCOALESCED:number;
1933
1923
 
1934
- static ofString(value:string):BigDecimalWrapper;
1935
- asNumber():number;
1936
- valueOf():string;
1937
- toString():string;
1938
- }
1924
+ protected constructor();
1939
1925
 
1940
- /**
1941
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1942
- * column.
1943
- */
1944
- export class Column {
1926
+ batch(userCode:(arg0:unknown)=>void):Promise<Table>;
1927
+ /**
1928
+ * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
1929
+ * caching a returned value.
1930
+ * @param key -
1931
+ * @return {@link dh.Column}
1932
+ */
1933
+ findColumn(key:string):Column;
1945
1934
  /**
1946
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1947
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1948
- * @return String
1935
+ * Retrieve multiple columns specified by the given names.
1936
+ * @param keys -
1937
+ * @return {@link dh.Column} array
1949
1938
  */
1950
- readonly constituentType?:string|null;
1951
- readonly description?:string|null;
1952
-
1953
- protected constructor();
1954
-
1939
+ findColumns(keys:string[]):Column[];
1940
+ isBlinkTable():boolean;
1955
1941
  /**
1956
- * the value for this column in the given row. Type will be consistent with the type of the Column.
1957
- * @param row -
1958
- * @return Any
1942
+ * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
1943
+ * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
1944
+ * @return Promise of dh.InputTable
1959
1945
  */
1960
- get(row:Row):any;
1961
- getFormat(row:Row):Format;
1946
+ inputTable():Promise<InputTable>;
1962
1947
  /**
1963
- * Creates a sort builder object, to be used when sorting by this column.
1964
- * @return {@link dh.Sort}
1948
+ * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1965
1949
  */
1966
- sort():Sort;
1950
+ close():void;
1951
+ getAttributes():string[];
1967
1952
  /**
1968
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1969
- * operation, or as a builder to create a filter operation.
1970
- * @return {@link dh.FilterValue}
1953
+ * null if no property exists, a string if it is an easily serializable property, or a ```Promise
1954
+ * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
1955
+ * @param attributeName -
1956
+ * @return Object
1971
1957
  */
1972
- filter():FilterValue;
1958
+ getAttribute(attributeName:string):unknown|undefined|null;
1973
1959
  /**
1974
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1975
- * @param expression -
1976
- * @return {@link dh.CustomColumn}
1960
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
1961
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
1962
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
1963
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
1964
+ * not.
1965
+ * @param sort -
1966
+ * @return {@link dh.Sort} array
1977
1967
  */
1978
- formatColor(expression:string):CustomColumn;
1968
+ applySort(sort:Sort[]):Array<Sort>;
1979
1969
  /**
1980
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1981
- * @param expression -
1982
- * @return {@link dh.CustomColumn}
1970
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
1971
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
1972
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
1973
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
1974
+ * will not.
1975
+ * @param filter -
1976
+ * @return {@link dh.FilterCondition} array
1983
1977
  */
1984
- formatNumber(expression:string):CustomColumn;
1978
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1985
1979
  /**
1986
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1987
- * @param expression -
1988
- * @return {@link dh.CustomColumn}
1980
+ * used when adding new filter and sort operations to the table, as long as they are present.
1981
+ * @param customColumns -
1982
+ * @return {@link dh.CustomColumn} array
1989
1983
  */
1990
- formatDate(expression:string):CustomColumn;
1991
- toString():string;
1984
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
1992
1985
  /**
1993
- * Label for this column.
1994
- * @return String
1986
+ * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
1987
+ * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
1988
+ * will result in events to be fired once data becomes available, starting with an `updated` event and a
1989
+ * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
1990
+ * needed.
1991
+ * @param firstRow -
1992
+ * @param lastRow -
1993
+ * @param columns -
1994
+ * @param updateIntervalMs -
1995
+ * @return {@link dh.TableViewportSubscription}
1995
1996
  */
1996
- get name():string;
1997
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
1997
1998
  /**
1998
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1999
- * <b>isUncoalesced</b> property on <b>Table</b>)
2000
- * @return boolean
1999
+ * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
2000
+ * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
2001
+ * separate the lifespan of this promise from the table itself, call
2002
+ * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
2003
+ * @return Promise of {@link dh.TableData}
2001
2004
  */
2002
- get isPartitionColumn():boolean;
2005
+ getViewportData():Promise<TableData>;
2003
2006
  /**
2004
- *
2005
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
2006
- * @return int
2007
+ * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
2008
+ * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
2009
+ * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
2010
+ * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
2011
+ * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
2012
+ * called on it to stop it, and all events are fired from the TableSubscription instance.
2013
+ * @param columns -
2014
+ * @param updateIntervalMs -
2015
+ * @return {@link dh.TableSubscription}
2007
2016
  */
2008
- get index():number;
2009
- get isSortable():boolean;
2017
+ subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
2010
2018
  /**
2011
- * Type of the row data that can be found in this column.
2012
- * @return String
2019
+ * a new table containing the distinct tuples of values from the given columns that are present in the original
2020
+ * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
2021
+ * order of appearance of values from the original table.
2022
+ * @param columns -
2023
+ * @return Promise of dh.Table
2013
2024
  */
2014
- get type():string;
2025
+ selectDistinct(columns:Column[]):Promise<Table>;
2015
2026
  /**
2016
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
2017
- * table using <b>applyCustomColumns</b> with the parameters specified.
2018
- * @param expression -
2019
- * @return {@link dh.CustomColumn}
2027
+ * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
2028
+ * @return Promise of dh.Table
2020
2029
  */
2021
- static formatRowColor(expression:string):CustomColumn;
2030
+ copy():Promise<Table>;
2022
2031
  /**
2023
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2024
- * @param name -
2025
- * @param expression -
2026
- * @return {@link dh.CustomColumn}
2032
+ * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
2033
+ * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
2034
+ * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
2035
+ * called on it when not in use.
2036
+ * @param config -
2037
+ * @return Promise of dh.TotalsTable
2027
2038
  */
2028
- static createCustomColumn(name:string, expression:string):CustomColumn;
2029
- }
2030
-
2031
- /**
2032
- * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
2033
- * mechanism, and so reimplemented here.
2034
- * <p>
2035
- * Any time a change is made, we build a new request and send it to the server, and wait for the updated state.
2036
- * <p>
2037
- * Semantics around getting updates from the server are slightly different - we don't "unset" the viewport here after
2038
- * operations are performed, but encourage the client code to re-set them to the desired position.
2039
- * <p>
2040
- * The table size will be -1 until a viewport has been fetched.
2041
- * <p>
2042
- * Similar to a table, a Tree Table provides access to subscribed viewport data on the current hierarchy. A different
2043
- * Row type is used within that viewport, showing the depth of that node within the tree and indicating details about
2044
- * whether it has children or is expanded. The Tree Table itself then provides the ability to change if a row is
2045
- * expanded or not. Methods used to control or check if a row should be expanded or not can be invoked on a TreeRow
2046
- * instance, or on the number of the row (thus allowing for expanding/collapsing rows which are not currently visible in
2047
- * the viewport).
2048
- * <p>
2049
- * Events and viewports are somewhat different from tables, due to the expense of computing the expanded/collapsed rows
2050
- * and count of children at each level of the hierarchy, and differences in the data that is available.
2051
- * <p>
2052
- * <ul>
2053
- * <li>There is no {@link Table.totalSize | totalSize} property.</li>
2054
- * <li>The viewport is not un-set when changes are made to filter or sort, but changes will continue to be streamed in.
2055
- * It is suggested that the viewport be changed to the desired position (usually the first N rows) after any filter/sort
2056
- * change is made. Likewise, {@link getViewportData} will always return the most recent data, and will not wait if a
2057
- * new operation is pending.</li>
2058
- * <li>Custom columns are not directly supported. If the TreeTable was created client-side, the original Table can have
2059
- * custom columns applied, and the TreeTable can be recreated.</li>
2060
- * <li>Whereas Table has a {@link Table.totalsTableConfig} property, it is defined here as a method,
2061
- * {@link getTotalsTableConfig}. This returns a promise so the config can be fetched asynchronously.</li>
2062
- * <li>Totals Tables for trees vary in behavior between tree tables and roll-up tables. This behavior is based on the
2063
- * original flat table used to produce the Tree Table - for a hierarchical table (i.e. Table.treeTable in the query
2064
- * config), the totals will include non-leaf nodes (since they are themselves actual rows in the table), but in a
2065
- * roll-up table, the totals only include leaf nodes (as non-leaf nodes are generated through grouping the contents of
2066
- * the original table). Roll-ups also have the {@link dh.includeConstituents} property, indicating that a
2067
- * {@link dh.Column} in the tree may have a {@link Column.constituentType} property reflecting that the type of cells
2068
- * where {@link TreeRow.hasChildren} is false will be different from usual.</li>
2069
- * </ul>
2070
- */
2071
- export class TreeTable implements HasEventHandling {
2039
+ getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2072
2040
  /**
2073
- * event.detail is the currently visible viewport data based on the active viewport configuration.
2041
+ * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
2042
+ * above for more specifics.
2043
+ * @param config -
2044
+ * @return promise of dh.TotalsTable
2074
2045
  */
2075
- static readonly EVENT_UPDATED:string;
2046
+ getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2076
2047
  /**
2077
- * event.detail is the currently visible viewport data based on the active viewport configuration.
2048
+ * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
2049
+ * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
2050
+ * @param configObject -
2051
+ * @return Promise of dh.TreeTable
2078
2052
  */
2079
- static readonly EVENT_DISCONNECT:string;
2053
+ rollup(configObject:RollupConfig):Promise<TreeTable>;
2080
2054
  /**
2081
- * event.detail is the currently visible viewport data based on the active viewport configuration.
2055
+ * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
2056
+ * new `TreeTable` which must have close() called on it when not in use.
2057
+ * @param configObject -
2058
+ * @return Promise dh.TreeTable
2082
2059
  */
2083
- static readonly EVENT_RECONNECT:string;
2060
+ treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
2084
2061
  /**
2085
- * event.detail is the currently visible viewport data based on the active viewport configuration.
2062
+ * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
2063
+ * table will not update. This does not change the original table, and the new table will not have any of the client
2064
+ * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
2065
+ * @return Promise of dh.Table
2086
2066
  */
2087
- static readonly EVENT_RECONNECTFAILED:string;
2067
+ freeze():Promise<Table>;
2068
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
2088
2069
  /**
2089
- * event.detail is the currently visible viewport data based on the active viewport configuration.
2070
+ *
2071
+ * @deprecated a promise that will be resolved with a newly created table holding the results of the join operation.
2072
+ * The last parameter is optional, and if not specified or empty, all columns from the right table will
2073
+ * be added to the output. Callers are responsible for ensuring that there are no duplicates - a match
2074
+ * pair can be passed instead of a name to specify the new name for the column. Supported `joinType`
2075
+ * values (consult Deephaven's "Joining Data from Multiple Tables for more detail): "Join" <a href='https://docs.deephaven.io/latest/Content/writeQueries/tableOperations/joins.htm#Joining_Data_from_Multiple_Tables'>Joining_Data_from_Multiple_Tables</a>
2076
+ * "Natural" "AJ" "ReverseAJ" "ExactJoin" "LeftJoin"
2077
+ * @param joinType -
2078
+ * @param rightTable -
2079
+ * @param columnsToMatch -
2080
+ * @param columnsToAdd -
2081
+ * @param asOfMatchRule -
2082
+ * @return Promise of dh.Table
2090
2083
  */
2091
- static readonly EVENT_REQUEST_FAILED:string;
2092
- readonly description?:string|null;
2093
-
2094
- protected constructor();
2095
-
2084
+ join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:unknown|undefined|null):Promise<Table>;
2096
2085
  /**
2097
- * Expands the given node, so that its children are visible when they are in the viewport. The parameter can be the
2098
- * row index, or the row object itself. The second parameter is a boolean value, false by default, specifying if the
2099
- * row and all descendants should be fully expanded. Equivalent to `setExpanded(row, true)` with an optional third
2100
- * boolean parameter.
2101
- * @param row -
2102
- * @param expandDescendants -
2086
+ * a promise that will be resolved with the newly created table holding the results of the specified as-of join
2087
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
2088
+ * right table being added to the output. The <b>asOfMatchRule</b> is optional, defaults to <b>LESS_THAN_EQUAL</b>
2089
+ *
2090
+ * <p>
2091
+ * the allowed values are:
2092
+ * </p>
2093
+ *
2094
+ * <ul>
2095
+ * <li>LESS_THAN_EQUAL</li>
2096
+ * <li>LESS_THAN</li>
2097
+ * <li>GREATER_THAN_EQUAL</li>
2098
+ * <li>GREATER_THAN</li>
2099
+ * </ul>
2100
+ * @param rightTable -
2101
+ * @param columnsToMatch -
2102
+ * @param columnsToAdd -
2103
+ * @param asOfMatchRule -
2104
+ * @return Promise og dh.Table
2103
2105
  */
2104
- expand(row:TreeRow|number, expandDescendants?:boolean):void;
2106
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
2105
2107
  /**
2106
- * Collapses the given node, so that its children and descendants are not visible in the size or the viewport. The
2107
- * parameter can be the row index, or the row object itself. Equivalent to <b>setExpanded(row, false, false)</b>.
2108
- * @param row -
2108
+ * a promise that will be resolved with the newly created table holding the results of the specified cross join
2109
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
2110
+ * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
2111
+ * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
2112
+ * @param rightTable -
2113
+ * @param columnsToMatch -
2114
+ * @param columnsToAdd -
2115
+ * @param reserve_bits -
2116
+ * @return Promise of dh.Table
2109
2117
  */
2110
- collapse(row:TreeRow|number):void;
2118
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
2111
2119
  /**
2112
- * Specifies if the given node should be expanded or collapsed. If this node has children, and the value is changed,
2113
- * the size of the table will change. If node is to be expanded and the third parameter, <b>expandDescendants</b>,
2114
- * is true, then its children will also be expanded.
2115
- * @param row -
2116
- * @param isExpanded -
2117
- * @param expandDescendants -
2120
+ * a promise that will be resolved with the newly created table holding the results of the specified exact join
2121
+ * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
2122
+ * table being added to the output.
2123
+ * @param rightTable -
2124
+ * @param columnsToMatch -
2125
+ * @param columnsToAdd -
2126
+ * @return Promise of dh.Table
2118
2127
  */
2119
- setExpanded(row:TreeRow|number, isExpanded:boolean, expandDescendants?:boolean):void;
2120
- expandAll():void;
2121
- collapseAll():void;
2128
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2122
2129
  /**
2123
- * true if the given row is expanded, false otherwise. Equivalent to `TreeRow.isExpanded`, if an instance of the row
2124
- * is available
2125
- * @param row -
2126
- * @return boolean
2130
+ * a promise that will be resolved with the newly created table holding the results of the specified natural join
2131
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
2132
+ * right table being added to the output.
2133
+ * @param rightTable -
2134
+ * @param columnsToMatch -
2135
+ * @param columnsToAdd -
2136
+ * @return Promise of dh.Table
2127
2137
  */
2128
- isExpanded(row:TreeRow|number):boolean;
2129
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateInterval?:number|undefined|null):void;
2130
- getViewportData():Promise<TreeViewportData>;
2138
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2139
+ byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2131
2140
  /**
2132
- * Indicates that the table will no longer be used, and server resources can be freed.
2141
+ * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
2142
+ * keys.
2143
+ * @param keys -
2144
+ * @param dropKeys -
2145
+ * @return Promise dh.PartitionedTable
2133
2146
  */
2134
- close():void;
2135
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2147
+ partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2136
2148
  /**
2137
- * Applies the given sort to all levels of the tree. Returns the previous sort in use.
2138
- * @param sort -
2139
- * @return {@link dh.Sort} array
2149
+ * a promise that will resolve to ColumnStatistics for the column of this table.
2150
+ * @param column -
2151
+ * @return Promise of dh.ColumnStatistics
2140
2152
  */
2141
- applySort(sort:Sort[]):Array<Sort>;
2153
+ getColumnStatistics(column:Column):Promise<ColumnStatistics>;
2142
2154
  /**
2143
- * Applies the given filter to the contents of the tree in such a way that if any node is visible, then any parent
2144
- * node will be visible as well even if that parent node would not normally be visible due to the filter's
2145
- * condition. Returns the previous sort in use.
2146
- * @param filter -
2147
- * @return {@link dh.FilterCondition} array
2155
+ * Seek the row matching the data provided
2156
+ * @param startingRow - Row to start the seek from
2157
+ * @param column - Column to seek for value on
2158
+ * @param valueType - Type of value provided
2159
+ * @param seekValue - Value to seek
2160
+ * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
2161
+ * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
2162
+ * `false`.
2163
+ * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
2164
+ * @return A promise that resolves to the row value found.
2148
2165
  */
2149
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
2166
+ seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
2167
+ toString():string;
2150
2168
  /**
2151
- * a column with the given name, or throws an exception if it cannot be found
2152
- * @param key -
2153
- * @return {@link dh.Column}
2169
+ * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
2170
+ * .inputTable() to add or remove data from the underlying table.
2171
+ * @return boolean
2154
2172
  */
2155
- findColumn(key:string):Column;
2173
+ get hasInputTable():boolean;
2156
2174
  /**
2157
- * an array with all of the named columns in order, or throws an exception if one cannot be found.
2158
- * @param keys -
2175
+ * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
2176
+ * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
2177
+ * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
2178
+ * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
2159
2179
  * @return {@link dh.Column} array
2160
2180
  */
2161
- findColumns(keys:string[]):Column[];
2181
+ get columns():Array<Column>;
2162
2182
  /**
2163
- * Provides Table-like selectDistinct functionality, but with a few quirks, since it is only fetching the distinct
2164
- * values for the given columns in the source table:
2165
- * <ul>
2166
- * <li>Rollups may make no sense, since values are aggregated.</li>
2167
- * <li>Values found on orphaned (and removed) nodes will show up in the resulting table, even though they are not in
2168
- * the tree.</li>
2169
- * <li>Values found on parent nodes which are only present in the tree since a child is visible will not be present
2170
- * in the resulting table.</li>
2171
- * </ul>
2183
+ * The default configuration to be used when building a <b>TotalsTable</b> for this table.
2184
+ * @return dh.TotalsTableConfig
2172
2185
  */
2173
- selectDistinct(columns:Column[]):Promise<Table>;
2174
- getTotalsTableConfig():Promise<TotalsTableConfig>;
2175
- getTotalsTable(config?:object):Promise<TotalsTable>;
2176
- getGrandTotalsTable(config?:object):Promise<TotalsTable>;
2186
+ get totalsTableConfig():TotalsTableConfig;
2177
2187
  /**
2178
- * a new copy of this treetable, so it can be sorted and filtered separately, and maintain a different viewport.
2179
- * Unlike Table, this will _not_ copy the filter or sort, since tree table viewport semantics differ, and without a
2180
- * viewport set, the treetable doesn't evaluate these settings, and they aren't readable on the properties. Expanded
2181
- * state is also not copied.
2182
- * @return Promise of dh.TreeTable
2188
+ * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
2189
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
2190
+ * for the <b>sortchanged</b> event to know when to update the UI.
2191
+ * @return {@link dh.Sort} array
2183
2192
  */
2184
- copy():Promise<TreeTable>;
2193
+ get sort():Array<Sort>;
2185
2194
  /**
2186
- * The current filter configuration of this Tree Table.
2187
- * @return {@link dh.FilterCondition} array
2195
+ * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
2196
+ * ones. To update, call <b>applyCustomColumns()</b>.
2197
+ * @return {@link dh.CustomColumn} array
2188
2198
  */
2189
- get filter():Array<FilterCondition>;
2199
+ get customColumns():Array<CustomColumn>;
2190
2200
  /**
2191
- * True if this is a roll-up and will provide the original rows that make up each grouping.
2201
+ * True if this table may receive updates from the server, including size changed events, updated events after
2202
+ * initial snapshot.
2192
2203
  * @return boolean
2193
2204
  */
2194
- get includeConstituents():boolean;
2195
- get groupedColumns():Array<Column>;
2205
+ get isRefreshing():boolean;
2196
2206
  /**
2197
- * True if this table has been closed.
2198
- * @return boolean
2207
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
2208
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
2209
+ * for the <b>filterchanged</b> event to know when to update the UI.
2210
+ * @return {@link dh.FilterCondition} array
2199
2211
  */
2200
- get isClosed():boolean;
2212
+ get filter():Array<FilterCondition>;
2201
2213
  /**
2202
- * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
2203
- * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
2204
- * when considering collapse/expand states).
2214
+ * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
2215
+ * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
2216
+ * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
2217
+ * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
2205
2218
  * @return double
2206
2219
  */
2207
- get size():number;
2220
+ get totalSize():number;
2208
2221
  /**
2209
- * The columns that can be shown in this Tree Table.
2210
- * @return {@link dh.Column} array
2222
+ * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
2223
+ * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
2224
+ * property). for details).
2225
+ * @return double
2211
2226
  */
2212
- get columns():Array<Column>;
2227
+ get size():number;
2213
2228
  /**
2214
- * The current sort configuration of this Tree Table
2215
- * @return {@link dh.Sort} array.
2229
+ * True if this table has been closed.
2230
+ * @return boolean
2216
2231
  */
2217
- get sort():Array<Sort>;
2232
+ get isClosed():boolean;
2218
2233
  /**
2219
- * True if this table may receive updates from the server, including size changed events, updated events after
2220
- * initial snapshot.
2234
+ * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
2235
+ * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
2236
+ * will be unavailable until table is coalesced.
2221
2237
  * @return boolean
2222
2238
  */
2223
- get isRefreshing():boolean;
2239
+ get isUncoalesced():boolean;
2224
2240
  /**
2225
2241
  * Listen for events on this object.
2226
2242
  * @param name - the name of the event to listen for
@@ -2239,94 +2255,78 @@ export namespace dh {
2239
2255
  * @typeParam T -
2240
2256
  */
2241
2257
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2242
- }
2243
-
2244
- /**
2245
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
2246
- * the server to get each Table. All tables will have the same structure.
2247
- */
2248
- export class PartitionedTable implements HasEventHandling {
2249
- /**
2250
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2251
- */
2252
- static readonly EVENT_KEYADDED:string;
2253
- /**
2254
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2255
- */
2256
- static readonly EVENT_DISCONNECT:string;
2257
- /**
2258
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2259
- */
2260
- static readonly EVENT_RECONNECT:string;
2261
2258
  /**
2262
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
2259
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2260
+ * do not support reverse.
2261
+ * @return {@link dh.Sort}
2263
2262
  */
2264
- static readonly EVENT_RECONNECTFAILED:string;
2263
+ static reverse():Sort;
2264
+ }
2265
+
2266
+ export class IdeSession implements HasEventHandling {
2267
+ static readonly EVENT_COMMANDSTARTED:string;
2268
+ static readonly EVENT_REQUEST_FAILED:string;
2265
2269
 
2266
2270
  protected constructor();
2267
2271
 
2268
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
2269
- /**
2270
- * Fetch the table with the given key.
2271
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
2272
- * @return Promise of dh.Table
2273
- */
2274
- getTable(key:object):Promise<Table>;
2275
- /**
2276
- * Open a new table that is the result of merging all constituent tables. See
2277
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
2278
- * @return A merged representation of the constituent tables.
2279
- */
2280
- getMergedTable():Promise<Table>;
2281
- /**
2282
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
2283
- * for <b>keyadded</b> will ensure no keys are missed.
2284
- * @return Set of Object
2285
- */
2286
- getKeys():Set<object>;
2287
2272
  /**
2288
- * Fetch a table containing all the valid keys of the partitioned table.
2289
- * @return Promise of a Table
2273
+ * Load the named table, with columns and size information already fully populated.
2274
+ * @param name -
2275
+ * @param applyPreviewColumns - optional boolean
2276
+ * @return {@link Promise} of {@link dh.Table}
2290
2277
  */
2291
- getKeyTable():Promise<Table>;
2278
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2292
2279
  /**
2293
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
2294
- * will not affect tables in use.
2280
+ * Load the named Figure, including its tables and tablemaps as needed.
2281
+ * @param name -
2282
+ * @return promise of dh.plot.Figure
2295
2283
  */
2296
- close():void;
2284
+ getFigure(name:string):Promise<dh.plot.Figure>;
2297
2285
  /**
2298
- * The count of known keys.
2299
- * @return int
2286
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2287
+ * size is presently not available until the viewport is first set.
2288
+ * @param name -
2289
+ * @return {@link Promise} of {@link dh.TreeTable}
2300
2290
  */
2301
- get size():number;
2302
- /**
2303
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2304
- * non-key columns.
2305
- * @return Array of Column
2291
+ getTreeTable(name:string):Promise<TreeTable>;
2292
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2293
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2294
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2295
+ /**
2296
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2297
+ * @param tables -
2298
+ * @return {@link Promise} of {@link dh.Table}
2306
2299
  */
2307
- get columns():Column[];
2300
+ mergeTables(tables:Table[]):Promise<Table>;
2301
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2302
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2303
+ close():void;
2304
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2305
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2306
+ openDocument(params:object):void;
2307
+ changeDocument(params:object):void;
2308
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2309
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2310
+ getHover(params:object):Promise<dh.lsp.Hover>;
2311
+ closeDocument(params:object):void;
2308
2312
  /**
2309
- * An array of all the key columns that the tables are partitioned by.
2310
- * @return Array of Column
2313
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2314
+ * values will be null.
2315
+ * @param size -
2316
+ * @return {@link Promise} of {@link dh.Table}
2311
2317
  */
2312
- get keyColumns():Column[];
2318
+ emptyTable(size:number):Promise<Table>;
2313
2319
  /**
2314
- * Listen for events on this object.
2315
- * @param name - the name of the event to listen for
2316
- * @param callback - a function to call when the event occurs
2317
- * @return Returns a cleanup function.
2318
- * @typeParam T - the type of the data that the event will provide
2320
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2321
+ * the table will be populated with the interval from the specified date until now.
2322
+ * @param periodNanos -
2323
+ * @param startTime -
2324
+ * @return {@link Promise} of {@link dh.Table}
2319
2325
  */
2326
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2320
2327
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2321
2328
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2322
2329
  hasListeners(name:string):boolean;
2323
- /**
2324
- * Removes an event listener added to this table.
2325
- * @param name -
2326
- * @param callback -
2327
- * @return
2328
- * @typeParam T -
2329
- */
2330
2330
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2331
2331
  }
2332
2332
 
@@ -2352,6 +2352,23 @@ export namespace dh {
2352
2352
  static readonly SKIP:AggregationOperationType;
2353
2353
  }
2354
2354
 
2355
+ type SearchDisplayModeType = string;
2356
+ export class SearchDisplayMode {
2357
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2358
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2359
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2360
+ }
2361
+
2362
+ type ValueTypeType = string;
2363
+ export class ValueType {
2364
+ static readonly STRING:ValueTypeType;
2365
+ static readonly NUMBER:ValueTypeType;
2366
+ static readonly DOUBLE:ValueTypeType;
2367
+ static readonly LONG:ValueTypeType;
2368
+ static readonly DATETIME:ValueTypeType;
2369
+ static readonly BOOLEAN:ValueTypeType;
2370
+ }
2371
+
2355
2372
  /**
2356
2373
  * A set of string constants that can be used to describe the different objects the JS API can export.
2357
2374
  */
@@ -2368,27 +2385,57 @@ export namespace dh {
2368
2385
  static readonly TREEMAP:VariableTypeType;
2369
2386
  }
2370
2387
 
2371
- type ValueTypeType = string;
2372
- export class ValueType {
2373
- static readonly STRING:ValueTypeType;
2374
- static readonly NUMBER:ValueTypeType;
2375
- static readonly DOUBLE:ValueTypeType;
2376
- static readonly LONG:ValueTypeType;
2377
- static readonly DATETIME:ValueTypeType;
2378
- static readonly BOOLEAN:ValueTypeType;
2379
- }
2380
-
2381
- type SearchDisplayModeType = string;
2382
- export class SearchDisplayMode {
2383
- static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2384
- static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2385
- static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2386
- }
2387
-
2388
2388
  }
2389
2389
 
2390
2390
  export namespace dh.ide {
2391
2391
 
2392
+ /**
2393
+ * Describes changes in the current set of variables in the script session. Note that variables that changed value
2394
+ * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2395
+ * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2396
+ * new types.
2397
+ */
2398
+ export interface VariableChanges {
2399
+ /**
2400
+ *
2401
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2402
+ * different type.
2403
+ */
2404
+ get removed():Array<VariableDefinition>;
2405
+ /**
2406
+ *
2407
+ * @return The variables that were created by this operation, or have a new type.
2408
+ */
2409
+ get created():Array<VariableDefinition>;
2410
+ /**
2411
+ *
2412
+ * @return The variables that changed value during this operation.
2413
+ */
2414
+ get updated():Array<VariableDefinition>;
2415
+ }
2416
+ /**
2417
+ * Specifies a type and either id or name (but not both).
2418
+ */
2419
+ export interface VariableDescriptor {
2420
+ type:string;
2421
+ id?:string|null;
2422
+ name?:string|null;
2423
+ }
2424
+ /**
2425
+ * Indicates the result of code run on the server.
2426
+ */
2427
+ export interface CommandResult {
2428
+ /**
2429
+ * Describes changes made in the course of this command.
2430
+ * @return {@link dh.ide.VariableChanges}.
2431
+ */
2432
+ get changes():VariableChanges;
2433
+ /**
2434
+ * If the command failed, the error message will be provided here.
2435
+ * @return String
2436
+ */
2437
+ get error():string;
2438
+ }
2392
2439
  /**
2393
2440
  * A format to describe a variable available to be read from the server. Application fields are optional, and only
2394
2441
  * populated when a variable is provided by application mode.
@@ -2451,56 +2498,120 @@ export namespace dh.ide {
2451
2498
  */
2452
2499
  get message():string;
2453
2500
  }
2501
+ }
2502
+
2503
+ export namespace dh.i18n {
2504
+
2454
2505
  /**
2455
- * Specifies a type and either id or name (but not both).
2456
- */
2457
- export interface VariableDescriptor {
2458
- type:string;
2459
- id?:string|null;
2460
- name?:string|null;
2461
- }
2462
- /**
2463
- * Describes changes in the current set of variables in the script session. Note that variables that changed value
2464
- * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2465
- * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2466
- * new types.
2506
+ * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2507
+ * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
2508
+ * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
2509
+ * instance.
2510
+ *
2511
+ *
2512
+ * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
2513
+ * return the same details:
2514
+ *
2515
+ * <ul>
2516
+ * <li>GMT/UTC</li>
2517
+ * <li>Asia/Tokyo</li>
2518
+ * <li>Asia/Seoul</li>
2519
+ * <li>Asia/Hong_Kong</li>
2520
+ * <li>Asia/Singapore</li>
2521
+ * <li>Asia/Calcutta/Asia/Kolkata</li>
2522
+ * <li>Europe/Berlin</li>
2523
+ * <li>Europe/London</li>
2524
+ * <li>America/Sao_Paulo</li>
2525
+ * <li>America/St_Johns</li>
2526
+ * <li>America/Halifax</li>
2527
+ * <li>America/New_York</li>
2528
+ * <li>America/Chicago</li>
2529
+ * <li>America/Denver</li>
2530
+ * <li>America/Los_Angeles</li>
2531
+ * <li>America/Anchorage</li>
2532
+ * <li>Pacific/Honolulu</li>
2533
+ * </ul>
2534
+ *
2535
+ * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
2536
+ *
2537
+ * <ul>
2538
+ * <li>UTC</li>
2539
+ * <li>GMT</li>
2540
+ * <li>Z</li>
2541
+ * <li>NY</li>
2542
+ * <li>ET</li>
2543
+ * <li>EST</li>
2544
+ * <li>EDT</li>
2545
+ * <li>MN</li>
2546
+ * <li>CT</li>
2547
+ * <li>CST</li>
2548
+ * <li>CDT</li>
2549
+ * <li>MT</li>
2550
+ * <li>MST</li>
2551
+ * <li>MDT</li>
2552
+ * <li>PT</li>
2553
+ * <li>PST</li>
2554
+ * <li>PDT</li>
2555
+ * <li>HI</li>
2556
+ * <li>HST</li>
2557
+ * <li>HDT</li>
2558
+ * <li>BT</li>
2559
+ * <li>BRST</li>
2560
+ * <li>BRT</li>
2561
+ * <li>KR</li>
2562
+ * <li>KST</li>
2563
+ * <li>HK</li>
2564
+ * <li>HKT</li>
2565
+ * <li>JP</li>
2566
+ * <li>JST</li>
2567
+ * <li>AT</li>
2568
+ * <li>AST</li>
2569
+ * <li>ADT</li>
2570
+ * <li>NF</li>
2571
+ * <li>NST</li>
2572
+ * <li>NDT</li>
2573
+ * <li>AL</li>
2574
+ * <li>AKST</li>
2575
+ * <li>AKDT</li>
2576
+ * <li>IN</li>
2577
+ * <li>IST</li>
2578
+ * <li>CE</li>
2579
+ * <li>CET</li>
2580
+ * <li>CEST</li>
2581
+ * <li>SG</li>
2582
+ * <li>SGT</li>
2583
+ * <li>LON</li>
2584
+ * <li>BST</li>
2585
+ * <li>MOS</li>
2586
+ * <li>SHG</li>
2587
+ * <li>CH</li>
2588
+ * <li>NL</li>
2589
+ * <li>TW</li>
2590
+ * <li>SYD</li>
2591
+ * <li>AEST</li>
2592
+ * <li>AEDT</li>
2593
+ * </ul>
2467
2594
  */
2468
- export interface VariableChanges {
2469
- /**
2470
- *
2471
- * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2472
- * different type.
2473
- */
2474
- get removed():Array<VariableDefinition>;
2475
- /**
2476
- *
2477
- * @return The variables that were created by this operation, or have a new type.
2478
- */
2479
- get created():Array<VariableDefinition>;
2595
+ export class TimeZone {
2596
+ protected constructor();
2597
+
2480
2598
  /**
2481
- *
2482
- * @return The variables that changed value during this operation.
2483
- */
2484
- get updated():Array<VariableDefinition>;
2485
- }
2486
- /**
2487
- * Indicates the result of code run on the server.
2488
- */
2489
- export interface CommandResult {
2599
+ * Factory method which creates timezone instances from one of the supported keys.
2600
+ * @param tzCode -
2601
+ * @return dh.i18n.TimeZone
2602
+ */
2603
+ static getTimeZone(tzCode:string):TimeZone;
2490
2604
  /**
2491
- * Describes changes made in the course of this command.
2492
- * @return {@link dh.ide.VariableChanges}.
2605
+ * the standard offset of this timezone, in minutes
2606
+ * @return int
2493
2607
  */
2494
- get changes():VariableChanges;
2608
+ get standardOffset():number;
2495
2609
  /**
2496
- * If the command failed, the error message will be provided here.
2610
+ * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2497
2611
  * @return String
2498
2612
  */
2499
- get error():string;
2613
+ get id():string;
2500
2614
  }
2501
- }
2502
-
2503
- export namespace dh.i18n {
2504
2615
 
2505
2616
  /**
2506
2617
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
@@ -2654,117 +2765,6 @@ export namespace dh.i18n {
2654
2765
  }
2655
2766
 
2656
2767
 
2657
- /**
2658
- * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2659
- * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
2660
- * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
2661
- * instance.
2662
- *
2663
- *
2664
- * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
2665
- * return the same details:
2666
- *
2667
- * <ul>
2668
- * <li>GMT/UTC</li>
2669
- * <li>Asia/Tokyo</li>
2670
- * <li>Asia/Seoul</li>
2671
- * <li>Asia/Hong_Kong</li>
2672
- * <li>Asia/Singapore</li>
2673
- * <li>Asia/Calcutta/Asia/Kolkata</li>
2674
- * <li>Europe/Berlin</li>
2675
- * <li>Europe/London</li>
2676
- * <li>America/Sao_Paulo</li>
2677
- * <li>America/St_Johns</li>
2678
- * <li>America/Halifax</li>
2679
- * <li>America/New_York</li>
2680
- * <li>America/Chicago</li>
2681
- * <li>America/Denver</li>
2682
- * <li>America/Los_Angeles</li>
2683
- * <li>America/Anchorage</li>
2684
- * <li>Pacific/Honolulu</li>
2685
- * </ul>
2686
- *
2687
- * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
2688
- *
2689
- * <ul>
2690
- * <li>UTC</li>
2691
- * <li>GMT</li>
2692
- * <li>Z</li>
2693
- * <li>NY</li>
2694
- * <li>ET</li>
2695
- * <li>EST</li>
2696
- * <li>EDT</li>
2697
- * <li>MN</li>
2698
- * <li>CT</li>
2699
- * <li>CST</li>
2700
- * <li>CDT</li>
2701
- * <li>MT</li>
2702
- * <li>MST</li>
2703
- * <li>MDT</li>
2704
- * <li>PT</li>
2705
- * <li>PST</li>
2706
- * <li>PDT</li>
2707
- * <li>HI</li>
2708
- * <li>HST</li>
2709
- * <li>HDT</li>
2710
- * <li>BT</li>
2711
- * <li>BRST</li>
2712
- * <li>BRT</li>
2713
- * <li>KR</li>
2714
- * <li>KST</li>
2715
- * <li>HK</li>
2716
- * <li>HKT</li>
2717
- * <li>JP</li>
2718
- * <li>JST</li>
2719
- * <li>AT</li>
2720
- * <li>AST</li>
2721
- * <li>ADT</li>
2722
- * <li>NF</li>
2723
- * <li>NST</li>
2724
- * <li>NDT</li>
2725
- * <li>AL</li>
2726
- * <li>AKST</li>
2727
- * <li>AKDT</li>
2728
- * <li>IN</li>
2729
- * <li>IST</li>
2730
- * <li>CE</li>
2731
- * <li>CET</li>
2732
- * <li>CEST</li>
2733
- * <li>SG</li>
2734
- * <li>SGT</li>
2735
- * <li>LON</li>
2736
- * <li>BST</li>
2737
- * <li>MOS</li>
2738
- * <li>SHG</li>
2739
- * <li>CH</li>
2740
- * <li>NL</li>
2741
- * <li>TW</li>
2742
- * <li>SYD</li>
2743
- * <li>AEST</li>
2744
- * <li>AEDT</li>
2745
- * </ul>
2746
- */
2747
- export class TimeZone {
2748
- protected constructor();
2749
-
2750
- /**
2751
- * Factory method which creates timezone instances from one of the supported keys.
2752
- * @param tzCode -
2753
- * @return dh.i18n.TimeZone
2754
- */
2755
- static getTimeZone(tzCode:string):TimeZone;
2756
- /**
2757
- * the standard offset of this timezone, in minutes
2758
- * @return int
2759
- */
2760
- get standardOffset():number;
2761
- /**
2762
- * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2763
- * @return String
2764
- */
2765
- get id():string;
2766
- }
2767
-
2768
2768
  }
2769
2769
 
2770
2770
  export namespace dh.plot {
@@ -2813,24 +2813,11 @@ export namespace dh.plot {
2813
2813
  get multiSeries():MultiSeries;
2814
2814
  get shapeLabel():string;
2815
2815
  }
2816
- export interface FigureDataUpdatedEvent {
2817
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2818
- get series():Series[];
2819
- }
2820
- /**
2821
- * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2822
- */
2823
- export interface MultiSeries {
2824
- /**
2825
- * The name for this multi-series.
2826
- * @return String
2827
- */
2828
- get name():string;
2829
- /**
2830
- * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2831
- * @return int
2832
- */
2833
- get plotStyle():SeriesPlotStyleType;
2816
+ export interface OneClick {
2817
+ setValueForColumn(columnName:string, value:any):void;
2818
+ getValueForColumn(columName:string):any;
2819
+ get requireAllFiltersToDisplay():boolean;
2820
+ get columns():dh.Column[];
2834
2821
  }
2835
2822
  /**
2836
2823
  * Describes how to access and display data required within a series.
@@ -2920,54 +2907,71 @@ export namespace dh.plot {
2920
2907
  get formatType():AxisFormatTypeType;
2921
2908
  get minRange():number;
2922
2909
  }
2923
- export interface OneClick {
2924
- setValueForColumn(columnName:string, value:any):void;
2925
- getValueForColumn(columName:string):any;
2926
- get requireAllFiltersToDisplay():boolean;
2927
- get columns():dh.Column[];
2910
+ /**
2911
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2912
+ */
2913
+ export interface MultiSeries {
2914
+ /**
2915
+ * The name for this multi-series.
2916
+ * @return String
2917
+ */
2918
+ get name():string;
2919
+ /**
2920
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2921
+ * @return int
2922
+ */
2923
+ get plotStyle():SeriesPlotStyleType;
2924
+ }
2925
+ export interface FigureDataUpdatedEvent {
2926
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2927
+ get series():Series[];
2928
2928
  }
2929
2929
 
2930
- export class ChartDescriptor {
2931
- colspan?:number|null;
2932
- rowspan?:number|null;
2933
- series:Array<SeriesDescriptor>;
2934
- axes:Array<AxisDescriptor>;
2935
- chartType:string;
2936
- title?:string|null;
2937
- titleFont?:string|null;
2938
- titleColor?:string|null;
2939
- showLegend?:boolean|null;
2940
- legendFont?:string|null;
2941
- legendColor?:string|null;
2942
- is3d?:boolean|null;
2930
+ export class SeriesDescriptor {
2931
+ plotStyle:string;
2932
+ name?:string|null;
2933
+ linesVisible?:boolean|null;
2934
+ shapesVisible?:boolean|null;
2935
+ gradientVisible?:boolean|null;
2936
+ lineColor?:string|null;
2937
+ pointLabelFormat?:string|null;
2938
+ xToolTipPattern?:string|null;
2939
+ yToolTipPattern?:string|null;
2940
+ shapeLabel?:string|null;
2941
+ shapeSize?:number|null;
2942
+ shapeColor?:string|null;
2943
+ shape?:string|null;
2944
+ dataSources:Array<SourceDescriptor>;
2943
2945
 
2944
2946
  constructor();
2945
2947
  }
2946
2948
 
2947
- export class AxisDescriptor {
2948
- formatType:string;
2949
+ export class SourceDescriptor {
2950
+ axis:AxisDescriptor;
2951
+ table:dh.Table;
2952
+ columnName:string;
2949
2953
  type:string;
2950
- position:string;
2951
- log?:boolean|null;
2952
- label?:string|null;
2953
- labelFont?:string|null;
2954
- ticksFont?:string|null;
2955
- formatPattern?:string|null;
2956
- color?:string|null;
2957
- minRange?:number|null;
2958
- maxRange?:number|null;
2959
- minorTicksVisible?:boolean|null;
2960
- majorTicksVisible?:boolean|null;
2961
- minorTickCount?:number|null;
2962
- gapBetweenMajorTicks?:number|null;
2963
- majorTickLocations?:Array<number>|null;
2964
- tickLabelAngle?:number|null;
2965
- invert?:boolean|null;
2966
- isTimeAxis?:boolean|null;
2967
2954
 
2968
2955
  constructor();
2969
2956
  }
2970
2957
 
2958
+ /**
2959
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
2960
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
2961
+ * keep that cached as well.
2962
+ */
2963
+ export class ChartData {
2964
+ constructor(table:dh.Table);
2965
+
2966
+ update(tableData:dh.SubscriptionTableData):void;
2967
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
2968
+ /**
2969
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
2970
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
2971
+ */
2972
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
2973
+ }
2974
+
2971
2975
  export class FigureFetchError {
2972
2976
  error:object;
2973
2977
  errors:Array<string>;
@@ -2975,28 +2979,47 @@ export namespace dh.plot {
2975
2979
  protected constructor();
2976
2980
  }
2977
2981
 
2982
+ export class DownsampleOptions {
2983
+ /**
2984
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
2985
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
2986
+ * series.subscribe().
2987
+ */
2988
+ static MAX_SERIES_SIZE:number;
2989
+ /**
2990
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
2991
+ * downsampling disabled, the series will not load data.
2992
+ */
2993
+ static MAX_SUBSCRIPTION_SIZE:number;
2994
+ /**
2995
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
2996
+ * axes are configured.
2997
+ */
2998
+ static readonly DEFAULT:DownsampleOptions;
2999
+ /**
3000
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3001
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3002
+ */
3003
+ static readonly DISABLE:DownsampleOptions;
3004
+
3005
+ protected constructor();
3006
+ }
3007
+
2978
3008
  /**
2979
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
2980
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
2981
- * keep that cached as well.
3009
+ * A descriptor used with JsFigureFactory.create to create a figure from JS.
2982
3010
  */
2983
- export class ChartData {
2984
- constructor(table:dh.Table);
2985
-
2986
- update(tableData:dh.SubscriptionTableData):void;
2987
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
2988
- /**
2989
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
2990
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
2991
- */
2992
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
2993
- }
2994
-
2995
- export class SeriesDataSourceException {
2996
- protected constructor();
3011
+ export class FigureDescriptor {
3012
+ title?:string|null;
3013
+ titleFont?:string|null;
3014
+ titleColor?:string|null;
3015
+ isResizable?:boolean|null;
3016
+ isDefaultTheme?:boolean|null;
3017
+ updateInterval?:number|null;
3018
+ cols?:number|null;
3019
+ rows?:number|null;
3020
+ charts:Array<ChartDescriptor>;
2997
3021
 
2998
- get source():SeriesDataSource;
2999
- get message():string;
3022
+ constructor();
3000
3023
  }
3001
3024
 
3002
3025
  /**
@@ -3043,41 +3066,6 @@ export namespace dh.plot {
3043
3066
  get multiSeries():MultiSeries[];
3044
3067
  }
3045
3068
 
3046
- export class SourceDescriptor {
3047
- axis:AxisDescriptor;
3048
- table:dh.Table;
3049
- columnName:string;
3050
- type:string;
3051
-
3052
- constructor();
3053
- }
3054
-
3055
- export class DownsampleOptions {
3056
- /**
3057
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3058
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3059
- * series.subscribe().
3060
- */
3061
- static MAX_SERIES_SIZE:number;
3062
- /**
3063
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3064
- * downsampling disabled, the series will not load data.
3065
- */
3066
- static MAX_SUBSCRIPTION_SIZE:number;
3067
- /**
3068
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3069
- * axes are configured.
3070
- */
3071
- static readonly DEFAULT:DownsampleOptions;
3072
- /**
3073
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3074
- * the limit of MAX_SUBSCRIPTION_SIZE.
3075
- */
3076
- static readonly DISABLE:DownsampleOptions;
3077
-
3078
- protected constructor();
3079
- }
3080
-
3081
3069
  /**
3082
3070
  * Provides the details for a figure.
3083
3071
  *
@@ -3198,56 +3186,62 @@ export namespace dh.plot {
3198
3186
  static create(config:FigureDescriptor):Promise<Figure>;
3199
3187
  }
3200
3188
 
3201
- export class FigureSourceException {
3202
- table:dh.Table;
3203
- source:SeriesDataSource;
3204
-
3189
+ export class SeriesDataSourceException {
3205
3190
  protected constructor();
3191
+
3192
+ get source():SeriesDataSource;
3193
+ get message():string;
3206
3194
  }
3207
3195
 
3208
- /**
3209
- * A descriptor used with JsFigureFactory.create to create a figure from JS.
3210
- */
3211
- export class FigureDescriptor {
3196
+ export class ChartDescriptor {
3197
+ colspan?:number|null;
3198
+ rowspan?:number|null;
3199
+ series:Array<SeriesDescriptor>;
3200
+ axes:Array<AxisDescriptor>;
3201
+ chartType:string;
3212
3202
  title?:string|null;
3213
3203
  titleFont?:string|null;
3214
3204
  titleColor?:string|null;
3215
- isResizable?:boolean|null;
3216
- isDefaultTheme?:boolean|null;
3217
- updateInterval?:number|null;
3218
- cols?:number|null;
3219
- rows?:number|null;
3220
- charts:Array<ChartDescriptor>;
3205
+ showLegend?:boolean|null;
3206
+ legendFont?:string|null;
3207
+ legendColor?:string|null;
3208
+ is3d?:boolean|null;
3221
3209
 
3222
3210
  constructor();
3223
3211
  }
3224
3212
 
3225
- export class SeriesDescriptor {
3226
- plotStyle:string;
3227
- name?:string|null;
3228
- linesVisible?:boolean|null;
3229
- shapesVisible?:boolean|null;
3230
- gradientVisible?:boolean|null;
3231
- lineColor?:string|null;
3232
- pointLabelFormat?:string|null;
3233
- xToolTipPattern?:string|null;
3234
- yToolTipPattern?:string|null;
3235
- shapeLabel?:string|null;
3236
- shapeSize?:number|null;
3237
- shapeColor?:string|null;
3238
- shape?:string|null;
3239
- dataSources:Array<SourceDescriptor>;
3213
+ export class FigureSourceException {
3214
+ table:dh.Table;
3215
+ source:SeriesDataSource;
3240
3216
 
3241
- constructor();
3217
+ protected constructor();
3242
3218
  }
3243
3219
 
3220
+ export class AxisDescriptor {
3221
+ formatType:string;
3222
+ type:string;
3223
+ position:string;
3224
+ log?:boolean|null;
3225
+ label?:string|null;
3226
+ labelFont?:string|null;
3227
+ ticksFont?:string|null;
3228
+ formatPattern?:string|null;
3229
+ color?:string|null;
3230
+ minRange?:number|null;
3231
+ maxRange?:number|null;
3232
+ minorTicksVisible?:boolean|null;
3233
+ majorTicksVisible?:boolean|null;
3234
+ minorTickCount?:number|null;
3235
+ gapBetweenMajorTicks?:number|null;
3236
+ majorTickLocations?:Array<number>|null;
3237
+ tickLabelAngle?:number|null;
3238
+ invert?:boolean|null;
3239
+ isTimeAxis?:boolean|null;
3244
3240
 
3245
- type AxisFormatTypeType = number;
3246
- export class AxisFormatType {
3247
- static readonly CATEGORY:AxisFormatTypeType;
3248
- static readonly NUMBER:AxisFormatTypeType;
3241
+ constructor();
3249
3242
  }
3250
3243
 
3244
+
3251
3245
  type AxisPositionType = number;
3252
3246
  export class AxisPosition {
3253
3247
  static readonly TOP:AxisPositionType;
@@ -3257,6 +3251,28 @@ export namespace dh.plot {
3257
3251
  static readonly NONE:AxisPositionType;
3258
3252
  }
3259
3253
 
3254
+ type SeriesPlotStyleType = number;
3255
+ export class SeriesPlotStyle {
3256
+ static readonly BAR:SeriesPlotStyleType;
3257
+ static readonly STACKED_BAR:SeriesPlotStyleType;
3258
+ static readonly LINE:SeriesPlotStyleType;
3259
+ static readonly AREA:SeriesPlotStyleType;
3260
+ static readonly STACKED_AREA:SeriesPlotStyleType;
3261
+ static readonly PIE:SeriesPlotStyleType;
3262
+ static readonly HISTOGRAM:SeriesPlotStyleType;
3263
+ static readonly OHLC:SeriesPlotStyleType;
3264
+ static readonly SCATTER:SeriesPlotStyleType;
3265
+ static readonly STEP:SeriesPlotStyleType;
3266
+ static readonly ERROR_BAR:SeriesPlotStyleType;
3267
+ static readonly TREEMAP:SeriesPlotStyleType;
3268
+ }
3269
+
3270
+ type AxisFormatTypeType = number;
3271
+ export class AxisFormatType {
3272
+ static readonly CATEGORY:AxisFormatTypeType;
3273
+ static readonly NUMBER:AxisFormatTypeType;
3274
+ }
3275
+
3260
3276
  /**
3261
3277
  * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3262
3278
  * those series should be rendered.
@@ -3282,22 +3298,6 @@ export namespace dh.plot {
3282
3298
  static readonly COLOR:AxisTypeType;
3283
3299
  }
3284
3300
 
3285
- type SeriesPlotStyleType = number;
3286
- export class SeriesPlotStyle {
3287
- static readonly BAR:SeriesPlotStyleType;
3288
- static readonly STACKED_BAR:SeriesPlotStyleType;
3289
- static readonly LINE:SeriesPlotStyleType;
3290
- static readonly AREA:SeriesPlotStyleType;
3291
- static readonly STACKED_AREA:SeriesPlotStyleType;
3292
- static readonly PIE:SeriesPlotStyleType;
3293
- static readonly HISTOGRAM:SeriesPlotStyleType;
3294
- static readonly OHLC:SeriesPlotStyleType;
3295
- static readonly SCATTER:SeriesPlotStyleType;
3296
- static readonly STEP:SeriesPlotStyleType;
3297
- static readonly ERROR_BAR:SeriesPlotStyleType;
3298
- static readonly TREEMAP:SeriesPlotStyleType;
3299
- }
3300
-
3301
3301
  /**
3302
3302
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3303
3303
  * item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
@@ -3331,15 +3331,6 @@ export namespace dh.plot {
3331
3331
 
3332
3332
  export namespace dh.lsp {
3333
3333
 
3334
- export class Range {
3335
- start:Position;
3336
- end:Position;
3337
-
3338
- constructor();
3339
-
3340
- isInside(innerStart:Position, innerEnd:Position):boolean;
3341
- }
3342
-
3343
3334
  export class CompletionItem {
3344
3335
  label:string;
3345
3336
  kind:number;
@@ -3357,28 +3348,23 @@ export namespace dh.lsp {
3357
3348
  constructor();
3358
3349
  }
3359
3350
 
3360
- export class Position {
3361
- line:number;
3362
- character:number;
3351
+ export class MarkupContent {
3352
+ kind:string;
3353
+ value:string;
3363
3354
 
3364
3355
  constructor();
3365
-
3366
- lessThan(start:Position):boolean;
3367
- lessOrEqual(start:Position):boolean;
3368
- greaterThan(end:Position):boolean;
3369
- greaterOrEqual(end:Position):boolean;
3370
- copy():Position;
3371
3356
  }
3372
3357
 
3373
- export class ParameterInformation {
3374
- label:string;
3375
- documentation:MarkupContent;
3358
+ export class TextEdit {
3359
+ range:Range;
3360
+ text:string;
3376
3361
 
3377
3362
  constructor();
3378
3363
  }
3379
3364
 
3380
- export class TextEdit {
3365
+ export class TextDocumentContentChangeEvent {
3381
3366
  range:Range;
3367
+ rangeLength:number;
3382
3368
  text:string;
3383
3369
 
3384
3370
  constructor();
@@ -3391,28 +3377,42 @@ export namespace dh.lsp {
3391
3377
  constructor();
3392
3378
  }
3393
3379
 
3394
- export class MarkupContent {
3395
- kind:string;
3396
- value:string;
3380
+ export class SignatureInformation {
3381
+ label:string;
3382
+ documentation:MarkupContent;
3383
+ parameters:Array<ParameterInformation>;
3384
+ activeParameter:number;
3397
3385
 
3398
3386
  constructor();
3399
3387
  }
3400
3388
 
3401
- export class TextDocumentContentChangeEvent {
3402
- range:Range;
3403
- rangeLength:number;
3404
- text:string;
3389
+ export class ParameterInformation {
3390
+ label:string;
3391
+ documentation:MarkupContent;
3405
3392
 
3406
3393
  constructor();
3407
3394
  }
3408
3395
 
3409
- export class SignatureInformation {
3410
- label:string;
3411
- documentation:MarkupContent;
3412
- parameters:Array<ParameterInformation>;
3413
- activeParameter:number;
3396
+ export class Position {
3397
+ line:number;
3398
+ character:number;
3399
+
3400
+ constructor();
3401
+
3402
+ lessThan(start:Position):boolean;
3403
+ lessOrEqual(start:Position):boolean;
3404
+ greaterThan(end:Position):boolean;
3405
+ greaterOrEqual(end:Position):boolean;
3406
+ copy():Position;
3407
+ }
3408
+
3409
+ export class Range {
3410
+ start:Position;
3411
+ end:Position;
3414
3412
 
3415
3413
  constructor();
3414
+
3415
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3416
3416
  }
3417
3417
 
3418
3418
  }