@deephaven/jsapi-types 1.0.0-dev0.39.4 → 1.0.0-dev0.39.5

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 +1817 -1808
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -17,37 +17,6 @@ export interface IIterableResult<T> {
17
17
  }
18
18
  export namespace dh.storage {
19
19
 
20
- /**
21
- * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
22
- * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
23
- * be used.
24
- */
25
- export class FileContents {
26
- protected constructor();
27
-
28
- static blob(blob:Blob):FileContents;
29
- static text(...text:string[]):FileContents;
30
- static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
31
- text():Promise<string>;
32
- arrayBuffer():Promise<ArrayBuffer>;
33
- get etag():string;
34
- }
35
-
36
- /**
37
- * Storage service metadata about files and folders.
38
- */
39
- export class ItemDetails {
40
- protected constructor();
41
-
42
- toString():string;
43
- get filename():string;
44
- get basename():string;
45
- get size():number;
46
- get etag():string;
47
- get type():ItemTypeType;
48
- get dirname():string;
49
- }
50
-
51
20
  /**
52
21
  * Remote service to read and write files on the server. Paths use "/" as a separator, and should not start with "/".
53
22
  */
@@ -106,6 +75,37 @@ export namespace dh.storage {
106
75
  createDirectory(path:string):Promise<void>;
107
76
  }
108
77
 
78
+ /**
79
+ * Storage service metadata about files and folders.
80
+ */
81
+ export class ItemDetails {
82
+ protected constructor();
83
+
84
+ toString():string;
85
+ get filename():string;
86
+ get basename():string;
87
+ get size():number;
88
+ get etag():string;
89
+ get type():ItemTypeType;
90
+ get dirname():string;
91
+ }
92
+
93
+ /**
94
+ * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
95
+ * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
96
+ * be used.
97
+ */
98
+ export class FileContents {
99
+ protected constructor();
100
+
101
+ static blob(blob:Blob):FileContents;
102
+ static text(...text:string[]):FileContents;
103
+ static arrayBuffers(...buffers:ArrayBuffer[]):FileContents;
104
+ text():Promise<string>;
105
+ arrayBuffer():Promise<ArrayBuffer>;
106
+ get etag():string;
107
+ }
108
+
109
109
 
110
110
  type ItemTypeType = string;
111
111
  export class ItemType {
@@ -115,121 +115,76 @@ export namespace dh.storage {
115
115
 
116
116
  }
117
117
 
118
- export namespace dh.ide {
118
+ export namespace dh {
119
119
 
120
120
  /**
121
- * Indicates the result of code run on the server.
121
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
122
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
123
+ * are correctly freed.
122
124
  */
123
- export interface CommandResult {
124
- /**
125
- * Describes changes made in the course of this command.
126
- * @return {@link dh.ide.VariableChanges}.
127
- */
128
- get changes():VariableChanges;
125
+ export interface WidgetExportedObject {
129
126
  /**
130
- * If the command failed, the error message will be provided here.
131
- * @return String
127
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
128
+ * null, this object cannot be fetched, but can be passed to the server, such as via
129
+ * {@link Widget.sendMessage}.
130
+ * @return the string type of this server-side object, or null.
132
131
  */
133
- get error():string;
134
- }
135
- /**
136
- * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
137
- * server.
138
- */
139
- export interface LogItem {
132
+ readonly type?:string|null;
133
+
140
134
  /**
141
- * The level of the log message, enabling the client to ignore messages.
142
- * @return String
135
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
136
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
137
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
143
138
  */
144
- get logLevel():string;
139
+ reexport():Promise<WidgetExportedObject>;
145
140
  /**
146
- * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
147
- * @return double
141
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
142
+ * the same instance.
143
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
148
144
  */
149
- get micros():number;
145
+ fetch():Promise<any>;
150
146
  /**
151
- * The log message written on the server.
152
- * @return String
147
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
148
+ * exist that also use that object. Should not be called after fetch() has been invoked.
153
149
  */
154
- get message():string;
155
- }
156
- /**
157
- * Specifies a type and either id or name (but not both).
158
- */
159
- export interface VariableDescriptor {
160
- type:string;
161
- id?:string|null;
162
- name?:string|null;
150
+ close():void;
163
151
  }
164
152
  /**
165
- * A format to describe a variable available to be read from the server. Application fields are optional, and only
166
- * populated when a variable is provided by application mode.
167
- * <p>
168
- * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
153
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table, but
154
+ * with additional properties to reflect the tree structure.
169
155
  */
170
- export interface VariableDefinition {
171
- get name():string;
172
- /**
173
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
174
- * reasonable to put in the title
175
- * @return String
176
- */
177
- get description():string;
178
- /**
179
- * An opaque identifier for this variable
180
- * @return String
181
- */
182
- get id():string;
183
- /**
184
- * The type of the variable, one of <b>dh.VariableType</b>
185
- * @return dh.VariableType.
186
- */
187
- get type():dh.VariableTypeType;
156
+ export interface TreeRow extends Row {
157
+ get(column:Column):any;
158
+ getFormat(column:Column):Format;
188
159
  /**
189
- * The name of the variable, to be used when rendering it to a user
190
- * @return String
160
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
161
+ * rows below this one with a greater depth than this one.
162
+ * @return boolean
191
163
  */
192
- get title():string;
164
+ get isExpanded():boolean;
193
165
  /**
194
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
195
- * reasonable to put in the title
196
- * @return String
166
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
167
+ * and its expand/collapse icon.
168
+ * @return int
197
169
  */
198
- get applicationId():string;
170
+ get depth():number;
199
171
  /**
200
- * The name of the application which provided this variable
201
- * @return String
172
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when the
173
+ * table updates, depending on the table's configuration.
174
+ * @return boolean
202
175
  */
203
- get applicationName():string;
176
+ get hasChildren():boolean;
177
+ get index():LongWrapper;
204
178
  }
205
179
  /**
206
- * Describes changes in the current set of variables in the script session. Note that variables that changed value
207
- * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
208
- * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
209
- * new types.
180
+ * Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
181
+ * details about the event.
182
+ * @typeParam T - the type of the event detail
210
183
  */
211
- export interface VariableChanges {
212
- /**
213
- *
214
- * @return The variables that no longer exist after this operation, or were replaced by some variable with a
215
- * different type.
216
- */
217
- get removed():Array<VariableDefinition>;
218
- /**
219
- *
220
- * @return The variables that were created by this operation, or have a new type.
221
- */
222
- get created():Array<VariableDefinition>;
223
- /**
224
- *
225
- * @return The variables that changed value during this operation.
226
- */
227
- get updated():Array<VariableDefinition>;
184
+ export interface Event<T> {
185
+ get detail():T;
186
+ get type():string;
228
187
  }
229
- }
230
-
231
- export namespace dh {
232
-
233
188
  /**
234
189
  * This object may be pooled internally or discarded and not updated. Do not retain references to it.
235
190
  */
@@ -255,50 +210,163 @@ export namespace dh {
255
210
  */
256
211
  readonly numberFormat?:string|null;
257
212
  }
258
- export interface WorkerHeapInfo {
259
- /**
260
- * Total heap size available for this worker.
261
- */
262
- get totalHeapSize():number;
263
- get freeMemory():number;
264
- get maximumHeapSize():number;
265
- }
266
213
  /**
267
- * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
268
- * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
269
- *
270
- * Additionally, this is automatically subscribed to its one and only row, across all columns.
271
- *
272
- * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
273
- * template when fetching a new totals table, or changing the totals table in use.
274
- *
275
- * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
276
- * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
277
- * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
278
- * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
279
- *
280
- * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
281
- * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
214
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
215
+ * columns) either by index, or scanning the complete present index.
216
+ * <p>
217
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading all
218
+ * data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
219
+ * in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
220
+ * options should be considered.
221
+ * <p>
222
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
223
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
224
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
225
+ * specific rows or cells out of the table.
282
226
  */
283
- export interface TotalsTable extends JoinableTable {
227
+ export interface SubscriptionTableData extends TableData {
228
+ get fullIndex():RangeSet;
284
229
  /**
285
- * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
286
- * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
287
- * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
288
- * event per row in that range.
289
- * @param firstRow -
290
- * @param lastRow -
291
- * @param columns -
292
- * @param updateIntervalMs -
230
+ * The ordered set of row indexes removed since the last update
231
+ * @return the rangeset of removed rows
293
232
  */
294
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
233
+ get removed():RangeSet;
295
234
  /**
296
- * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
297
- * resolve until that data is ready.
298
- * @return Promise of {@link dh.TableData}
235
+ * The ordered set of row indexes added since the last update.
236
+ * @return the rangeset of rows added
299
237
  */
300
- getViewportData():Promise<ViewportData>;
301
- /**
238
+ get added():RangeSet;
239
+ get columns():Array<Column>;
240
+ /**
241
+ * The ordered set of row indexes updated since the last update
242
+ * @return the rnageset of modified rows
243
+ */
244
+ get modified():RangeSet;
245
+ /**
246
+ * A lazily computed array of all rows available on the client.
247
+ */
248
+ get rows():Array<Row>;
249
+ }
250
+ /**
251
+ * Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
252
+ * not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
253
+ * event, or re-request the viewport data.
254
+ */
255
+ export interface Row {
256
+ get(column:Column):any;
257
+ getFormat(column:Column):Format;
258
+ get index():LongWrapper;
259
+ }
260
+ /**
261
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
262
+ */
263
+ export interface LocalTimeWrapper {
264
+ valueOf():string;
265
+ getHour():number;
266
+ getMinute():number;
267
+ getSecond():number;
268
+ getNano():number;
269
+ toString():string;
270
+ }
271
+ /**
272
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
273
+ */
274
+ export interface LocalDateWrapper {
275
+ valueOf():string;
276
+ getYear():number;
277
+ getMonthValue():number;
278
+ getDayOfMonth():number;
279
+ toString():string;
280
+ }
281
+ export interface WorkerHeapInfo {
282
+ /**
283
+ * Total heap size available for this worker.
284
+ */
285
+ get totalHeapSize():number;
286
+ get freeMemory():number;
287
+ get maximumHeapSize():number;
288
+ }
289
+ /**
290
+ * Similar to {@link dh.ViewportData}, but with additional properties to reflect
291
+ * the tree structure.
292
+ */
293
+ export interface TreeViewportData extends TableData {
294
+ get(index:LongWrapper|number):TreeRow;
295
+ getData(index:LongWrapper|number, column:Column):any;
296
+ getFormat(index:LongWrapper|number, column:Column):Format;
297
+ get treeSize():number;
298
+ /**
299
+ * The position of the first returned row within the tree.
300
+ */
301
+ get offset():number;
302
+ get columns():Array<Column>;
303
+ get rows():Array<TreeRow>;
304
+ }
305
+ export interface HasEventHandling {
306
+ /**
307
+ * Listen for events on this object.
308
+ * @param name - the name of the event to listen for
309
+ * @param callback - a function to call when the event occurs
310
+ * @return Returns a cleanup function.
311
+ * @typeParam T - the type of the data that the event will provide
312
+ */
313
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
314
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
315
+ hasListeners(name:string):boolean;
316
+ /**
317
+ * Removes an event listener added to this table.
318
+ * @param name -
319
+ * @param callback -
320
+ * @return
321
+ * @typeParam T -
322
+ */
323
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
324
+ }
325
+ /**
326
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
327
+ * request the viewport again.
328
+ */
329
+ export interface ViewportRow extends Row {
330
+ get(column:Column):any;
331
+ getFormat(column:Column):Format;
332
+ get index():LongWrapper;
333
+ }
334
+ /**
335
+ * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
336
+ * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
337
+ *
338
+ * Additionally, this is automatically subscribed to its one and only row, across all columns.
339
+ *
340
+ * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
341
+ * template when fetching a new totals table, or changing the totals table in use.
342
+ *
343
+ * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
344
+ * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
345
+ * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
346
+ * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
347
+ *
348
+ * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
349
+ * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
350
+ */
351
+ export interface TotalsTable extends JoinableTable {
352
+ /**
353
+ * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
354
+ * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
355
+ * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
356
+ * event per row in that range.
357
+ * @param firstRow -
358
+ * @param lastRow -
359
+ * @param columns -
360
+ * @param updateIntervalMs -
361
+ */
362
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number, isReverseViewport?:boolean|undefined|null):void;
363
+ /**
364
+ * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
365
+ * resolve until that data is ready.
366
+ * @return Promise of {@link dh.TableData}
367
+ */
368
+ getViewportData():Promise<ViewportData>;
369
+ /**
302
370
  * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
303
371
  * returned value.
304
372
  * @param key -
@@ -393,45 +461,89 @@ export namespace dh {
393
461
  get isRefreshing():boolean;
394
462
  }
395
463
  /**
396
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data in
397
- * columns) either by index, or scanning the complete present index.
398
- * <p>
399
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading all
400
- * data currently in the table. While it is more expensive to always iterate over every single row in the table, it may
401
- * in some cases actually be cheaper than maintaining state separately and updating only the changes, though both
402
- * options should be considered.
464
+ * Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
465
+ * on tables, data in trees, and snapshots.
403
466
  * <p>
404
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
405
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
406
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to read
407
- * specific rows or cells out of the table.
467
+ * Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
468
+ * and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
469
+ * incur other costs - it is likely faster to access data by columns using {@link getData}.
408
470
  */
409
- export interface SubscriptionTableData extends TableData {
410
- get fullIndex():RangeSet;
471
+ export interface TableData {
411
472
  /**
412
- * The ordered set of row indexes removed since the last update
413
- * @return the rangeset of removed rows
473
+ * Reads a row object from the table, from which any subscribed column can be read.
474
+ * @param index - the position or key to access
475
+ * @return the row at the given location
414
476
  */
415
- get removed():RangeSet;
477
+ get(index:LongWrapper|number):Row;
416
478
  /**
417
- * The ordered set of row indexes added since the last update.
418
- * @return the rangeset of rows added
479
+ * Reads a specific cell from the table, by row key and column.
480
+ * @param index - the row in the table to get data from
481
+ * @param column - the column to read
482
+ * @return the value in the table
419
483
  */
420
- get added():RangeSet;
421
- get columns():Array<Column>;
484
+ getData(index:LongWrapper|number, column:Column):any;
422
485
  /**
423
- * The ordered set of row indexes updated since the last update
424
- * @return the rnageset of modified rows
486
+ * The server-specified Format to use for the cell at the given position.
487
+ * @param index - the row to read
488
+ * @param column - the column to read
489
+ * @return a Format instance with any server-specified details
425
490
  */
426
- get modified():RangeSet;
491
+ getFormat(index:LongWrapper|number, column:Column):Format;
492
+ get columns():Array<Column>;
427
493
  /**
428
494
  * A lazily computed array of all rows available on the client.
429
495
  */
430
496
  get rows():Array<Row>;
431
497
  }
432
- export interface RefreshToken {
433
- get bytes():string;
434
- get expiry():number;
498
+ /**
499
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
500
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
501
+ *
502
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
503
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
504
+ * backwards compatibility and to better follow JS expectations.
505
+ */
506
+ export interface WidgetMessageDetails {
507
+ /**
508
+ * Returns the data from this message as a base64-encoded string.
509
+ */
510
+ getDataAsBase64():string;
511
+ /**
512
+ * Returns the data from this message as a Uint8Array.
513
+ */
514
+ getDataAsU8():Uint8Array;
515
+ /**
516
+ * Returns the data from this message as a utf-8 string.
517
+ */
518
+ getDataAsString():string;
519
+ /**
520
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
521
+ * objects, and should close them when no longer needed.
522
+ */
523
+ get exportedObjects():WidgetExportedObject[];
524
+ }
525
+ /**
526
+ * Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
527
+ * ViewportData also contains the offset to this data, so that the actual row number may be determined.
528
+ * <p>
529
+ * For viewport subscriptions, it is not necessary to read with the key, only with the position.
530
+ * <p>
531
+ * Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
532
+ * scrolling without going to the server.
533
+ */
534
+ export interface ViewportData extends TableData {
535
+ /**
536
+ * Reads a row object from the viewport, based on its position in the table.
537
+ */
538
+ get(index:LongWrapper|number):ViewportRow;
539
+ getData(index:LongWrapper|number, column:Column):any;
540
+ getFormat(index:LongWrapper|number, column:Column):Format;
541
+ /**
542
+ * The position of the first returned row within the table.
543
+ */
544
+ get offset():number;
545
+ get columns():Array<Column>;
546
+ get rows():Array<ViewportRow>;
435
547
  }
436
548
  /**
437
549
  * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
@@ -522,6 +634,33 @@ export namespace dh {
522
634
  */
523
635
  naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
524
636
  }
637
+ /**
638
+ * Represents statistics for a given table column.
639
+ */
640
+ export interface ColumnStatistics {
641
+ /**
642
+ * Gets the type of formatting that should be used for given statistic.
643
+ * <p>
644
+ * the format type for a statistic. A null return value means that the column formatting should be used.
645
+ * @param name - the display name of the statistic
646
+ * @return String
647
+ */
648
+ getType(name:string):string;
649
+ /**
650
+ * 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
651
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
652
+ * than 19 unique values.
653
+ * @return Map of String double
654
+ */
655
+ get uniqueValues():Map<string, number>;
656
+ /**
657
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
658
+ * <p>
659
+ * A map of each statistic's name to its value.
660
+ * @return Map of String and Object
661
+ */
662
+ get statisticsMap():Map<string, object>;
663
+ }
525
664
  export interface LayoutHints {
526
665
  readonly searchDisplayMode?:SearchDisplayModeType|null;
527
666
 
@@ -532,194 +671,108 @@ export namespace dh {
532
671
  get frontColumns():string[]|null;
533
672
  get backColumns():string[]|null;
534
673
  }
535
- /**
536
- * Similar to {@link dh.ViewportData}, but with additional properties to reflect
537
- * the tree structure.
538
- */
539
- export interface TreeViewportData extends TableData {
540
- get(index:LongWrapper|number):TreeRow;
541
- getData(index:LongWrapper|number, column:Column):any;
542
- getFormat(index:LongWrapper|number, column:Column):Format;
543
- get treeSize():number;
544
- /**
545
- * The position of the first returned row within the tree.
546
- */
547
- get offset():number;
548
- get columns():Array<Column>;
549
- get rows():Array<TreeRow>;
550
- }
551
- /**
552
- * Row implementation that also provides additional read-only properties. represents visible rows in the table, but
553
- * with additional properties to reflect the tree structure.
554
- */
555
- export interface TreeRow extends Row {
556
- get(column:Column):any;
557
- getFormat(column:Column):Format;
558
- /**
559
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
560
- * rows below this one with a greater depth than this one.
561
- * @return boolean
562
- */
563
- get isExpanded():boolean;
564
- /**
565
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the row
566
- * and its expand/collapse icon.
567
- * @return int
568
- */
569
- get depth():number;
570
- /**
571
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when the
572
- * table updates, depending on the table's configuration.
573
- * @return boolean
574
- */
575
- get hasChildren():boolean;
576
- get index():LongWrapper;
674
+ export interface RefreshToken {
675
+ get bytes():string;
676
+ get expiry():number;
577
677
  }
578
- /**
579
- * Represents a row available in a subscription/snapshot on the client. Do not retain references to rows - they will
580
- * not function properly when the event isn't actively going off (or promise resolving). Instead, wait for the next
581
- * event, or re-request the viewport data.
582
- */
583
- export interface Row {
584
- get(column:Column):any;
585
- getFormat(column:Column):Format;
586
- get index():LongWrapper;
678
+ export interface ColumnGroup {
679
+ get name():string|null;
680
+ get children():string[]|null;
681
+ get color():string|null;
587
682
  }
683
+
588
684
  /**
589
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
590
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
591
- *
592
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
593
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
594
- * backwards compatibility and to better follow JS expectations.
685
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
595
686
  */
596
- export interface WidgetMessageDetails {
597
- /**
598
- * Returns the data from this message as a base64-encoded string.
599
- */
600
- getDataAsBase64():string;
601
- /**
602
- * Returns the data from this message as a Uint8Array.
603
- */
604
- getDataAsU8():Uint8Array;
605
- /**
606
- * Returns the data from this message as a utf-8 string.
607
- */
608
- getDataAsString():string;
609
- /**
610
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
611
- * objects, and should close them when no longer needed.
612
- */
613
- get exportedObjects():WidgetExportedObject[];
687
+ export class BigDecimalWrapper {
688
+ protected constructor();
689
+
690
+ static ofString(value:string):BigDecimalWrapper;
691
+ asNumber():number;
692
+ valueOf():string;
693
+ toString():string;
694
+ equals(o:object):boolean;
695
+ hashCode():number;
614
696
  }
697
+
615
698
  /**
616
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
617
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
618
- * are correctly freed.
699
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
700
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
619
701
  */
620
- export interface WidgetExportedObject {
702
+ export class IdeConnection implements HasEventHandling {
621
703
  /**
622
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
623
- * null, this object cannot be fetched, but can be passed to the server, such as via
624
- * {@link Widget.sendMessage}.
625
- * @return the string type of this server-side object, or null.
704
+ * @deprecated
626
705
  */
627
- readonly type?:string|null;
706
+ static readonly HACK_CONNECTION_FAILURE:string;
707
+ static readonly EVENT_DISCONNECT:string;
708
+ static readonly EVENT_RECONNECT:string;
709
+ static readonly EVENT_SHUTDOWN:string;
710
+
711
+ protected constructor();
628
712
 
629
713
  /**
630
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
631
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
632
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
633
- */
634
- reexport():Promise<WidgetExportedObject>;
635
- /**
636
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
637
- * the same instance.
638
- * @return a promise that will resolve to a client side object that represents the reference on the server.
639
- */
640
- fetch():Promise<any>;
641
- /**
642
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
643
- * exist that also use that object. Should not be called after fetch() has been invoked.
714
+ * Closes the current connection, releasing any resources on the server or client.
644
715
  */
645
716
  close():void;
646
- }
647
- /**
648
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead,
649
- * request the viewport again.
650
- */
651
- export interface ViewportRow extends Row {
652
- get(column:Column):any;
653
- getFormat(column:Column):Format;
654
- get index():LongWrapper;
655
- }
656
- /**
657
- * Represents statistics for a given table column.
658
- */
659
- export interface ColumnStatistics {
717
+ running():Promise<IdeConnection>;
660
718
  /**
661
- * Gets the type of formatting that should be used for given statistic.
662
- * <p>
663
- * the format type for a statistic. A null return value means that the column formatting should be used.
664
- * @param name - the display name of the statistic
665
- * @return String
719
+ * Load the named table, with columns and size information already fully populated.
720
+ * @param name - the name of the table to fetch
721
+ * @param applyPreviewColumns - false to disable previews, defaults to true
722
+ * @return a {@link Promise} that will resolve to the table, or reject with an error if it cannot be loaded.
723
+ * @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
666
724
  */
667
- getType(name:string):string;
725
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
726
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
727
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
668
728
  /**
669
- * 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
670
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
671
- * than 19 unique values.
672
- * @return Map of String double
729
+ * Makes an `object` available to another user or another client on this same server which knows the value of
730
+ * the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
731
+ * which knows this value can read the same object.
732
+ * <p>
733
+ * Shared objects will remain available using the sharedTicketBytes until the client that first shared them
734
+ * releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
735
+ * the remote end has signaled that it has successfully fetched the object before releasing it from this client.
736
+ * <p>
737
+ * Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
738
+ * prevent access by unauthorized clients.
739
+ * @param object - the object to share with another client/user
740
+ * @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
741
+ * string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
742
+ * @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
743
+ * by another client, or will reject if an error occurs.
673
744
  */
674
- get uniqueValues():Map<string, number>;
745
+ shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
675
746
  /**
676
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
747
+ * Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
748
+ * client releases this object (or their session ends), the object will be available on the server.
677
749
  * <p>
678
- * A map of each statistic's name to its value.
679
- * @return Map of String and Object
750
+ * The type of the object must be passed so that the object can be read from the server correct - the other client
751
+ * should provide this information.
752
+ * @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
753
+ * string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
754
+ * @param type - The type of the object, so it can be correctly read from the server
755
+ * @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
680
756
  */
681
- get statisticsMap():Map<string, object>;
682
- }
683
- /**
684
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
685
- */
686
- export interface LocalTimeWrapper {
687
- valueOf():string;
688
- getHour():number;
689
- getMinute():number;
690
- getSecond():number;
691
- getNano():number;
692
- toString():string;
693
- }
694
- /**
695
- * Extends {@link dh.TableData}, but only contains data in the current viewport. The only API change from TableData is that
696
- * ViewportData also contains the offset to this data, so that the actual row number may be determined.
697
- * <p>
698
- * For viewport subscriptions, it is not necessary to read with the key, only with the position.
699
- * <p>
700
- * Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided for easier
701
- * scrolling without going to the server.
702
- */
703
- export interface ViewportData extends TableData {
757
+ getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
758
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
704
759
  /**
705
- * Reads a row object from the viewport, based on its position in the table.
760
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
761
+ * @param tables -
762
+ * @return {@link Promise} of {@link dh.Table}
706
763
  */
707
- get(index:LongWrapper|number):ViewportRow;
708
- getData(index:LongWrapper|number, column:Column):any;
709
- getFormat(index:LongWrapper|number, column:Column):Format;
764
+ mergeTables(tables:Table[]):Promise<Table>;
710
765
  /**
711
- * The position of the first returned row within the table.
766
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
767
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
768
+ * log messages as are presently available.
769
+ * @param callback -
770
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
712
771
  */
713
- get offset():number;
714
- get columns():Array<Column>;
715
- get rows():Array<ViewportRow>;
716
- }
717
- export interface ColumnGroup {
718
- get name():string|null;
719
- get children():string[]|null;
720
- get color():string|null;
721
- }
722
- export interface HasEventHandling {
772
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
773
+ startSession(type:string):Promise<IdeSession>;
774
+ getConsoleTypes():Promise<Array<string>>;
775
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
723
776
  /**
724
777
  * Listen for events on this object.
725
778
  * @param name - the name of the event to listen for
@@ -739,95 +792,11 @@ export namespace dh {
739
792
  */
740
793
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
741
794
  }
795
+
742
796
  /**
743
- * Similar to the browser `CustomEvent` type, this class holds only the type of the event, and optionally some
744
- * details about the event.
745
- * @typeParam T - the type of the event detail
746
- */
747
- export interface Event<T> {
748
- get detail():T;
749
- get type():string;
750
- }
751
- /**
752
- * Common interface for various ways of accessing table data and formatting for viewport or non-viewport subscriptions
753
- * on tables, data in trees, and snapshots.
754
- * <p>
755
- * Generally speaking, it is more efficient to access data in column-major order, rather than iterating through each Row
756
- * and accessing all columns that it holds. The {@link rows} accessor can be useful to read row data, but may
757
- * incur other costs - it is likely faster to access data by columns using {@link getData}.
758
- */
759
- export interface TableData {
760
- /**
761
- * Reads a row object from the table, from which any subscribed column can be read.
762
- * @param index - the position or key to access
763
- * @return the row at the given location
764
- */
765
- get(index:LongWrapper|number):Row;
766
- /**
767
- * Reads a specific cell from the table, by row key and column.
768
- * @param index - the row in the table to get data from
769
- * @param column - the column to read
770
- * @return the value in the table
771
- */
772
- getData(index:LongWrapper|number, column:Column):any;
773
- /**
774
- * The server-specified Format to use for the cell at the given position.
775
- * @param index - the row to read
776
- * @param column - the column to read
777
- * @return a Format instance with any server-specified details
778
- */
779
- getFormat(index:LongWrapper|number, column:Column):Format;
780
- get columns():Array<Column>;
781
- /**
782
- * A lazily computed array of all rows available on the client.
783
- */
784
- get rows():Array<Row>;
785
- }
786
- /**
787
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
788
- */
789
- export interface LocalDateWrapper {
790
- valueOf():string;
791
- getYear():number;
792
- getMonthValue():number;
793
- getDayOfMonth():number;
794
- toString():string;
795
- }
796
-
797
- /**
798
- * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
799
- * roll-up table.
800
- */
801
- export class RollupConfig {
802
- /**
803
- * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
804
- */
805
- groupingColumns:Array<String>;
806
- /**
807
- * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
808
- * roll-up table.
809
- */
810
- aggregations:{ [key: string]: Array<string>; };
811
- /**
812
- * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
813
- * rows in the underlying table which make up that grouping. Since these values might be a different type from the
814
- * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
815
- * as if they were Column.constituentType instead of Column.type. Defaults to false.
816
- */
817
- includeConstituents:boolean;
818
- includeOriginalColumns?:boolean|null;
819
- /**
820
- * Optional parameter indicating if original column descriptions should be included. Defaults to true.
821
- */
822
- includeDescriptions:boolean;
823
-
824
- constructor();
825
- }
826
-
827
- /**
828
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
829
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
830
- * methods return a new Sort instance.
797
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
798
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
799
+ * methods return a new Sort instance.
831
800
  */
832
801
  export class Sort {
833
802
  static readonly ASCENDING:string;
@@ -870,180 +839,360 @@ export namespace dh {
870
839
  }
871
840
 
872
841
  /**
873
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
874
- * column.
842
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
843
+ * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
844
+ * inform the UI right away that they have taken place.
875
845
  */
876
- export class Column {
846
+ export class Table implements JoinableTable, HasEventHandling {
847
+ readonly description?:string|null;
848
+ readonly pluginName?:string|null;
849
+ readonly layoutHints?:null|LayoutHints;
877
850
  /**
878
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
879
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
880
- * @return String
851
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
881
852
  */
882
- readonly constituentType?:string|null;
883
- readonly description?:string|null;
884
-
885
- protected constructor();
886
-
853
+ static readonly EVENT_SIZECHANGED:string;
887
854
  /**
888
- * the value for this column in the given row. Type will be consistent with the type of the Column.
889
- * @param row -
890
- * @return Any
855
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
891
856
  */
892
- get(row:Row):any;
893
- getFormat(row:Row):Format;
857
+ static readonly EVENT_UPDATED:string;
894
858
  /**
895
- * Creates a sort builder object, to be used when sorting by this column.
896
- * @return {@link dh.Sort}
859
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
897
860
  */
898
- sort():Sort;
861
+ static readonly EVENT_ROWADDED:string;
899
862
  /**
900
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
901
- * operation, or as a builder to create a filter operation.
902
- * @return {@link dh.FilterValue}
863
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
903
864
  */
904
- filter():FilterValue;
865
+ static readonly EVENT_ROWREMOVED:string;
905
866
  /**
906
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
907
- * @param expression -
908
- * @return {@link dh.CustomColumn}
867
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
909
868
  */
910
- formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
869
+ static readonly EVENT_ROWUPDATED:string;
911
870
  /**
912
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
913
- * @param expression -
914
- * @return {@link dh.CustomColumn}
871
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
915
872
  */
916
- formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
873
+ static readonly EVENT_SORTCHANGED:string;
917
874
  /**
918
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
919
- * @param expression -
920
- * @return {@link dh.CustomColumn}
875
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
921
876
  */
922
- formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
923
- toString():string;
877
+ static readonly EVENT_FILTERCHANGED:string;
924
878
  /**
925
- * Label for this column.
926
- * @return String
879
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
927
880
  */
928
- get name():string;
881
+ static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
929
882
  /**
930
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
931
- * {@link Table.uncoalesced}.
932
- * @return true if the column is a partition column
883
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
933
884
  */
934
- get isPartitionColumn():boolean;
885
+ static readonly EVENT_DISCONNECT:string;
935
886
  /**
936
- *
937
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
938
- * @return int
887
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
939
888
  */
940
- get index():number;
941
- get isSortable():boolean;
889
+ static readonly EVENT_RECONNECT:string;
942
890
  /**
943
- * Type of the row data that can be found in this column.
944
- * @return String
891
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
945
892
  */
946
- get type():string;
893
+ static readonly EVENT_RECONNECTFAILED:string;
947
894
  /**
948
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
949
- * table using <b>applyCustomColumns</b> with the parameters specified.
950
- * @param expression -
951
- * @param options -
952
- * @return {@link dh.CustomColumn}
895
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
953
896
  */
954
- static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
897
+ static readonly EVENT_REQUEST_FAILED:string;
955
898
  /**
956
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
957
- * @param name -
958
- * @param expression -
959
- * @param options -
960
- * @return {@link dh.CustomColumn}
899
+ * The table size has updated, so live scrollbars and the like can be updated accordingly.
961
900
  */
962
- static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
963
- }
964
-
965
- /**
966
- * Event fired when a command is issued from the client.
967
- */
968
- export class CommandInfo {
969
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
901
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
902
+ /**
903
+ * The size the table will have if it is uncoalesced.
904
+ */
905
+ static readonly SIZE_UNCOALESCED:number;
970
906
 
971
- get result():Promise<dh.ide.CommandResult>;
972
- get code():string;
973
- }
907
+ protected constructor();
974
908
 
975
- /**
976
- * Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
977
- */
978
- export class ConnectOptions {
909
+ batch(userCode:(arg0:unknown)=>void):Promise<Table>;
979
910
  /**
980
- * Optional map of http header names and values to send to the server with each request.
911
+ * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
912
+ * caching a returned value.
913
+ * @param key -
914
+ * @return {@link dh.Column}
981
915
  */
982
- headers?:{ [key: string]: string; }|null;
916
+ findColumn(key:string):Column;
983
917
  /**
984
- * True to enable debug logging. At this time, only enables logging for gRPC calls.
918
+ * Retrieve multiple columns specified by the given names.
919
+ * @param keys -
920
+ * @return {@link dh.Column} array
985
921
  */
986
- debug?:boolean|null;
922
+ findColumns(keys:string[]):Column[];
923
+ isBlinkTable():boolean;
987
924
  /**
988
- * Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
989
- * of `fetch`. Ignored if {@link dh.transportFactory} is set.
990
- * <p>
991
- * Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
925
+ * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
926
+ * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
927
+ * @return Promise of dh.InputTable
992
928
  */
993
- useWebsockets?:boolean|null;
929
+ inputTable():Promise<InputTable>;
994
930
  /**
995
- * The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
996
- * {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
997
- * <p>
998
- * Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
999
- * `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
1000
- * https, it will use fetch, otherwise it will use websockets.
931
+ * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1001
932
  */
1002
- transportFactory?:dh.grpc.GrpcTransportFactory|null;
1003
-
1004
- constructor();
1005
- }
1006
-
1007
- export class CustomColumn {
1008
- static readonly TYPE_FORMAT_COLOR:string;
1009
- static readonly TYPE_FORMAT_NUMBER:string;
1010
- static readonly TYPE_FORMAT_DATE:string;
1011
- static readonly TYPE_NEW:string;
1012
-
1013
- protected constructor();
1014
-
1015
- valueOf():string;
1016
- toString():string;
1017
- static from(columnInfo:string):CustomColumn;
933
+ close():void;
934
+ getAttributes():string[];
1018
935
  /**
1019
- * The expression to evaluate this custom column.
1020
- * @return String
936
+ * null if no property exists, a string if it is an easily serializable property, or a ```Promise
937
+ * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
938
+ * @param attributeName -
939
+ * @return Object
1021
940
  */
1022
- get expression():string;
941
+ getAttribute(attributeName:string):unknown|undefined|null;
1023
942
  /**
1024
- * The name of the column to use.
1025
- * @return String
943
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
944
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
945
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
946
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
947
+ * not.
948
+ * @param sort -
949
+ * @return {@link dh.Sort} array
1026
950
  */
1027
- get name():string;
951
+ applySort(sort:Sort[]):Array<Sort>;
1028
952
  /**
1029
- * The options for this custom column.
1030
- * @return CustomColumOptions
953
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
954
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
955
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
956
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
957
+ * will not.
958
+ * @param filter -
959
+ * @return {@link dh.FilterCondition} array
1031
960
  */
1032
- get options():CustomColumnOptions;
961
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1033
962
  /**
1034
- * Type of custom column. One of
1035
- *
1036
- * <ul>
1037
- * <li>FORMAT_COLOR</li>
1038
- * <li>FORMAT_NUMBER</li>
1039
- * <li>FORMAT_DATE</li>
1040
- * <li>NEW</li>
1041
- * </ul>
1042
- * @return String
963
+ * used when adding new filter and sort operations to the table, as long as they are present.
964
+ * @param customColumns -
965
+ * @return {@link dh.CustomColumn} array
1043
966
  */
1044
- get type():string;
967
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
968
+ /**
969
+ * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
970
+ * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
971
+ * will result in events to be fired once data becomes available, starting with an `updated` event and a
972
+ * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
973
+ * needed.
974
+ * @param firstRow -
975
+ * @param lastRow -
976
+ * @param columns -
977
+ * @param updateIntervalMs -
978
+ * @return {@link dh.TableViewportSubscription}
979
+ */
980
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
981
+ /**
982
+ * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
983
+ * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
984
+ * separate the lifespan of this promise from the table itself, call
985
+ * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
986
+ * @return Promise of {@link dh.TableData}
987
+ */
988
+ getViewportData():Promise<ViewportData>;
989
+ /**
990
+ * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
991
+ * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
992
+ * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
993
+ * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
994
+ * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
995
+ * called on it to stop it, and all events are fired from the TableSubscription instance.
996
+ * @param columns -
997
+ * @param updateIntervalMs -
998
+ * @return {@link dh.TableSubscription}
999
+ */
1000
+ subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
1001
+ /**
1002
+ * a new table containing the distinct tuples of values from the given columns that are present in the original
1003
+ * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1004
+ * order of appearance of values from the original table.
1005
+ * @param columns -
1006
+ * @return Promise of dh.Table
1007
+ */
1008
+ selectDistinct(columns:Column[]):Promise<Table>;
1009
+ /**
1010
+ * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1011
+ * @return Promise of dh.Table
1012
+ */
1013
+ copy():Promise<Table>;
1014
+ /**
1015
+ * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1016
+ * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1017
+ * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1018
+ * called on it when not in use.
1019
+ * @param config -
1020
+ * @return Promise of dh.TotalsTable
1021
+ */
1022
+ getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1023
+ /**
1024
+ * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1025
+ * above for more specifics.
1026
+ * @param config -
1027
+ * @return promise of dh.TotalsTable
1028
+ */
1029
+ getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1030
+ /**
1031
+ * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1032
+ * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1033
+ * @param configObject -
1034
+ * @return Promise of dh.TreeTable
1035
+ */
1036
+ rollup(configObject:RollupConfig):Promise<TreeTable>;
1037
+ /**
1038
+ * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1039
+ * new `TreeTable` which must have close() called on it when not in use.
1040
+ * @param configObject -
1041
+ * @return Promise dh.TreeTable
1042
+ */
1043
+ treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
1044
+ /**
1045
+ * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1046
+ * table will not update. This does not change the original table, and the new table will not have any of the client
1047
+ * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1048
+ * @return Promise of dh.Table
1049
+ */
1050
+ freeze():Promise<Table>;
1051
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
1052
+ /**
1053
+ *
1054
+ * @inheritDoc
1055
+ * @deprecated
1056
+ */
1057
+ join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1058
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1059
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
1060
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1061
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1062
+ byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1063
+ /**
1064
+ * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1065
+ * keys.
1066
+ * @param keys -
1067
+ * @param dropKeys -
1068
+ * @return Promise dh.PartitionedTable
1069
+ */
1070
+ partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1071
+ /**
1072
+ * a promise that will resolve to ColumnStatistics for the column of this table.
1073
+ * @param column -
1074
+ * @return Promise of dh.ColumnStatistics
1075
+ */
1076
+ getColumnStatistics(column:Column):Promise<ColumnStatistics>;
1077
+ /**
1078
+ * Seek the row matching the data provided
1079
+ * @param startingRow - Row to start the seek from
1080
+ * @param column - Column to seek for value on
1081
+ * @param valueType - Type of value provided
1082
+ * @param seekValue - Value to seek
1083
+ * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1084
+ * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1085
+ * `false`.
1086
+ * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1087
+ * @return A promise that resolves to the row value found.
1088
+ */
1089
+ seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1090
+ toString():string;
1091
+ /**
1092
+ * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1093
+ * .inputTable() to add or remove data from the underlying table.
1094
+ * @return boolean
1095
+ */
1096
+ get hasInputTable():boolean;
1097
+ /**
1098
+ * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1099
+ * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1100
+ * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1101
+ * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
1102
+ * @return {@link dh.Column} array
1103
+ */
1104
+ get columns():Array<Column>;
1105
+ /**
1106
+ * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1107
+ * @return dh.TotalsTableConfig
1108
+ */
1109
+ get totalsTableConfig():TotalsTableConfig;
1110
+ /**
1111
+ * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1112
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1113
+ * for the <b>sortchanged</b> event to know when to update the UI.
1114
+ * @return {@link dh.Sort} array
1115
+ */
1116
+ get sort():Array<Sort>;
1117
+ /**
1118
+ * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1119
+ * ones. To update, call <b>applyCustomColumns()</b>.
1120
+ * @return {@link dh.CustomColumn} array
1121
+ */
1122
+ get customColumns():Array<CustomColumn>;
1123
+ /**
1124
+ * True if this table may receive updates from the server, including size changed events, updated events after
1125
+ * initial snapshot.
1126
+ * @return boolean
1127
+ */
1128
+ get isRefreshing():boolean;
1129
+ /**
1130
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1131
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1132
+ * for the <b>filterchanged</b> event to know when to update the UI.
1133
+ * @return {@link dh.FilterCondition} array
1134
+ */
1135
+ get filter():Array<FilterCondition>;
1136
+ /**
1137
+ * The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
1138
+ * will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
1139
+ * If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
1140
+ * @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
1141
+ */
1142
+ get totalSize():number;
1143
+ /**
1144
+ * The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
1145
+ * the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
1146
+ * {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
1147
+ * <p>
1148
+ * When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
1149
+ * @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
1150
+ * uncoalesced.
1151
+ */
1152
+ get size():number;
1153
+ /**
1154
+ * True if this table has been closed.
1155
+ * @return boolean
1156
+ */
1157
+ get isClosed():boolean;
1158
+ /**
1159
+ * Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
1160
+ * <p>
1161
+ * Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
1162
+ * subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
1163
+ * this can be very expensive. To see which partitions are available, check each column on the table to see which
1164
+ * have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
1165
+ * for those columns, use {@link Table.selectDistinct}.
1166
+ * @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
1167
+ */
1168
+ get isUncoalesced():boolean;
1169
+ /**
1170
+ * Listen for events on this object.
1171
+ * @param name - the name of the event to listen for
1172
+ * @param callback - a function to call when the event occurs
1173
+ * @return Returns a cleanup function.
1174
+ * @typeParam T - the type of the data that the event will provide
1175
+ */
1176
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1177
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1178
+ hasListeners(name:string):boolean;
1179
+ /**
1180
+ * Removes an event listener added to this table.
1181
+ * @param name -
1182
+ * @param callback -
1183
+ * @return
1184
+ * @typeParam T -
1185
+ */
1186
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1187
+ /**
1188
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
1189
+ * do not support reverse.
1190
+ * @return {@link dh.Sort}
1191
+ */
1192
+ static reverse():Sort;
1045
1193
  }
1046
1194
 
1195
+
1047
1196
  /**
1048
1197
  * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
1049
1198
  * mechanism, and so reimplemented here.
@@ -1274,262 +1423,6 @@ export namespace dh {
1274
1423
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1275
1424
  }
1276
1425
 
1277
-
1278
- /**
1279
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1280
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1281
- * instance.
1282
- */
1283
- export class FilterCondition {
1284
- protected constructor();
1285
-
1286
- /**
1287
- * the opposite of this condition
1288
- * @return FilterCondition
1289
- */
1290
- not():FilterCondition;
1291
- /**
1292
- * a condition representing the current condition logically ANDed with the other parameters
1293
- * @param filters -
1294
- * @return FilterCondition
1295
- */
1296
- and(...filters:FilterCondition[]):FilterCondition;
1297
- /**
1298
- * a condition representing the current condition logically ORed with the other parameters
1299
- * @param filters -
1300
- * @return FilterCondition.
1301
- */
1302
- or(...filters:FilterCondition[]):FilterCondition;
1303
- /**
1304
- * a string suitable for debugging showing the details of this condition.
1305
- * @return String.
1306
- */
1307
- toString():string;
1308
- get columns():Array<Column>;
1309
- /**
1310
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1311
- * functions:
1312
- * <ul>
1313
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1314
- * than the third</li>
1315
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1316
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1317
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1318
- * "not a number"</i></li>
1319
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1320
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1321
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1322
- * expression</li>
1323
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1324
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1325
- * <p>
1326
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1327
- * method should be used in other cases
1328
- * </p>
1329
- * </li>
1330
- * </ul>
1331
- * @param function -
1332
- * @param args -
1333
- * @return dh.FilterCondition
1334
- */
1335
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1336
- /**
1337
- * a filter condition which will check if the given value can be found in any supported column on whatever table
1338
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1339
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1340
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1341
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1342
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1343
- * {@link dh.Column.filter}).
1344
- * @param value -
1345
- * @param columns -
1346
- * @return dh.FilterCondition
1347
- */
1348
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1349
- }
1350
-
1351
- /**
1352
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1353
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1354
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1355
- */
1356
- export class RangeSet {
1357
- protected constructor();
1358
-
1359
- static ofRange(first:number, last:number):RangeSet;
1360
- static ofItems(rows:number[]):RangeSet;
1361
- static ofRanges(ranges:RangeSet[]):RangeSet;
1362
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1363
- /**
1364
- * a new iterator over all indexes in this collection.
1365
- * @return Iterator of {@link dh.LongWrapper}
1366
- */
1367
- iterator():Iterator<LongWrapper>;
1368
- /**
1369
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1370
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1371
- * property each time through a loop).
1372
- * @return double
1373
- */
1374
- get size():number;
1375
- }
1376
-
1377
- /**
1378
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1379
- * some options, JS applications can run code on the server, and interact with available exportable objects.
1380
- */
1381
- export class IdeConnection implements HasEventHandling {
1382
- /**
1383
- * @deprecated
1384
- */
1385
- static readonly HACK_CONNECTION_FAILURE:string;
1386
- static readonly EVENT_DISCONNECT:string;
1387
- static readonly EVENT_RECONNECT:string;
1388
- static readonly EVENT_SHUTDOWN:string;
1389
-
1390
- protected constructor();
1391
-
1392
- /**
1393
- * Closes the current connection, releasing any resources on the server or client.
1394
- */
1395
- close():void;
1396
- running():Promise<IdeConnection>;
1397
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1398
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1399
- /**
1400
- * Makes an `object` available to another user or another client on this same server which knows the value of
1401
- * the `sharedTicketBytes`. Use that sharedTicketBytes value like a one-time use password - any other client
1402
- * which knows this value can read the same object.
1403
- * <p>
1404
- * Shared objects will remain available using the sharedTicketBytes until the client that first shared them
1405
- * releases/closes their copy of the object. Whatever side-channel is used to share the bytes, be sure to wait until
1406
- * the remote end has signaled that it has successfully fetched the object before releasing it from this client.
1407
- * <p>
1408
- * Be sure to use an unpredictable value for the shared ticket bytes, like a UUID or other large, random value to
1409
- * prevent access by unauthorized clients.
1410
- * @param object - the object to share with another client/user
1411
- * @param sharedTicketBytes - the value which another client/user must know to obtain the object. It may be a unicode
1412
- * string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
1413
- * @return A promise that will resolve to the value passed as sharedTicketBytes when the object is ready to be read
1414
- * by another client, or will reject if an error occurs.
1415
- */
1416
- shareObject(object:Table|Widget|WidgetExportedObject|PartitionedTable|TotalsTable|TreeTable, sharedTicketBytes:string|Uint8Array):Promise<string|Uint8Array>;
1417
- /**
1418
- * Reads an object shared by another client to this server with the `sharedTicketBytes`. Until the other
1419
- * client releases this object (or their session ends), the object will be available on the server.
1420
- * <p>
1421
- * The type of the object must be passed so that the object can be read from the server correct - the other client
1422
- * should provide this information.
1423
- * @param sharedTicketBytes - the value provided by another client/user to obtain the object. It may be a unicode
1424
- * string (will be encoded as utf8 bytes), or a {@link Uint8Array} value.
1425
- * @param type - The type of the object, so it can be correctly read from the server
1426
- * @return A promise that will resolve to the shared object, or will reject with an error if it cannot be read.
1427
- */
1428
- getSharedObject(sharedTicketBytes:string|Uint8Array, type:string):Promise<any>;
1429
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1430
- /**
1431
- * Merges the given tables into a single table. Assumes all tables have the same structure.
1432
- * @param tables -
1433
- * @return {@link Promise} of {@link dh.Table}
1434
- */
1435
- mergeTables(tables:Table[]):Promise<Table>;
1436
- /**
1437
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1438
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1439
- * log messages as are presently available.
1440
- * @param callback -
1441
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1442
- */
1443
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1444
- startSession(type:string):Promise<IdeSession>;
1445
- getConsoleTypes():Promise<Array<string>>;
1446
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1447
- /**
1448
- * Listen for events on this object.
1449
- * @param name - the name of the event to listen for
1450
- * @param callback - a function to call when the event occurs
1451
- * @return Returns a cleanup function.
1452
- * @typeParam T - the type of the data that the event will provide
1453
- */
1454
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1455
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1456
- hasListeners(name:string):boolean;
1457
- /**
1458
- * Removes an event listener added to this table.
1459
- * @param name -
1460
- * @param callback -
1461
- * @return
1462
- * @typeParam T -
1463
- */
1464
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1465
- }
1466
-
1467
- /**
1468
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1469
- *
1470
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1471
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1472
- * value can be provided describing the strategy the engine should use when grouping the rows.
1473
- */
1474
- export class TreeTableConfig {
1475
- /**
1476
- * The column representing the unique ID for each item
1477
- */
1478
- idColumn:string;
1479
- /**
1480
- * The column representing the parent ID for each item
1481
- */
1482
- parentColumn:string;
1483
- /**
1484
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1485
- */
1486
- promoteOrphansToRoot:boolean;
1487
-
1488
- constructor();
1489
- }
1490
-
1491
- export class QueryInfo {
1492
- static readonly EVENT_TABLE_OPENED:string;
1493
- static readonly EVENT_DISCONNECT:string;
1494
- static readonly EVENT_RECONNECT:string;
1495
- static readonly EVENT_CONNECT:string;
1496
-
1497
- protected constructor();
1498
- }
1499
-
1500
- export class CoreClient implements HasEventHandling {
1501
- static readonly EVENT_CONNECT:string;
1502
- static readonly EVENT_DISCONNECT:string;
1503
- static readonly EVENT_RECONNECT:string;
1504
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1505
- static readonly EVENT_REQUEST_FAILED:string;
1506
- static readonly EVENT_REQUEST_STARTED:string;
1507
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1508
- /**
1509
- * @deprecated
1510
- */
1511
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1512
- static readonly LOGIN_TYPE_PASSWORD:string;
1513
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1514
-
1515
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1516
-
1517
- running():Promise<CoreClient>;
1518
- getServerUrl():string;
1519
- getAuthConfigValues():Promise<string[][]>;
1520
- login(credentials:LoginCredentials):Promise<void>;
1521
- relogin(token:RefreshToken):Promise<void>;
1522
- onConnected(timeoutInMillis?:number):Promise<void>;
1523
- getServerConfigValues():Promise<string[][]>;
1524
- getStorageService():dh.storage.StorageService;
1525
- getAsIdeConnection():Promise<IdeConnection>;
1526
- disconnect():void;
1527
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
1528
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
1529
- hasListeners(name:string):boolean;
1530
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
1531
- }
1532
-
1533
1426
  /**
1534
1427
  * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1535
1428
  * indicating how that table was configured when it was declared, and each Totals Table has a similar property
@@ -1614,11 +1507,169 @@ export namespace dh {
1614
1507
  toString():string;
1615
1508
  }
1616
1509
 
1617
- export class LongWrapper {
1618
- protected constructor();
1619
-
1620
- static ofString(str:string):LongWrapper;
1621
- asNumber():number;
1510
+ /**
1511
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1512
+ * this type TableMap.
1513
+ * @deprecated
1514
+ */
1515
+ export class TableMap {
1516
+ static readonly EVENT_KEYADDED:string;
1517
+ static readonly EVENT_DISCONNECT:string;
1518
+ static readonly EVENT_RECONNECT:string;
1519
+ static readonly EVENT_RECONNECTFAILED:string;
1520
+
1521
+ protected constructor();
1522
+ }
1523
+
1524
+ /**
1525
+ * Describes a grouping and aggregations for a roll-up table. Pass to the <b>Table.rollup</b> function to create a
1526
+ * roll-up table.
1527
+ */
1528
+ export class RollupConfig {
1529
+ /**
1530
+ * Ordered list of columns to group by to form the hierarchy of the resulting roll-up table.
1531
+ */
1532
+ groupingColumns:Array<String>;
1533
+ /**
1534
+ * Mapping from each aggregation name to the ordered list of columns it should be applied to in the resulting
1535
+ * roll-up table.
1536
+ */
1537
+ aggregations:{ [key: string]: Array<string>; };
1538
+ /**
1539
+ * Optional parameter indicating if an extra leaf node should be added at the bottom of the hierarchy, showing the
1540
+ * rows in the underlying table which make up that grouping. Since these values might be a different type from the
1541
+ * rest of the column, any client code must check if TreeRow.hasChildren = false, and if so, interpret those values
1542
+ * as if they were Column.constituentType instead of Column.type. Defaults to false.
1543
+ */
1544
+ includeConstituents:boolean;
1545
+ includeOriginalColumns?:boolean|null;
1546
+ /**
1547
+ * Optional parameter indicating if original column descriptions should be included. Defaults to true.
1548
+ */
1549
+ includeDescriptions:boolean;
1550
+
1551
+ constructor();
1552
+ }
1553
+
1554
+ /**
1555
+ * A js type for operating on input tables.
1556
+ *
1557
+ * Represents a User Input Table, which can have data added to it from other sources.
1558
+ *
1559
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1560
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1561
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1562
+ * before sending the next operation.
1563
+ *
1564
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1565
+ *
1566
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1567
+ * object.
1568
+ */
1569
+ export class InputTable {
1570
+ protected constructor();
1571
+
1572
+ /**
1573
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1574
+ * property at that name and validate it can be put into the given column type.
1575
+ * @param row -
1576
+ * @param userTimeZone -
1577
+ * @return Promise of dh.InputTable
1578
+ */
1579
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1580
+ /**
1581
+ * Add multiple rows to a table.
1582
+ * @param rows -
1583
+ * @param userTimeZone -
1584
+ * @return Promise of dh.InputTable
1585
+ */
1586
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1587
+ /**
1588
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1589
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1590
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1591
+ * resolved to the same InputTable instance this method was called upon once the server returns.
1592
+ * @param tableToAdd -
1593
+ * @return Promise of dh.InputTable
1594
+ */
1595
+ addTable(tableToAdd:Table):Promise<InputTable>;
1596
+ /**
1597
+ * Add multiple tables to this Input Table.
1598
+ * @param tablesToAdd -
1599
+ * @return Promise of dh.InputTable
1600
+ */
1601
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
1602
+ /**
1603
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1604
+ * @param tableToDelete -
1605
+ * @return Promise of dh.InputTable
1606
+ */
1607
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
1608
+ /**
1609
+ * Delete multiple tables from this Input Table.
1610
+ * @param tablesToDelete -
1611
+ * @return
1612
+ */
1613
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1614
+ /**
1615
+ * A list of the key columns, by name
1616
+ * @return String array.
1617
+ */
1618
+ get keys():string[];
1619
+ /**
1620
+ * A list of the value columns, by name
1621
+ * @return String array.
1622
+ */
1623
+ get values():string[];
1624
+ /**
1625
+ * A list of the key columns.
1626
+ * @return Column array.
1627
+ */
1628
+ get keyColumns():Column[];
1629
+ /**
1630
+ * A list of the value Column objects
1631
+ * @return {@link dh.Column} array.
1632
+ */
1633
+ get valueColumns():Column[];
1634
+ /**
1635
+ * The source table for this Input Table
1636
+ * @return dh.table
1637
+ */
1638
+ get table():Table;
1639
+ }
1640
+
1641
+ /**
1642
+ * Options for custom columns.
1643
+ */
1644
+ export class CustomColumnOptions {
1645
+ /**
1646
+ * When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
1647
+ * nodes.
1648
+ */
1649
+ rollupNodeType?:RollupNodeTypeType|null;
1650
+
1651
+ constructor();
1652
+ }
1653
+
1654
+ /**
1655
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
1656
+ */
1657
+ export class BigIntegerWrapper {
1658
+ protected constructor();
1659
+
1660
+ static ofString(str:string):BigIntegerWrapper;
1661
+ asNumber():number;
1662
+ valueOf():string;
1663
+ toString():string;
1664
+ equals(o:object):boolean;
1665
+ hashCode():number;
1666
+ }
1667
+
1668
+ export class LongWrapper {
1669
+ protected constructor();
1670
+
1671
+ static ofString(str:string):LongWrapper;
1672
+ asNumber():number;
1622
1673
  valueOf():string;
1623
1674
  toString():string;
1624
1675
  }
@@ -1795,6 +1846,30 @@ export namespace dh {
1795
1846
  static ofBoolean(b:boolean):FilterValue;
1796
1847
  }
1797
1848
 
1849
+ /**
1850
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1851
+ *
1852
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1853
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1854
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1855
+ */
1856
+ export class TreeTableConfig {
1857
+ /**
1858
+ * The column representing the unique ID for each item
1859
+ */
1860
+ idColumn:string;
1861
+ /**
1862
+ * The column representing the parent ID for each item
1863
+ */
1864
+ parentColumn:string;
1865
+ /**
1866
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1867
+ */
1868
+ promoteOrphansToRoot:boolean;
1869
+
1870
+ constructor();
1871
+ }
1872
+
1798
1873
  /**
1799
1874
  * A Widget represents a server side object that sends one or more responses to the client. The client can then
1800
1875
  * interpret these responses to see what to render, or how to respond.
@@ -1887,254 +1962,176 @@ export namespace dh {
1887
1962
  }
1888
1963
 
1889
1964
  /**
1890
- * A js type for operating on input tables.
1891
- *
1892
- * Represents a User Input Table, which can have data added to it from other sources.
1893
- *
1894
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
1895
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
1896
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
1897
- * before sending the next operation.
1898
- *
1899
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
1900
- *
1901
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
1902
- * object.
1965
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
1966
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
1967
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
1968
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
1969
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
1903
1970
  */
1904
- export class InputTable {
1971
+ export class TableViewportSubscription implements HasEventHandling {
1905
1972
  protected constructor();
1906
1973
 
1907
1974
  /**
1908
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
1909
- * property at that name and validate it can be put into the given column type.
1910
- * @param row -
1911
- * @param userTimeZone -
1912
- * @return Promise of dh.InputTable
1913
- */
1914
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
1915
- /**
1916
- * Add multiple rows to a table.
1917
- * @param rows -
1918
- * @param userTimeZone -
1919
- * @return Promise of dh.InputTable
1975
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
1976
+ * @param firstRow -
1977
+ * @param lastRow -
1978
+ * @param columns -
1979
+ * @param updateIntervalMs -
1920
1980
  */
1921
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
1981
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
1922
1982
  /**
1923
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
1924
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
1925
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
1926
- * resolved to the same InputTable instance this method was called upon once the server returns.
1927
- * @param tableToAdd -
1928
- * @return Promise of dh.InputTable
1983
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
1929
1984
  */
1930
- addTable(tableToAdd:Table):Promise<InputTable>;
1985
+ close():void;
1931
1986
  /**
1932
- * Add multiple tables to this Input Table.
1933
- * @param tablesToAdd -
1934
- * @return Promise of dh.InputTable
1987
+ * Gets the data currently visible in this viewport
1988
+ * @return Promise of {@link dh.TableData}.
1935
1989
  */
1936
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
1990
+ getViewportData():Promise<ViewportData>;
1991
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
1937
1992
  /**
1938
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
1939
- * @param tableToDelete -
1940
- * @return Promise of dh.InputTable
1993
+ * Listen for events on this object.
1994
+ * @param name - the name of the event to listen for
1995
+ * @param callback - a function to call when the event occurs
1996
+ * @return Returns a cleanup function.
1997
+ * @typeParam T - the type of the data that the event will provide
1941
1998
  */
1942
- deleteTable(tableToDelete:Table):Promise<InputTable>;
1999
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2000
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2001
+ hasListeners(name:string):boolean;
1943
2002
  /**
1944
- * Delete multiple tables from this Input Table.
1945
- * @param tablesToDelete -
2003
+ * Removes an event listener added to this table.
2004
+ * @param name -
2005
+ * @param callback -
1946
2006
  * @return
2007
+ * @typeParam T -
1947
2008
  */
1948
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
1949
- /**
1950
- * A list of the key columns, by name
1951
- * @return String array.
1952
- */
1953
- get keys():string[];
2009
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2010
+ }
2011
+
2012
+ /**
2013
+ * Addition optional configuration that can be passed to the {@link dh.CoreClient} constructor.
2014
+ */
2015
+ export class ConnectOptions {
1954
2016
  /**
1955
- * A list of the value columns, by name
1956
- * @return String array.
2017
+ * Optional map of http header names and values to send to the server with each request.
1957
2018
  */
1958
- get values():string[];
2019
+ headers?:{ [key: string]: string; }|null;
1959
2020
  /**
1960
- * A list of the key columns.
1961
- * @return Column array.
2021
+ * True to enable debug logging. At this time, only enables logging for gRPC calls.
1962
2022
  */
1963
- get keyColumns():Column[];
2023
+ debug?:boolean|null;
1964
2024
  /**
1965
- * A list of the value Column objects
1966
- * @return {@link dh.Column} array.
2025
+ * Set this to true to force the use of websockets when connecting to the deephaven instance, false to force the use
2026
+ * of `fetch`. Ignored if {@link dh.transportFactory} is set.
2027
+ * <p>
2028
+ * Defaults to null, indicating that the server URL should be checked to see if we connect with fetch or websockets.
1967
2029
  */
1968
- get valueColumns():Column[];
2030
+ useWebsockets?:boolean|null;
1969
2031
  /**
1970
- * The source table for this Input Table
1971
- * @return dh.table
2032
+ * The transport factory to use for creating gRPC streams. If specified, the JS API will ignore
2033
+ * {@link dh.useWebsockets} and its own internal logic for determining the appropriate transport to use.
2034
+ * <p>
2035
+ * Defaults to null, indicating that the JS API should determine the appropriate transport to use. If
2036
+ * `useWebsockets` is set to true, the JS API will use websockets, otherwise if the server url begins with
2037
+ * https, it will use fetch, otherwise it will use websockets.
1972
2038
  */
1973
- get table():Table;
1974
- }
1975
-
1976
- /**
1977
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
1978
- */
1979
- export class BigDecimalWrapper {
1980
- protected constructor();
2039
+ transportFactory?:dh.grpc.GrpcTransportFactory|null;
1981
2040
 
1982
- static ofString(value:string):BigDecimalWrapper;
1983
- asNumber():number;
1984
- valueOf():string;
1985
- toString():string;
1986
- equals(o:object):boolean;
1987
- hashCode():number;
2041
+ constructor();
1988
2042
  }
1989
2043
 
1990
2044
  /**
1991
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1992
- * this type TableMap.
1993
- * @deprecated
2045
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
2046
+ * column.
1994
2047
  */
1995
- export class TableMap {
1996
- static readonly EVENT_KEYADDED:string;
1997
- static readonly EVENT_DISCONNECT:string;
1998
- static readonly EVENT_RECONNECT:string;
1999
- static readonly EVENT_RECONNECTFAILED:string;
2000
-
2001
- protected constructor();
2002
- }
2048
+ export class Column {
2049
+ /**
2050
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
2051
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
2052
+ * @return String
2053
+ */
2054
+ readonly constituentType?:string|null;
2055
+ readonly description?:string|null;
2003
2056
 
2004
- /**
2005
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
2006
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
2007
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
2008
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
2009
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
2010
- */
2011
- export class TableViewportSubscription implements HasEventHandling {
2012
2057
  protected constructor();
2013
2058
 
2014
2059
  /**
2015
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
2016
- * @param firstRow -
2017
- * @param lastRow -
2018
- * @param columns -
2019
- * @param updateIntervalMs -
2060
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
2061
+ * @param row -
2062
+ * @return Any
2020
2063
  */
2021
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):void;
2064
+ get(row:Row):any;
2065
+ getFormat(row:Row):Format;
2022
2066
  /**
2023
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
2067
+ * Creates a sort builder object, to be used when sorting by this column.
2068
+ * @return {@link dh.Sort}
2024
2069
  */
2025
- close():void;
2070
+ sort():Sort;
2026
2071
  /**
2027
- * Gets the data currently visible in this viewport
2028
- * @return Promise of {@link dh.TableData}.
2072
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
2073
+ * operation, or as a builder to create a filter operation.
2074
+ * @return {@link dh.FilterValue}
2029
2075
  */
2030
- getViewportData():Promise<ViewportData>;
2031
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
2076
+ filter():FilterValue;
2032
2077
  /**
2033
- * Listen for events on this object.
2034
- * @param name - the name of the event to listen for
2035
- * @param callback - a function to call when the event occurs
2036
- * @return Returns a cleanup function.
2037
- * @typeParam T - the type of the data that the event will provide
2078
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
2079
+ * @param expression -
2080
+ * @return {@link dh.CustomColumn}
2038
2081
  */
2039
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2040
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2041
- hasListeners(name:string):boolean;
2082
+ formatColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
2042
2083
  /**
2043
- * Removes an event listener added to this table.
2044
- * @param name -
2045
- * @param callback -
2046
- * @return
2047
- * @typeParam T -
2084
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2085
+ * @param expression -
2086
+ * @return {@link dh.CustomColumn}
2048
2087
  */
2049
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2050
- }
2051
-
2052
- export class DateWrapper extends LongWrapper {
2053
- protected constructor();
2054
-
2055
- static ofJsDate(date:Date):DateWrapper;
2056
- asDate():Date;
2057
- }
2058
-
2059
- export class LoginCredentials {
2060
- type?:string|null;
2061
- username?:string|null;
2062
- token?:string|null;
2063
-
2064
- constructor();
2065
- }
2066
-
2067
- /**
2068
- * Options for custom columns.
2069
- */
2070
- export class CustomColumnOptions {
2088
+ formatNumber(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
2071
2089
  /**
2072
- * When specified for custom columns on a rollup table, specifies if the formula apply to rollup or constituent
2073
- * nodes.
2090
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2091
+ * @param expression -
2092
+ * @return {@link dh.CustomColumn}
2074
2093
  */
2075
- rollupNodeType?:RollupNodeTypeType|null;
2076
-
2077
- constructor();
2078
- }
2079
-
2080
- /**
2081
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
2082
- */
2083
- export class BigIntegerWrapper {
2084
- protected constructor();
2085
-
2086
- static ofString(str:string):BigIntegerWrapper;
2087
- asNumber():number;
2088
- valueOf():string;
2094
+ formatDate(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
2089
2095
  toString():string;
2090
- equals(o:object):boolean;
2091
- hashCode():number;
2092
- }
2093
-
2094
- /**
2095
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2096
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2097
- *
2098
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2099
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2100
- * forward data to it.
2101
- *
2102
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2103
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2104
- * viewports to make it less expensive to compute for large tables.
2105
- */
2106
- export class TableSubscription implements HasEventHandling {
2107
- protected constructor();
2108
-
2109
2096
  /**
2110
- * Updates the subscription to use the given columns and update interval.
2111
- * @param columns - the new columns to subscribe to
2112
- * @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
2097
+ * Label for this column.
2098
+ * @return String
2113
2099
  */
2114
- changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
2115
- get columns():Array<Column>;
2100
+ get name():string;
2116
2101
  /**
2117
- * Stops the subscription on the server.
2102
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables - see
2103
+ * {@link Table.uncoalesced}.
2104
+ * @return true if the column is a partition column
2118
2105
  */
2119
- close():void;
2106
+ get isPartitionColumn():boolean;
2120
2107
  /**
2121
- * Listen for events on this object.
2122
- * @param name - the name of the event to listen for
2123
- * @param callback - a function to call when the event occurs
2124
- * @return Returns a cleanup function.
2125
- * @typeParam T - the type of the data that the event will provide
2108
+ *
2109
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
2110
+ * @return int
2126
2111
  */
2127
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2128
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2129
- hasListeners(name:string):boolean;
2112
+ get index():number;
2113
+ get isSortable():boolean;
2130
2114
  /**
2131
- * Removes an event listener added to this table.
2115
+ * Type of the row data that can be found in this column.
2116
+ * @return String
2117
+ */
2118
+ get type():string;
2119
+ /**
2120
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
2121
+ * table using <b>applyCustomColumns</b> with the parameters specified.
2122
+ * @param expression -
2123
+ * @param options -
2124
+ * @return {@link dh.CustomColumn}
2125
+ */
2126
+ static formatRowColor(expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
2127
+ /**
2128
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
2132
2129
  * @param name -
2133
- * @param callback -
2134
- * @return
2135
- * @typeParam T -
2130
+ * @param expression -
2131
+ * @param options -
2132
+ * @return {@link dh.CustomColumn}
2136
2133
  */
2137
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2134
+ static createCustomColumn(name:string, expression:string, options?:CustomColumnOptions|undefined|null):CustomColumn;
2138
2135
  }
2139
2136
 
2140
2137
  export class IdeSession implements HasEventHandling {
@@ -2145,9 +2142,10 @@ export namespace dh {
2145
2142
 
2146
2143
  /**
2147
2144
  * Load the named table, with columns and size information already fully populated.
2148
- * @param name -
2149
- * @param applyPreviewColumns - optional boolean
2150
- * @return {@link Promise} of {@link dh.Table}
2145
+ * @param name - the name of the table to fetch
2146
+ * @param applyPreviewColumns - false to disable previews, defaults to true
2147
+ * @return a {@link Promise} that will resolve to the table, or reject with an error if it cannot be loaded.
2148
+ * @deprecated Added to resolve a specific issue, in the future preview will be applied as part of the subscription.
2151
2149
  */
2152
2150
  getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2153
2151
  /**
@@ -2235,370 +2233,148 @@ export namespace dh {
2235
2233
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2236
2234
  }
2237
2235
 
2236
+ export class QueryInfo {
2237
+ static readonly EVENT_TABLE_OPENED:string;
2238
+ static readonly EVENT_DISCONNECT:string;
2239
+ static readonly EVENT_RECONNECT:string;
2240
+ static readonly EVENT_CONNECT:string;
2241
+
2242
+ protected constructor();
2243
+ }
2244
+
2238
2245
  /**
2239
- * Deprecated for use in Deephaven Core.
2240
- * @deprecated
2241
- */
2242
- export class Client {
2243
- static readonly EVENT_REQUEST_FAILED:string;
2244
- static readonly EVENT_REQUEST_STARTED:string;
2245
- static readonly EVENT_REQUEST_SUCCEEDED:string;
2246
-
2247
- constructor();
2248
- }
2249
-
2250
- /**
2251
- * Provides access to data in a table. Note that several methods present their response through Promises. This allows
2252
- * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
2253
- * inform the UI right away that they have taken place.
2246
+ * Event fired when a command is issued from the client.
2254
2247
  */
2255
- export class Table implements JoinableTable, HasEventHandling {
2256
- readonly description?:string|null;
2257
- readonly pluginName?:string|null;
2258
- readonly layoutHints?:null|LayoutHints;
2259
- /**
2260
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2261
- */
2262
- static readonly EVENT_SIZECHANGED:string;
2263
- /**
2264
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2265
- */
2266
- static readonly EVENT_UPDATED:string;
2267
- /**
2268
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2269
- */
2270
- static readonly EVENT_ROWADDED:string;
2271
- /**
2272
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2273
- */
2274
- static readonly EVENT_ROWREMOVED:string;
2275
- /**
2276
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2277
- */
2278
- static readonly EVENT_ROWUPDATED:string;
2279
- /**
2280
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2281
- */
2282
- static readonly EVENT_SORTCHANGED:string;
2283
- /**
2284
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2285
- */
2286
- static readonly EVENT_FILTERCHANGED:string;
2287
- /**
2288
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2289
- */
2290
- static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
2291
- /**
2292
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2293
- */
2294
- static readonly EVENT_DISCONNECT:string;
2295
- /**
2296
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2297
- */
2298
- static readonly EVENT_RECONNECT:string;
2299
- /**
2300
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2301
- */
2302
- static readonly EVENT_RECONNECTFAILED:string;
2303
- /**
2304
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2305
- */
2306
- static readonly EVENT_REQUEST_FAILED:string;
2307
- /**
2308
- * The table size has updated, so live scrollbars and the like can be updated accordingly.
2309
- */
2310
- static readonly EVENT_REQUEST_SUCCEEDED:string;
2311
- /**
2312
- * The size the table will have if it is uncoalesced.
2313
- */
2314
- static readonly SIZE_UNCOALESCED:number;
2315
-
2316
- protected constructor();
2317
-
2318
- batch(userCode:(arg0:unknown)=>void):Promise<Table>;
2319
- /**
2320
- * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
2321
- * caching a returned value.
2322
- * @param key -
2323
- * @return {@link dh.Column}
2324
- */
2325
- findColumn(key:string):Column;
2326
- /**
2327
- * Retrieve multiple columns specified by the given names.
2328
- * @param keys -
2329
- * @return {@link dh.Column} array
2330
- */
2331
- findColumns(keys:string[]):Column[];
2332
- isBlinkTable():boolean;
2333
- /**
2334
- * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
2335
- * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
2336
- * @return Promise of dh.InputTable
2337
- */
2338
- inputTable():Promise<InputTable>;
2339
- /**
2340
- * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
2341
- */
2342
- close():void;
2343
- getAttributes():string[];
2344
- /**
2345
- * null if no property exists, a string if it is an easily serializable property, or a ```Promise
2346
- * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
2347
- * @param attributeName -
2348
- * @return Object
2349
- */
2350
- getAttribute(attributeName:string):unknown|undefined|null;
2351
- /**
2352
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
2353
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
2354
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
2355
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
2356
- * not.
2357
- * @param sort -
2358
- * @return {@link dh.Sort} array
2359
- */
2360
- applySort(sort:Sort[]):Array<Sort>;
2361
- /**
2362
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
2363
- * will immediately return the new value, but you may receive update events using the old filter before the new one
2364
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
2365
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
2366
- * will not.
2367
- * @param filter -
2368
- * @return {@link dh.FilterCondition} array
2369
- */
2370
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
2371
- /**
2372
- * used when adding new filter and sort operations to the table, as long as they are present.
2373
- * @param customColumns -
2374
- * @return {@link dh.CustomColumn} array
2375
- */
2376
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
2377
- /**
2378
- * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
2379
- * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
2380
- * will result in events to be fired once data becomes available, starting with an `updated` event and a
2381
- * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
2382
- * needed.
2383
- * @param firstRow -
2384
- * @param lastRow -
2385
- * @param columns -
2386
- * @param updateIntervalMs -
2387
- * @return {@link dh.TableViewportSubscription}
2388
- */
2389
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null, isReverseViewport?:boolean|undefined|null):TableViewportSubscription;
2390
- /**
2391
- * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
2392
- * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
2393
- * separate the lifespan of this promise from the table itself, call
2394
- * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
2395
- * @return Promise of {@link dh.TableData}
2396
- */
2397
- getViewportData():Promise<ViewportData>;
2398
- /**
2399
- * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
2400
- * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
2401
- * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
2402
- * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
2403
- * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
2404
- * called on it to stop it, and all events are fired from the TableSubscription instance.
2405
- * @param columns -
2406
- * @param updateIntervalMs -
2407
- * @return {@link dh.TableSubscription}
2408
- */
2409
- subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
2410
- /**
2411
- * a new table containing the distinct tuples of values from the given columns that are present in the original
2412
- * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
2413
- * order of appearance of values from the original table.
2414
- * @param columns -
2415
- * @return Promise of dh.Table
2416
- */
2417
- selectDistinct(columns:Column[]):Promise<Table>;
2418
- /**
2419
- * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
2420
- * @return Promise of dh.Table
2421
- */
2422
- copy():Promise<Table>;
2423
- /**
2424
- * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
2425
- * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
2426
- * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
2427
- * called on it when not in use.
2428
- * @param config -
2429
- * @return Promise of dh.TotalsTable
2430
- */
2431
- getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2432
- /**
2433
- * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
2434
- * above for more specifics.
2435
- * @param config -
2436
- * @return promise of dh.TotalsTable
2437
- */
2438
- getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
2439
- /**
2440
- * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
2441
- * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
2442
- * @param configObject -
2443
- * @return Promise of dh.TreeTable
2444
- */
2445
- rollup(configObject:RollupConfig):Promise<TreeTable>;
2446
- /**
2447
- * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
2448
- * new `TreeTable` which must have close() called on it when not in use.
2449
- * @param configObject -
2450
- * @return Promise dh.TreeTable
2451
- */
2452
- treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
2453
- /**
2454
- * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
2455
- * table will not update. This does not change the original table, and the new table will not have any of the client
2456
- * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
2457
- * @return Promise of dh.Table
2458
- */
2459
- freeze():Promise<Table>;
2460
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
2461
- /**
2462
- *
2463
- * @inheritDoc
2464
- * @deprecated
2465
- */
2466
- join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
2467
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
2468
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
2469
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2470
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
2471
- byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2472
- /**
2473
- * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
2474
- * keys.
2475
- * @param keys -
2476
- * @param dropKeys -
2477
- * @return Promise dh.PartitionedTable
2478
- */
2479
- partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
2480
- /**
2481
- * a promise that will resolve to ColumnStatistics for the column of this table.
2482
- * @param column -
2483
- * @return Promise of dh.ColumnStatistics
2484
- */
2485
- getColumnStatistics(column:Column):Promise<ColumnStatistics>;
2486
- /**
2487
- * Seek the row matching the data provided
2488
- * @param startingRow - Row to start the seek from
2489
- * @param column - Column to seek for value on
2490
- * @param valueType - Type of value provided
2491
- * @param seekValue - Value to seek
2492
- * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
2493
- * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
2494
- * `false`.
2495
- * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
2496
- * @return A promise that resolves to the row value found.
2497
- */
2498
- seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
2499
- toString():string;
2500
- /**
2501
- * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
2502
- * .inputTable() to add or remove data from the underlying table.
2503
- * @return boolean
2504
- */
2505
- get hasInputTable():boolean;
2506
- /**
2507
- * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
2508
- * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
2509
- * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
2510
- * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
2511
- * @return {@link dh.Column} array
2512
- */
2513
- get columns():Array<Column>;
2514
- /**
2515
- * The default configuration to be used when building a <b>TotalsTable</b> for this table.
2516
- * @return dh.TotalsTableConfig
2517
- */
2518
- get totalsTableConfig():TotalsTableConfig;
2519
- /**
2520
- * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
2521
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
2522
- * for the <b>sortchanged</b> event to know when to update the UI.
2523
- * @return {@link dh.Sort} array
2524
- */
2525
- get sort():Array<Sort>;
2248
+ export class CommandInfo {
2249
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
2250
+
2251
+ get result():Promise<dh.ide.CommandResult>;
2252
+ get code():string;
2253
+ }
2254
+
2255
+ /**
2256
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
2257
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
2258
+ * instance.
2259
+ */
2260
+ export class FilterCondition {
2261
+ protected constructor();
2262
+
2526
2263
  /**
2527
- * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
2528
- * ones. To update, call <b>applyCustomColumns()</b>.
2529
- * @return {@link dh.CustomColumn} array
2264
+ * the opposite of this condition
2265
+ * @return FilterCondition
2530
2266
  */
2531
- get customColumns():Array<CustomColumn>;
2267
+ not():FilterCondition;
2532
2268
  /**
2533
- * True if this table may receive updates from the server, including size changed events, updated events after
2534
- * initial snapshot.
2535
- * @return boolean
2269
+ * a condition representing the current condition logically ANDed with the other parameters
2270
+ * @param filters -
2271
+ * @return FilterCondition
2536
2272
  */
2537
- get isRefreshing():boolean;
2273
+ and(...filters:FilterCondition[]):FilterCondition;
2538
2274
  /**
2539
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
2540
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
2541
- * for the <b>filterchanged</b> event to know when to update the UI.
2542
- * @return {@link dh.FilterCondition} array
2275
+ * a condition representing the current condition logically ORed with the other parameters
2276
+ * @param filters -
2277
+ * @return FilterCondition.
2543
2278
  */
2544
- get filter():Array<FilterCondition>;
2279
+ or(...filters:FilterCondition[]):FilterCondition;
2545
2280
  /**
2546
- * The total count of the rows in the table, excluding any filters. Unlike {@link Table.size}, changes to this value
2547
- * will not result in any event. If the table is unfiltered, this will return the same size as {@link Table.size}.
2548
- * If this table was uncoalesced before it was filtered, this will return {@link dh.Table.SIZE_UNCOALESCED}.
2549
- * @return the size of the table before filters, or {@link dh.Table.SIZE_UNCOALESCED}
2281
+ * a string suitable for debugging showing the details of this condition.
2282
+ * @return String.
2550
2283
  */
2551
- get totalSize():number;
2284
+ toString():string;
2285
+ get columns():Array<Column>;
2552
2286
  /**
2553
- * The total count of rows in the table. If there is a viewport subscription active, this size will be updated when
2554
- * the subscription updates. If not, and {@link Table.uncoalesced} is true, the size will be
2555
- * {@link dh.Table.SIZE_UNCOALESCED}. Otherwise, the size will be updated when the server's update graph processes changes.
2287
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
2288
+ * functions:
2289
+ * <ul>
2290
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
2291
+ * than the third</li>
2292
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
2293
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
2294
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
2295
+ * "not a number"</i></li>
2296
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
2297
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
2298
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
2299
+ * expression</li>
2300
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
2301
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
2556
2302
  * <p>
2557
- * When the size changes, the {@link dh.Table.EVENT_SIZECHANGED} event will be fired.
2558
- * @return the size of the table, or {@link dh.Table.SIZE_UNCOALESCED} if there is no subscription and the table is
2559
- * uncoalesced.
2560
- */
2561
- get size():number;
2562
- /**
2563
- * True if this table has been closed.
2564
- * @return boolean
2303
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
2304
+ * method should be used in other cases
2305
+ * </p>
2306
+ * </li>
2307
+ * </ul>
2308
+ * @param function -
2309
+ * @param args -
2310
+ * @return dh.FilterCondition
2565
2311
  */
2566
- get isClosed():boolean;
2312
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
2567
2313
  /**
2568
- * Read-only. True if this table is uncoalesced, indicating that work must be done before the table can be used.
2569
- * <p>
2570
- * Uncoalesced tables are expensive to operate on - filter to a single partition or range of partitions before
2571
- * subscribing to access only the desired data efficiently. A subscription can be specified without a filter, but
2572
- * this can be very expensive. To see which partitions are available, check each column on the table to see which
2573
- * have {@link Column.isPartitionColumn} as `true`, and filter those columns. To read the possible values
2574
- * for those columns, use {@link Table.selectDistinct}.
2575
- * @return True if the table is uncoaleced and should be filtered before operating on it, otherwise false.
2314
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
2315
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
2316
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
2317
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
2318
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
2319
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
2320
+ * {@link dh.Column.filter}).
2321
+ * @param value -
2322
+ * @param columns -
2323
+ * @return dh.FilterCondition
2576
2324
  */
2577
- get isUncoalesced():boolean;
2325
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
2326
+ }
2327
+
2328
+ export class CoreClient implements HasEventHandling {
2329
+ static readonly EVENT_CONNECT:string;
2330
+ static readonly EVENT_DISCONNECT:string;
2331
+ static readonly EVENT_RECONNECT:string;
2332
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
2333
+ static readonly EVENT_REQUEST_FAILED:string;
2334
+ static readonly EVENT_REQUEST_STARTED:string;
2335
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
2578
2336
  /**
2579
- * Listen for events on this object.
2580
- * @param name - the name of the event to listen for
2581
- * @param callback - a function to call when the event occurs
2582
- * @return Returns a cleanup function.
2583
- * @typeParam T - the type of the data that the event will provide
2337
+ * @deprecated
2584
2338
  */
2339
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
2340
+ static readonly LOGIN_TYPE_PASSWORD:string;
2341
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
2342
+
2343
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
2344
+
2345
+ running():Promise<CoreClient>;
2346
+ getServerUrl():string;
2347
+ getAuthConfigValues():Promise<string[][]>;
2348
+ login(credentials:LoginCredentials):Promise<void>;
2349
+ relogin(token:RefreshToken):Promise<void>;
2350
+ onConnected(timeoutInMillis?:number):Promise<void>;
2351
+ getServerConfigValues():Promise<string[][]>;
2352
+ getStorageService():dh.storage.StorageService;
2353
+ getAsIdeConnection():Promise<IdeConnection>;
2354
+ disconnect():void;
2585
2355
  addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2586
2356
  nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2587
2357
  hasListeners(name:string):boolean;
2588
- /**
2589
- * Removes an event listener added to this table.
2590
- * @param name -
2591
- * @param callback -
2592
- * @return
2593
- * @typeParam T -
2594
- */
2595
2358
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2596
- /**
2597
- * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
2598
- * do not support reverse.
2599
- * @return {@link dh.Sort}
2600
- */
2601
- static reverse():Sort;
2359
+ }
2360
+
2361
+ export class DateWrapper extends LongWrapper {
2362
+ protected constructor();
2363
+
2364
+ static ofJsDate(date:Date):DateWrapper;
2365
+ asDate():Date;
2366
+ }
2367
+
2368
+ /**
2369
+ * Deprecated for use in Deephaven Core.
2370
+ * @deprecated
2371
+ */
2372
+ export class Client {
2373
+ static readonly EVENT_REQUEST_FAILED:string;
2374
+ static readonly EVENT_REQUEST_STARTED:string;
2375
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
2376
+
2377
+ constructor();
2602
2378
  }
2603
2379
 
2604
2380
  /**
@@ -2663,18 +2439,138 @@ export namespace dh {
2663
2439
  * The count of known keys.
2664
2440
  * @return int
2665
2441
  */
2666
- get size():number;
2442
+ get size():number;
2443
+ /**
2444
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2445
+ * non-key columns.
2446
+ * @return Array of Column
2447
+ */
2448
+ get columns():Column[];
2449
+ /**
2450
+ * An array of all the key columns that the tables are partitioned by.
2451
+ * @return Array of Column
2452
+ */
2453
+ get keyColumns():Column[];
2454
+ /**
2455
+ * Listen for events on this object.
2456
+ * @param name - the name of the event to listen for
2457
+ * @param callback - a function to call when the event occurs
2458
+ * @return Returns a cleanup function.
2459
+ * @typeParam T - the type of the data that the event will provide
2460
+ */
2461
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
2462
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<Event<T>>;
2463
+ hasListeners(name:string):boolean;
2464
+ /**
2465
+ * Removes an event listener added to this table.
2466
+ * @param name -
2467
+ * @param callback -
2468
+ * @return
2469
+ * @typeParam T -
2470
+ */
2471
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
2472
+ }
2473
+
2474
+ /**
2475
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
2476
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
2477
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
2478
+ */
2479
+ export class RangeSet {
2480
+ protected constructor();
2481
+
2482
+ static ofRange(first:number, last:number):RangeSet;
2483
+ static ofItems(rows:number[]):RangeSet;
2484
+ static ofRanges(ranges:RangeSet[]):RangeSet;
2485
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
2486
+ /**
2487
+ * a new iterator over all indexes in this collection.
2488
+ * @return Iterator of {@link dh.LongWrapper}
2489
+ */
2490
+ iterator():Iterator<LongWrapper>;
2491
+ /**
2492
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
2493
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
2494
+ * property each time through a loop).
2495
+ * @return double
2496
+ */
2497
+ get size():number;
2498
+ }
2499
+
2500
+ export class CustomColumn {
2501
+ static readonly TYPE_FORMAT_COLOR:string;
2502
+ static readonly TYPE_FORMAT_NUMBER:string;
2503
+ static readonly TYPE_FORMAT_DATE:string;
2504
+ static readonly TYPE_NEW:string;
2505
+
2506
+ protected constructor();
2507
+
2508
+ valueOf():string;
2509
+ toString():string;
2510
+ static from(columnInfo:string):CustomColumn;
2511
+ /**
2512
+ * The expression to evaluate this custom column.
2513
+ * @return String
2514
+ */
2515
+ get expression():string;
2516
+ /**
2517
+ * The name of the column to use.
2518
+ * @return String
2519
+ */
2520
+ get name():string;
2521
+ /**
2522
+ * The options for this custom column.
2523
+ * @return CustomColumOptions
2524
+ */
2525
+ get options():CustomColumnOptions;
2526
+ /**
2527
+ * Type of custom column. One of
2528
+ *
2529
+ * <ul>
2530
+ * <li>FORMAT_COLOR</li>
2531
+ * <li>FORMAT_NUMBER</li>
2532
+ * <li>FORMAT_DATE</li>
2533
+ * <li>NEW</li>
2534
+ * </ul>
2535
+ * @return String
2536
+ */
2537
+ get type():string;
2538
+ }
2539
+
2540
+ export class LoginCredentials {
2541
+ type?:string|null;
2542
+ username?:string|null;
2543
+ token?:string|null;
2544
+
2545
+ constructor();
2546
+ }
2547
+
2548
+ /**
2549
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2550
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2551
+ *
2552
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2553
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2554
+ * forward data to it.
2555
+ *
2556
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2557
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2558
+ * viewports to make it less expensive to compute for large tables.
2559
+ */
2560
+ export class TableSubscription implements HasEventHandling {
2561
+ protected constructor();
2562
+
2667
2563
  /**
2668
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
2669
- * non-key columns.
2670
- * @return Array of Column
2564
+ * Updates the subscription to use the given columns and update interval.
2565
+ * @param columns - the new columns to subscribe to
2566
+ * @param updateIntervalMs - the new update interval, or null/omit to use the default of one second
2671
2567
  */
2672
- get columns():Column[];
2568
+ changeSubscription(columns:Array<Column>, updateIntervalMs:number|undefined|null):void;
2569
+ get columns():Array<Column>;
2673
2570
  /**
2674
- * An array of all the key columns that the tables are partitioned by.
2675
- * @return Array of Column
2571
+ * Stops the subscription on the server.
2676
2572
  */
2677
- get keyColumns():Column[];
2573
+ close():void;
2678
2574
  /**
2679
2575
  * Listen for events on this object.
2680
2576
  * @param name - the name of the event to listen for
@@ -2696,6 +2592,29 @@ export namespace dh {
2696
2592
  }
2697
2593
 
2698
2594
 
2595
+ type SearchDisplayModeType = string;
2596
+ export class SearchDisplayMode {
2597
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2598
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2599
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2600
+ }
2601
+
2602
+ /**
2603
+ * A set of string constants that can be used to describe the different objects the JS API can export.
2604
+ */
2605
+ type VariableTypeType = string;
2606
+ export class VariableType {
2607
+ static readonly TABLE:VariableTypeType;
2608
+ static readonly TREETABLE:VariableTypeType;
2609
+ static readonly HIERARCHICALTABLE:VariableTypeType;
2610
+ static readonly TABLEMAP:VariableTypeType;
2611
+ static readonly PARTITIONEDTABLE:VariableTypeType;
2612
+ static readonly FIGURE:VariableTypeType;
2613
+ static readonly OTHERWIDGET:VariableTypeType;
2614
+ static readonly PANDAS:VariableTypeType;
2615
+ static readonly TREEMAP:VariableTypeType;
2616
+ }
2617
+
2699
2618
  /**
2700
2619
  * This enum describes the name of each supported operation/aggregation type when creating a `TreeTable`.
2701
2620
  */
@@ -2718,15 +2637,6 @@ export namespace dh {
2718
2637
  static readonly SKIP:AggregationOperationType;
2719
2638
  }
2720
2639
 
2721
- /**
2722
- * Describes the type of node in a rollup table.
2723
- */
2724
- type RollupNodeTypeType = string;
2725
- export class RollupNodeType {
2726
- static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
2727
- static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
2728
- }
2729
-
2730
2640
  type ValueTypeType = string;
2731
2641
  export class ValueType {
2732
2642
  static readonly STRING:ValueTypeType;
@@ -2737,106 +2647,242 @@ export namespace dh {
2737
2647
  static readonly BOOLEAN:ValueTypeType;
2738
2648
  }
2739
2649
 
2740
- type SearchDisplayModeType = string;
2741
- export class SearchDisplayMode {
2742
- static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2743
- static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2744
- static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2745
- }
2746
-
2747
2650
  /**
2748
- * A set of string constants that can be used to describe the different objects the JS API can export.
2651
+ * Describes the type of node in a rollup table.
2749
2652
  */
2750
- type VariableTypeType = string;
2751
- export class VariableType {
2752
- static readonly TABLE:VariableTypeType;
2753
- static readonly TREETABLE:VariableTypeType;
2754
- static readonly HIERARCHICALTABLE:VariableTypeType;
2755
- static readonly TABLEMAP:VariableTypeType;
2756
- static readonly PARTITIONEDTABLE:VariableTypeType;
2757
- static readonly FIGURE:VariableTypeType;
2758
- static readonly OTHERWIDGET:VariableTypeType;
2759
- static readonly PANDAS:VariableTypeType;
2760
- static readonly TREEMAP:VariableTypeType;
2653
+ type RollupNodeTypeType = string;
2654
+ export class RollupNodeType {
2655
+ static readonly ROLLUP_NODE_TYPE_AGGREGATED:RollupNodeTypeType;
2656
+ static readonly ROLLUP_NODE_TYPE_CONSTITUENT:RollupNodeTypeType;
2761
2657
  }
2762
2658
 
2763
2659
  }
2764
2660
 
2765
- export namespace dh.grpc {
2661
+ export namespace dh.ide {
2766
2662
 
2767
2663
  /**
2768
- * Factory for creating gRPC transports.
2664
+ * A format to describe a variable available to be read from the server. Application fields are optional, and only
2665
+ * populated when a variable is provided by application mode.
2666
+ * <p>
2667
+ * APIs which take a VariableDefinition must at least be provided an object with a <b>type</b> and <b>id</b> field.
2769
2668
  */
2770
- export interface GrpcTransportFactory {
2669
+ export interface VariableDefinition {
2670
+ get name():string;
2771
2671
  /**
2772
- * Create a new transport instance.
2773
- * @param options - options for creating the transport
2774
- * @return a transport instance to use for gRPC communication
2672
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2673
+ * reasonable to put in the title
2674
+ * @return String
2775
2675
  */
2776
- create(options:GrpcTransportOptions):GrpcTransport;
2676
+ get description():string;
2777
2677
  /**
2778
- * Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it
2779
- * more than once before {@link GrpcTransport.finishSend} should be called.
2780
- * @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
2781
- * Open/Next gRPC calls should be used
2678
+ * An opaque identifier for this variable
2679
+ * @return String
2782
2680
  */
2783
- get supportsClientStreaming():boolean;
2681
+ get id():string;
2682
+ /**
2683
+ * The type of the variable, one of <b>dh.VariableType</b>
2684
+ * @return dh.VariableType.
2685
+ */
2686
+ get type():dh.VariableTypeType;
2687
+ /**
2688
+ * The name of the variable, to be used when rendering it to a user
2689
+ * @return String
2690
+ */
2691
+ get title():string;
2692
+ /**
2693
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2694
+ * reasonable to put in the title
2695
+ * @return String
2696
+ */
2697
+ get applicationId():string;
2698
+ /**
2699
+ * The name of the application which provided this variable
2700
+ * @return String
2701
+ */
2702
+ get applicationName():string;
2784
2703
  }
2785
2704
  /**
2786
- * gRPC transport implementation.
2705
+ * Describes changes in the current set of variables in the script session. Note that variables that changed value
2706
+ * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2707
+ * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2708
+ * new types.
2787
2709
  */
2788
- export interface GrpcTransport {
2710
+ export interface VariableChanges {
2789
2711
  /**
2790
- * Starts the stream, sending metadata to the server.
2791
- * @param metadata - the headers to send the server when opening the connection
2712
+ *
2713
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2714
+ * different type.
2792
2715
  */
2793
- start(metadata:{ [key: string]: string|Array<string>; }):void;
2716
+ get removed():Array<VariableDefinition>;
2794
2717
  /**
2795
- * Sends a message to the server.
2796
- * @param msgBytes - bytes to send to the server
2718
+ *
2719
+ * @return The variables that were created by this operation, or have a new type.
2797
2720
  */
2798
- sendMessage(msgBytes:Uint8Array):void;
2721
+ get created():Array<VariableDefinition>;
2799
2722
  /**
2800
- * "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
2801
- * open to receiving messages.
2723
+ *
2724
+ * @return The variables that changed value during this operation.
2802
2725
  */
2803
- finishSend():void;
2726
+ get updated():Array<VariableDefinition>;
2727
+ }
2728
+ /**
2729
+ * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2730
+ * server.
2731
+ */
2732
+ export interface LogItem {
2804
2733
  /**
2805
- * End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
2806
- * client from receiving any more events.
2734
+ * The level of the log message, enabling the client to ignore messages.
2735
+ * @return String
2807
2736
  */
2808
- cancel():void;
2737
+ get logLevel():string;
2738
+ /**
2739
+ * Timestamp of the message in microseconds since Jan 1, 1970 UTC.
2740
+ * @return double
2741
+ */
2742
+ get micros():number;
2743
+ /**
2744
+ * The log message written on the server.
2745
+ * @return String
2746
+ */
2747
+ get message():string;
2809
2748
  }
2810
2749
  /**
2811
- * Options for creating a gRPC stream transport instance.
2750
+ * Indicates the result of code run on the server.
2751
+ */
2752
+ export interface CommandResult {
2753
+ /**
2754
+ * Describes changes made in the course of this command.
2755
+ * @return {@link dh.ide.VariableChanges}.
2756
+ */
2757
+ get changes():VariableChanges;
2758
+ /**
2759
+ * If the command failed, the error message will be provided here.
2760
+ * @return String
2761
+ */
2762
+ get error():string;
2763
+ }
2764
+ /**
2765
+ * Specifies a type and either id or name (but not both).
2766
+ */
2767
+ export interface VariableDescriptor {
2768
+ type:string;
2769
+ id?:string|null;
2770
+ name?:string|null;
2771
+ }
2772
+ }
2773
+
2774
+ export namespace dh.i18n {
2775
+
2776
+ /**
2777
+ * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2778
+ * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
2779
+ * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
2780
+ * instance.
2781
+ *
2782
+ *
2783
+ * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
2784
+ * return the same details:
2785
+ *
2786
+ * <ul>
2787
+ * <li>GMT/UTC</li>
2788
+ * <li>Asia/Tokyo</li>
2789
+ * <li>Asia/Seoul</li>
2790
+ * <li>Asia/Hong_Kong</li>
2791
+ * <li>Asia/Singapore</li>
2792
+ * <li>Asia/Calcutta/Asia/Kolkata</li>
2793
+ * <li>Europe/Berlin</li>
2794
+ * <li>Europe/London</li>
2795
+ * <li>America/Sao_Paulo</li>
2796
+ * <li>America/St_Johns</li>
2797
+ * <li>America/Halifax</li>
2798
+ * <li>America/New_York</li>
2799
+ * <li>America/Chicago</li>
2800
+ * <li>America/Denver</li>
2801
+ * <li>America/Los_Angeles</li>
2802
+ * <li>America/Anchorage</li>
2803
+ * <li>Pacific/Honolulu</li>
2804
+ * </ul>
2805
+ *
2806
+ * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
2807
+ *
2808
+ * <ul>
2809
+ * <li>UTC</li>
2810
+ * <li>GMT</li>
2811
+ * <li>Z</li>
2812
+ * <li>NY</li>
2813
+ * <li>ET</li>
2814
+ * <li>EST</li>
2815
+ * <li>EDT</li>
2816
+ * <li>MN</li>
2817
+ * <li>CT</li>
2818
+ * <li>CST</li>
2819
+ * <li>CDT</li>
2820
+ * <li>MT</li>
2821
+ * <li>MST</li>
2822
+ * <li>MDT</li>
2823
+ * <li>PT</li>
2824
+ * <li>PST</li>
2825
+ * <li>PDT</li>
2826
+ * <li>HI</li>
2827
+ * <li>HST</li>
2828
+ * <li>HDT</li>
2829
+ * <li>BT</li>
2830
+ * <li>BRST</li>
2831
+ * <li>BRT</li>
2832
+ * <li>KR</li>
2833
+ * <li>KST</li>
2834
+ * <li>HK</li>
2835
+ * <li>HKT</li>
2836
+ * <li>JP</li>
2837
+ * <li>JST</li>
2838
+ * <li>AT</li>
2839
+ * <li>AST</li>
2840
+ * <li>ADT</li>
2841
+ * <li>NF</li>
2842
+ * <li>NST</li>
2843
+ * <li>NDT</li>
2844
+ * <li>AL</li>
2845
+ * <li>AKST</li>
2846
+ * <li>AKDT</li>
2847
+ * <li>IN</li>
2848
+ * <li>IST</li>
2849
+ * <li>CE</li>
2850
+ * <li>CET</li>
2851
+ * <li>CEST</li>
2852
+ * <li>SG</li>
2853
+ * <li>SGT</li>
2854
+ * <li>LON</li>
2855
+ * <li>BST</li>
2856
+ * <li>MOS</li>
2857
+ * <li>SHG</li>
2858
+ * <li>CH</li>
2859
+ * <li>NL</li>
2860
+ * <li>TW</li>
2861
+ * <li>SYD</li>
2862
+ * <li>AEST</li>
2863
+ * <li>AEDT</li>
2864
+ * </ul>
2812
2865
  */
2813
- export interface GrpcTransportOptions {
2814
- /**
2815
- * The gRPC method URL.
2816
- */
2817
- url:URL;
2818
- /**
2819
- * True to enable debug logging for this stream.
2820
- */
2821
- debug:boolean;
2866
+ export class TimeZone {
2867
+ protected constructor();
2868
+
2822
2869
  /**
2823
- * Callback for when headers and status are received. The headers are a map of header names to values, and the
2824
- * status is the HTTP status code. If the connection could not be made, the status should be 0.
2870
+ * Factory method which creates timezone instances from one of the supported keys.
2871
+ * @param tzCode -
2872
+ * @return dh.i18n.TimeZone
2825
2873
  */
2826
- onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
2874
+ static getTimeZone(tzCode:string):TimeZone;
2827
2875
  /**
2828
- * Callback for when a chunk of data is received.
2876
+ * the standard offset of this timezone, in minutes
2877
+ * @return int
2829
2878
  */
2830
- onChunk:(chunk:Uint8Array)=>void;
2879
+ get standardOffset():number;
2831
2880
  /**
2832
- * Callback for when the stream ends, with an error instance if it can be provided. Note that the present
2833
- * implementation does not consume errors, even if provided.
2881
+ * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
2882
+ * @return String
2834
2883
  */
2835
- onEnd:(error?:Error|undefined|null)=>void;
2884
+ get id():string;
2836
2885
  }
2837
- }
2838
-
2839
- export namespace dh.i18n {
2840
2886
 
2841
2887
  /**
2842
2888
  * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
@@ -2990,164 +3036,107 @@ export namespace dh.i18n {
2990
3036
  }
2991
3037
 
2992
3038
 
3039
+ }
3040
+
3041
+ export namespace dh.grpc {
3042
+
2993
3043
  /**
2994
- * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
2995
- * throughout the year (potentially changing each year). These instances mostly are useful at this time to pass to the
2996
- * <b>DateTimeFormat.format()</b> methods, though also support a few properties at this time to see details about each
2997
- * instance.
2998
- *
2999
- *
3000
- * The following timezone codes are supported when getting a timezone object - instances appearing in the same line will
3001
- * return the same details:
3002
- *
3003
- * <ul>
3004
- * <li>GMT/UTC</li>
3005
- * <li>Asia/Tokyo</li>
3006
- * <li>Asia/Seoul</li>
3007
- * <li>Asia/Hong_Kong</li>
3008
- * <li>Asia/Singapore</li>
3009
- * <li>Asia/Calcutta/Asia/Kolkata</li>
3010
- * <li>Europe/Berlin</li>
3011
- * <li>Europe/London</li>
3012
- * <li>America/Sao_Paulo</li>
3013
- * <li>America/St_Johns</li>
3014
- * <li>America/Halifax</li>
3015
- * <li>America/New_York</li>
3016
- * <li>America/Chicago</li>
3017
- * <li>America/Denver</li>
3018
- * <li>America/Los_Angeles</li>
3019
- * <li>America/Anchorage</li>
3020
- * <li>Pacific/Honolulu</li>
3021
- * </ul>
3022
- *
3023
- * A Timezone object can also be created from an abbreviation. The following abbreviations are supported:
3024
- *
3025
- * <ul>
3026
- * <li>UTC</li>
3027
- * <li>GMT</li>
3028
- * <li>Z</li>
3029
- * <li>NY</li>
3030
- * <li>ET</li>
3031
- * <li>EST</li>
3032
- * <li>EDT</li>
3033
- * <li>MN</li>
3034
- * <li>CT</li>
3035
- * <li>CST</li>
3036
- * <li>CDT</li>
3037
- * <li>MT</li>
3038
- * <li>MST</li>
3039
- * <li>MDT</li>
3040
- * <li>PT</li>
3041
- * <li>PST</li>
3042
- * <li>PDT</li>
3043
- * <li>HI</li>
3044
- * <li>HST</li>
3045
- * <li>HDT</li>
3046
- * <li>BT</li>
3047
- * <li>BRST</li>
3048
- * <li>BRT</li>
3049
- * <li>KR</li>
3050
- * <li>KST</li>
3051
- * <li>HK</li>
3052
- * <li>HKT</li>
3053
- * <li>JP</li>
3054
- * <li>JST</li>
3055
- * <li>AT</li>
3056
- * <li>AST</li>
3057
- * <li>ADT</li>
3058
- * <li>NF</li>
3059
- * <li>NST</li>
3060
- * <li>NDT</li>
3061
- * <li>AL</li>
3062
- * <li>AKST</li>
3063
- * <li>AKDT</li>
3064
- * <li>IN</li>
3065
- * <li>IST</li>
3066
- * <li>CE</li>
3067
- * <li>CET</li>
3068
- * <li>CEST</li>
3069
- * <li>SG</li>
3070
- * <li>SGT</li>
3071
- * <li>LON</li>
3072
- * <li>BST</li>
3073
- * <li>MOS</li>
3074
- * <li>SHG</li>
3075
- * <li>CH</li>
3076
- * <li>NL</li>
3077
- * <li>TW</li>
3078
- * <li>SYD</li>
3079
- * <li>AEST</li>
3080
- * <li>AEDT</li>
3081
- * </ul>
3044
+ * Options for creating a gRPC stream transport instance.
3082
3045
  */
3083
- export class TimeZone {
3084
- protected constructor();
3085
-
3046
+ export interface GrpcTransportOptions {
3086
3047
  /**
3087
- * Factory method which creates timezone instances from one of the supported keys.
3088
- * @param tzCode -
3089
- * @return dh.i18n.TimeZone
3048
+ * The gRPC method URL.
3090
3049
  */
3091
- static getTimeZone(tzCode:string):TimeZone;
3050
+ url:URL;
3092
3051
  /**
3093
- * the standard offset of this timezone, in minutes
3094
- * @return int
3052
+ * True to enable debug logging for this stream.
3095
3053
  */
3096
- get standardOffset():number;
3054
+ debug:boolean;
3097
3055
  /**
3098
- * the timezone code that represents this `TimeZone`, usually the same key as was use to create this instance
3099
- * @return String
3056
+ * Callback for when headers and status are received. The headers are a map of header names to values, and the
3057
+ * status is the HTTP status code. If the connection could not be made, the status should be 0.
3100
3058
  */
3101
- get id():string;
3059
+ onHeaders:(headers:{ [key: string]: string|Array<string>; },status:number)=>void;
3060
+ /**
3061
+ * Callback for when a chunk of data is received.
3062
+ */
3063
+ onChunk:(chunk:Uint8Array)=>void;
3064
+ /**
3065
+ * Callback for when the stream ends, with an error instance if it can be provided. Note that the present
3066
+ * implementation does not consume errors, even if provided.
3067
+ */
3068
+ onEnd:(error?:Error|undefined|null)=>void;
3069
+ }
3070
+ /**
3071
+ * Factory for creating gRPC transports.
3072
+ */
3073
+ export interface GrpcTransportFactory {
3074
+ /**
3075
+ * Create a new transport instance.
3076
+ * @param options - options for creating the transport
3077
+ * @return a transport instance to use for gRPC communication
3078
+ */
3079
+ create(options:GrpcTransportOptions):GrpcTransport;
3080
+ /**
3081
+ * Return true to signal that created transports may have {@link GrpcTransport.sendMessage} called on it
3082
+ * more than once before {@link GrpcTransport.finishSend} should be called.
3083
+ * @return true to signal that the implementation can stream multiple messages, false otherwise indicating that
3084
+ * Open/Next gRPC calls should be used
3085
+ */
3086
+ get supportsClientStreaming():boolean;
3087
+ }
3088
+ /**
3089
+ * gRPC transport implementation.
3090
+ */
3091
+ export interface GrpcTransport {
3092
+ /**
3093
+ * Starts the stream, sending metadata to the server.
3094
+ * @param metadata - the headers to send the server when opening the connection
3095
+ */
3096
+ start(metadata:{ [key: string]: string|Array<string>; }):void;
3097
+ /**
3098
+ * Sends a message to the server.
3099
+ * @param msgBytes - bytes to send to the server
3100
+ */
3101
+ sendMessage(msgBytes:Uint8Array):void;
3102
+ /**
3103
+ * "Half close" the stream, signaling to the server that no more messages will be sent, but that the client is still
3104
+ * open to receiving messages.
3105
+ */
3106
+ finishSend():void;
3107
+ /**
3108
+ * End the stream, both notifying the server that no more messages will be sent nor received, and preventing the
3109
+ * client from receiving any more events.
3110
+ */
3111
+ cancel():void;
3102
3112
  }
3103
-
3104
3113
  }
3105
3114
 
3106
3115
  export namespace dh.plot {
3107
3116
 
3108
3117
  /**
3109
- * Provides access to the data for displaying in a figure.
3118
+ * Describes how to access and display data required within a series.
3110
3119
  */
3111
- export interface Series {
3112
- readonly isLinesVisible?:boolean|null;
3113
- readonly pointLabelFormat?:string|null;
3114
- readonly yToolTipPattern?:string|null;
3115
- readonly shapeSize?:number|null;
3116
- readonly xToolTipPattern?:string|null;
3117
- readonly isShapesVisible?:boolean|null;
3118
-
3119
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
3120
+ export interface SeriesDataSource {
3120
3121
  /**
3121
- * Disable updates for this Series.
3122
+ * the type of data stored in the underlying table's Column.
3123
+ * @return String
3122
3124
  */
3123
- unsubscribe():void;
3124
- get shape():string;
3125
+ get columnType():string;
3125
3126
  /**
3126
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
3127
- * the axis.
3128
- * @return {@link dh.plot.SeriesDataSource}
3127
+ * the axis that this source should be drawn on.
3128
+ * @return dh.plot.Axis
3129
3129
  */
3130
- get sources():SeriesDataSource[];
3131
- get lineColor():string;
3130
+ get axis():Axis;
3132
3131
  /**
3133
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
3132
+ * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
3134
3133
  * @return int
3135
3134
  */
3136
- get plotStyle():SeriesPlotStyleType;
3137
- get oneClick():OneClick;
3138
- get gradientVisible():boolean;
3139
- get shapeColor():string;
3140
- /**
3141
- * The name for this series.
3142
- * @return String
3143
- */
3144
- get name():string;
3145
- /**
3146
- * indicates that this series belongs to a MultiSeries, null otherwise
3147
- * @return dh.plot.MultiSeries
3148
- */
3149
- get multiSeries():MultiSeries;
3150
- get shapeLabel():string;
3135
+ get type():SourceTypeType;
3136
+ }
3137
+ export interface FigureDataUpdatedEvent {
3138
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
3139
+ get series():Series[];
3151
3140
  }
3152
3141
  /**
3153
3142
  * Describes a template that will be used to make new series instances when a new table added to a plotBy.
@@ -3164,16 +3153,6 @@ export namespace dh.plot {
3164
3153
  */
3165
3154
  get plotStyle():SeriesPlotStyleType;
3166
3155
  }
3167
- export interface OneClick {
3168
- setValueForColumn(columnName:string, value:any):void;
3169
- getValueForColumn(columName:string):any;
3170
- get requireAllFiltersToDisplay():boolean;
3171
- get columns():dh.Column[];
3172
- }
3173
- export interface FigureDataUpdatedEvent {
3174
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
3175
- get series():Series[];
3176
- }
3177
3156
  /**
3178
3157
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
3179
3158
  * may be shared between Series instances.
@@ -3242,116 +3221,105 @@ export namespace dh.plot {
3242
3221
  get formatType():AxisFormatTypeType;
3243
3222
  get minRange():number;
3244
3223
  }
3224
+ export interface OneClick {
3225
+ setValueForColumn(columnName:string, value:any):void;
3226
+ getValueForColumn(columName:string):any;
3227
+ get requireAllFiltersToDisplay():boolean;
3228
+ get columns():dh.Column[];
3229
+ }
3245
3230
  /**
3246
- * Describes how to access and display data required within a series.
3231
+ * Provides access to the data for displaying in a figure.
3247
3232
  */
3248
- export interface SeriesDataSource {
3233
+ export interface Series {
3234
+ readonly isLinesVisible?:boolean|null;
3235
+ readonly pointLabelFormat?:string|null;
3236
+ readonly yToolTipPattern?:string|null;
3237
+ readonly shapeSize?:number|null;
3238
+ readonly xToolTipPattern?:string|null;
3239
+ readonly isShapesVisible?:boolean|null;
3240
+
3241
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
3249
3242
  /**
3250
- * the type of data stored in the underlying table's Column.
3251
- * @return String
3243
+ * Disable updates for this Series.
3252
3244
  */
3253
- get columnType():string;
3245
+ unsubscribe():void;
3246
+ get shape():string;
3254
3247
  /**
3255
- * the axis that this source should be drawn on.
3256
- * @return dh.plot.Axis
3248
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
3249
+ * the axis.
3250
+ * @return {@link dh.plot.SeriesDataSource}
3257
3251
  */
3258
- get axis():Axis;
3252
+ get sources():SeriesDataSource[];
3253
+ get lineColor():string;
3259
3254
  /**
3260
- * the feature of this series represented by this source. See the <b>SourceType</b> enum for more details.
3255
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
3261
3256
  * @return int
3262
3257
  */
3263
- get type():SourceTypeType;
3264
- }
3265
-
3266
- export class SeriesDataSourceException {
3267
- protected constructor();
3268
-
3269
- get source():SeriesDataSource;
3270
- get message():string;
3271
- }
3272
-
3273
- export class FigureSourceException {
3274
- table:dh.Table;
3275
- source:SeriesDataSource;
3276
-
3277
- protected constructor();
3278
- }
3279
-
3280
- export class FigureFetchError {
3281
- error:object;
3282
- errors:Array<string>;
3283
-
3284
- protected constructor();
3258
+ get plotStyle():SeriesPlotStyleType;
3259
+ get oneClick():OneClick;
3260
+ get gradientVisible():boolean;
3261
+ get shapeColor():string;
3262
+ /**
3263
+ * The name for this series.
3264
+ * @return String
3265
+ */
3266
+ get name():string;
3267
+ /**
3268
+ * indicates that this series belongs to a MultiSeries, null otherwise
3269
+ * @return dh.plot.MultiSeries
3270
+ */
3271
+ get multiSeries():MultiSeries;
3272
+ get shapeLabel():string;
3285
3273
  }
3286
3274
 
3287
- export class SourceDescriptor {
3288
- axis:AxisDescriptor;
3289
- table:dh.Table;
3290
- columnName:string;
3291
- type:string;
3275
+ /**
3276
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3277
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3278
+ * keep that cached as well.
3279
+ */
3280
+ export class ChartData {
3281
+ constructor(table:dh.Table);
3292
3282
 
3293
- constructor();
3283
+ update(tableData:dh.SubscriptionTableData):void;
3284
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3285
+ /**
3286
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3287
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3288
+ */
3289
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3294
3290
  }
3295
3291
 
3296
- /**
3297
- * Provide the details for a chart.
3298
- */
3299
- export class Chart implements dh.HasEventHandling {
3292
+ export class DownsampleOptions {
3300
3293
  /**
3301
- * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3294
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3295
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3296
+ * series.subscribe().
3302
3297
  */
3303
- static readonly EVENT_SERIES_ADDED:string;
3298
+ static MAX_SERIES_SIZE:number;
3304
3299
  /**
3305
- * The title of the chart.
3306
- * @return String
3300
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3301
+ * downsampling disabled, the series will not load data.
3307
3302
  */
3308
- readonly title?:string|null;
3309
-
3310
- protected constructor();
3311
-
3312
- addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
3313
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
3314
- hasListeners(name:string):boolean;
3315
- removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3316
- get column():number;
3317
- get showLegend():boolean;
3303
+ static MAX_SUBSCRIPTION_SIZE:number;
3318
3304
  /**
3319
- * The axes used in this chart.
3320
- * @return dh.plot.Axis
3305
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3306
+ * axes are configured.
3321
3307
  */
3322
- get axes():Axis[];
3323
- get is3d():boolean;
3324
- get titleFont():string;
3325
- get colspan():number;
3326
- get titleColor():string;
3327
- get series():Series[];
3328
- get rowspan():number;
3308
+ static readonly DEFAULT:DownsampleOptions;
3329
3309
  /**
3330
- * The type of this chart, see <b>ChartType</b> enum for more details.
3331
- * @return int
3310
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3311
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3332
3312
  */
3333
- get chartType():ChartTypeType;
3334
- get row():number;
3335
- get legendColor():string;
3336
- get legendFont():string;
3337
- get multiSeries():MultiSeries[];
3313
+ static readonly DISABLE:DownsampleOptions;
3314
+
3315
+ protected constructor();
3338
3316
  }
3339
3317
 
3340
- export class SeriesDescriptor {
3341
- plotStyle:string;
3342
- name?:string|null;
3343
- linesVisible?:boolean|null;
3344
- shapesVisible?:boolean|null;
3345
- gradientVisible?:boolean|null;
3346
- lineColor?:string|null;
3347
- pointLabelFormat?:string|null;
3348
- xToolTipPattern?:string|null;
3349
- yToolTipPattern?:string|null;
3350
- shapeLabel?:string|null;
3351
- shapeSize?:number|null;
3352
- shapeColor?:string|null;
3353
- shape?:string|null;
3354
- dataSources:Array<SourceDescriptor>;
3318
+ export class SourceDescriptor {
3319
+ axis:AxisDescriptor;
3320
+ table:dh.Table;
3321
+ columnName:string;
3322
+ type:string;
3355
3323
 
3356
3324
  constructor();
3357
3325
  }
@@ -3373,23 +3341,6 @@ export namespace dh.plot {
3373
3341
  constructor();
3374
3342
  }
3375
3343
 
3376
- /**
3377
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3378
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
3379
- * keep that cached as well.
3380
- */
3381
- export class ChartData {
3382
- constructor(table:dh.Table);
3383
-
3384
- update(tableData:dh.SubscriptionTableData):void;
3385
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3386
- /**
3387
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3388
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3389
- */
3390
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3391
- }
3392
-
3393
3344
  export class AxisDescriptor {
3394
3345
  formatType:string;
3395
3346
  type:string;
@@ -3414,6 +3365,42 @@ export namespace dh.plot {
3414
3365
  constructor();
3415
3366
  }
3416
3367
 
3368
+ export class SeriesDescriptor {
3369
+ plotStyle:string;
3370
+ name?:string|null;
3371
+ linesVisible?:boolean|null;
3372
+ shapesVisible?:boolean|null;
3373
+ gradientVisible?:boolean|null;
3374
+ lineColor?:string|null;
3375
+ pointLabelFormat?:string|null;
3376
+ xToolTipPattern?:string|null;
3377
+ yToolTipPattern?:string|null;
3378
+ shapeLabel?:string|null;
3379
+ shapeSize?:number|null;
3380
+ shapeColor?:string|null;
3381
+ shape?:string|null;
3382
+ dataSources:Array<SourceDescriptor>;
3383
+
3384
+ constructor();
3385
+ }
3386
+
3387
+ export class ChartDescriptor {
3388
+ colspan?:number|null;
3389
+ rowspan?:number|null;
3390
+ series:Array<SeriesDescriptor>;
3391
+ axes:Array<AxisDescriptor>;
3392
+ chartType:string;
3393
+ title?:string|null;
3394
+ titleFont?:string|null;
3395
+ titleColor?:string|null;
3396
+ showLegend?:boolean|null;
3397
+ legendFont?:string|null;
3398
+ legendColor?:string|null;
3399
+ is3d?:boolean|null;
3400
+
3401
+ constructor();
3402
+ }
3403
+
3417
3404
  /**
3418
3405
  * Helper class for plot downsampling methods.
3419
3406
  */
@@ -3433,49 +3420,6 @@ export namespace dh.plot {
3433
3420
  static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3434
3421
  }
3435
3422
 
3436
- export class DownsampleOptions {
3437
- /**
3438
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3439
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3440
- * series.subscribe().
3441
- */
3442
- static MAX_SERIES_SIZE:number;
3443
- /**
3444
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3445
- * downsampling disabled, the series will not load data.
3446
- */
3447
- static MAX_SUBSCRIPTION_SIZE:number;
3448
- /**
3449
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3450
- * axes are configured.
3451
- */
3452
- static readonly DEFAULT:DownsampleOptions;
3453
- /**
3454
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3455
- * the limit of MAX_SUBSCRIPTION_SIZE.
3456
- */
3457
- static readonly DISABLE:DownsampleOptions;
3458
-
3459
- protected constructor();
3460
- }
3461
-
3462
- export class ChartDescriptor {
3463
- colspan?:number|null;
3464
- rowspan?:number|null;
3465
- series:Array<SeriesDescriptor>;
3466
- axes:Array<AxisDescriptor>;
3467
- chartType:string;
3468
- title?:string|null;
3469
- titleFont?:string|null;
3470
- titleColor?:string|null;
3471
- showLegend?:boolean|null;
3472
- legendFont?:string|null;
3473
- legendColor?:string|null;
3474
- is3d?:boolean|null;
3475
-
3476
- constructor();
3477
- }
3478
-
3479
3423
  export class Figure implements dh.HasEventHandling {
3480
3424
  /**
3481
3425
  * The title of the figure.
@@ -3560,38 +3504,72 @@ export namespace dh.plot {
3560
3504
  removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3561
3505
  }
3562
3506
 
3507
+ /**
3508
+ * Provide the details for a chart.
3509
+ */
3510
+ export class Chart implements dh.HasEventHandling {
3511
+ /**
3512
+ * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3513
+ */
3514
+ static readonly EVENT_SERIES_ADDED:string;
3515
+ /**
3516
+ * The title of the chart.
3517
+ * @return String
3518
+ */
3519
+ readonly title?:string|null;
3520
+
3521
+ protected constructor();
3563
3522
 
3564
- type AxisTypeType = number;
3565
- export class AxisType {
3566
- static readonly X:AxisTypeType;
3567
- static readonly Y:AxisTypeType;
3568
- static readonly SHAPE:AxisTypeType;
3569
- static readonly SIZE:AxisTypeType;
3570
- static readonly LABEL:AxisTypeType;
3571
- static readonly COLOR:AxisTypeType;
3523
+ addEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):()=>void;
3524
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<dh.Event<T>>;
3525
+ hasListeners(name:string):boolean;
3526
+ removeEventListener<T>(name:string, callback:(e:dh.Event<T>)=>void):boolean;
3527
+ get column():number;
3528
+ get showLegend():boolean;
3529
+ /**
3530
+ * The axes used in this chart.
3531
+ * @return dh.plot.Axis
3532
+ */
3533
+ get axes():Axis[];
3534
+ get is3d():boolean;
3535
+ get titleFont():string;
3536
+ get colspan():number;
3537
+ get titleColor():string;
3538
+ get series():Series[];
3539
+ get rowspan():number;
3540
+ /**
3541
+ * The type of this chart, see <b>ChartType</b> enum for more details.
3542
+ * @return int
3543
+ */
3544
+ get chartType():ChartTypeType;
3545
+ get row():number;
3546
+ get legendColor():string;
3547
+ get legendFont():string;
3548
+ get multiSeries():MultiSeries[];
3572
3549
  }
3573
3550
 
3574
- type AxisFormatTypeType = number;
3575
- export class AxisFormatType {
3576
- static readonly CATEGORY:AxisFormatTypeType;
3577
- static readonly NUMBER:AxisFormatTypeType;
3551
+ export class SeriesDataSourceException {
3552
+ protected constructor();
3553
+
3554
+ get source():SeriesDataSource;
3555
+ get message():string;
3578
3556
  }
3579
3557
 
3580
- /**
3581
- * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3582
- * those series should be rendered.
3583
- */
3584
- type ChartTypeType = number;
3585
- export class ChartType {
3586
- static readonly XY:ChartTypeType;
3587
- static readonly PIE:ChartTypeType;
3588
- static readonly OHLC:ChartTypeType;
3589
- static readonly CATEGORY:ChartTypeType;
3590
- static readonly XYZ:ChartTypeType;
3591
- static readonly CATEGORY_3D:ChartTypeType;
3592
- static readonly TREEMAP:ChartTypeType;
3558
+ export class FigureFetchError {
3559
+ error:object;
3560
+ errors:Array<string>;
3561
+
3562
+ protected constructor();
3563
+ }
3564
+
3565
+ export class FigureSourceException {
3566
+ table:dh.Table;
3567
+ source:SeriesDataSource;
3568
+
3569
+ protected constructor();
3593
3570
  }
3594
3571
 
3572
+
3595
3573
  type AxisPositionType = number;
3596
3574
  export class AxisPosition {
3597
3575
  static readonly TOP:AxisPositionType;
@@ -3601,6 +3579,12 @@ export namespace dh.plot {
3601
3579
  static readonly NONE:AxisPositionType;
3602
3580
  }
3603
3581
 
3582
+ type AxisFormatTypeType = number;
3583
+ export class AxisFormatType {
3584
+ static readonly CATEGORY:AxisFormatTypeType;
3585
+ static readonly NUMBER:AxisFormatTypeType;
3586
+ }
3587
+
3604
3588
  /**
3605
3589
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3606
3590
  * 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
@@ -3630,6 +3614,31 @@ export namespace dh.plot {
3630
3614
  static readonly HOVER_TEXT:SourceTypeType;
3631
3615
  }
3632
3616
 
3617
+ /**
3618
+ * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3619
+ * those series should be rendered.
3620
+ */
3621
+ type ChartTypeType = number;
3622
+ export class ChartType {
3623
+ static readonly XY:ChartTypeType;
3624
+ static readonly PIE:ChartTypeType;
3625
+ static readonly OHLC:ChartTypeType;
3626
+ static readonly CATEGORY:ChartTypeType;
3627
+ static readonly XYZ:ChartTypeType;
3628
+ static readonly CATEGORY_3D:ChartTypeType;
3629
+ static readonly TREEMAP:ChartTypeType;
3630
+ }
3631
+
3632
+ type AxisTypeType = number;
3633
+ export class AxisType {
3634
+ static readonly X:AxisTypeType;
3635
+ static readonly Y:AxisTypeType;
3636
+ static readonly SHAPE:AxisTypeType;
3637
+ static readonly SIZE:AxisTypeType;
3638
+ static readonly LABEL:AxisTypeType;
3639
+ static readonly COLOR:AxisTypeType;
3640
+ }
3641
+
3633
3642
  type SeriesPlotStyleType = number;
3634
3643
  export class SeriesPlotStyle {
3635
3644
  static readonly BAR:SeriesPlotStyleType;
@@ -3650,19 +3659,18 @@ export namespace dh.plot {
3650
3659
 
3651
3660
  export namespace dh.lsp {
3652
3661
 
3653
- export class Range {
3654
- start:Position;
3655
- end:Position;
3662
+ export class MarkupContent {
3663
+ kind:string;
3664
+ value:string;
3656
3665
 
3657
3666
  constructor();
3658
-
3659
- isInside(innerStart:Position, innerEnd:Position):boolean;
3660
3667
  }
3661
3668
 
3662
- export class TextDocumentContentChangeEvent {
3663
- range:Range;
3664
- rangeLength:number;
3665
- text:string;
3669
+ export class SignatureInformation {
3670
+ label:string;
3671
+ documentation:MarkupContent;
3672
+ parameters:Array<ParameterInformation>;
3673
+ activeParameter:number;
3666
3674
 
3667
3675
  constructor();
3668
3676
  }
@@ -3684,13 +3692,6 @@ export namespace dh.lsp {
3684
3692
  constructor();
3685
3693
  }
3686
3694
 
3687
- export class TextEdit {
3688
- range:Range;
3689
- text:string;
3690
-
3691
- constructor();
3692
- }
3693
-
3694
3695
  export class Position {
3695
3696
  line:number;
3696
3697
  character:number;
@@ -3704,9 +3705,9 @@ export namespace dh.lsp {
3704
3705
  copy():Position;
3705
3706
  }
3706
3707
 
3707
- export class MarkupContent {
3708
- kind:string;
3709
- value:string;
3708
+ export class TextEdit {
3709
+ range:Range;
3710
+ text:string;
3710
3711
 
3711
3712
  constructor();
3712
3713
  }
@@ -3718,6 +3719,15 @@ export namespace dh.lsp {
3718
3719
  constructor();
3719
3720
  }
3720
3721
 
3722
+ export class Range {
3723
+ start:Position;
3724
+ end:Position;
3725
+
3726
+ constructor();
3727
+
3728
+ isInside(innerStart:Position, innerEnd:Position):boolean;
3729
+ }
3730
+
3721
3731
  export class ParameterInformation {
3722
3732
  label:string;
3723
3733
  documentation:MarkupContent;
@@ -3725,11 +3735,10 @@ export namespace dh.lsp {
3725
3735
  constructor();
3726
3736
  }
3727
3737
 
3728
- export class SignatureInformation {
3729
- label:string;
3730
- documentation:MarkupContent;
3731
- parameters:Array<ParameterInformation>;
3732
- activeParameter:number;
3738
+ export class TextDocumentContentChangeEvent {
3739
+ range:Range;
3740
+ rangeLength:number;
3741
+ text:string;
3733
3742
 
3734
3743
  constructor();
3735
3744
  }
@@ -3738,6 +3747,22 @@ export namespace dh.lsp {
3738
3747
 
3739
3748
  export namespace dh.calendar {
3740
3749
 
3750
+ export interface BusinessPeriod {
3751
+ get close():string;
3752
+ get open():string;
3753
+ }
3754
+ export interface Holiday {
3755
+ /**
3756
+ * The date of the Holiday.
3757
+ * @return {@link dh.LocalDateWrapper}
3758
+ */
3759
+ get date():dh.LocalDateWrapper;
3760
+ /**
3761
+ * The business periods that are open on the holiday.
3762
+ * @return dh.calendar.BusinessPeriod
3763
+ */
3764
+ get businessPeriods():Array<BusinessPeriod>;
3765
+ }
3741
3766
  /**
3742
3767
  * Defines a calendar with business hours and holidays.
3743
3768
  */
@@ -3768,22 +3793,6 @@ export namespace dh.calendar {
3768
3793
  */
3769
3794
  get businessPeriods():Array<BusinessPeriod>;
3770
3795
  }
3771
- export interface Holiday {
3772
- /**
3773
- * The date of the Holiday.
3774
- * @return {@link dh.LocalDateWrapper}
3775
- */
3776
- get date():dh.LocalDateWrapper;
3777
- /**
3778
- * The business periods that are open on the holiday.
3779
- * @return dh.calendar.BusinessPeriod
3780
- */
3781
- get businessPeriods():Array<BusinessPeriod>;
3782
- }
3783
- export interface BusinessPeriod {
3784
- get close():string;
3785
- get open():string;
3786
- }
3787
3796
 
3788
3797
  type DayOfWeekType = string;
3789
3798
  export class DayOfWeek {