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

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 +1774 -1774
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  // Minimum TypeScript Version: 4.3
2
2
  // Generated using com.vertispan.tsdefs.doclet.TsDoclet
3
3
 
4
+ export interface IIterableResult<T> {
5
+ value:T;
6
+ done:boolean;
7
+ }
4
8
  /**
5
9
  * This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
6
10
  * returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
@@ -11,10 +15,6 @@ export interface Iterator<T> {
11
15
  hasNext():boolean;
12
16
  next():IIterableResult<T>;
13
17
  }
14
- export interface IIterableResult<T> {
15
- value:T;
16
- done:boolean;
17
- }
18
18
  export namespace dh.storage {
19
19
 
20
20
  /**
@@ -116,63 +116,9 @@ 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
- }
130
- /**
131
- * Common interface for various ways of accessing table data and formatting.
132
- *
133
- * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
134
- * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
135
- */
136
- export interface TableData {
137
- get(index:LongWrapper|number):Row;
138
- getData(index:LongWrapper|number, column:Column):any;
139
- getFormat(index:LongWrapper|number, column:Column):Format;
140
- get columns():Array<Column>;
141
- get rows():Array<Row>;
142
- }
143
- /**
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.
150
- */
151
- export interface WidgetMessageDetails {
152
- /**
153
- * Returns the data from this message as a base64-encoded string.
154
- */
155
- getDataAsBase64():string;
156
- /**
157
- * Returns the data from this message as a Uint8Array.
158
- */
159
- getDataAsU8():Uint8Array;
160
- /**
161
- * Returns the data from this message as a utf-8 string.
162
- */
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;
119
+ export interface RefreshToken {
120
+ get bytes():string;
121
+ get expiry():number;
176
122
  }
177
123
  /**
178
124
  * This object may be pooled internally or discarded and not updated. Do not retain references to it.
@@ -199,41 +145,18 @@ export namespace dh {
199
145
  */
200
146
  readonly numberFormat?:string|null;
201
147
  }
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;
148
+ /**
149
+ * Common interface for various ways of accessing table data and formatting.
150
+ *
151
+ * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
152
+ * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
153
+ */
154
+ export interface TableData {
155
+ get(index:LongWrapper|number):Row;
156
+ getData(index:LongWrapper|number, column:Column):any;
157
+ getFormat(index:LongWrapper|number, column:Column):Format;
158
+ get columns():Array<Column>;
159
+ get rows():Array<Row>;
237
160
  }
238
161
  /**
239
162
  * Row implementation that also provides additional read-only properties. represents visible rows in the table,
@@ -260,25 +183,75 @@ export namespace dh {
260
183
  get hasChildren():boolean;
261
184
  get index():LongWrapper;
262
185
  }
263
- export interface HasEventHandling {
186
+ export interface LayoutHints {
187
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
188
+
189
+ get hiddenColumns():string[]|null;
190
+ get frozenColumns():string[]|null;
191
+ get columnGroups():ColumnGroup[]|null;
192
+ get areSavedLayoutsAllowed():boolean;
193
+ get frontColumns():string[]|null;
194
+ get backColumns():string[]|null;
195
+ }
196
+ /**
197
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
198
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
199
+ * are correctly freed.
200
+ */
201
+ export interface WidgetExportedObject {
264
202
  /**
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
203
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
204
+ * null, this object cannot be fetched, but can be passed to the server, such as via
205
+ * {@link Widget.sendMessage}.
206
+ * @return the string type of this server-side object, or null.
270
207
  */
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;
208
+ readonly type?:string|null;
209
+
274
210
  /**
275
- * Removes an event listener added to this table.
276
- * @param name -
277
- * @param callback -
278
- * @return
279
- * @typeParam T -
211
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
212
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
213
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
280
214
  */
281
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
215
+ reexport():Promise<WidgetExportedObject>;
216
+ /**
217
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
218
+ * the same instance.
219
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
220
+ */
221
+ fetch():Promise<any>;
222
+ /**
223
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
224
+ * exist that also use that object. Should not be called after fetch() has been invoked.
225
+ */
226
+ close():void;
227
+ }
228
+ /**
229
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
230
+ * table column.
231
+ */
232
+ export interface ColumnStatistics {
233
+ /**
234
+ * Gets the type of formatting that should be used for given statistic.
235
+ * <p>
236
+ * the format type for a statistic. A null return value means that the column formatting should be used.
237
+ * @param name - the display name of the statistic
238
+ * @return String
239
+ */
240
+ getType(name:string):string;
241
+ /**
242
+ * 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
243
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
244
+ * than 19 unique values.
245
+ * @return Map of String double
246
+ */
247
+ get uniqueValues():Map<string, number>;
248
+ /**
249
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
250
+ * <p>
251
+ * A map of each statistic's name to its value.
252
+ * @return Map of String and Object
253
+ */
254
+ get statisticsMap():Map<string, object>;
282
255
  }
283
256
  /**
284
257
  * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
@@ -302,50 +275,200 @@ export namespace dh {
302
275
  */
303
276
  get rows():Array<ViewportRow>;
304
277
  }
305
- /**
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.
308
- *
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.
318
- */
319
- export interface SubscriptionTableData extends TableData {
320
- get fullIndex():RangeSet;
278
+ export interface JoinableTable {
279
+ freeze():Promise<Table>;
280
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
321
281
  /**
322
- * The ordered set of row indexes removed since the last update
323
- * @return dh.RangeSet
282
+ * @deprecated
324
283
  */
325
- get removed():RangeSet;
284
+ join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:object):Promise<Table>;
285
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, asOfMatchRule?:string):Promise<Table>;
286
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
287
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
288
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
289
+ }
290
+ export interface HasEventHandling {
326
291
  /**
327
- * The ordered set of row indexes added since the last update
328
- * @return dh.RangeSet
292
+ * Listen for events on this object.
293
+ * @param name - the name of the event to listen for
294
+ * @param callback - a function to call when the event occurs
295
+ * @return Returns a cleanup function.
296
+ * @typeParam T - the type of the data that the event will provide
329
297
  */
330
- get added():RangeSet;
331
- get columns():Array<Column>;
298
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
299
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
300
+ hasListeners(name:string):boolean;
332
301
  /**
333
- * The ordered set of row indexes updated since the last update
334
- * @return dh.RangeSet
302
+ * Removes an event listener added to this table.
303
+ * @param name -
304
+ * @param callback -
305
+ * @return
306
+ * @typeParam T -
335
307
  */
336
- get modified():RangeSet;
337
- get rows():Array<Row>;
308
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
338
309
  }
339
310
  /**
340
- * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
341
- * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
342
- *
343
- * Additionally, this is automatically subscribed to its one and only row, across all columns.
344
- *
345
- * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
346
- * template when fetching a new totals table, or changing the totals table in use.
347
- *
348
- * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
311
+ * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
312
+ * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
313
+ * <p>
314
+ * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
315
+ * server. The setViewport method can be used to adjust this table instead of creating a new one.
316
+ * <p>
317
+ * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
318
+ * to the underlying handle and accumulated data.
319
+ * <p>
320
+ * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
321
+ * the idea then that the caller did not actually use this type. This means that for every exported method (which then
322
+ * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
323
+ * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
324
+ * deems it no longer in use.
325
+ * <p>
326
+ * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
327
+ * true), providing a way to stop the server from streaming updates to the client.
328
+ *
329
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
330
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
331
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
332
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
333
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
334
+ */
335
+ export interface TableViewportSubscription extends HasEventHandling {
336
+ /**
337
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
338
+ * @param firstRow -
339
+ * @param lastRow -
340
+ * @param columns -
341
+ * @param updateIntervalMs -
342
+ */
343
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
344
+ /**
345
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
346
+ */
347
+ close():void;
348
+ /**
349
+ * Gets the data currently visible in this viewport
350
+ * @return Promise of {@link dh.TableData}.
351
+ */
352
+ getViewportData():Promise<TableData>;
353
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
354
+ }
355
+ /**
356
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
357
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
358
+ *
359
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
360
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
361
+ * backwards compatibility and to better follow JS expectations.
362
+ */
363
+ export interface WidgetMessageDetails {
364
+ /**
365
+ * Returns the data from this message as a base64-encoded string.
366
+ */
367
+ getDataAsBase64():string;
368
+ /**
369
+ * Returns the data from this message as a Uint8Array.
370
+ */
371
+ getDataAsU8():Uint8Array;
372
+ /**
373
+ * Returns the data from this message as a utf-8 string.
374
+ */
375
+ getDataAsString():string;
376
+ /**
377
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
378
+ * objects, and should close them when no longer needed.
379
+ */
380
+ get exportedObjects():WidgetExportedObject[];
381
+ }
382
+ export interface Row {
383
+ get(column:Column):any;
384
+ getFormat(column:Column):Format;
385
+ get index():LongWrapper;
386
+ }
387
+ /**
388
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
389
+ * the viewport again.
390
+ */
391
+ export interface ViewportRow extends Row {
392
+ get index():LongWrapper;
393
+ }
394
+ export interface ColumnGroup {
395
+ get name():string|null;
396
+ get children():string[]|null;
397
+ get color():string|null;
398
+ }
399
+ /**
400
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
401
+ */
402
+ export interface LocalTimeWrapper {
403
+ valueOf():string;
404
+ getHour():number;
405
+ getMinute():number;
406
+ getSecond():number;
407
+ getNano():number;
408
+ toString():string;
409
+ }
410
+ export interface WorkerHeapInfo {
411
+ /**
412
+ * Total heap size available for this worker.
413
+ */
414
+ get totalHeapSize():number;
415
+ get freeMemory():number;
416
+ get maximumHeapSize():number;
417
+ }
418
+ /**
419
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
420
+ */
421
+ export interface LocalDateWrapper {
422
+ valueOf():string;
423
+ getYear():number;
424
+ getMonthValue():number;
425
+ getDayOfMonth():number;
426
+ toString():string;
427
+ }
428
+ /**
429
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
430
+ * in columns) either by index, or scanning the complete present index.
431
+ *
432
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading
433
+ * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
434
+ * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
435
+ * both options should be considered.
436
+ *
437
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
438
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
439
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
440
+ * read specific rows or cells out of the table.
441
+ */
442
+ export interface SubscriptionTableData extends TableData {
443
+ get fullIndex():RangeSet;
444
+ /**
445
+ * The ordered set of row indexes removed since the last update
446
+ * @return dh.RangeSet
447
+ */
448
+ get removed():RangeSet;
449
+ /**
450
+ * The ordered set of row indexes added since the last update
451
+ * @return dh.RangeSet
452
+ */
453
+ get added():RangeSet;
454
+ get columns():Array<Column>;
455
+ /**
456
+ * The ordered set of row indexes updated since the last update
457
+ * @return dh.RangeSet
458
+ */
459
+ get modified():RangeSet;
460
+ get rows():Array<Row>;
461
+ }
462
+ /**
463
+ * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
464
+ * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
465
+ *
466
+ * Additionally, this is automatically subscribed to its one and only row, across all columns.
467
+ *
468
+ * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
469
+ * template when fetching a new totals table, or changing the totals table in use.
470
+ *
471
+ * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
349
472
  * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
350
473
  * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
351
474
  * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
@@ -465,201 +588,71 @@ export namespace dh {
465
588
  */
466
589
  get isRefreshing():boolean;
467
590
  }
591
+ export interface TreeViewportData extends TableData {
592
+ get offset():number;
593
+ get columns():Array<Column>;
594
+ get rows():Array<TreeRow>;
595
+ }
596
+
468
597
  /**
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.
598
+ * Deprecated for use in Deephaven Core.
599
+ * @deprecated
472
600
  */
473
- export interface WidgetExportedObject {
601
+ export class Client {
602
+ static readonly EVENT_REQUEST_FAILED:string;
603
+ static readonly EVENT_REQUEST_STARTED:string;
604
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
605
+
606
+ constructor();
607
+ }
608
+
609
+ /**
610
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
611
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
612
+ * instance.
613
+ */
614
+ export class FilterCondition {
615
+ protected constructor();
616
+
474
617
  /**
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.
618
+ * the opposite of this condition
619
+ * @return FilterCondition
479
620
  */
480
- readonly type?:string|null;
481
-
621
+ not():FilterCondition;
482
622
  /**
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.
623
+ * a condition representing the current condition logically ANDed with the other parameters
624
+ * @param filters -
625
+ * @return FilterCondition
486
626
  */
487
- reexport():Promise<WidgetExportedObject>;
627
+ and(...filters:FilterCondition[]):FilterCondition;
488
628
  /**
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.
629
+ * a condition representing the current condition logically ORed with the other parameters
630
+ * @param filters -
631
+ * @return FilterCondition.
492
632
  */
493
- fetch():Promise<any>;
633
+ or(...filters:FilterCondition[]):FilterCondition;
494
634
  /**
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.
635
+ * a string suitable for debugging showing the details of this condition.
636
+ * @return String.
497
637
  */
498
- close():void;
499
- }
500
- /**
501
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
502
- */
503
- export interface LocalDateWrapper {
504
- valueOf():string;
505
- getYear():number;
506
- getMonthValue():number;
507
- getDayOfMonth():number;
508
638
  toString():string;
509
- }
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 {
639
+ get columns():Array<Column>;
515
640
  /**
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
521
- */
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>;
537
- }
538
- /**
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.
562
- */
563
- export interface TableViewportSubscription extends HasEventHandling {
564
- /**
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 -
570
- */
571
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
572
- /**
573
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
574
- */
575
- close():void;
576
- /**
577
- * Gets the data currently visible in this viewport
578
- * @return Promise of {@link dh.TableData}.
579
- */
580
- getViewportData():Promise<TableData>;
581
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
582
- }
583
- export interface WorkerHeapInfo {
584
- /**
585
- * Total heap size available for this worker.
586
- */
587
- get totalHeapSize():number;
588
- get freeMemory():number;
589
- get maximumHeapSize():number;
590
- }
591
- export interface TreeViewportData extends TableData {
592
- get offset():number;
593
- get columns():Array<Column>;
594
- get rows():Array<TreeRow>;
595
- }
596
-
597
- /**
598
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
599
- */
600
- export class BigIntegerWrapper {
601
- protected constructor();
602
-
603
- static ofString(str:string):BigIntegerWrapper;
604
- asNumber():number;
605
- valueOf():string;
606
- toString():string;
607
- }
608
-
609
- 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 {
622
- protected constructor();
623
-
624
- /**
625
- * the opposite of this condition
626
- * @return FilterCondition
627
- */
628
- not():FilterCondition;
629
- /**
630
- * a condition representing the current condition logically ANDed with the other parameters
631
- * @param filters -
632
- * @return FilterCondition
633
- */
634
- and(...filters:FilterCondition[]):FilterCondition;
635
- /**
636
- * a condition representing the current condition logically ORed with the other parameters
637
- * @param filters -
638
- * @return FilterCondition.
639
- */
640
- or(...filters:FilterCondition[]):FilterCondition;
641
- /**
642
- * a string suitable for debugging showing the details of this condition.
643
- * @return String.
644
- */
645
- toString():string;
646
- get columns():Array<Column>;
647
- /**
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.
641
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
642
+ * functions:
643
+ * <ul>
644
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
645
+ * than the third</li>
646
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
647
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
648
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
649
+ * "not a number"</i></li>
650
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
651
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
652
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
653
+ * expression</li>
654
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
655
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
663
656
  * <p>
664
657
  * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
665
658
  * method should be used in other cases
@@ -687,175 +680,270 @@ export namespace dh {
687
680
  }
688
681
 
689
682
  /**
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
693
- */
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
-
700
- protected constructor();
701
- }
702
-
703
- export class LoginCredentials {
704
- type?:string|null;
705
- username?:string|null;
706
- token?:string|null;
707
-
708
- constructor();
709
- }
710
-
711
- /**
712
- * Event fired when a command is issued from the client.
683
+ * A js type for operating on input tables.
684
+ *
685
+ * Represents a User Input Table, which can have data added to it from other sources.
686
+ *
687
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
688
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
689
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
690
+ * before sending the next operation.
691
+ *
692
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
693
+ *
694
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
695
+ * object.
713
696
  */
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
-
697
+ export class InputTable {
727
698
  protected constructor();
728
699
 
729
- valueOf():string;
730
- toString():string;
731
700
  /**
732
- * The expression to evaluate this custom column.
733
- * @return String
701
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
702
+ * property at that name and validate it can be put into the given column type.
703
+ * @param row -
704
+ * @param userTimeZone -
705
+ * @return Promise of dh.InputTable
734
706
  */
735
- get expression():string;
707
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
736
708
  /**
737
- * The name of the column to use.
738
- * @return String
709
+ * Add multiple rows to a table.
710
+ * @param rows -
711
+ * @param userTimeZone -
712
+ * @return Promise of dh.InputTable
739
713
  */
740
- get name():string;
714
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
741
715
  /**
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
716
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
717
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
718
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
719
+ * resolved to the same InputTable instance this method was called upon once the server returns.
720
+ * @param tableToAdd -
721
+ * @return Promise of dh.InputTable
751
722
  */
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 {
723
+ addTable(tableToAdd:Table):Promise<InputTable>;
767
724
  /**
768
- * @deprecated
725
+ * Add multiple tables to this Input Table.
726
+ * @param tablesToAdd -
727
+ * @return Promise of dh.InputTable
769
728
  */
770
- static readonly COUNT:string;
729
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
771
730
  /**
772
- * @deprecated
731
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
732
+ * @param tableToDelete -
733
+ * @return Promise of dh.InputTable
773
734
  */
774
- static readonly MIN:string;
735
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
775
736
  /**
776
- * @deprecated
777
- */
778
- static readonly MAX:string;
779
- /**
780
- * @deprecated
737
+ * Delete multiple tables from this Input Table.
738
+ * @param tablesToDelete -
739
+ * @return
781
740
  */
782
- static readonly SUM:string;
741
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
783
742
  /**
784
- * @deprecated
743
+ * A list of the key columns, by name
744
+ * @return String array.
785
745
  */
786
- static readonly ABS_SUM:string;
746
+ get keys():string[];
787
747
  /**
788
- * @deprecated
748
+ * A list of the value columns, by name
749
+ * @return String array.
789
750
  */
790
- static readonly VAR:string;
751
+ get values():string[];
791
752
  /**
792
- * @deprecated
753
+ * A list of the key Column objects
754
+ * @return {@link dh.Column} array.
793
755
  */
794
- static readonly AVG:string;
756
+ get keyColumns():Column[];
795
757
  /**
796
- * @deprecated
758
+ * A list of the value Column objects
759
+ * @return {@link dh.Column} array.
797
760
  */
798
- static readonly STD:string;
761
+ get valueColumns():Column[];
799
762
  /**
800
- * @deprecated
763
+ * The source table for this Input Table
764
+ * @return dh.table
801
765
  */
802
- static readonly FIRST:string;
766
+ get table():Table;
767
+ }
768
+
769
+ /**
770
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
771
+ * column.
772
+ */
773
+ export class Column {
803
774
  /**
804
- * @deprecated
775
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
776
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
777
+ * @return String
805
778
  */
806
- static readonly LAST:string;
779
+ readonly constituentType?:string|null;
780
+ readonly description?:string|null;
781
+
782
+ protected constructor();
783
+
807
784
  /**
808
- * @deprecated
785
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
786
+ * @param row -
787
+ * @return Any
809
788
  */
810
- static readonly SKIP:string;
789
+ get(row:Row):any;
790
+ getFormat(row:Row):Format;
811
791
  /**
812
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
792
+ * Creates a sort builder object, to be used when sorting by this column.
793
+ * @return {@link dh.Sort}
813
794
  */
814
- showTotalsByDefault:boolean;
795
+ sort():Sort;
815
796
  /**
816
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
797
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
798
+ * operation, or as a builder to create a filter operation.
799
+ * @return {@link dh.FilterValue}
817
800
  */
818
- showGrandTotalsByDefault:boolean;
801
+ filter():FilterValue;
819
802
  /**
820
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
803
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
804
+ * @param expression -
805
+ * @return {@link dh.CustomColumn}
821
806
  */
822
- defaultOperation:AggregationOperationType;
807
+ formatColor(expression:string):CustomColumn;
823
808
  /**
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.
809
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
810
+ * @param expression -
811
+ * @return {@link dh.CustomColumn}
826
812
  */
827
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
813
+ formatNumber(expression:string):CustomColumn;
828
814
  /**
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`.
815
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
816
+ * @param expression -
817
+ * @return {@link dh.CustomColumn}
831
818
  */
832
- groupBy:Array<string>;
833
-
834
- constructor();
835
-
819
+ formatDate(expression:string):CustomColumn;
836
820
  toString():string;
821
+ /**
822
+ * Label for this column.
823
+ * @return String
824
+ */
825
+ get name():string;
826
+ /**
827
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
828
+ * <b>isUncoalesced</b> property on <b>Table</b>)
829
+ * @return boolean
830
+ */
831
+ get isPartitionColumn():boolean;
832
+ /**
833
+ *
834
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
835
+ * @return int
836
+ */
837
+ get index():number;
838
+ get isSortable():boolean;
839
+ /**
840
+ * Type of the row data that can be found in this column.
841
+ * @return String
842
+ */
843
+ get type():string;
844
+ /**
845
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
846
+ * table using <b>applyCustomColumns</b> with the parameters specified.
847
+ * @param expression -
848
+ * @return {@link dh.CustomColumn}
849
+ */
850
+ static formatRowColor(expression:string):CustomColumn;
851
+ /**
852
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
853
+ * @param name -
854
+ * @param expression -
855
+ * @return {@link dh.CustomColumn}
856
+ */
857
+ static createCustomColumn(name:string, expression:string):CustomColumn;
837
858
  }
838
859
 
839
860
  /**
840
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
861
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
862
+ * the server to get each Table. All tables will have the same structure.
841
863
  */
842
- export class BigDecimalWrapper {
843
- protected constructor();
844
-
845
- static ofString(value:string):BigDecimalWrapper;
846
- asNumber():number;
847
- valueOf():string;
848
- toString():string;
849
- }
864
+ export class PartitionedTable implements HasEventHandling {
865
+ /**
866
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
867
+ */
868
+ static readonly EVENT_KEYADDED:string;
869
+ /**
870
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
871
+ */
872
+ static readonly EVENT_DISCONNECT:string;
873
+ /**
874
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
875
+ */
876
+ static readonly EVENT_RECONNECT:string;
877
+ /**
878
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
879
+ */
880
+ static readonly EVENT_RECONNECTFAILED:string;
850
881
 
851
- /**
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.
854
- */
855
- export class ConnectOptions {
856
- headers:{ [key: string]: string; };
882
+ protected constructor();
857
883
 
858
- constructor();
884
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
885
+ /**
886
+ * Fetch the table with the given key.
887
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
888
+ * @return Promise of dh.Table
889
+ */
890
+ getTable(key:object):Promise<Table>;
891
+ /**
892
+ * Open a new table that is the result of merging all constituent tables. See
893
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
894
+ * @return A merged representation of the constituent tables.
895
+ */
896
+ getMergedTable():Promise<Table>;
897
+ /**
898
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
899
+ * for <b>keyadded</b> will ensure no keys are missed.
900
+ * @return Set of Object
901
+ */
902
+ getKeys():Set<object>;
903
+ /**
904
+ * Fetch a table containing all the valid keys of the partitioned table.
905
+ * @return Promise of a Table
906
+ */
907
+ getKeyTable():Promise<Table>;
908
+ /**
909
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
910
+ * will not affect tables in use.
911
+ */
912
+ close():void;
913
+ /**
914
+ * The count of known keys.
915
+ * @return int
916
+ */
917
+ get size():number;
918
+ /**
919
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
920
+ * non-key columns.
921
+ * @return Array of Column
922
+ */
923
+ get columns():Column[];
924
+ /**
925
+ * An array of all the key columns that the tables are partitioned by.
926
+ * @return Array of Column
927
+ */
928
+ get keyColumns():Column[];
929
+ /**
930
+ * Listen for events on this object.
931
+ * @param name - the name of the event to listen for
932
+ * @param callback - a function to call when the event occurs
933
+ * @return Returns a cleanup function.
934
+ * @typeParam T - the type of the data that the event will provide
935
+ */
936
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
937
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
938
+ hasListeners(name:string):boolean;
939
+ /**
940
+ * Removes an event listener added to this table.
941
+ * @param name -
942
+ * @param callback -
943
+ * @return
944
+ * @typeParam T -
945
+ */
946
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
859
947
  }
860
948
 
861
949
  /**
@@ -1073,131 +1161,63 @@ export namespace dh {
1073
1161
 
1074
1162
 
1075
1163
  /**
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.
1164
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1165
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
1078
1166
  */
1079
- export class Column {
1167
+ export class IdeConnection implements HasEventHandling {
1080
1168
  /**
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
1169
+ * @deprecated
1084
1170
  */
1085
- readonly constituentType?:string|null;
1086
- readonly description?:string|null;
1087
-
1088
- protected constructor();
1171
+ static readonly HACK_CONNECTION_FAILURE:string;
1172
+ static readonly EVENT_DISCONNECT:string;
1173
+ static readonly EVENT_RECONNECT:string;
1174
+ static readonly EVENT_SHUTDOWN:string;
1089
1175
 
1090
1176
  /**
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
1177
+ * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1178
+ * @param serverUrl - The url used when connecting to the server. Read-only.
1179
+ * @param connectOptions - Optional Object
1180
+ * @param fromJava - Optional boolean
1181
+ * @deprecated
1094
1182
  */
1095
- get(row:Row):any;
1096
- getFormat(row:Row):Format;
1183
+ constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1184
+
1097
1185
  /**
1098
- * Creates a sort builder object, to be used when sorting by this column.
1099
- * @return {@link dh.Sort}
1100
- */
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}
1186
+ * closes the current connection, releasing any resources on the server or client.
1162
1187
  */
1163
- static createCustomColumn(name:string, expression:string):CustomColumn;
1164
- }
1165
-
1166
- /**
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.
1177
- */
1178
- export class TableSubscription implements HasEventHandling {
1188
+ close():void;
1189
+ running():Promise<IdeConnection>;
1190
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1191
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1179
1192
  /**
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.
1193
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1194
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1195
+ * log messages as are presently available.
1196
+ * @param callback -
1197
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1183
1198
  */
1184
- static readonly EVENT_UPDATED:string;
1185
-
1186
- protected constructor();
1187
-
1199
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1200
+ startSession(type:string):Promise<IdeSession>;
1201
+ getConsoleTypes():Promise<Array<string>>;
1202
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1188
1203
  /**
1189
- * Stops the subscription on the server.
1204
+ * Listen for events on this object.
1205
+ * @param name - the name of the event to listen for
1206
+ * @param callback - a function to call when the event occurs
1207
+ * @return Returns a cleanup function.
1208
+ * @typeParam T - the type of the data that the event will provide
1190
1209
  */
1191
- close():void;
1192
1210
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1193
1211
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1194
1212
  hasListeners(name:string):boolean;
1195
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1196
1213
  /**
1197
- * The columns that were subscribed to when this subscription was created
1198
- * @return {@link dh.Column}
1214
+ * Removes an event listener added to this table.
1215
+ * @param name -
1216
+ * @param callback -
1217
+ * @return
1218
+ * @typeParam T -
1199
1219
  */
1200
- get columns():Array<Column>;
1220
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1201
1221
  }
1202
1222
 
1203
1223
  export class CoreClient implements HasEventHandling {
@@ -1230,6 +1250,108 @@ export namespace dh {
1230
1250
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1231
1251
  }
1232
1252
 
1253
+ /**
1254
+ * Event fired when a command is issued from the client.
1255
+ */
1256
+ export class CommandInfo {
1257
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1258
+
1259
+ get result():Promise<dh.ide.CommandResult>;
1260
+ get code():string;
1261
+ }
1262
+
1263
+ export class CustomColumn {
1264
+ static readonly TYPE_FORMAT_COLOR:string;
1265
+ static readonly TYPE_FORMAT_NUMBER:string;
1266
+ static readonly TYPE_FORMAT_DATE:string;
1267
+ static readonly TYPE_NEW:string;
1268
+
1269
+ protected constructor();
1270
+
1271
+ valueOf():string;
1272
+ toString():string;
1273
+ /**
1274
+ * The expression to evaluate this custom column.
1275
+ * @return String
1276
+ */
1277
+ get expression():string;
1278
+ /**
1279
+ * The name of the column to use.
1280
+ * @return String
1281
+ */
1282
+ get name():string;
1283
+ /**
1284
+ * Type of custom column. One of
1285
+ *
1286
+ * <ul>
1287
+ * <li>FORMAT_COLOR</li>
1288
+ * <li>FORMAT_NUMBER</li>
1289
+ * <li>FORMAT_DATE</li>
1290
+ * <li>NEW</li>
1291
+ * </ul>
1292
+ * @return String
1293
+ */
1294
+ get type():string;
1295
+ }
1296
+
1297
+ /**
1298
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1299
+ *
1300
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1301
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1302
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1303
+ */
1304
+ export class TreeTableConfig {
1305
+ /**
1306
+ * The column representing the unique ID for each item
1307
+ */
1308
+ idColumn:string;
1309
+ /**
1310
+ * The column representing the parent ID for each item
1311
+ */
1312
+ parentColumn:string;
1313
+ /**
1314
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1315
+ */
1316
+ promoteOrphansToRoot:boolean;
1317
+
1318
+ constructor();
1319
+ }
1320
+
1321
+ /**
1322
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1323
+ */
1324
+ export class BigDecimalWrapper {
1325
+ protected constructor();
1326
+
1327
+ static ofString(value:string):BigDecimalWrapper;
1328
+ asNumber():number;
1329
+ valueOf():string;
1330
+ toString():string;
1331
+ }
1332
+
1333
+ export class QueryInfo {
1334
+ static readonly EVENT_TABLE_OPENED:string;
1335
+ static readonly EVENT_DISCONNECT:string;
1336
+ static readonly EVENT_RECONNECT:string;
1337
+ static readonly EVENT_CONNECT:string;
1338
+
1339
+ protected constructor();
1340
+ }
1341
+
1342
+ export class Ide {
1343
+ constructor();
1344
+
1345
+ /**
1346
+ * @deprecated
1347
+ */
1348
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1349
+ /**
1350
+ * @deprecated
1351
+ */
1352
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1353
+ }
1354
+
1233
1355
  /**
1234
1356
  * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1235
1357
  * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
@@ -1403,123 +1525,34 @@ export namespace dh {
1403
1525
  }
1404
1526
 
1405
1527
  /**
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.
1528
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1529
+ * roll-up table.
1408
1530
  */
1409
- export class PartitionedTable implements HasEventHandling {
1531
+ export class RollupConfig {
1410
1532
  /**
1411
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1533
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1412
1534
  */
1413
- static readonly EVENT_KEYADDED:string;
1535
+ groupingColumns:Array<String>;
1414
1536
  /**
1415
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1537
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1538
+ * roll-up table.
1416
1539
  */
1417
- static readonly EVENT_DISCONNECT:string;
1540
+ aggregations:{ [key: string]: Array<AggregationOperationType>; };
1418
1541
  /**
1419
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1542
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1543
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1544
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1545
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1420
1546
  */
1421
- static readonly EVENT_RECONNECT:string;
1547
+ includeConstituents:boolean;
1548
+ includeOriginalColumns?:boolean|null;
1422
1549
  /**
1423
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
1550
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1424
1551
  */
1425
- static readonly EVENT_RECONNECTFAILED:string;
1552
+ includeDescriptions:boolean;
1426
1553
 
1427
- protected constructor();
1428
-
1429
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
1430
- /**
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
1434
- */
1435
- getTable(key:object):Promise<Table>;
1436
- /**
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.
1440
- */
1441
- getMergedTable():Promise<Table>;
1442
- /**
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
1446
- */
1447
- getKeys():Set<object>;
1448
- /**
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.
1456
- */
1457
- close():void;
1458
- /**
1459
- * The count of known keys.
1460
- * @return int
1461
- */
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;
1492
- }
1493
-
1494
- export class LongWrapper {
1495
- protected constructor();
1496
-
1497
- static ofString(str:string):LongWrapper;
1498
- asNumber():number;
1499
- valueOf():string;
1500
- toString():string;
1501
- }
1502
-
1503
- export class QueryInfo {
1504
- static readonly EVENT_TABLE_OPENED:string;
1505
- static readonly EVENT_DISCONNECT:string;
1506
- static readonly EVENT_RECONNECT:string;
1507
- static readonly EVENT_CONNECT:string;
1508
-
1509
- protected constructor();
1510
- }
1511
-
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;
1520
-
1521
- constructor();
1522
- }
1554
+ constructor();
1555
+ }
1523
1556
 
1524
1557
  /**
1525
1558
  * A Widget represents a server side object that sends one or more responses to the client. The client can then
@@ -1613,723 +1646,707 @@ export namespace dh {
1613
1646
  }
1614
1647
 
1615
1648
  /**
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.
1649
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
1650
+ * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
1651
+ * inform the UI right away that they have taken place.
1629
1652
  */
1630
- export class InputTable {
1653
+ export class Table implements JoinableTable, HasEventHandling {
1654
+ readonly description?:string|null;
1655
+ readonly pluginName?:string|null;
1656
+ readonly layoutHints?:null|LayoutHints;
1657
+ static readonly EVENT_SIZECHANGED:string;
1658
+ static readonly EVENT_UPDATED:string;
1659
+ static readonly EVENT_ROWADDED:string;
1660
+ static readonly EVENT_ROWREMOVED:string;
1661
+ static readonly EVENT_ROWUPDATED:string;
1662
+ static readonly EVENT_SORTCHANGED:string;
1663
+ static readonly EVENT_FILTERCHANGED:string;
1664
+ static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
1665
+ static readonly EVENT_DISCONNECT:string;
1666
+ static readonly EVENT_RECONNECT:string;
1667
+ static readonly EVENT_RECONNECTFAILED:string;
1668
+ static readonly EVENT_REQUEST_FAILED:string;
1669
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1670
+ static readonly SIZE_UNCOALESCED:number;
1671
+
1631
1672
  protected constructor();
1632
1673
 
1674
+ batch(userCode:(arg0:unknown)=>void):Promise<Table>;
1633
1675
  /**
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
1676
+ * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
1677
+ * caching a returned value.
1678
+ * @param key -
1679
+ * @return {@link dh.Column}
1639
1680
  */
1640
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1681
+ findColumn(key:string):Column;
1641
1682
  /**
1642
- * Add multiple rows to a table.
1643
- * @param rows -
1644
- * @param userTimeZone -
1645
- * @return Promise of dh.InputTable
1683
+ * Retrieve multiple columns specified by the given names.
1684
+ * @param keys -
1685
+ * @return {@link dh.Column} array
1646
1686
  */
1647
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1687
+ findColumns(keys:string[]):Column[];
1688
+ isBlinkTable():boolean;
1648
1689
  /**
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 -
1690
+ * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
1691
+ * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
1654
1692
  * @return Promise of dh.InputTable
1655
1693
  */
1656
- addTable(tableToAdd:Table):Promise<InputTable>;
1694
+ inputTable():Promise<InputTable>;
1657
1695
  /**
1658
- * Add multiple tables to this Input Table.
1659
- * @param tablesToAdd -
1660
- * @return Promise of dh.InputTable
1696
+ * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1661
1697
  */
1662
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
1698
+ close():void;
1699
+ getAttributes():string[];
1663
1700
  /**
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
1701
+ * null if no property exists, a string if it is an easily serializable property, or a ```Promise
1702
+ * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
1703
+ * @param attributeName -
1704
+ * @return Object
1667
1705
  */
1668
- deleteTable(tableToDelete:Table):Promise<InputTable>;
1706
+ getAttribute(attributeName:string):unknown|undefined|null;
1669
1707
  /**
1670
- * Delete multiple tables from this Input Table.
1671
- * @param tablesToDelete -
1672
- * @return
1708
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
1709
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
1710
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
1711
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
1712
+ * not.
1713
+ * @param sort -
1714
+ * @return {@link dh.Sort} array
1673
1715
  */
1674
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1716
+ applySort(sort:Sort[]):Array<Sort>;
1675
1717
  /**
1676
- * A list of the key columns, by name
1677
- * @return String array.
1718
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
1719
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
1720
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
1721
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
1722
+ * will not.
1723
+ * @param filter -
1724
+ * @return {@link dh.FilterCondition} array
1678
1725
  */
1679
- get keys():string[];
1726
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1680
1727
  /**
1681
- * A list of the value columns, by name
1682
- * @return String array.
1728
+ * used when adding new filter and sort operations to the table, as long as they are present.
1729
+ * @param customColumns -
1730
+ * @return {@link dh.CustomColumn} array
1683
1731
  */
1684
- get values():string[];
1732
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
1685
1733
  /**
1686
- * A list of the key Column objects
1687
- * @return {@link dh.Column} array.
1734
+ * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
1735
+ * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
1736
+ * will result in events to be fired once data becomes available, starting with an `updated` event and a
1737
+ * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
1738
+ * needed.
1739
+ * @param firstRow -
1740
+ * @param lastRow -
1741
+ * @param columns -
1742
+ * @param updateIntervalMs -
1743
+ * @return {@link dh.TableViewportSubscription}
1688
1744
  */
1689
- get keyColumns():Column[];
1745
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
1690
1746
  /**
1691
- * A list of the value Column objects
1692
- * @return {@link dh.Column} array.
1747
+ * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
1748
+ * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
1749
+ * separate the lifespan of this promise from the table itself, call
1750
+ * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
1751
+ * @return Promise of {@link dh.TableData}
1693
1752
  */
1694
- get valueColumns():Column[];
1753
+ getViewportData():Promise<TableData>;
1695
1754
  /**
1696
- * The source table for this Input Table
1697
- * @return dh.table
1755
+ * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
1756
+ * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
1757
+ * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
1758
+ * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
1759
+ * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
1760
+ * called on it to stop it, and all events are fired from the TableSubscription instance.
1761
+ * @param columns -
1762
+ * @param updateIntervalMs -
1763
+ * @return {@link dh.TableSubscription}
1698
1764
  */
1699
- get table():Table;
1700
- }
1701
-
1702
- /**
1703
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1704
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1705
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1706
- */
1707
- export class RangeSet {
1708
- protected constructor();
1709
-
1710
- static ofRange(first:number, last:number):RangeSet;
1711
- static ofItems(rows:number[]):RangeSet;
1712
- static ofRanges(ranges:RangeSet[]):RangeSet;
1713
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1765
+ subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
1714
1766
  /**
1715
- * a new iterator over all indexes in this collection.
1716
- * @return Iterator of {@link dh.LongWrapper}
1717
- */
1718
- iterator():Iterator<LongWrapper>;
1719
- /**
1720
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1721
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1722
- * property each time through a loop).
1723
- * @return double
1767
+ * a new table containing the distinct tuples of values from the given columns that are present in the original
1768
+ * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1769
+ * order of appearance of values from the original table.
1770
+ * @param columns -
1771
+ * @return Promise of dh.Table
1724
1772
  */
1725
- get size():number;
1726
- }
1727
-
1728
- export class Ide {
1729
- constructor();
1730
-
1773
+ selectDistinct(columns:Column[]):Promise<Table>;
1731
1774
  /**
1732
- * @deprecated
1775
+ * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1776
+ * @return Promise of dh.Table
1733
1777
  */
1734
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1778
+ copy():Promise<Table>;
1735
1779
  /**
1736
- * @deprecated
1780
+ * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1781
+ * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1782
+ * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1783
+ * called on it when not in use.
1784
+ * @param config -
1785
+ * @return Promise of dh.TotalsTable
1737
1786
  */
1738
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1739
- }
1740
-
1741
- /**
1742
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1743
- * some options, JS applications can run code on the server, and interact with available exportable objects.
1744
- */
1745
- export class IdeConnection implements HasEventHandling {
1787
+ getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1746
1788
  /**
1747
- * @deprecated
1789
+ * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1790
+ * above for more specifics.
1791
+ * @param config -
1792
+ * @return promise of dh.TotalsTable
1748
1793
  */
1749
- static readonly HACK_CONNECTION_FAILURE:string;
1750
- static readonly EVENT_DISCONNECT:string;
1751
- static readonly EVENT_RECONNECT:string;
1752
- static readonly EVENT_SHUTDOWN:string;
1753
-
1794
+ getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1754
1795
  /**
1755
- * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1756
- * @param serverUrl - The url used when connecting to the server. Read-only.
1757
- * @param connectOptions - Optional Object
1758
- * @param fromJava - Optional boolean
1759
- * @deprecated
1796
+ * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1797
+ * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1798
+ * @param configObject -
1799
+ * @return Promise of dh.TreeTable
1760
1800
  */
1761
- constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1762
-
1801
+ rollup(configObject:RollupConfig):Promise<TreeTable>;
1763
1802
  /**
1764
- * closes the current connection, releasing any resources on the server or client.
1803
+ * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1804
+ * new `TreeTable` which must have close() called on it when not in use.
1805
+ * @param configObject -
1806
+ * @return Promise dh.TreeTable
1765
1807
  */
1766
- close():void;
1767
- running():Promise<IdeConnection>;
1768
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1769
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1808
+ treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
1770
1809
  /**
1771
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1772
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1773
- * log messages as are presently available.
1774
- * @param callback -
1775
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1810
+ * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1811
+ * table will not update. This does not change the original table, and the new table will not have any of the client
1812
+ * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1813
+ * @return Promise of dh.Table
1776
1814
  */
1777
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1778
- startSession(type:string):Promise<IdeSession>;
1779
- getConsoleTypes():Promise<Array<string>>;
1780
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1815
+ freeze():Promise<Table>;
1816
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
1781
1817
  /**
1782
- * Listen for events on this object.
1783
- * @param name - the name of the event to listen for
1784
- * @param callback - a function to call when the event occurs
1785
- * @return Returns a cleanup function.
1786
- * @typeParam T - the type of the data that the event will provide
1818
+ *
1819
+ * @deprecated a promise that will be resolved with a newly created table holding the results of the join operation.
1820
+ * The last parameter is optional, and if not specified or empty, all columns from the right table will
1821
+ * be added to the output. Callers are responsible for ensuring that there are no duplicates - a match
1822
+ * pair can be passed instead of a name to specify the new name for the column. Supported `joinType`
1823
+ * 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>
1824
+ * "Natural" "AJ" "ReverseAJ" "ExactJoin" "LeftJoin"
1825
+ * @param joinType -
1826
+ * @param rightTable -
1827
+ * @param columnsToMatch -
1828
+ * @param columnsToAdd -
1829
+ * @param asOfMatchRule -
1830
+ * @return Promise of dh.Table
1787
1831
  */
1788
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1789
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1790
- hasListeners(name:string):boolean;
1832
+ join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:unknown|undefined|null):Promise<Table>;
1791
1833
  /**
1792
- * Removes an event listener added to this table.
1793
- * @param name -
1794
- * @param callback -
1795
- * @return
1796
- * @typeParam T -
1834
+ * a promise that will be resolved with the newly created table holding the results of the specified as-of join
1835
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1836
+ * right table being added to the output. The <b>asOfMatchRule</b> is optional, defaults to <b>LESS_THAN_EQUAL</b>
1837
+ *
1838
+ * <p>
1839
+ * the allowed values are:
1840
+ * </p>
1841
+ *
1842
+ * <ul>
1843
+ * <li>LESS_THAN_EQUAL</li>
1844
+ * <li>LESS_THAN</li>
1845
+ * <li>GREATER_THAN_EQUAL</li>
1846
+ * <li>GREATER_THAN</li>
1847
+ * </ul>
1848
+ * @param rightTable -
1849
+ * @param columnsToMatch -
1850
+ * @param columnsToAdd -
1851
+ * @param asOfMatchRule -
1852
+ * @return Promise og dh.Table
1797
1853
  */
1798
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1799
- }
1800
-
1801
- /**
1802
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1803
- *
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.
1807
- */
1808
- export class TreeTableConfig {
1854
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1809
1855
  /**
1810
- * The column representing the unique ID for each item
1856
+ * a promise that will be resolved with the newly created table holding the results of the specified cross join
1857
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1858
+ * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
1859
+ * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
1860
+ * @param rightTable -
1861
+ * @param columnsToMatch -
1862
+ * @param columnsToAdd -
1863
+ * @param reserve_bits -
1864
+ * @return Promise of dh.Table
1811
1865
  */
1812
- idColumn:string;
1866
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
1813
1867
  /**
1814
- * The column representing the parent ID for each item
1868
+ * a promise that will be resolved with the newly created table holding the results of the specified exact join
1869
+ * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
1870
+ * table being added to the output.
1871
+ * @param rightTable -
1872
+ * @param columnsToMatch -
1873
+ * @param columnsToAdd -
1874
+ * @return Promise of dh.Table
1815
1875
  */
1816
- parentColumn:string;
1876
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1817
1877
  /**
1818
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1878
+ * a promise that will be resolved with the newly created table holding the results of the specified natural join
1879
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1880
+ * right table being added to the output.
1881
+ * @param rightTable -
1882
+ * @param columnsToMatch -
1883
+ * @param columnsToAdd -
1884
+ * @return Promise of dh.Table
1819
1885
  */
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 {
1886
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1887
+ byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1830
1888
  /**
1831
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1889
+ * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1890
+ * keys.
1891
+ * @param keys -
1892
+ * @param dropKeys -
1893
+ * @return Promise dh.PartitionedTable
1832
1894
  */
1833
- groupingColumns:Array<String>;
1895
+ partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1834
1896
  /**
1835
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1836
- * roll-up table.
1897
+ * a promise that will resolve to ColumnStatistics for the column of this table.
1898
+ * @param column -
1899
+ * @return Promise of dh.ColumnStatistics
1837
1900
  */
1838
- aggregations:{ [key: string]: Array<AggregationOperationType>; };
1901
+ getColumnStatistics(column:Column):Promise<ColumnStatistics>;
1839
1902
  /**
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.
1903
+ * Seek the row matching the data provided
1904
+ * @param startingRow - Row to start the seek from
1905
+ * @param column - Column to seek for value on
1906
+ * @param valueType - Type of value provided
1907
+ * @param seekValue - Value to seek
1908
+ * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1909
+ * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1910
+ * `false`.
1911
+ * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1912
+ * @return A promise that resolves to the row value found.
1844
1913
  */
1845
- includeConstituents:boolean;
1846
- includeOriginalColumns?:boolean|null;
1914
+ seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1915
+ toString():string;
1847
1916
  /**
1848
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1917
+ * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1918
+ * .inputTable() to add or remove data from the underlying table.
1919
+ * @return boolean
1849
1920
  */
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
-
1921
+ get hasInputTable():boolean;
1867
1922
  /**
1868
- * Builds a Sort instance to sort values in ascending order.
1869
- * @return {@link dh.Sort}
1923
+ * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1924
+ * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1925
+ * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1926
+ * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
1927
+ * @return {@link dh.Column} array
1870
1928
  */
1871
- asc():Sort;
1929
+ get columns():Array<Column>;
1872
1930
  /**
1873
- * Builds a Sort instance to sort values in descending order.
1874
- * @return {@link dh.Sort}
1931
+ * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1932
+ * @return dh.TotalsTableConfig
1875
1933
  */
1876
- desc():Sort;
1934
+ get totalsTableConfig():TotalsTableConfig;
1877
1935
  /**
1878
- * Builds a Sort instance which takes the absolute value before applying order.
1879
- * @return {@link dh.Sort}
1936
+ * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1937
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1938
+ * for the <b>sortchanged</b> event to know when to update the UI.
1939
+ * @return {@link dh.Sort} array
1880
1940
  */
1881
- abs():Sort;
1882
- toString():string;
1941
+ get sort():Array<Sort>;
1883
1942
  /**
1884
- * True if the absolute value of the column should be used when sorting; defaults to false.
1885
- * @return boolean
1943
+ * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1944
+ * ones. To update, call <b>applyCustomColumns()</b>.
1945
+ * @return {@link dh.CustomColumn} array
1886
1946
  */
1887
- get isAbs():boolean;
1947
+ get customColumns():Array<CustomColumn>;
1888
1948
  /**
1889
- * The column which is sorted.
1890
- * @return {@link dh.Column}
1949
+ * True if this table may receive updates from the server, including size changed events, updated events after
1950
+ * initial snapshot.
1951
+ * @return boolean
1891
1952
  */
1892
- get column():Column;
1953
+ get isRefreshing():boolean;
1893
1954
  /**
1894
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1895
- * @return String
1955
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1956
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1957
+ * for the <b>filterchanged</b> event to know when to update the UI.
1958
+ * @return {@link dh.FilterCondition} array
1896
1959
  */
1897
- get direction():string;
1898
- }
1899
-
1900
- /**
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.
1904
- */
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;
1923
-
1924
- protected constructor();
1925
-
1926
- batch(userCode:(arg0:unknown)=>void):Promise<Table>;
1960
+ get filter():Array<FilterCondition>;
1927
1961
  /**
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}
1962
+ * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
1963
+ * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
1964
+ * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
1965
+ * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
1966
+ * @return double
1932
1967
  */
1933
- findColumn(key:string):Column;
1968
+ get totalSize():number;
1934
1969
  /**
1935
- * Retrieve multiple columns specified by the given names.
1936
- * @param keys -
1937
- * @return {@link dh.Column} array
1970
+ * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
1971
+ * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
1972
+ * property). for details).
1973
+ * @return double
1938
1974
  */
1939
- findColumns(keys:string[]):Column[];
1940
- isBlinkTable():boolean;
1975
+ get size():number;
1941
1976
  /**
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
1977
+ * True if this table has been closed.
1978
+ * @return boolean
1945
1979
  */
1946
- inputTable():Promise<InputTable>;
1980
+ get isClosed():boolean;
1947
1981
  /**
1948
- * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1982
+ * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
1983
+ * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
1984
+ * will be unavailable until table is coalesced.
1985
+ * @return boolean
1949
1986
  */
1950
- close():void;
1951
- getAttributes():string[];
1987
+ get isUncoalesced():boolean;
1952
1988
  /**
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
1989
+ * Listen for events on this object.
1990
+ * @param name - the name of the event to listen for
1991
+ * @param callback - a function to call when the event occurs
1992
+ * @return Returns a cleanup function.
1993
+ * @typeParam T - the type of the data that the event will provide
1957
1994
  */
1958
- getAttribute(attributeName:string):unknown|undefined|null;
1995
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1996
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1997
+ hasListeners(name:string):boolean;
1959
1998
  /**
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
1999
+ * Removes an event listener added to this table.
2000
+ * @param name -
2001
+ * @param callback -
2002
+ * @return
2003
+ * @typeParam T -
1967
2004
  */
1968
- applySort(sort:Sort[]):Array<Sort>;
2005
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1969
2006
  /**
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
2007
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2008
+ * do not support reverse.
2009
+ * @return {@link dh.Sort}
1977
2010
  */
1978
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
2011
+ static reverse():Sort;
2012
+ }
2013
+
2014
+ export class DateWrapper extends LongWrapper {
2015
+ protected constructor();
2016
+
2017
+ static ofJsDate(date:Date):DateWrapper;
2018
+ asDate():Date;
2019
+ }
2020
+
2021
+ export class IdeSession implements HasEventHandling {
2022
+ static readonly EVENT_COMMANDSTARTED:string;
2023
+ static readonly EVENT_REQUEST_FAILED:string;
2024
+
2025
+ protected constructor();
2026
+
1979
2027
  /**
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
2028
+ * Load the named table, with columns and size information already fully populated.
2029
+ * @param name -
2030
+ * @param applyPreviewColumns - optional boolean
2031
+ * @return {@link Promise} of {@link dh.Table}
1983
2032
  */
1984
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
2033
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
1985
2034
  /**
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}
2035
+ * Load the named Figure, including its tables and tablemaps as needed.
2036
+ * @param name -
2037
+ * @return promise of dh.plot.Figure
1996
2038
  */
1997
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
2039
+ getFigure(name:string):Promise<dh.plot.Figure>;
1998
2040
  /**
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}
2041
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2042
+ * size is presently not available until the viewport is first set.
2043
+ * @param name -
2044
+ * @return {@link Promise} of {@link dh.TreeTable}
2004
2045
  */
2005
- getViewportData():Promise<TableData>;
2046
+ getTreeTable(name:string):Promise<TreeTable>;
2047
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2048
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2049
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2006
2050
  /**
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}
2051
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2052
+ * @param tables -
2053
+ * @return {@link Promise} of {@link dh.Table}
2016
2054
  */
2017
- subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
2055
+ mergeTables(tables:Table[]):Promise<Table>;
2056
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2057
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2058
+ close():void;
2059
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2060
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2061
+ openDocument(params:object):void;
2062
+ changeDocument(params:object):void;
2063
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2064
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2065
+ getHover(params:object):Promise<dh.lsp.Hover>;
2066
+ closeDocument(params:object):void;
2018
2067
  /**
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
2068
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2069
+ * values will be null.
2070
+ * @param size -
2071
+ * @return {@link Promise} of {@link dh.Table}
2024
2072
  */
2025
- selectDistinct(columns:Column[]):Promise<Table>;
2073
+ emptyTable(size:number):Promise<Table>;
2026
2074
  /**
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
2075
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2076
+ * the table will be populated with the interval from the specified date until now.
2077
+ * @param periodNanos -
2078
+ * @param startTime -
2079
+ * @return {@link Promise} of {@link dh.Table}
2029
2080
  */
2030
- copy():Promise<Table>;
2081
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2082
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2083
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2084
+ hasListeners(name:string):boolean;
2085
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2086
+ }
2087
+
2088
+ /**
2089
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2090
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2091
+ * methods return a new Sort instance.
2092
+ */
2093
+ export class Sort {
2094
+ static readonly ASCENDING:string;
2095
+ static readonly DESCENDING:string;
2096
+ static readonly REVERSE:string;
2097
+
2098
+ protected constructor();
2099
+
2031
2100
  /**
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
2101
+ * Builds a Sort instance to sort values in ascending order.
2102
+ * @return {@link dh.Sort}
2038
2103
  */
2039
- getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2104
+ asc():Sort;
2040
2105
  /**
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
2106
+ * Builds a Sort instance to sort values in descending order.
2107
+ * @return {@link dh.Sort}
2045
2108
  */
2046
- getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2109
+ desc():Sort;
2047
2110
  /**
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
2111
+ * Builds a Sort instance which takes the absolute value before applying order.
2112
+ * @return {@link dh.Sort}
2052
2113
  */
2053
- rollup(configObject:RollupConfig):Promise<TreeTable>;
2114
+ abs():Sort;
2115
+ toString():string;
2054
2116
  /**
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
2117
+ * True if the absolute value of the column should be used when sorting; defaults to false.
2118
+ * @return boolean
2059
2119
  */
2060
- treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
2120
+ get isAbs():boolean;
2061
2121
  /**
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
2122
+ * The column which is sorted.
2123
+ * @return {@link dh.Column}
2066
2124
  */
2067
- freeze():Promise<Table>;
2068
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
2125
+ get column():Column;
2069
2126
  /**
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
2127
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2128
+ * @return String
2083
2129
  */
2084
- join(joinType:object, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:unknown|undefined|null):Promise<Table>;
2130
+ get direction():string;
2131
+ }
2132
+
2133
+ /**
2134
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2135
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2136
+ *
2137
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2138
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2139
+ * forward data to it.
2140
+ *
2141
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2142
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2143
+ * viewports to make it less expensive to compute for large tables.
2144
+ */
2145
+ export class TableSubscription implements HasEventHandling {
2085
2146
  /**
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
2147
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
2148
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
2149
+ * allowing access to the entire range of items currently in the subscribed columns.
2105
2150
  */
2106
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
2151
+ static readonly EVENT_UPDATED:string;
2152
+
2153
+ protected constructor();
2154
+
2107
2155
  /**
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
2156
+ * Stops the subscription on the server.
2117
2157
  */
2118
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>, reserve_bits?:number):Promise<Table>;
2158
+ close():void;
2159
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2160
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2161
+ hasListeners(name:string):boolean;
2162
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2119
2163
  /**
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
2164
+ * The columns that were subscribed to when this subscription was created
2165
+ * @return {@link dh.Column}
2127
2166
  */
2128
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2167
+ get columns():Array<Column>;
2168
+ }
2169
+
2170
+ /**
2171
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
2172
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
2173
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
2174
+ */
2175
+ export class RangeSet {
2176
+ protected constructor();
2177
+
2178
+ static ofRange(first:number, last:number):RangeSet;
2179
+ static ofItems(rows:number[]):RangeSet;
2180
+ static ofRanges(ranges:RangeSet[]):RangeSet;
2181
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
2129
2182
  /**
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
2183
+ * a new iterator over all indexes in this collection.
2184
+ * @return Iterator of {@link dh.LongWrapper}
2137
2185
  */
2138
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2139
- byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2186
+ iterator():Iterator<LongWrapper>;
2140
2187
  /**
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
2188
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
2189
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
2190
+ * property each time through a loop).
2191
+ * @return double
2146
2192
  */
2147
- partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2193
+ get size():number;
2194
+ }
2195
+
2196
+ /**
2197
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
2198
+ * this type TableMap.
2199
+ * @deprecated
2200
+ */
2201
+ export class TableMap {
2202
+ static readonly EVENT_KEYADDED:string;
2203
+ static readonly EVENT_DISCONNECT:string;
2204
+ static readonly EVENT_RECONNECT:string;
2205
+ static readonly EVENT_RECONNECTFAILED:string;
2206
+
2207
+ protected constructor();
2208
+ }
2209
+
2210
+ /**
2211
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
2212
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
2213
+ */
2214
+ export class ConnectOptions {
2215
+ headers:{ [key: string]: string; };
2216
+
2217
+ constructor();
2218
+ }
2219
+
2220
+ export class LoginCredentials {
2221
+ type?:string|null;
2222
+ username?:string|null;
2223
+ token?:string|null;
2224
+
2225
+ constructor();
2226
+ }
2227
+
2228
+ /**
2229
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
2230
+ */
2231
+ export class BigIntegerWrapper {
2232
+ protected constructor();
2233
+
2234
+ static ofString(str:string):BigIntegerWrapper;
2235
+ asNumber():number;
2236
+ valueOf():string;
2237
+ toString():string;
2238
+ }
2239
+
2240
+ export class LongWrapper {
2241
+ protected constructor();
2242
+
2243
+ static ofString(str:string):LongWrapper;
2244
+ asNumber():number;
2245
+ valueOf():string;
2246
+ toString():string;
2247
+ }
2248
+
2249
+ /**
2250
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
2251
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
2252
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
2253
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
2254
+ * of <b>TotalsTableConfig</b> will be supplied.
2255
+ *
2256
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
2257
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
2258
+ * expected formats.
2259
+ */
2260
+ export class TotalsTableConfig {
2148
2261
  /**
2149
- * a promise that will resolve to ColumnStatistics for the column of this table.
2150
- * @param column -
2151
- * @return Promise of dh.ColumnStatistics
2262
+ * @deprecated
2152
2263
  */
2153
- getColumnStatistics(column:Column):Promise<ColumnStatistics>;
2264
+ static readonly COUNT:string;
2154
2265
  /**
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.
2266
+ * @deprecated
2165
2267
  */
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;
2268
+ static readonly MIN:string;
2168
2269
  /**
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
2270
+ * @deprecated
2172
2271
  */
2173
- get hasInputTable():boolean;
2272
+ static readonly MAX:string;
2174
2273
  /**
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).
2179
- * @return {@link dh.Column} array
2274
+ * @deprecated
2180
2275
  */
2181
- get columns():Array<Column>;
2276
+ static readonly SUM:string;
2182
2277
  /**
2183
- * The default configuration to be used when building a <b>TotalsTable</b> for this table.
2184
- * @return dh.TotalsTableConfig
2278
+ * @deprecated
2185
2279
  */
2186
- get totalsTableConfig():TotalsTableConfig;
2280
+ static readonly ABS_SUM:string;
2187
2281
  /**
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
2282
+ * @deprecated
2192
2283
  */
2193
- get sort():Array<Sort>;
2284
+ static readonly VAR:string;
2194
2285
  /**
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
2286
+ * @deprecated
2198
2287
  */
2199
- get customColumns():Array<CustomColumn>;
2288
+ static readonly AVG:string;
2200
2289
  /**
2201
- * True if this table may receive updates from the server, including size changed events, updated events after
2202
- * initial snapshot.
2203
- * @return boolean
2290
+ * @deprecated
2204
2291
  */
2205
- get isRefreshing():boolean;
2292
+ static readonly STD:string;
2206
2293
  /**
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
2294
+ * @deprecated
2211
2295
  */
2212
- get filter():Array<FilterCondition>;
2296
+ static readonly FIRST:string;
2213
2297
  /**
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.
2218
- * @return double
2298
+ * @deprecated
2219
2299
  */
2220
- get totalSize():number;
2300
+ static readonly LAST:string;
2221
2301
  /**
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
2302
+ * @deprecated
2226
2303
  */
2227
- get size():number;
2304
+ static readonly SKIP:string;
2228
2305
  /**
2229
- * True if this table has been closed.
2230
- * @return boolean
2306
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
2231
2307
  */
2232
- get isClosed():boolean;
2308
+ showTotalsByDefault:boolean;
2233
2309
  /**
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.
2237
- * @return boolean
2310
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
2238
2311
  */
2239
- get isUncoalesced():boolean;
2312
+ showGrandTotalsByDefault:boolean;
2240
2313
  /**
2241
- * Listen for events on this object.
2242
- * @param name - the name of the event to listen for
2243
- * @param callback - a function to call when the event occurs
2244
- * @return Returns a cleanup function.
2245
- * @typeParam T - the type of the data that the event will provide
2314
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
2246
2315
  */
2247
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2248
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2249
- hasListeners(name:string):boolean;
2316
+ defaultOperation:AggregationOperationType;
2250
2317
  /**
2251
- * Removes an event listener added to this table.
2252
- * @param name -
2253
- * @param callback -
2254
- * @return
2255
- * @typeParam T -
2318
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
2319
+ * Table. If a column is omitted, the defaultOperation is used.
2256
2320
  */
2257
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2321
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
2258
2322
  /**
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}
2323
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
2324
+ * these columns. See also `Table.selectDistinct`.
2262
2325
  */
2263
- static reverse():Sort;
2264
- }
2326
+ groupBy:Array<string>;
2265
2327
 
2266
- export class IdeSession implements HasEventHandling {
2267
- static readonly EVENT_COMMANDSTARTED:string;
2268
- static readonly EVENT_REQUEST_FAILED:string;
2328
+ constructor();
2269
2329
 
2270
- protected constructor();
2330
+ toString():string;
2331
+ }
2271
2332
 
2272
- /**
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}
2277
- */
2278
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2279
- /**
2280
- * Load the named Figure, including its tables and tablemaps as needed.
2281
- * @param name -
2282
- * @return promise of dh.plot.Figure
2283
- */
2284
- getFigure(name:string):Promise<dh.plot.Figure>;
2285
- /**
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}
2290
- */
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}
2299
- */
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;
2312
- /**
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}
2317
- */
2318
- emptyTable(size:number):Promise<Table>;
2319
- /**
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}
2325
- */
2326
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2327
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2328
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2329
- hasListeners(name:string):boolean;
2330
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2333
+
2334
+ type SearchDisplayModeType = string;
2335
+ export class SearchDisplayMode {
2336
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2337
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2338
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2331
2339
  }
2332
2340
 
2341
+ type ValueTypeType = string;
2342
+ export class ValueType {
2343
+ static readonly STRING:ValueTypeType;
2344
+ static readonly NUMBER:ValueTypeType;
2345
+ static readonly DOUBLE:ValueTypeType;
2346
+ static readonly LONG:ValueTypeType;
2347
+ static readonly DATETIME:ValueTypeType;
2348
+ static readonly BOOLEAN:ValueTypeType;
2349
+ }
2333
2350
 
2334
2351
  /**
2335
2352
  * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
@@ -2352,23 +2369,6 @@ export namespace dh {
2352
2369
  static readonly SKIP:AggregationOperationType;
2353
2370
  }
2354
2371
 
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
-
2372
2372
  /**
2373
2373
  * A set of string constants that can be used to describe the different objects the JS API can export.
2374
2374
  */
@@ -2395,46 +2395,23 @@ export namespace dh.ide {
2395
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
2396
  * new types.
2397
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 {
2398
+ export interface VariableChanges {
2428
2399
  /**
2429
- * Describes changes made in the course of this command.
2430
- * @return {@link dh.ide.VariableChanges}.
2400
+ *
2401
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2402
+ * different type.
2431
2403
  */
2432
- get changes():VariableChanges;
2404
+ get removed():Array<VariableDefinition>;
2433
2405
  /**
2434
- * If the command failed, the error message will be provided here.
2435
- * @return String
2406
+ *
2407
+ * @return The variables that were created by this operation, or have a new type.
2436
2408
  */
2437
- get error():string;
2409
+ get created():Array<VariableDefinition>;
2410
+ /**
2411
+ *
2412
+ * @return The variables that changed value during this operation.
2413
+ */
2414
+ get updated():Array<VariableDefinition>;
2438
2415
  }
2439
2416
  /**
2440
2417
  * A format to describe a variable available to be read from the server. Application fields are optional, and only
@@ -2498,10 +2475,185 @@ export namespace dh.ide {
2498
2475
  */
2499
2476
  get message():string;
2500
2477
  }
2478
+ /**
2479
+ * Specifies a type and either id or name (but not both).
2480
+ */
2481
+ export interface VariableDescriptor {
2482
+ type:string;
2483
+ id?:string|null;
2484
+ name?:string|null;
2485
+ }
2486
+ /**
2487
+ * Indicates the result of code run on the server.
2488
+ */
2489
+ export interface CommandResult {
2490
+ /**
2491
+ * Describes changes made in the course of this command.
2492
+ * @return {@link dh.ide.VariableChanges}.
2493
+ */
2494
+ get changes():VariableChanges;
2495
+ /**
2496
+ * If the command failed, the error message will be provided here.
2497
+ * @return String
2498
+ */
2499
+ get error():string;
2500
+ }
2501
2501
  }
2502
2502
 
2503
2503
  export namespace dh.i18n {
2504
2504
 
2505
+ /**
2506
+ * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2507
+ *
2508
+ * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2509
+ * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2510
+ * BigDecimal.
2511
+ */
2512
+ export class NumberFormat {
2513
+ /**
2514
+ * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2515
+ * function, which will create and cache an instance so that later calls share the same instance.
2516
+ * @param pattern -
2517
+ */
2518
+ constructor(pattern:string);
2519
+
2520
+ /**
2521
+ * a number format instance matching the specified format. If this format has not been specified before, a new
2522
+ * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2523
+ * take advantage of caching
2524
+ * @param pattern -
2525
+ * @return dh.i18n.NumberFormat
2526
+ */
2527
+ static getFormat(pattern:string):NumberFormat;
2528
+ /**
2529
+ * Parses the given text using the cached format matching the given pattern.
2530
+ * @param pattern -
2531
+ * @param text -
2532
+ * @return double
2533
+ */
2534
+ static parse(pattern:string, text:string):number;
2535
+ /**
2536
+ * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2537
+ * format matching the given pattern string.
2538
+ * @param pattern -
2539
+ * @param number -
2540
+ * @return String
2541
+ */
2542
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2543
+ /**
2544
+ * Parses the given text using this instance's pattern into a JS Number.
2545
+ * @param text -
2546
+ * @return double
2547
+ */
2548
+ parse(text:string):number;
2549
+ /**
2550
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2551
+ * @param number -
2552
+ * @return String
2553
+ */
2554
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2555
+ toString():string;
2556
+ }
2557
+
2558
+
2559
+ /**
2560
+ * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
2561
+ * additional 6 decimal places after the rest of the number.
2562
+ *
2563
+ * Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
2564
+ * and assuming it to be a lossy nano value, and parsing into a js Date.
2565
+ *
2566
+ *
2567
+ * Utility class to parse and format various date/time values, using the same format patterns as are supported by the
2568
+ * standard Java implementation used in the Deephaven server and swing client.
2569
+ *
2570
+ * As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
2571
+ * with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
2572
+ * however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
2573
+ * still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
2574
+ * object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
2575
+ * to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
2576
+ * `asDate()` to return a JS `Date` value.
2577
+ *
2578
+ *
2579
+ * Caveats:
2580
+ *
2581
+ *
2582
+ * - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
2583
+ * short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
2584
+ * browser to emit the user's own timezone.
2585
+ */
2586
+ export class DateTimeFormat {
2587
+ static readonly NANOS_PER_MILLI:number;
2588
+
2589
+ /**
2590
+ * Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
2591
+ * function, which will create and cache an instance so that later calls share the same instance.
2592
+ * @param pattern -
2593
+ */
2594
+ constructor(pattern:string);
2595
+
2596
+ /**
2597
+ *
2598
+ * @param pattern -
2599
+ * @return a date format instance matching the specified format. If this format has not been specified before, a new
2600
+ * instance will be created and stored for later reuse.
2601
+ */
2602
+ static getFormat(pattern:string):DateTimeFormat;
2603
+ /**
2604
+ * Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
2605
+ * `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
2606
+ * the instance method for more details on input objects.
2607
+ * @param pattern -
2608
+ * @param date -
2609
+ * @param timeZone -
2610
+ * @return
2611
+ */
2612
+ static format(pattern:string, date:any, timeZone?:TimeZone):string;
2613
+ /**
2614
+ * Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
2615
+ * @param pattern -
2616
+ * @param text -
2617
+ * @return
2618
+ */
2619
+ static parseAsDate(pattern:string, text:string):Date;
2620
+ /**
2621
+ * Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
2622
+ * A `TimeZone` object can optionally be provided to parse to a desired timezone.
2623
+ * @param pattern -
2624
+ * @param text -
2625
+ * @param tz -
2626
+ * @return
2627
+ */
2628
+ static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
2629
+ /**
2630
+ * Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
2631
+ * include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
2632
+ * nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
2633
+ * expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
2634
+ * date/time in that timezone.
2635
+ * @param date -
2636
+ * @param timeZone -
2637
+ * @return String
2638
+ */
2639
+ format(date:any, timeZone?:TimeZone):string;
2640
+ /**
2641
+ * Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
2642
+ * nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
2643
+ * @param text -
2644
+ * @param tz -
2645
+ * @return
2646
+ */
2647
+ parse(text:string, tz?:TimeZone):dh.DateWrapper;
2648
+ /**
2649
+ * Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
2650
+ * @param text -
2651
+ * @return
2652
+ */
2653
+ parseAsDate(text:string):Date;
2654
+ toString():string;
2655
+ }
2656
+
2505
2657
  /**
2506
2658
  * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2507
2659
  * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
@@ -2587,188 +2739,56 @@ export namespace dh.i18n {
2587
2739
  * <li>CH</li>
2588
2740
  * <li>NL</li>
2589
2741
  * <li>TW</li>
2590
- * <li>SYD</li>
2591
- * <li>AEST</li>
2592
- * <li>AEDT</li>
2593
- * </ul>
2594
- */
2595
- export class TimeZone {
2596
- protected constructor();
2597
-
2598
- /**
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;
2604
- /**
2605
- * the standard offset of this timezone, in minutes
2606
- * @return int
2607
- */
2608
- get standardOffset():number;
2609
- /**
2610
- * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2611
- * @return String
2612
- */
2613
- get id():string;
2614
- }
2615
-
2616
- /**
2617
- * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
2618
- * additional 6 decimal places after the rest of the number.
2619
- *
2620
- * Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
2621
- * and assuming it to be a lossy nano value, and parsing into a js Date.
2622
- *
2623
- *
2624
- * Utility class to parse and format various date/time values, using the same format patterns as are supported by the
2625
- * standard Java implementation used in the Deephaven server and swing client.
2626
- *
2627
- * As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
2628
- * with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
2629
- * however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
2630
- * still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
2631
- * object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
2632
- * to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
2633
- * `asDate()` to return a JS `Date` value.
2634
- *
2635
- *
2636
- * Caveats:
2637
- *
2638
- *
2639
- * - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
2640
- * short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
2641
- * browser to emit the user's own timezone.
2642
- */
2643
- export class DateTimeFormat {
2644
- static readonly NANOS_PER_MILLI:number;
2645
-
2646
- /**
2647
- * Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
2648
- * function, which will create and cache an instance so that later calls share the same instance.
2649
- * @param pattern -
2650
- */
2651
- constructor(pattern:string);
2742
+ * <li>SYD</li>
2743
+ * <li>AEST</li>
2744
+ * <li>AEDT</li>
2745
+ * </ul>
2746
+ */
2747
+ export class TimeZone {
2748
+ protected constructor();
2652
2749
 
2653
2750
  /**
2654
- *
2655
- * @param pattern -
2656
- * @return a date format instance matching the specified format. If this format has not been specified before, a new
2657
- * instance will be created and stored for later reuse.
2658
- */
2659
- static getFormat(pattern:string):DateTimeFormat;
2660
- /**
2661
- * Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
2662
- * `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
2663
- * the instance method for more details on input objects.
2664
- * @param pattern -
2665
- * @param date -
2666
- * @param timeZone -
2667
- * @return
2668
- */
2669
- static format(pattern:string, date:any, timeZone?:TimeZone):string;
2670
- /**
2671
- * Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
2672
- * @param pattern -
2673
- * @param text -
2674
- * @return
2751
+ * Factory method which creates timezone instances from one of the supported keys.
2752
+ * @param tzCode -
2753
+ * @return dh.i18n.TimeZone
2675
2754
  */
2676
- static parseAsDate(pattern:string, text:string):Date;
2755
+ static getTimeZone(tzCode:string):TimeZone;
2677
2756
  /**
2678
- * Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
2679
- * A `TimeZone` object can optionally be provided to parse to a desired timezone.
2680
- * @param pattern -
2681
- * @param text -
2682
- * @param tz -
2683
- * @return
2757
+ * the standard offset of this timezone, in minutes
2758
+ * @return int
2684
2759
  */
2685
- static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
2760
+ get standardOffset():number;
2686
2761
  /**
2687
- * Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
2688
- * include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
2689
- * nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
2690
- * expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
2691
- * date/time in that timezone.
2692
- * @param date -
2693
- * @param timeZone -
2762
+ * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2694
2763
  * @return String
2695
2764
  */
2696
- format(date:any, timeZone?:TimeZone):string;
2697
- /**
2698
- * Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
2699
- * nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
2700
- * @param text -
2701
- * @param tz -
2702
- * @return
2703
- */
2704
- parse(text:string, tz?:TimeZone):dh.DateWrapper;
2705
- /**
2706
- * Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
2707
- * @param text -
2708
- * @return
2709
- */
2710
- parseAsDate(text:string):Date;
2711
- toString():string;
2765
+ get id():string;
2712
2766
  }
2713
2767
 
2768
+ }
2769
+
2770
+ export namespace dh.plot {
2771
+
2714
2772
  /**
2715
- * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2716
- *
2717
- * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2718
- * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2719
- * BigDecimal.
2773
+ * Describes how to access and display data required within a series.
2720
2774
  */
2721
- export class NumberFormat {
2722
- /**
2723
- * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2724
- * function, which will create and cache an instance so that later calls share the same instance.
2725
- * @param pattern -
2726
- */
2727
- constructor(pattern:string);
2728
-
2729
- /**
2730
- * a number format instance matching the specified format. If this format has not been specified before, a new
2731
- * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2732
- * take advantage of caching
2733
- * @param pattern -
2734
- * @return dh.i18n.NumberFormat
2735
- */
2736
- static getFormat(pattern:string):NumberFormat;
2737
- /**
2738
- * Parses the given text using the cached format matching the given pattern.
2739
- * @param pattern -
2740
- * @param text -
2741
- * @return double
2742
- */
2743
- static parse(pattern:string, text:string):number;
2775
+ export interface SeriesDataSource {
2744
2776
  /**
2745
- * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2746
- * format matching the given pattern string.
2747
- * @param pattern -
2748
- * @param number -
2777
+ * the type of data stored in the underlying table's Column.
2749
2778
  * @return String
2750
2779
  */
2751
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2780
+ get columnType():string;
2752
2781
  /**
2753
- * Parses the given text using this instance's pattern into a JS Number.
2754
- * @param text -
2755
- * @return double
2782
+ * the axis that this source should be drawn on.
2783
+ * @return dh.plot.Axis
2756
2784
  */
2757
- parse(text:string):number;
2785
+ get axis():Axis;
2758
2786
  /**
2759
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2760
- * @param number -
2761
- * @return String
2787
+ * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
2788
+ * @return int
2762
2789
  */
2763
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2764
- toString():string;
2790
+ get type():SourceTypeType;
2765
2791
  }
2766
-
2767
-
2768
- }
2769
-
2770
- export namespace dh.plot {
2771
-
2772
2792
  /**
2773
2793
  * Provides access to the data for displaying in a figure.
2774
2794
  */
@@ -2813,31 +2833,9 @@ export namespace dh.plot {
2813
2833
  get multiSeries():MultiSeries;
2814
2834
  get shapeLabel():string;
2815
2835
  }
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[];
2821
- }
2822
- /**
2823
- * Describes how to access and display data required within a series.
2824
- */
2825
- export interface SeriesDataSource {
2826
- /**
2827
- * the type of data stored in the underlying table's Column.
2828
- * @return String
2829
- */
2830
- get columnType():string;
2831
- /**
2832
- * the axis that this source should be drawn on.
2833
- * @return dh.plot.Axis
2834
- */
2835
- get axis():Axis;
2836
- /**
2837
- * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
2838
- * @return int
2839
- */
2840
- get type():SourceTypeType;
2836
+ export interface FigureDataUpdatedEvent {
2837
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2838
+ get series():Series[];
2841
2839
  }
2842
2840
  /**
2843
2841
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
@@ -2867,203 +2865,66 @@ export namespace dh.plot {
2867
2865
  get color():string;
2868
2866
  get invert():boolean;
2869
2867
  get log():boolean;
2870
- get maxRange():number;
2871
- /**
2872
- * The label for this axis.
2873
- * @return String
2874
- */
2875
- get label():string;
2876
- get timeAxis():boolean;
2877
- /**
2878
- * The type for this axis, indicating how it will be drawn. See <b>AxisType</b> enum for more details.
2879
- * @return int
2880
- */
2881
- get type():AxisTypeType;
2882
- get minorTicksVisible():boolean;
2883
- get minorTickCount():number;
2884
- get majorTickLocations():number[];
2885
- get majorTicksVisible():boolean;
2886
- get ticksFont():string;
2887
- /**
2888
- * The unique id for this axis.
2889
- * @return String
2890
- */
2891
- get id():string;
2892
- /**
2893
- * The position for this axis. See <b>AxisPosition</b> enum for more details.
2894
- * @return int
2895
- */
2896
- get position():AxisPositionType;
2897
- /**
2898
- * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2899
- * transform.
2900
- * @return dh.calendar.BusinessCalendar
2901
- */
2902
- get businessCalendar():dh.calendar.BusinessCalendar;
2903
- /**
2904
- * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2905
- * @return int
2906
- */
2907
- get formatType():AxisFormatTypeType;
2908
- get minRange():number;
2909
- }
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
- }
2929
-
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>;
2945
-
2946
- constructor();
2947
- }
2948
-
2949
- export class SourceDescriptor {
2950
- axis:AxisDescriptor;
2951
- table:dh.Table;
2952
- columnName:string;
2953
- type:string;
2954
-
2955
- constructor();
2956
- }
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>;
2868
+ get maxRange():number;
2968
2869
  /**
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.
2870
+ * The label for this axis.
2871
+ * @return String
2971
2872
  */
2972
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
2973
- }
2974
-
2975
- export class FigureFetchError {
2976
- error:object;
2977
- errors:Array<string>;
2978
-
2979
- protected constructor();
2980
- }
2981
-
2982
- export class DownsampleOptions {
2873
+ get label():string;
2874
+ get timeAxis():boolean;
2983
2875
  /**
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().
2876
+ * The type for this axis, indicating how it will be drawn. See <b>AxisType</b> enum for more details.
2877
+ * @return int
2987
2878
  */
2988
- static MAX_SERIES_SIZE:number;
2879
+ get type():AxisTypeType;
2880
+ get minorTicksVisible():boolean;
2881
+ get minorTickCount():number;
2882
+ get majorTickLocations():number[];
2883
+ get majorTicksVisible():boolean;
2884
+ get ticksFont():string;
2989
2885
  /**
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.
2886
+ * The unique id for this axis.
2887
+ * @return String
2992
2888
  */
2993
- static MAX_SUBSCRIPTION_SIZE:number;
2889
+ get id():string;
2994
2890
  /**
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.
2891
+ * The position for this axis. See <b>AxisPosition</b> enum for more details.
2892
+ * @return int
2997
2893
  */
2998
- static readonly DEFAULT:DownsampleOptions;
2894
+ get position():AxisPositionType;
2999
2895
  /**
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.
2896
+ * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2897
+ * transform.
2898
+ * @return dh.calendar.BusinessCalendar
3002
2899
  */
3003
- static readonly DISABLE:DownsampleOptions;
3004
-
3005
- protected constructor();
2900
+ get businessCalendar():dh.calendar.BusinessCalendar;
2901
+ /**
2902
+ * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2903
+ * @return int
2904
+ */
2905
+ get formatType():AxisFormatTypeType;
2906
+ get minRange():number;
3006
2907
  }
3007
-
3008
- /**
3009
- * A descriptor used with JsFigureFactory.create to create a figure from JS.
3010
- */
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>;
3021
-
3022
- constructor();
2908
+ export interface OneClick {
2909
+ setValueForColumn(columnName:string, value:any):void;
2910
+ getValueForColumn(columName:string):any;
2911
+ get requireAllFiltersToDisplay():boolean;
2912
+ get columns():dh.Column[];
3023
2913
  }
3024
-
3025
2914
  /**
3026
- * Provide the details for a chart.
2915
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
3027
2916
  */
3028
- export class Chart implements dh.HasEventHandling {
3029
- /**
3030
- * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3031
- */
3032
- static readonly EVENT_SERIES_ADDED:string;
2917
+ export interface MultiSeries {
3033
2918
  /**
3034
- * The title of the chart.
2919
+ * The name for this multi-series.
3035
2920
  * @return String
3036
2921
  */
3037
- readonly title?:string|null;
3038
-
3039
- protected constructor();
3040
-
3041
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
3042
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3043
- hasListeners(name:string):boolean;
3044
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3045
- get column():number;
3046
- get showLegend():boolean;
3047
- /**
3048
- * The axes used in this chart.
3049
- * @return dh.plot.Axis
3050
- */
3051
- get axes():Axis[];
3052
- get is3d():boolean;
3053
- get titleFont():string;
3054
- get colspan():number;
3055
- get titleColor():string;
3056
- get series():Series[];
3057
- get rowspan():number;
2922
+ get name():string;
3058
2923
  /**
3059
- * The type of this chart, see <b>ChartType</b> enum for more details.
2924
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
3060
2925
  * @return int
3061
2926
  */
3062
- get chartType():ChartTypeType;
3063
- get row():number;
3064
- get legendColor():string;
3065
- get legendFont():string;
3066
- get multiSeries():MultiSeries[];
2927
+ get plotStyle():SeriesPlotStyleType;
3067
2928
  }
3068
2929
 
3069
2930
  /**
@@ -3176,81 +3037,211 @@ export namespace dh.plot {
3176
3037
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3177
3038
  hasListeners(name:string):boolean;
3178
3039
  /**
3179
- * Removes an event listener added to this table.
3180
- * @param name -
3181
- * @param callback -
3182
- * @return
3183
- * @typeParam T -
3040
+ * Removes an event listener added to this table.
3041
+ * @param name -
3042
+ * @param callback -
3043
+ * @return
3044
+ * @typeParam T -
3045
+ */
3046
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3047
+ static create(config:FigureDescriptor):Promise<Figure>;
3048
+ }
3049
+
3050
+ /**
3051
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3052
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3053
+ * keep that cached as well.
3054
+ */
3055
+ export class ChartData {
3056
+ constructor(table:dh.Table);
3057
+
3058
+ update(tableData:dh.SubscriptionTableData):void;
3059
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3060
+ /**
3061
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3062
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3063
+ */
3064
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3065
+ }
3066
+
3067
+ export class ChartDescriptor {
3068
+ colspan?:number|null;
3069
+ rowspan?:number|null;
3070
+ series:Array<SeriesDescriptor>;
3071
+ axes:Array<AxisDescriptor>;
3072
+ chartType:string;
3073
+ title?:string|null;
3074
+ titleFont?:string|null;
3075
+ titleColor?:string|null;
3076
+ showLegend?:boolean|null;
3077
+ legendFont?:string|null;
3078
+ legendColor?:string|null;
3079
+ is3d?:boolean|null;
3080
+
3081
+ constructor();
3082
+ }
3083
+
3084
+ export class DownsampleOptions {
3085
+ /**
3086
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3087
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3088
+ * series.subscribe().
3089
+ */
3090
+ static MAX_SERIES_SIZE:number;
3091
+ /**
3092
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3093
+ * downsampling disabled, the series will not load data.
3094
+ */
3095
+ static MAX_SUBSCRIPTION_SIZE:number;
3096
+ /**
3097
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3098
+ * axes are configured.
3099
+ */
3100
+ static readonly DEFAULT:DownsampleOptions;
3101
+ /**
3102
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3103
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3104
+ */
3105
+ static readonly DISABLE:DownsampleOptions;
3106
+
3107
+ protected constructor();
3108
+ }
3109
+
3110
+ export class SeriesDataSourceException {
3111
+ protected constructor();
3112
+
3113
+ get source():SeriesDataSource;
3114
+ get message():string;
3115
+ }
3116
+
3117
+ export class AxisDescriptor {
3118
+ formatType:string;
3119
+ type:string;
3120
+ position:string;
3121
+ log?:boolean|null;
3122
+ label?:string|null;
3123
+ labelFont?:string|null;
3124
+ ticksFont?:string|null;
3125
+ formatPattern?:string|null;
3126
+ color?:string|null;
3127
+ minRange?:number|null;
3128
+ maxRange?:number|null;
3129
+ minorTicksVisible?:boolean|null;
3130
+ majorTicksVisible?:boolean|null;
3131
+ minorTickCount?:number|null;
3132
+ gapBetweenMajorTicks?:number|null;
3133
+ majorTickLocations?:Array<number>|null;
3134
+ tickLabelAngle?:number|null;
3135
+ invert?:boolean|null;
3136
+ isTimeAxis?:boolean|null;
3137
+
3138
+ constructor();
3139
+ }
3140
+
3141
+ export class SourceDescriptor {
3142
+ axis:AxisDescriptor;
3143
+ table:dh.Table;
3144
+ columnName:string;
3145
+ type:string;
3146
+
3147
+ constructor();
3148
+ }
3149
+
3150
+ /**
3151
+ * Provide the details for a chart.
3152
+ */
3153
+ export class Chart implements dh.HasEventHandling {
3154
+ /**
3155
+ * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3156
+ */
3157
+ static readonly EVENT_SERIES_ADDED:string;
3158
+ /**
3159
+ * The title of the chart.
3160
+ * @return String
3161
+ */
3162
+ readonly title?:string|null;
3163
+
3164
+ protected constructor();
3165
+
3166
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
3167
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3168
+ hasListeners(name:string):boolean;
3169
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3170
+ get column():number;
3171
+ get showLegend():boolean;
3172
+ /**
3173
+ * The axes used in this chart.
3174
+ * @return dh.plot.Axis
3175
+ */
3176
+ get axes():Axis[];
3177
+ get is3d():boolean;
3178
+ get titleFont():string;
3179
+ get colspan():number;
3180
+ get titleColor():string;
3181
+ get series():Series[];
3182
+ get rowspan():number;
3183
+ /**
3184
+ * The type of this chart, see <b>ChartType</b> enum for more details.
3185
+ * @return int
3184
3186
  */
3185
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3186
- static create(config:FigureDescriptor):Promise<Figure>;
3187
+ get chartType():ChartTypeType;
3188
+ get row():number;
3189
+ get legendColor():string;
3190
+ get legendFont():string;
3191
+ get multiSeries():MultiSeries[];
3187
3192
  }
3188
3193
 
3189
- export class SeriesDataSourceException {
3190
- protected constructor();
3194
+ export class FigureSourceException {
3195
+ table:dh.Table;
3196
+ source:SeriesDataSource;
3191
3197
 
3192
- get source():SeriesDataSource;
3193
- get message():string;
3198
+ protected constructor();
3194
3199
  }
3195
3200
 
3196
- export class ChartDescriptor {
3197
- colspan?:number|null;
3198
- rowspan?:number|null;
3199
- series:Array<SeriesDescriptor>;
3200
- axes:Array<AxisDescriptor>;
3201
- chartType:string;
3202
- title?:string|null;
3203
- titleFont?:string|null;
3204
- titleColor?:string|null;
3205
- showLegend?:boolean|null;
3206
- legendFont?:string|null;
3207
- legendColor?:string|null;
3208
- is3d?:boolean|null;
3201
+ export class SeriesDescriptor {
3202
+ plotStyle:string;
3203
+ name?:string|null;
3204
+ linesVisible?:boolean|null;
3205
+ shapesVisible?:boolean|null;
3206
+ gradientVisible?:boolean|null;
3207
+ lineColor?:string|null;
3208
+ pointLabelFormat?:string|null;
3209
+ xToolTipPattern?:string|null;
3210
+ yToolTipPattern?:string|null;
3211
+ shapeLabel?:string|null;
3212
+ shapeSize?:number|null;
3213
+ shapeColor?:string|null;
3214
+ shape?:string|null;
3215
+ dataSources:Array<SourceDescriptor>;
3209
3216
 
3210
3217
  constructor();
3211
3218
  }
3212
3219
 
3213
- export class FigureSourceException {
3214
- table:dh.Table;
3215
- source:SeriesDataSource;
3220
+ export class FigureFetchError {
3221
+ error:object;
3222
+ errors:Array<string>;
3216
3223
 
3217
3224
  protected constructor();
3218
3225
  }
3219
3226
 
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;
3227
+ /**
3228
+ * A descriptor used with JsFigureFactory.create to create a figure from JS.
3229
+ */
3230
+ export class FigureDescriptor {
3231
+ title?:string|null;
3232
+ titleFont?:string|null;
3233
+ titleColor?:string|null;
3234
+ isResizable?:boolean|null;
3235
+ isDefaultTheme?:boolean|null;
3236
+ updateInterval?:number|null;
3237
+ cols?:number|null;
3238
+ rows?:number|null;
3239
+ charts:Array<ChartDescriptor>;
3240
3240
 
3241
3241
  constructor();
3242
3242
  }
3243
3243
 
3244
3244
 
3245
- type AxisPositionType = number;
3246
- export class AxisPosition {
3247
- static readonly TOP:AxisPositionType;
3248
- static readonly BOTTOM:AxisPositionType;
3249
- static readonly LEFT:AxisPositionType;
3250
- static readonly RIGHT:AxisPositionType;
3251
- static readonly NONE:AxisPositionType;
3252
- }
3253
-
3254
3245
  type SeriesPlotStyleType = number;
3255
3246
  export class SeriesPlotStyle {
3256
3247
  static readonly BAR:SeriesPlotStyleType;
@@ -3267,10 +3258,13 @@ export namespace dh.plot {
3267
3258
  static readonly TREEMAP:SeriesPlotStyleType;
3268
3259
  }
3269
3260
 
3270
- type AxisFormatTypeType = number;
3271
- export class AxisFormatType {
3272
- static readonly CATEGORY:AxisFormatTypeType;
3273
- static readonly NUMBER:AxisFormatTypeType;
3261
+ type AxisPositionType = number;
3262
+ export class AxisPosition {
3263
+ static readonly TOP:AxisPositionType;
3264
+ static readonly BOTTOM:AxisPositionType;
3265
+ static readonly LEFT:AxisPositionType;
3266
+ static readonly RIGHT:AxisPositionType;
3267
+ static readonly NONE:AxisPositionType;
3274
3268
  }
3275
3269
 
3276
3270
  /**
@@ -3288,16 +3282,6 @@ export namespace dh.plot {
3288
3282
  static readonly TREEMAP:ChartTypeType;
3289
3283
  }
3290
3284
 
3291
- type AxisTypeType = number;
3292
- export class AxisType {
3293
- static readonly X:AxisTypeType;
3294
- static readonly Y:AxisTypeType;
3295
- static readonly SHAPE:AxisTypeType;
3296
- static readonly SIZE:AxisTypeType;
3297
- static readonly LABEL:AxisTypeType;
3298
- static readonly COLOR:AxisTypeType;
3299
- }
3300
-
3301
3285
  /**
3302
3286
  * 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
3287
  * 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
@@ -3327,68 +3311,62 @@ export namespace dh.plot {
3327
3311
  static readonly HOVER_TEXT:SourceTypeType;
3328
3312
  }
3329
3313
 
3314
+ type AxisFormatTypeType = number;
3315
+ export class AxisFormatType {
3316
+ static readonly CATEGORY:AxisFormatTypeType;
3317
+ static readonly NUMBER:AxisFormatTypeType;
3318
+ }
3319
+
3320
+ type AxisTypeType = number;
3321
+ export class AxisType {
3322
+ static readonly X:AxisTypeType;
3323
+ static readonly Y:AxisTypeType;
3324
+ static readonly SHAPE:AxisTypeType;
3325
+ static readonly SIZE:AxisTypeType;
3326
+ static readonly LABEL:AxisTypeType;
3327
+ static readonly COLOR:AxisTypeType;
3328
+ }
3329
+
3330
3330
  }
3331
3331
 
3332
3332
  export namespace dh.lsp {
3333
3333
 
3334
- export class CompletionItem {
3334
+ export class SignatureInformation {
3335
3335
  label:string;
3336
- kind:number;
3337
- detail:string;
3338
3336
  documentation:MarkupContent;
3339
- deprecated:boolean;
3340
- preselect:boolean;
3341
- textEdit:TextEdit;
3342
- sortText:string;
3343
- filterText:string;
3344
- insertTextFormat:number;
3345
- additionalTextEdits:Array<TextEdit>;
3346
- commitCharacters:Array<string>;
3337
+ parameters:Array<ParameterInformation>;
3338
+ activeParameter:number;
3347
3339
 
3348
3340
  constructor();
3349
3341
  }
3350
3342
 
3351
- export class MarkupContent {
3352
- kind:string;
3353
- value:string;
3343
+ export class Range {
3344
+ start:Position;
3345
+ end:Position;
3354
3346
 
3355
3347
  constructor();
3348
+
3349
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3356
3350
  }
3357
3351
 
3358
- export class TextEdit {
3359
- range:Range;
3360
- text:string;
3352
+ export class ParameterInformation {
3353
+ label:string;
3354
+ documentation:MarkupContent;
3361
3355
 
3362
3356
  constructor();
3363
3357
  }
3364
3358
 
3365
- export class TextDocumentContentChangeEvent {
3359
+ export class TextEdit {
3366
3360
  range:Range;
3367
- rangeLength:number;
3368
3361
  text:string;
3369
3362
 
3370
3363
  constructor();
3371
3364
  }
3372
3365
 
3373
- export class Hover {
3374
- contents:MarkupContent;
3366
+ export class TextDocumentContentChangeEvent {
3375
3367
  range:Range;
3376
-
3377
- constructor();
3378
- }
3379
-
3380
- export class SignatureInformation {
3381
- label:string;
3382
- documentation:MarkupContent;
3383
- parameters:Array<ParameterInformation>;
3384
- activeParameter:number;
3385
-
3386
- constructor();
3387
- }
3388
-
3389
- export class ParameterInformation {
3390
- label:string;
3391
- documentation:MarkupContent;
3368
+ rangeLength:number;
3369
+ text:string;
3392
3370
 
3393
3371
  constructor();
3394
3372
  }
@@ -3406,35 +3384,41 @@ export namespace dh.lsp {
3406
3384
  copy():Position;
3407
3385
  }
3408
3386
 
3409
- export class Range {
3410
- start:Position;
3411
- end:Position;
3387
+ export class Hover {
3388
+ contents:MarkupContent;
3389
+ range:Range;
3412
3390
 
3413
3391
  constructor();
3392
+ }
3414
3393
 
3415
- isInside(innerStart:Position, innerEnd:Position):boolean;
3394
+ export class MarkupContent {
3395
+ kind:string;
3396
+ value:string;
3397
+
3398
+ constructor();
3399
+ }
3400
+
3401
+ export class CompletionItem {
3402
+ label:string;
3403
+ kind:number;
3404
+ detail:string;
3405
+ documentation:MarkupContent;
3406
+ deprecated:boolean;
3407
+ preselect:boolean;
3408
+ textEdit:TextEdit;
3409
+ sortText:string;
3410
+ filterText:string;
3411
+ insertTextFormat:number;
3412
+ additionalTextEdits:Array<TextEdit>;
3413
+ commitCharacters:Array<string>;
3414
+
3415
+ constructor();
3416
3416
  }
3417
3417
 
3418
3418
  }
3419
3419
 
3420
3420
  export namespace dh.calendar {
3421
3421
 
3422
- export interface BusinessPeriod {
3423
- get close():string;
3424
- get open():string;
3425
- }
3426
- export interface Holiday {
3427
- /**
3428
- * The date of the Holiday.
3429
- * @return {@link dh.LocalDateWrapper}
3430
- */
3431
- get date():dh.LocalDateWrapper;
3432
- /**
3433
- * The business periods that are open on the holiday.
3434
- * @return dh.calendar.BusinessPeriod
3435
- */
3436
- get businessPeriods():Array<BusinessPeriod>;
3437
- }
3438
3422
  /**
3439
3423
  * Defines a calendar with business hours and holidays.
3440
3424
  */
@@ -3465,6 +3449,22 @@ export namespace dh.calendar {
3465
3449
  */
3466
3450
  get businessPeriods():Array<BusinessPeriod>;
3467
3451
  }
3452
+ export interface Holiday {
3453
+ /**
3454
+ * The date of the Holiday.
3455
+ * @return {@link dh.LocalDateWrapper}
3456
+ */
3457
+ get date():dh.LocalDateWrapper;
3458
+ /**
3459
+ * The business periods that are open on the holiday.
3460
+ * @return dh.calendar.BusinessPeriod
3461
+ */
3462
+ get businessPeriods():Array<BusinessPeriod>;
3463
+ }
3464
+ export interface BusinessPeriod {
3465
+ get close():string;
3466
+ get open():string;
3467
+ }
3468
3468
 
3469
3469
  type DayOfWeekType = string;
3470
3470
  export class DayOfWeek {