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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +2077 -2041
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,10 +1,6 @@
1
1
  // Minimum TypeScript Version: 4.3
2
2
  // Generated using com.vertispan.tsdefs.doclet.TsDoclet
3
3
 
4
- export interface IIterableResult<T> {
5
- value:T;
6
- done:boolean;
7
- }
8
4
  /**
9
5
  * This is part of EcmaScript 2015, documented here for completeness. It supports a single method, <b>next()</b>, which
10
6
  * returns an object with a <b>boolean</b> named <b>done</b> (true if there are no more items to return; false
@@ -15,23 +11,12 @@ export interface Iterator<T> {
15
11
  hasNext():boolean;
16
12
  next():IIterableResult<T>;
17
13
  }
14
+ export interface IIterableResult<T> {
15
+ value:T;
16
+ done:boolean;
17
+ }
18
18
  export namespace dh.storage {
19
19
 
20
- /**
21
- * Storage service metadata about files and folders.
22
- */
23
- export class ItemDetails {
24
- protected constructor();
25
-
26
- toString():string;
27
- get filename():string;
28
- get basename():string;
29
- get size():number;
30
- get etag():string;
31
- get type():ItemTypeType;
32
- get dirname():string;
33
- }
34
-
35
20
  /**
36
21
  * Represents a file's contents loaded from the server. If an etag was specified when loading, client should first test
37
22
  * if the etag of this instance matches - if so, the contents will be empty, and the client's existing contents should
@@ -106,6 +91,21 @@ export namespace dh.storage {
106
91
  createDirectory(path:string):Promise<void>;
107
92
  }
108
93
 
94
+ /**
95
+ * Storage service metadata about files and folders.
96
+ */
97
+ export class ItemDetails {
98
+ protected constructor();
99
+
100
+ toString():string;
101
+ get filename():string;
102
+ get basename():string;
103
+ get size():number;
104
+ get etag():string;
105
+ get type():ItemTypeType;
106
+ get dirname():string;
107
+ }
108
+
109
109
 
110
110
  type ItemTypeType = string;
111
111
  export class ItemType {
@@ -117,325 +117,213 @@ export namespace dh.storage {
117
117
 
118
118
  export namespace dh {
119
119
 
120
- export interface ColumnGroup {
121
- get name():string|null;
122
- get children():string[]|null;
123
- get color():string|null;
124
- }
125
- export interface WorkerHeapInfo {
120
+ /**
121
+ * Row implementation that also provides additional read-only properties. represents visible rows in the table,
122
+ * but with additional properties to reflect the tree structure.
123
+ */
124
+ export interface TreeRow extends ViewportRow {
126
125
  /**
127
- * Total heap size available for this worker.
126
+ * True if this node is currently expanded to show its children; false otherwise. Those children will be the
127
+ * rows below this one with a greater depth than this one
128
+ * @return boolean
128
129
  */
129
- get totalHeapSize():number;
130
- get freeMemory():number;
131
- get maximumHeapSize():number;
130
+ get isExpanded():boolean;
131
+ /**
132
+ * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
133
+ * row and its expand/collapse icon
134
+ * @return int
135
+ */
136
+ get depth():number;
137
+ /**
138
+ * True if this node has children and can be expanded; false otherwise. Note that this value may change when
139
+ * the table updates, depending on the table's configuration
140
+ * @return boolean
141
+ */
142
+ get hasChildren():boolean;
143
+ get index():LongWrapper;
132
144
  }
133
145
  /**
134
- * Common interface for various ways of accessing table data and formatting.
146
+ * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
147
+ * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
135
148
  *
136
- * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
137
- * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
138
- */
139
- export interface TableData {
140
- get(index:LongWrapper|number):Row;
141
- getData(index:LongWrapper|number, column:Column):any;
142
- getFormat(index:LongWrapper|number, column:Column):Format;
143
- get columns():Array<Column>;
144
- get rows():Array<Row>;
145
- }
146
- export interface LayoutHints {
147
- readonly searchDisplayMode?:SearchDisplayModeType|null;
148
-
149
- get hiddenColumns():string[]|null;
150
- get frozenColumns():string[]|null;
151
- get columnGroups():ColumnGroup[]|null;
152
- get areSavedLayoutsAllowed():boolean;
153
- get frontColumns():string[]|null;
154
- get backColumns():string[]|null;
155
- }
156
- /**
157
- * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
158
- * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
159
- * <p>
160
- * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
161
- * server. The setViewport method can be used to adjust this table instead of creating a new one.
162
- * <p>
163
- * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
164
- * to the underlying handle and accumulated data.
165
- * <p>
166
- * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
167
- * the idea then that the caller did not actually use this type. This means that for every exported method (which then
168
- * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
169
- * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
170
- * deems it no longer in use.
171
- * <p>
172
- * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
173
- * true), providing a way to stop the server from streaming updates to the client.
149
+ * Additionally, this is automatically subscribed to its one and only row, across all columns.
174
150
  *
175
- * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
176
- * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
177
- * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
178
- * always call `close()` when finished. Calling any method on this object other than close() will result in it
179
- * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
151
+ * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
152
+ * template when fetching a new totals table, or changing the totals table in use.
153
+ *
154
+ * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
155
+ * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
156
+ * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
157
+ * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
158
+ *
159
+ * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
160
+ * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
180
161
  */
181
- export interface TableViewportSubscription extends HasEventHandling {
162
+ export interface TotalsTable extends JoinableTable {
182
163
  /**
183
- * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
164
+ * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
165
+ * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
166
+ * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
167
+ * event per row in that range.
184
168
  * @param firstRow -
185
169
  * @param lastRow -
186
170
  * @param columns -
187
171
  * @param updateIntervalMs -
188
172
  */
189
- setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
190
- /**
191
- * Stops this viewport from running, stopping all events on itself and on the table that created it.
192
- */
193
- close():void;
173
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
194
174
  /**
195
- * Gets the data currently visible in this viewport
196
- * @return Promise of {@link dh.TableData}.
175
+ * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
176
+ * resolve until that data is ready.
177
+ * @return Promise of {@link dh.TableData}
197
178
  */
198
179
  getViewportData():Promise<TableData>;
199
- snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
200
- }
201
- /**
202
- * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
203
- * in columns) either by index, or scanning the complete present index.
204
- *
205
- * This class supports two ways of reading the table - checking the changes made since the last update, and reading
206
- * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
207
- * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
208
- * both options should be considered.
209
- *
210
- * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
211
- * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
212
- * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
213
- * read specific rows or cells out of the table.
214
- */
215
- export interface SubscriptionTableData extends TableData {
216
- get fullIndex():RangeSet;
217
- /**
218
- * The ordered set of row indexes removed since the last update
219
- * @return dh.RangeSet
220
- */
221
- get removed():RangeSet;
222
180
  /**
223
- * The ordered set of row indexes added since the last update
224
- * @return dh.RangeSet
181
+ * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
182
+ * returned value.
183
+ * @param key -
184
+ * @return {@link dh.Column}
225
185
  */
226
- get added():RangeSet;
227
- get columns():Array<Column>;
186
+ findColumn(key:string):Column;
228
187
  /**
229
- * The ordered set of row indexes updated since the last update
230
- * @return dh.RangeSet
188
+ * multiple columns specified by the given names.
189
+ * @param keys -
190
+ * @return {@link dh.Column} array
231
191
  */
232
- get modified():RangeSet;
233
- get rows():Array<Row>;
234
- }
235
- export interface HasEventHandling {
192
+ findColumns(keys:string[]):Column[];
236
193
  /**
237
- * Listen for events on this object.
238
- * @param name - the name of the event to listen for
239
- * @param callback - a function to call when the event occurs
240
- * @return Returns a cleanup function.
241
- * @typeParam T - the type of the data that the event will provide
194
+ * Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
242
195
  */
196
+ close():void;
243
197
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
244
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
198
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
199
+ nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<CustomEvent<T>>;
245
200
  hasListeners(name:string):boolean;
246
201
  /**
247
- * Removes an event listener added to this table.
248
- * @param name -
249
- * @param callback -
202
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
203
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
204
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
205
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
206
+ * not.
207
+ * @param sort -
208
+ * @return {@link dh.Sort} array
209
+ */
210
+ applySort(sort:Sort[]):Array<Sort>;
211
+ /**
212
+ * Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
213
+ * operations to the table, as long as they are present.
214
+ * @param customColumns -
250
215
  * @return
251
- * @typeParam T -
252
216
  */
253
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
254
- }
255
- /**
256
- * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
257
- * {@link dh.TotalsTable}.
258
- */
259
- export interface JoinableTable {
260
- freeze():Promise<Table>;
261
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
217
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
262
218
  /**
263
- * Joins this table to the provided table, using one of the specified join types:
264
- * <ul>
265
- * <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
266
- * provided matching rule.</li>
267
- * <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
268
- * tables.</li>
269
- * <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
270
- * with errors if there is not exactly one.</li>
271
- * <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
272
- * with nulls if there is no match or errors if there are multiple matches.</li>
273
- * </ul>
274
- *
275
- * Note that <code>Left</code> join is not supported here, unlike DHE.
276
- * <p>
277
- * See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
278
- * more guidance on picking a join operation.
279
- * @deprecated Instead, call the specific method for the join type.
280
- * @param joinType - The type of join to perform, see the list above.
281
- * @param rightTable - The table to match to values in this table
282
- * @param columnsToMatch - Columns that should match
283
- * @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
284
- * @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
285
- * @return a promise that will resolve to the joined table
219
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
220
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
221
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
222
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
223
+ * will not.
224
+ * @param filter -
225
+ * @return {@link dh.FilterCondition} array
286
226
  */
287
- join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
227
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
288
228
  /**
289
- * Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
290
- * row from the right table.
291
- * <p>
292
- * The `asOfMatchRule` value can be one of:
293
- * <ul>
294
- * <li>LESS_THAN_EQUAL</li>
295
- * <li>LESS_THAN</li>
296
- * <li>GREATER_THAN_EQUAL</li>
297
- * <li>GREATER_THAN</li>
298
- * </ul>
299
- * @param rightTable - the table to match to values in this table
300
- * @param columnsToMatch - the columns that should match, according to the asOfMatchRole
301
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
302
- * columns
303
- * @param asOfMatchRule - the match rule to use, see above
304
- * @return a promise that will resolve to the joined table
305
- */
306
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
307
- /**
308
- * a promise that will be resolved with the newly created table holding the results of the specified cross join
309
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
310
- * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
311
- * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
312
- * @param rightTable - the table to match to values in this table
313
- * @param columnsToMatch - the columns that should match exactly
314
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
315
- * columns
316
- * @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
317
- * server select a value
318
- * @return a promise that will resolve to the joined table
319
- */
320
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
321
- /**
322
- * a promise that will be resolved with the newly created table holding the results of the specified exact join
323
- * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
324
- * table being added to the output.
325
- * @param rightTable - the table to match to values in this table
326
- * @param columnsToMatch - the columns that should match exactly
327
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
328
- * columns
329
- * @return a promise that will resolve to the joined table
330
- */
331
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
332
- /**
333
- * a promise that will be resolved with the newly created table holding the results of the specified natural join
334
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
335
- * right table being added to the output.
336
- * @param rightTable - the table to match to values in this table
337
- * @param columnsToMatch - the columns that should match exactly
338
- * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
339
- * columns
340
- * @return a promise that will resolve to the joined table
229
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
230
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
231
+ * for the <b>filterchanged</b> event to know when to update the UI.
232
+ * @return {@link dh.FilterCondition} array
341
233
  */
342
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
343
- }
344
- /**
345
- * Row implementation that also provides additional read-only properties. represents visible rows in the table,
346
- * but with additional properties to reflect the tree structure.
347
- */
348
- export interface TreeRow extends ViewportRow {
234
+ get filter():Array<FilterCondition>;
349
235
  /**
350
- * True if this node is currently expanded to show its children; false otherwise. Those children will be the
351
- * rows below this one with a greater depth than this one
236
+ * True if this table has been closed.
352
237
  * @return boolean
353
238
  */
354
- get isExpanded():boolean;
239
+ get isClosed():boolean;
355
240
  /**
356
- * The number of levels above this node; zero for top level nodes. Generally used by the UI to indent the
357
- * row and its expand/collapse icon
358
- * @return int
241
+ * The total number of rows in this table. This may change as the base table's configuration, filter, or contents
242
+ * change.
243
+ * @return double
359
244
  */
360
- get depth():number;
245
+ get size():number;
361
246
  /**
362
- * True if this node has children and can be expanded; false otherwise. Note that this value may change when
363
- * the table updates, depending on the table's configuration
364
- * @return boolean
247
+ * The columns present on this table. Note that this may not include all columns in the parent table, and in cases
248
+ * where a given column has more than one aggregation applied, the column name will have a suffix indicating the
249
+ * aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
250
+ * @return {@link dh.Column} array
365
251
  */
366
- get hasChildren():boolean;
367
- get index():LongWrapper;
368
- }
369
- /**
370
- * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
371
- * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
372
- * for easier scrolling without going to the server.
373
- */
374
- export interface ViewportData extends TableData {
252
+ get columns():Array<Column>;
253
+ get totalsTableConfig():TotalsTableConfig;
375
254
  /**
376
- * The index of the first returned row
377
- * @return double
255
+ * An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
256
+ * the new value immediately, even though it may take a little time to update on the server. You may listen for the
257
+ * <b>sortchanged</b> event to know when to update the UI.
258
+ * @return {@link dh.Sort} array
378
259
  */
379
- get offset():number;
260
+ get sort():Array<Sort>;
380
261
  /**
381
- * A list of columns describing the data types in each row
382
- * @return {@link dh.Column} array.
262
+ * Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
263
+ * existing ones. To update, call <b>applyCustomColumns()</b>.
264
+ * @return {@link dh.CustomColumn} array
383
265
  */
384
- get columns():Array<Column>;
266
+ get customColumns():Array<CustomColumn>;
385
267
  /**
386
- * An array of rows of data
387
- * @return {@link dh.ViewportRow} array.
268
+ * True if this table may receive updates from the server, including size changed events, updated events after
269
+ * initial snapshot.
270
+ * @return boolean
388
271
  */
389
- get rows():Array<ViewportRow>;
390
- }
391
- export interface Row {
392
- get(column:Column):any;
393
- getFormat(column:Column):Format;
394
- get index():LongWrapper;
272
+ get isRefreshing():boolean;
395
273
  }
396
274
  /**
397
- * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
398
- * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
399
- *
400
- * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
401
- * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
402
- * backwards compatibility and to better follow JS expectations.
275
+ * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
276
+ * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
277
+ * are correctly freed.
403
278
  */
404
- export interface WidgetMessageDetails {
279
+ export interface WidgetExportedObject {
405
280
  /**
406
- * Returns the data from this message as a base64-encoded string.
281
+ * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
282
+ * null, this object cannot be fetched, but can be passed to the server, such as via
283
+ * {@link Widget.sendMessage}.
284
+ * @return the string type of this server-side object, or null.
407
285
  */
408
- getDataAsBase64():string;
286
+ readonly type?:string|null;
287
+
409
288
  /**
410
- * Returns the data from this message as a Uint8Array.
289
+ * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
290
+ * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
291
+ * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
411
292
  */
412
- getDataAsU8():Uint8Array;
293
+ reexport():Promise<WidgetExportedObject>;
413
294
  /**
414
- * Returns the data from this message as a utf-8 string.
295
+ * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
296
+ * the same instance.
297
+ * @return a promise that will resolve to a client side object that represents the reference on the server.
415
298
  */
416
- getDataAsString():string;
299
+ fetch():Promise<any>;
417
300
  /**
418
- * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
419
- * objects, and should close them when no longer needed.
301
+ * Releases the server-side resources associated with this object, regardless of whether other client-side objects
302
+ * exist that also use that object. Should not be called after fetch() has been invoked.
420
303
  */
421
- get exportedObjects():WidgetExportedObject[];
304
+ close():void;
422
305
  }
423
306
  /**
424
- * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
425
- * the viewport again.
307
+ * Common interface for various ways of accessing table data and formatting.
308
+ *
309
+ * Java note: this interface contains some extra overloads that aren't available in JS. Implementations are expected to
310
+ * implement only abstract methods, and default methods present in this interface will dispatch accordingly.
426
311
  */
427
- export interface ViewportRow extends Row {
428
- get index():LongWrapper;
312
+ export interface TableData {
313
+ get(index:LongWrapper|number):Row;
314
+ getData(index:LongWrapper|number, column:Column):any;
315
+ getFormat(index:LongWrapper|number, column:Column):Format;
316
+ get columns():Array<Column>;
317
+ get rows():Array<Row>;
429
318
  }
430
319
  /**
431
- * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
320
+ * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
432
321
  */
433
- export interface LocalTimeWrapper {
322
+ export interface LocalDateWrapper {
434
323
  valueOf():string;
435
- getHour():number;
436
- getMinute():number;
437
- getSecond():number;
438
- getNano():number;
324
+ getYear():number;
325
+ getMonthValue():number;
326
+ getDayOfMonth():number;
439
327
  toString():string;
440
328
  }
441
329
  /**
@@ -463,700 +351,1054 @@ export namespace dh {
463
351
  */
464
352
  readonly numberFormat?:string|null;
465
353
  }
354
+ export interface WorkerHeapInfo {
355
+ /**
356
+ * Total heap size available for this worker.
357
+ */
358
+ get totalHeapSize():number;
359
+ get freeMemory():number;
360
+ get maximumHeapSize():number;
361
+ }
362
+ export interface TreeViewportData extends TableData {
363
+ get offset():number;
364
+ get columns():Array<Column>;
365
+ get rows():Array<TreeRow>;
366
+ }
367
+ export interface LayoutHints {
368
+ readonly searchDisplayMode?:SearchDisplayModeType|null;
369
+
370
+ get hiddenColumns():string[]|null;
371
+ get frozenColumns():string[]|null;
372
+ get columnGroups():ColumnGroup[]|null;
373
+ get areSavedLayoutsAllowed():boolean;
374
+ get frontColumns():string[]|null;
375
+ get backColumns():string[]|null;
376
+ }
466
377
  /**
467
- * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
468
- * table column.
378
+ * Event data, describing the indexes that were added/removed/updated, and providing access to Rows (and thus data
379
+ * in columns) either by index, or scanning the complete present index.
380
+ *
381
+ * This class supports two ways of reading the table - checking the changes made since the last update, and reading
382
+ * all data currently in the table. While it is more expensive to always iterate over every single row in the table,
383
+ * it may in some cases actually be cheaper than maintaining state separately and updating only the changes, though
384
+ * both options should be considered.
385
+ *
386
+ * The RangeSet objects allow iterating over the LongWrapper indexes in the table. Note that these "indexes" are not
387
+ * necessarily contiguous and may be negative, and represent some internal state on the server, allowing it to keep
388
+ * track of data efficiently. Those LongWrapper objects can be passed to the various methods on this instance to
389
+ * read specific rows or cells out of the table.
469
390
  */
470
- export interface ColumnStatistics {
391
+ export interface SubscriptionTableData extends TableData {
392
+ get fullIndex():RangeSet;
471
393
  /**
472
- * Gets the type of formatting that should be used for given statistic.
473
- * <p>
474
- * the format type for a statistic. A null return value means that the column formatting should be used.
475
- * @param name - the display name of the statistic
476
- * @return String
394
+ * The ordered set of row indexes removed since the last update
395
+ * @return dh.RangeSet
477
396
  */
478
- getType(name:string):string;
397
+ get removed():RangeSet;
479
398
  /**
480
- * 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
481
- * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
482
- * than 19 unique values.
483
- * @return Map of String double
399
+ * The ordered set of row indexes added since the last update
400
+ * @return dh.RangeSet
484
401
  */
485
- get uniqueValues():Map<string, number>;
402
+ get added():RangeSet;
403
+ get columns():Array<Column>;
486
404
  /**
487
- * Gets a map with the display name of statistics as keys and the numeric stat as a value.
488
- * <p>
489
- * A map of each statistic's name to its value.
490
- * @return Map of String and Object
405
+ * The ordered set of row indexes updated since the last update
406
+ * @return dh.RangeSet
491
407
  */
492
- get statisticsMap():Map<string, object>;
408
+ get modified():RangeSet;
409
+ get rows():Array<Row>;
493
410
  }
494
411
  /**
495
- * Represents a server-side object that may not yet have been fetched by the client. When this object will no longer be
496
- * used, if {@link fetch} is not called on this object, then {@link close} must be to ensure server-side resources
497
- * are correctly freed.
412
+ * Wrap LocalTime values for use in JS. Provides text formatting for display and access to the underlying value.
498
413
  */
499
- export interface WidgetExportedObject {
414
+ export interface LocalTimeWrapper {
415
+ valueOf():string;
416
+ getHour():number;
417
+ getMinute():number;
418
+ getSecond():number;
419
+ getNano():number;
420
+ toString():string;
421
+ }
422
+ /**
423
+ * Encapsulates event handling around table subscriptions by "cheating" and wrapping up a JsTable instance to do the
424
+ * real dirty work. This allows a viewport to stay open on the old table if desired, while this one remains open.
425
+ * <p>
426
+ * As this just wraps a JsTable (and thus a CTS), it holds its own flattened, pUT'd handle to get deltas from the
427
+ * server. The setViewport method can be used to adjust this table instead of creating a new one.
428
+ * <p>
429
+ * Existing methods on JsTable like setViewport and getViewportData are intended to proxy to this, which then will talk
430
+ * to the underlying handle and accumulated data.
431
+ * <p>
432
+ * As long as we keep the existing methods/events on JsTable, close() is not required if no other method is called, with
433
+ * the idea then that the caller did not actually use this type. This means that for every exported method (which then
434
+ * will mark the instance of "actually being used, please don't automatically close me"), there must be an internal
435
+ * version called by those existing JsTable method, which will allow this instance to be cleaned up once the JsTable
436
+ * deems it no longer in use.
437
+ * <p>
438
+ * Note that if the caller does close an instance, this shuts down the JsTable's use of this (while the converse is not
439
+ * true), providing a way to stop the server from streaming updates to the client.
440
+ *
441
+ * This object serves as a "handle" to a subscription, allowing it to be acted on directly or canceled outright. If you
442
+ * retain an instance of this, you have two choices - either only use it to call `close()` on it to stop the table's
443
+ * viewport without creating a new one, or listen directly to this object instead of the table for data events, and
444
+ * always call `close()` when finished. Calling any method on this object other than close() will result in it
445
+ * continuing to live on after `setViewport` is called on the original table, or after the table is modified.
446
+ */
447
+ export interface TableViewportSubscription extends HasEventHandling {
500
448
  /**
501
- * Returns the type of this export, typically one of {@link dh.VariableType}, but may also include plugin types. If
502
- * null, this object cannot be fetched, but can be passed to the server, such as via
503
- * {@link Widget.sendMessage}.
504
- * @return the string type of this server-side object, or null.
449
+ * Changes the rows and columns set on this viewport. This cannot be used to change the update interval.
450
+ * @param firstRow -
451
+ * @param lastRow -
452
+ * @param columns -
453
+ * @param updateIntervalMs -
505
454
  */
506
- readonly type?:string|null;
507
-
455
+ setViewport(firstRow:number, lastRow:number, columns?:Column[]|undefined|null, updateIntervalMs?:number|undefined|null):void;
508
456
  /**
509
- * Exports another copy of this reference, allowing it to be fetched separately. Results in rejection if the ticket
510
- * was already closed (either by calling {@link WidgetExportedObject.close} or closing the object returned from {@link WidgetExportedObject.fetch}).
511
- * @return a promise returning a reexported copy of this object, still referencing the same server-side object.
457
+ * Stops this viewport from running, stopping all events on itself and on the table that created it.
512
458
  */
513
- reexport():Promise<WidgetExportedObject>;
459
+ close():void;
514
460
  /**
515
- * Returns a promise that will fetch the object represented by this reference. Multiple calls to this will return
516
- * the same instance.
517
- * @return a promise that will resolve to a client side object that represents the reference on the server.
461
+ * Gets the data currently visible in this viewport
462
+ * @return Promise of {@link dh.TableData}.
518
463
  */
519
- fetch():Promise<any>;
464
+ getViewportData():Promise<TableData>;
465
+ snapshot(rows:RangeSet, columns:Column[]):Promise<TableData>;
466
+ }
467
+ export interface HasEventHandling {
520
468
  /**
521
- * Releases the server-side resources associated with this object, regardless of whether other client-side objects
522
- * exist that also use that object. Should not be called after fetch() has been invoked.
469
+ * Listen for events on this object.
470
+ * @param name - the name of the event to listen for
471
+ * @param callback - a function to call when the event occurs
472
+ * @return Returns a cleanup function.
473
+ * @typeParam T - the type of the data that the event will provide
523
474
  */
524
- close():void;
475
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
476
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
477
+ hasListeners(name:string):boolean;
478
+ /**
479
+ * Removes an event listener added to this table.
480
+ * @param name -
481
+ * @param callback -
482
+ * @return
483
+ * @typeParam T -
484
+ */
485
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
486
+ }
487
+ /**
488
+ * Represents a table which can be joined to another table. Current implementations are {@link dh.Table} and
489
+ * {@link dh.TotalsTable}.
490
+ */
491
+ export interface JoinableTable {
492
+ freeze():Promise<Table>;
493
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
494
+ /**
495
+ * Joins this table to the provided table, using one of the specified join types:
496
+ * <ul>
497
+ * <li><code>AJ</code>, <code>ReverseAJ</code> (or <code>RAJ</code>) - inexact timeseries joins, based on the
498
+ * provided matching rule.</li>
499
+ * <li><code>CROSS_JOIN</code> (or <code>Join</code>) - cross join of all rows that have matching values in both
500
+ * tables.</li>
501
+ * <li><code>EXACT_JOIN</code> (or <code>ExactJoin</code> - matches values in exactly one row in the right table,
502
+ * with errors if there is not exactly one.</li>
503
+ * <li><code>NATURAL_JOIN</code> (or <code>Natural</code> - matches values in at most one row in the right table,
504
+ * with nulls if there is no match or errors if there are multiple matches.</li>
505
+ * </ul>
506
+ *
507
+ * Note that <code>Left</code> join is not supported here, unlike DHE.
508
+ * <p>
509
+ * See the <a href="https://deephaven.io/core/docs/conceptual/choose-joins/">Choose a join method</a> document for
510
+ * more guidance on picking a join operation.
511
+ * @deprecated Instead, call the specific method for the join type.
512
+ * @param joinType - The type of join to perform, see the list above.
513
+ * @param rightTable - The table to match to values in this table
514
+ * @param columnsToMatch - Columns that should match
515
+ * @param columnsToAdd - Columns from the right table to add to the result - empty/null/absent to add all columns
516
+ * @param asOfMatchRule - If joinType is AJ/RAJ/ReverseAJ, the match rule to use
517
+ * @return a promise that will resolve to the joined table
518
+ */
519
+ join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
520
+ /**
521
+ * Performs an inexact timeseries join, where rows in this table will have columns added from the closest matching
522
+ * row from the right table.
523
+ * <p>
524
+ * The `asOfMatchRule` value can be one of:
525
+ * <ul>
526
+ * <li>LESS_THAN_EQUAL</li>
527
+ * <li>LESS_THAN</li>
528
+ * <li>GREATER_THAN_EQUAL</li>
529
+ * <li>GREATER_THAN</li>
530
+ * </ul>
531
+ * @param rightTable - the table to match to values in this table
532
+ * @param columnsToMatch - the columns that should match, according to the asOfMatchRole
533
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
534
+ * columns
535
+ * @param asOfMatchRule - the match rule to use, see above
536
+ * @return a promise that will resolve to the joined table
537
+ */
538
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
539
+ /**
540
+ * a promise that will be resolved with the newly created table holding the results of the specified cross join
541
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
542
+ * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
543
+ * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
544
+ * @param rightTable - the table to match to values in this table
545
+ * @param columnsToMatch - the columns that should match exactly
546
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
547
+ * columns
548
+ * @param reserveBits - the number of bits of key-space to initially reserve per group, null/absent will let the
549
+ * server select a value
550
+ * @return a promise that will resolve to the joined table
551
+ */
552
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
553
+ /**
554
+ * a promise that will be resolved with the newly created table holding the results of the specified exact join
555
+ * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
556
+ * table being added to the output.
557
+ * @param rightTable - the table to match to values in this table
558
+ * @param columnsToMatch - the columns that should match exactly
559
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
560
+ * columns
561
+ * @return a promise that will resolve to the joined table
562
+ */
563
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
564
+ /**
565
+ * a promise that will be resolved with the newly created table holding the results of the specified natural join
566
+ * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
567
+ * right table being added to the output.
568
+ * @param rightTable - the table to match to values in this table
569
+ * @param columnsToMatch - the columns that should match exactly
570
+ * @param columnsToAdd - columns from the right table to add to the resulting table, empty/null/absent to add all
571
+ * columns
572
+ * @return a promise that will resolve to the joined table
573
+ */
574
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null):Promise<Table>;
575
+ }
576
+ /**
577
+ * This object may be pooled internally or discarded and not updated. Do not retain references to it. Instead, request
578
+ * the viewport again.
579
+ */
580
+ export interface ViewportRow extends Row {
581
+ get index():LongWrapper;
582
+ }
583
+ export interface ColumnGroup {
584
+ get name():string|null;
585
+ get children():string[]|null;
586
+ get color():string|null;
587
+ }
588
+ /**
589
+ * Javascript wrapper for {@link io.deephaven.web.shared.data.ColumnStatistics} This class holds the results of a call to generate statistics on a
590
+ * table column.
591
+ */
592
+ export interface ColumnStatistics {
593
+ /**
594
+ * Gets the type of formatting that should be used for given statistic.
595
+ * <p>
596
+ * the format type for a statistic. A null return value means that the column formatting should be used.
597
+ * @param name - the display name of the statistic
598
+ * @return String
599
+ */
600
+ getType(name:string):string;
601
+ /**
602
+ * Gets a map with the name of each unique value as key and the count as the value. A map of each unique value's
603
+ * name to the count of how many times it occurred in the column. This map will be empty for tables containing more
604
+ * than 19 unique values.
605
+ * @return Map of String double
606
+ */
607
+ get uniqueValues():Map<string, number>;
608
+ /**
609
+ * Gets a map with the display name of statistics as keys and the numeric stat as a value.
610
+ * <p>
611
+ * A map of each statistic's name to its value.
612
+ * @return Map of String and Object
613
+ */
614
+ get statisticsMap():Map<string, object>;
615
+ }
616
+ /**
617
+ * Contains data in the current viewport. Also contains the offset to this data, so that the actual row number may be
618
+ * determined. Do not assume that the first row in `rows` is the first visible row, because extra rows may be provided
619
+ * for easier scrolling without going to the server.
620
+ */
621
+ export interface ViewportData extends TableData {
622
+ /**
623
+ * The index of the first returned row
624
+ * @return double
625
+ */
626
+ get offset():number;
627
+ /**
628
+ * A list of columns describing the data types in each row
629
+ * @return {@link dh.Column} array.
630
+ */
631
+ get columns():Array<Column>;
632
+ /**
633
+ * An array of rows of data
634
+ * @return {@link dh.ViewportRow} array.
635
+ */
636
+ get rows():Array<ViewportRow>;
637
+ }
638
+ /**
639
+ * Represents the contents of a single widget data message from the server, with a binary data paylod and exported
640
+ * objects. Implemented both by Widget itself and by the `event.details` when data is received by the client.
641
+ *
642
+ * Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
643
+ * "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
644
+ * backwards compatibility and to better follow JS expectations.
645
+ */
646
+ export interface WidgetMessageDetails {
647
+ /**
648
+ * Returns the data from this message as a base64-encoded string.
649
+ */
650
+ getDataAsBase64():string;
651
+ /**
652
+ * Returns the data from this message as a Uint8Array.
653
+ */
654
+ getDataAsU8():Uint8Array;
655
+ /**
656
+ * Returns the data from this message as a utf-8 string.
657
+ */
658
+ getDataAsString():string;
659
+ /**
660
+ * Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
661
+ * objects, and should close them when no longer needed.
662
+ */
663
+ get exportedObjects():WidgetExportedObject[];
525
664
  }
526
665
  export interface RefreshToken {
527
666
  get bytes():string;
528
667
  get expiry():number;
529
668
  }
669
+ export interface Row {
670
+ get(column:Column):any;
671
+ getFormat(column:Column):Format;
672
+ get index():LongWrapper;
673
+ }
674
+
530
675
  /**
531
- * Behaves like a Table, but doesn't expose all of its API for changing the internal state. Instead, state is driven by
532
- * the upstream table - when it changes handle, this listens and updates its own handle accordingly.
533
- *
534
- * Additionally, this is automatically subscribed to its one and only row, across all columns.
535
- *
536
- * A new config is returned any time it is accessed, to prevent accidental mutation, and to allow it to be used as a
537
- * template when fetching a new totals table, or changing the totals table in use.
538
- *
539
- * A simplistic Table, providing access to aggregation of the table it is sourced from. This table is always
540
- * automatically subscribed to its parent, and adopts changes automatically from it. This class has limited methods
541
- * found on Table. Instances of this type always have a size of one when no groupBy is set on the config, but may
542
- * potentially contain as few as zero rows, or as many as the parent table if each row gets its own group.
543
- *
544
- * When using the `groupBy` feature, it may be desireable to also provide a row to the user with all values across all
545
- * rows. To achieve this, request the same Totals Table again, but remove the `groupBy` setting.
676
+ * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
677
+ * the server to get each Table. All tables will have the same structure.
546
678
  */
547
- export interface TotalsTable extends JoinableTable {
679
+ export class PartitionedTable implements HasEventHandling {
548
680
  /**
549
- * Specifies the range of items to pass to the client and update as they change. If the columns parameter is not
550
- * provided, all columns will be used. Until this is called, no data will be available. Invoking this will result in
551
- * events to be fired once data becomes available, starting with an <b>updated</b> event and one <b>rowadded</b>
552
- * event per row in that range.
553
- * @param firstRow -
554
- * @param lastRow -
555
- * @param columns -
556
- * @param updateIntervalMs -
681
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
557
682
  */
558
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>, updateIntervalMs?:number):void;
683
+ static readonly EVENT_KEYADDED:string;
559
684
  /**
560
- * the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
561
- * resolve until that data is ready.
562
- * @return Promise of {@link dh.TableData}
685
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
563
686
  */
564
- getViewportData():Promise<TableData>;
687
+ static readonly EVENT_DISCONNECT:string;
565
688
  /**
566
- * a column by the given name. You should prefer to always retrieve a new Column instance instead of caching a
567
- * returned value.
568
- * @param key -
569
- * @return {@link dh.Column}
689
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
570
690
  */
571
- findColumn(key:string):Column;
691
+ static readonly EVENT_RECONNECT:string;
572
692
  /**
573
- * multiple columns specified by the given names.
574
- * @param keys -
575
- * @return {@link dh.Column} array
693
+ * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
576
694
  */
577
- findColumns(keys:string[]):Column[];
695
+ static readonly EVENT_RECONNECTFAILED:string;
696
+
697
+ protected constructor();
698
+
699
+ typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
578
700
  /**
579
- * Indicates that the table will no longer be used, and resources used to provide it can be freed up on the server.
701
+ * Fetch the table with the given key. If the key does not exist, returns `null`.
702
+ * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
703
+ * @return Promise of dh.Table, or `null` if the key does not exist.
704
+ */
705
+ getTable(key:object):Promise<Table|undefined|null>;
706
+ /**
707
+ * Open a new table that is the result of merging all constituent tables. See
708
+ * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
709
+ * @return A merged representation of the constituent tables.
710
+ */
711
+ getMergedTable():Promise<Table>;
712
+ /**
713
+ * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
714
+ * for <b>keyadded</b> will ensure no keys are missed.
715
+ * @return Set of Object
716
+ */
717
+ getKeys():Set<object>;
718
+ /**
719
+ * Fetch a table containing all the valid keys of the partitioned table.
720
+ * @return Promise of a Table
721
+ * @deprecated
722
+ */
723
+ getKeyTable():Promise<Table>;
724
+ /**
725
+ * Fetch the underlying base table of the partitioned table.
726
+ * @return Promise of a Table
727
+ */
728
+ getBaseTable():Promise<Table>;
729
+ /**
730
+ * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
731
+ * will not affect tables in use.
580
732
  */
581
733
  close():void;
734
+ /**
735
+ * The count of known keys.
736
+ * @return int
737
+ */
738
+ get size():number;
739
+ /**
740
+ * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
741
+ * non-key columns.
742
+ * @return Array of Column
743
+ */
744
+ get columns():Column[];
745
+ /**
746
+ * An array of all the key columns that the tables are partitioned by.
747
+ * @return Array of Column
748
+ */
749
+ get keyColumns():Column[];
750
+ /**
751
+ * Listen for events on this object.
752
+ * @param name - the name of the event to listen for
753
+ * @param callback - a function to call when the event occurs
754
+ * @return Returns a cleanup function.
755
+ * @typeParam T - the type of the data that the event will provide
756
+ */
582
757
  addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
583
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
584
- nextEvent<T>(eventName:string, timeoutInMillis:number):Promise<CustomEvent<T>>;
758
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
585
759
  hasListeners(name:string):boolean;
586
760
  /**
587
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
588
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
589
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
590
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
591
- * not.
592
- * @param sort -
593
- * @return {@link dh.Sort} array
761
+ * Removes an event listener added to this table.
762
+ * @param name -
763
+ * @param callback -
764
+ * @return
765
+ * @typeParam T -
594
766
  */
595
- applySort(sort:Sort[]):Array<Sort>;
767
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
768
+ }
769
+
770
+ export class QueryInfo {
771
+ static readonly EVENT_TABLE_OPENED:string;
772
+ static readonly EVENT_DISCONNECT:string;
773
+ static readonly EVENT_RECONNECT:string;
774
+ static readonly EVENT_CONNECT:string;
775
+
776
+ protected constructor();
777
+ }
778
+
779
+ /**
780
+ * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
781
+ */
782
+ export class BigIntegerWrapper {
783
+ protected constructor();
784
+
785
+ static ofString(str:string):BigIntegerWrapper;
786
+ asNumber():number;
787
+ valueOf():string;
788
+ toString():string;
789
+ }
790
+
791
+ /**
792
+ * A js type for operating on input tables.
793
+ *
794
+ * Represents a User Input Table, which can have data added to it from other sources.
795
+ *
796
+ * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
797
+ * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
798
+ * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
799
+ * before sending the next operation.
800
+ *
801
+ * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
802
+ *
803
+ * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
804
+ * object.
805
+ */
806
+ export class InputTable {
807
+ protected constructor();
808
+
596
809
  /**
597
- * Replace the current custom columns with a new set. These columns can be used when adding new filter and sort
598
- * operations to the table, as long as they are present.
599
- * @param customColumns -
600
- * @return
810
+ * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
811
+ * property at that name and validate it can be put into the given column type.
812
+ * @param row -
813
+ * @param userTimeZone -
814
+ * @return Promise of dh.InputTable
601
815
  */
602
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
816
+ addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
603
817
  /**
604
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
605
- * will immediately return the new value, but you may receive update events using the old filter before the new one
606
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
607
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
608
- * will not.
609
- * @param filter -
610
- * @return {@link dh.FilterCondition} array
818
+ * Add multiple rows to a table.
819
+ * @param rows -
820
+ * @param userTimeZone -
821
+ * @return Promise of dh.InputTable
611
822
  */
612
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
823
+ addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
613
824
  /**
614
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
615
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
616
- * for the <b>filterchanged</b> event to know when to update the UI.
617
- * @return {@link dh.FilterCondition} array
825
+ * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
826
+ * copied, and all key columns must have values filled in. This only copies the current state of the source table;
827
+ * future updates to the source table will not be reflected in the Input Table. The returned promise will be
828
+ * resolved to the same InputTable instance this method was called upon once the server returns.
829
+ * @param tableToAdd -
830
+ * @return Promise of dh.InputTable
618
831
  */
619
- get filter():Array<FilterCondition>;
832
+ addTable(tableToAdd:Table):Promise<InputTable>;
620
833
  /**
621
- * True if this table has been closed.
622
- * @return boolean
834
+ * Add multiple tables to this Input Table.
835
+ * @param tablesToAdd -
836
+ * @return Promise of dh.InputTable
623
837
  */
624
- get isClosed():boolean;
838
+ addTables(tablesToAdd:Table[]):Promise<InputTable>;
625
839
  /**
626
- * The total number of rows in this table. This may change as the base table's configuration, filter, or contents
627
- * change.
628
- * @return double
840
+ * Deletes an entire table from this Input Table. Key columns must match the Input Table.
841
+ * @param tableToDelete -
842
+ * @return Promise of dh.InputTable
629
843
  */
630
- get size():number;
844
+ deleteTable(tableToDelete:Table):Promise<InputTable>;
631
845
  /**
632
- * The columns present on this table. Note that this may not include all columns in the parent table, and in cases
633
- * where a given column has more than one aggregation applied, the column name will have a suffix indicating the
634
- * aggregation used. This suffixed name will be of the form <b>columnName + '__' + aggregationName</b>.
635
- * @return {@link dh.Column} array
846
+ * Delete multiple tables from this Input Table.
847
+ * @param tablesToDelete -
848
+ * @return
636
849
  */
637
- get columns():Array<Column>;
638
- get totalsTableConfig():TotalsTableConfig;
850
+ deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
639
851
  /**
640
- * An ordered list of Sorts to apply to the table. To update, call applySort(). Note that this getter will return
641
- * the new value immediately, even though it may take a little time to update on the server. You may listen for the
642
- * <b>sortchanged</b> event to know when to update the UI.
643
- * @return {@link dh.Sort} array
852
+ * A list of the key columns, by name
853
+ * @return String array.
854
+ */
855
+ get keys():string[];
856
+ /**
857
+ * A list of the value columns, by name
858
+ * @return String array.
859
+ */
860
+ get values():string[];
861
+ /**
862
+ * A list of the key columns.
863
+ * @return Column array.
644
864
  */
645
- get sort():Array<Sort>;
865
+ get keyColumns():Column[];
646
866
  /**
647
- * Read-only. An ordered list of custom column formulas to add to the table, either adding new columns or replacing
648
- * existing ones. To update, call <b>applyCustomColumns()</b>.
649
- * @return {@link dh.CustomColumn} array
867
+ * A list of the value Column objects
868
+ * @return {@link dh.Column} array.
650
869
  */
651
- get customColumns():Array<CustomColumn>;
870
+ get valueColumns():Column[];
652
871
  /**
653
- * True if this table may receive updates from the server, including size changed events, updated events after
654
- * initial snapshot.
655
- * @return boolean
872
+ * The source table for this Input Table
873
+ * @return dh.table
656
874
  */
657
- get isRefreshing():boolean;
658
- }
659
- export interface TreeViewportData extends TableData {
660
- get offset():number;
661
- get columns():Array<Column>;
662
- get rows():Array<TreeRow>;
875
+ get table():Table;
663
876
  }
877
+
664
878
  /**
665
- * Wrap LocalDate values for use in JS. Provides text formatting for display and access to the underlying value.
879
+ * Deprecated for use in Deephaven Core.
880
+ * @deprecated
666
881
  */
667
- export interface LocalDateWrapper {
668
- valueOf():string;
669
- getYear():number;
670
- getMonthValue():number;
671
- getDayOfMonth():number;
672
- toString():string;
882
+ export class Client {
883
+ static readonly EVENT_REQUEST_FAILED:string;
884
+ static readonly EVENT_REQUEST_STARTED:string;
885
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
886
+
887
+ constructor();
673
888
  }
674
889
 
675
890
  /**
676
- * Represents a set of Tables each corresponding to some key. The keys are available locally, but a call must be made to
677
- * the server to get each Table. All tables will have the same structure.
891
+ * Provides access to data in a table. Note that several methods present their response through Promises. This allows
892
+ * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
893
+ * inform the UI right away that they have taken place.
678
894
  */
679
- export class PartitionedTable implements HasEventHandling {
680
- /**
681
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
682
- */
683
- static readonly EVENT_KEYADDED:string;
684
- /**
685
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
686
- */
895
+ export class Table implements JoinableTable, HasEventHandling {
896
+ readonly description?:string|null;
897
+ readonly pluginName?:string|null;
898
+ readonly layoutHints?:null|LayoutHints;
899
+ static readonly EVENT_SIZECHANGED:string;
900
+ static readonly EVENT_UPDATED:string;
901
+ static readonly EVENT_ROWADDED:string;
902
+ static readonly EVENT_ROWREMOVED:string;
903
+ static readonly EVENT_ROWUPDATED:string;
904
+ static readonly EVENT_SORTCHANGED:string;
905
+ static readonly EVENT_FILTERCHANGED:string;
906
+ static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
687
907
  static readonly EVENT_DISCONNECT:string;
688
- /**
689
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
690
- */
691
908
  static readonly EVENT_RECONNECT:string;
692
- /**
693
- * Indicates that a new key has been added to the array of keys, which can now be fetched with getTable.
694
- */
695
909
  static readonly EVENT_RECONNECTFAILED:string;
910
+ static readonly EVENT_REQUEST_FAILED:string;
911
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
912
+ static readonly SIZE_UNCOALESCED:number;
696
913
 
697
914
  protected constructor();
698
915
 
699
- typedTicket():dhinternal.io.deephaven.proto.ticket_pb.TypedTicket;
916
+ batch(userCode:(arg0:unknown)=>void):Promise<Table>;
700
917
  /**
701
- * Fetch the table with the given key. If the key does not exist, returns `null`.
702
- * @param key - The key to fetch. An array of values for each key column, in the same order as the key columns are.
703
- * @return Promise of dh.Table, or `null` if the key does not exist.
918
+ * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
919
+ * caching a returned value.
920
+ * @param key -
921
+ * @return {@link dh.Column}
704
922
  */
705
- getTable(key:object):Promise<Table|undefined|null>;
923
+ findColumn(key:string):Column;
706
924
  /**
707
- * Open a new table that is the result of merging all constituent tables. See
708
- * {@link io.deephaven.engine.table.PartitionedTable#merge()} for details.
709
- * @return A merged representation of the constituent tables.
925
+ * Retrieve multiple columns specified by the given names.
926
+ * @param keys -
927
+ * @return {@link dh.Column} array
710
928
  */
711
- getMergedTable():Promise<Table>;
929
+ findColumns(keys:string[]):Column[];
930
+ isBlinkTable():boolean;
712
931
  /**
713
- * The set of all currently known keys. This is kept up to date, so getting the list after adding an event listener
714
- * for <b>keyadded</b> will ensure no keys are missed.
715
- * @return Set of Object
932
+ * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
933
+ * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
934
+ * @return Promise of dh.InputTable
716
935
  */
717
- getKeys():Set<object>;
936
+ inputTable():Promise<InputTable>;
718
937
  /**
719
- * Fetch a table containing all the valid keys of the partitioned table.
720
- * @return Promise of a Table
721
- * @deprecated
938
+ * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
722
939
  */
723
- getKeyTable():Promise<Table>;
940
+ close():void;
941
+ getAttributes():string[];
724
942
  /**
725
- * Fetch the underlying base table of the partitioned table.
726
- * @return Promise of a Table
943
+ * null if no property exists, a string if it is an easily serializable property, or a ```Promise
944
+ * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
945
+ * @param attributeName -
946
+ * @return Object
727
947
  */
728
- getBaseTable():Promise<Table>;
948
+ getAttribute(attributeName:string):unknown|undefined|null;
729
949
  /**
730
- * Indicates that this PartitionedTable will no longer be used, removing subcriptions to updated keys, etc. This
731
- * will not affect tables in use.
950
+ * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
951
+ * immediately return the new value, but you may receive update events using the old sort before the new sort is
952
+ * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
953
+ * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
954
+ * not.
955
+ * @param sort -
956
+ * @return {@link dh.Sort} array
732
957
  */
733
- close():void;
958
+ applySort(sort:Sort[]):Array<Sort>;
734
959
  /**
735
- * The count of known keys.
736
- * @return int
960
+ * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
961
+ * will immediately return the new value, but you may receive update events using the old filter before the new one
962
+ * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
963
+ * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
964
+ * will not.
965
+ * @param filter -
966
+ * @return {@link dh.FilterCondition} array
737
967
  */
738
- get size():number;
968
+ applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
739
969
  /**
740
- * An array of the columns in the tables that can be retrieved from this partitioned table, including both key and
741
- * non-key columns.
742
- * @return Array of Column
970
+ * used when adding new filter and sort operations to the table, as long as they are present.
971
+ * @param customColumns -
972
+ * @return {@link dh.CustomColumn} array
743
973
  */
744
- get columns():Column[];
974
+ applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
745
975
  /**
746
- * An array of all the key columns that the tables are partitioned by.
747
- * @return Array of Column
976
+ * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
977
+ * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
978
+ * will result in events to be fired once data becomes available, starting with an `updated` event and a
979
+ * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
980
+ * needed.
981
+ * @param firstRow -
982
+ * @param lastRow -
983
+ * @param columns -
984
+ * @param updateIntervalMs -
985
+ * @return {@link dh.TableViewportSubscription}
748
986
  */
749
- get keyColumns():Column[];
987
+ setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
750
988
  /**
751
- * Listen for events on this object.
752
- * @param name - the name of the event to listen for
753
- * @param callback - a function to call when the event occurs
754
- * @return Returns a cleanup function.
755
- * @typeParam T - the type of the data that the event will provide
989
+ * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
990
+ * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
991
+ * separate the lifespan of this promise from the table itself, call
992
+ * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
993
+ * @return Promise of {@link dh.TableData}
756
994
  */
757
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
758
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
759
- hasListeners(name:string):boolean;
995
+ getViewportData():Promise<TableData>;
760
996
  /**
761
- * Removes an event listener added to this table.
762
- * @param name -
763
- * @param callback -
764
- * @return
765
- * @typeParam T -
997
+ * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
998
+ * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
999
+ * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
1000
+ * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
1001
+ * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
1002
+ * called on it to stop it, and all events are fired from the TableSubscription instance.
1003
+ * @param columns -
1004
+ * @param updateIntervalMs -
1005
+ * @return {@link dh.TableSubscription}
766
1006
  */
767
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
768
- }
769
-
770
- /**
771
- * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
772
- */
773
- export class BigDecimalWrapper {
774
- protected constructor();
775
-
776
- static ofString(value:string):BigDecimalWrapper;
777
- asNumber():number;
778
- valueOf():string;
779
- toString():string;
780
- }
781
-
782
- /**
783
- * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
784
- * some options, JS applications can run code on the server, and interact with available exportable objects.
785
- */
786
- export class IdeConnection implements HasEventHandling {
1007
+ subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
787
1008
  /**
788
- * @deprecated
1009
+ * a new table containing the distinct tuples of values from the given columns that are present in the original
1010
+ * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1011
+ * order of appearance of values from the original table.
1012
+ * @param columns -
1013
+ * @return Promise of dh.Table
789
1014
  */
790
- static readonly HACK_CONNECTION_FAILURE:string;
791
- static readonly EVENT_DISCONNECT:string;
792
- static readonly EVENT_RECONNECT:string;
793
- static readonly EVENT_SHUTDOWN:string;
794
-
1015
+ selectDistinct(columns:Column[]):Promise<Table>;
795
1016
  /**
796
- * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
797
- * @param serverUrl - The url used when connecting to the server. Read-only.
798
- * @param connectOptions - Optional Object
799
- * @param fromJava - Optional boolean
800
- * @deprecated
1017
+ * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1018
+ * @return Promise of dh.Table
801
1019
  */
802
- constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
803
-
1020
+ copy():Promise<Table>;
804
1021
  /**
805
- * closes the current connection, releasing any resources on the server or client.
1022
+ * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1023
+ * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1024
+ * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1025
+ * called on it when not in use.
1026
+ * @param config -
1027
+ * @return Promise of dh.TotalsTable
806
1028
  */
807
- close():void;
808
- running():Promise<IdeConnection>;
809
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
810
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1029
+ getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
811
1030
  /**
812
- * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
813
- * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
814
- * log messages as are presently available.
815
- * @param callback -
816
- * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1031
+ * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1032
+ * above for more specifics.
1033
+ * @param config -
1034
+ * @return promise of dh.TotalsTable
817
1035
  */
818
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
819
- startSession(type:string):Promise<IdeSession>;
820
- getConsoleTypes():Promise<Array<string>>;
821
- getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1036
+ getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
822
1037
  /**
823
- * Listen for events on this object.
824
- * @param name - the name of the event to listen for
825
- * @param callback - a function to call when the event occurs
826
- * @return Returns a cleanup function.
827
- * @typeParam T - the type of the data that the event will provide
1038
+ * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1039
+ * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1040
+ * @param configObject -
1041
+ * @return Promise of dh.TreeTable
828
1042
  */
829
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
830
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
831
- hasListeners(name:string):boolean;
1043
+ rollup(configObject:RollupConfig):Promise<TreeTable>;
832
1044
  /**
833
- * Removes an event listener added to this table.
834
- * @param name -
835
- * @param callback -
836
- * @return
837
- * @typeParam T -
1045
+ * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1046
+ * new `TreeTable` which must have close() called on it when not in use.
1047
+ * @param configObject -
1048
+ * @return Promise dh.TreeTable
838
1049
  */
839
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
840
- }
841
-
842
- export class IdeSession implements HasEventHandling {
843
- static readonly EVENT_COMMANDSTARTED:string;
844
- static readonly EVENT_REQUEST_FAILED:string;
845
-
846
- protected constructor();
847
-
1050
+ treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
848
1051
  /**
849
- * Load the named table, with columns and size information already fully populated.
850
- * @param name -
851
- * @param applyPreviewColumns - optional boolean
852
- * @return {@link Promise} of {@link dh.Table}
1052
+ * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1053
+ * table will not update. This does not change the original table, and the new table will not have any of the client
1054
+ * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1055
+ * @return Promise of dh.Table
853
1056
  */
854
- getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
1057
+ freeze():Promise<Table>;
1058
+ snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
855
1059
  /**
856
- * Load the named Figure, including its tables and tablemaps as needed.
857
- * @param name -
858
- * @return promise of dh.plot.Figure
1060
+ *
1061
+ * @inheritDoc
1062
+ * @deprecated
859
1063
  */
860
- getFigure(name:string):Promise<dh.plot.Figure>;
1064
+ join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1065
+ asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1066
+ crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
1067
+ exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1068
+ naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1069
+ byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
861
1070
  /**
862
- * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
863
- * size is presently not available until the viewport is first set.
864
- * @param name -
865
- * @return {@link Promise} of {@link dh.TreeTable}
1071
+ * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1072
+ * keys.
1073
+ * @param keys -
1074
+ * @param dropKeys -
1075
+ * @return Promise dh.PartitionedTable
866
1076
  */
867
- getTreeTable(name:string):Promise<TreeTable>;
868
- getHierarchicalTable(name:string):Promise<TreeTable>;
869
- getPartitionedTable(name:string):Promise<PartitionedTable>;
870
- getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
871
- newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
1077
+ partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
872
1078
  /**
873
- * Merges the given tables into a single table. Assumes all tables have the same structure.
874
- * @param tables -
875
- * @return {@link Promise} of {@link dh.Table}
1079
+ * a promise that will resolve to ColumnStatistics for the column of this table.
1080
+ * @param column -
1081
+ * @return Promise of dh.ColumnStatistics
876
1082
  */
877
- mergeTables(tables:Table[]):Promise<Table>;
878
- bindTableToVariable(table:Table, name:string):Promise<void>;
879
- subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
880
- close():void;
881
- runCode(code:string):Promise<dh.ide.CommandResult>;
882
- onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
883
- openDocument(params:object):void;
884
- changeDocument(params:object):void;
885
- getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
886
- getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
887
- getHover(params:object):Promise<dh.lsp.Hover>;
888
- closeDocument(params:object):void;
1083
+ getColumnStatistics(column:Column):Promise<ColumnStatistics>;
889
1084
  /**
890
- * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
891
- * values will be null.
892
- * @param size -
893
- * @return {@link Promise} of {@link dh.Table}
1085
+ * Seek the row matching the data provided
1086
+ * @param startingRow - Row to start the seek from
1087
+ * @param column - Column to seek for value on
1088
+ * @param valueType - Type of value provided
1089
+ * @param seekValue - Value to seek
1090
+ * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1091
+ * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1092
+ * `false`.
1093
+ * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1094
+ * @return A promise that resolves to the row value found.
894
1095
  */
895
- emptyTable(size:number):Promise<Table>;
1096
+ seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1097
+ toString():string;
896
1098
  /**
897
- * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
898
- * the table will be populated with the interval from the specified date until now.
899
- * @param periodNanos -
900
- * @param startTime -
901
- * @return {@link Promise} of {@link dh.Table}
1099
+ * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1100
+ * .inputTable() to add or remove data from the underlying table.
1101
+ * @return boolean
902
1102
  */
903
- timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
904
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
905
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
906
- hasListeners(name:string):boolean;
907
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
908
- }
909
-
910
- /**
911
- * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
912
- *
913
- * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
914
- * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
915
- * value can be provided describing the strategy the engine should use when grouping the rows.
916
- */
917
- export class TreeTableConfig {
1103
+ get hasInputTable():boolean;
918
1104
  /**
919
- * The column representing the unique ID for each item
1105
+ * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1106
+ * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1107
+ * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1108
+ * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
1109
+ * @return {@link dh.Column} array
920
1110
  */
921
- idColumn:string;
1111
+ get columns():Array<Column>;
922
1112
  /**
923
- * The column representing the parent ID for each item
1113
+ * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1114
+ * @return dh.TotalsTableConfig
924
1115
  */
925
- parentColumn:string;
1116
+ get totalsTableConfig():TotalsTableConfig;
926
1117
  /**
927
- * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1118
+ * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1119
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1120
+ * for the <b>sortchanged</b> event to know when to update the UI.
1121
+ * @return {@link dh.Sort} array
928
1122
  */
929
- promoteOrphansToRoot:boolean;
930
-
931
- constructor();
932
- }
933
-
934
- /**
935
- * Wrap BigInteger values for use in JS. Provides text formatting for display and access to the underlying value.
936
- */
937
- export class BigIntegerWrapper {
938
- protected constructor();
939
-
940
- static ofString(str:string):BigIntegerWrapper;
941
- asNumber():number;
942
- valueOf():string;
943
- toString():string;
944
- }
945
-
946
- /**
947
- * Presently optional and not used by the server, this allows the client to specify some authentication details. String
948
- * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
949
- */
950
- export class ConnectOptions {
951
- headers:{ [key: string]: string; };
952
-
953
- constructor();
954
- }
955
-
956
- /**
957
- * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
958
- * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
959
- * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
960
- * called on these value literal instances. These instances are immutable - any method called on them returns a new
961
- * instance.
962
- */
963
- export class FilterValue {
964
- protected constructor();
965
-
1123
+ get sort():Array<Sort>;
966
1124
  /**
967
- * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
968
- * {@link TableData.get} for DateTime values. To create
969
- * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
970
- * {@link i18n.DateTimeFormat.parse}. To create a filter with a
971
- * 64-bit long integer, use {@link LongWrapper.ofString}.
972
- * @param input - the number to wrap as a FilterValue
973
- * @return an immutable FilterValue that can be built into a filter
1125
+ * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1126
+ * ones. To update, call <b>applyCustomColumns()</b>.
1127
+ * @return {@link dh.CustomColumn} array
974
1128
  */
975
- static ofNumber(input:LongWrapper|number):FilterValue;
1129
+ get customColumns():Array<CustomColumn>;
976
1130
  /**
977
- * a filter condition checking if the current value is equal to the given parameter
978
- * @param term -
979
- * @return {@link dh.FilterCondition}
1131
+ * True if this table may receive updates from the server, including size changed events, updated events after
1132
+ * initial snapshot.
1133
+ * @return boolean
980
1134
  */
981
- eq(term:FilterValue):FilterCondition;
1135
+ get isRefreshing():boolean;
982
1136
  /**
983
- * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
984
- * vs lower case
985
- * @param term -
986
- * @return {@link dh.FilterCondition}
1137
+ * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1138
+ * return the new value immediately, even though it may take a little time to update on the server. You may listen
1139
+ * for the <b>filterchanged</b> event to know when to update the UI.
1140
+ * @return {@link dh.FilterCondition} array
987
1141
  */
988
- eqIgnoreCase(term:FilterValue):FilterCondition;
1142
+ get filter():Array<FilterCondition>;
989
1143
  /**
990
- * a filter condition checking if the current value is not equal to the given parameter
991
- * @param term -
992
- * @return {@link dh.FilterCondition}
1144
+ * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
1145
+ * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
1146
+ * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
1147
+ * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
1148
+ * @return double
993
1149
  */
994
- notEq(term:FilterValue):FilterCondition;
1150
+ get totalSize():number;
995
1151
  /**
996
- * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
997
- * upper vs lower case
998
- * @param term -
999
- * @return {@link dh.FilterCondition}
1152
+ * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
1153
+ * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
1154
+ * property). for details).
1155
+ * @return double
1000
1156
  */
1001
- notEqIgnoreCase(term:FilterValue):FilterCondition;
1157
+ get size():number;
1002
1158
  /**
1003
- * a filter condition checking if the current value is greater than the given parameter
1004
- * @param term -
1005
- * @return {@link dh.FilterCondition}
1159
+ * True if this table has been closed.
1160
+ * @return boolean
1006
1161
  */
1007
- greaterThan(term:FilterValue):FilterCondition;
1162
+ get isClosed():boolean;
1008
1163
  /**
1009
- * a filter condition checking if the current value is less than the given parameter
1010
- * @param term -
1011
- * @return {@link dh.FilterCondition}
1164
+ * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
1165
+ * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
1166
+ * will be unavailable until table is coalesced.
1167
+ * @return boolean
1012
1168
  */
1013
- lessThan(term:FilterValue):FilterCondition;
1169
+ get isUncoalesced():boolean;
1014
1170
  /**
1015
- * a filter condition checking if the current value is greater than or equal to the given parameter
1016
- * @param term -
1017
- * @return {@link dh.FilterCondition}
1171
+ * Listen for events on this object.
1172
+ * @param name - the name of the event to listen for
1173
+ * @param callback - a function to call when the event occurs
1174
+ * @return Returns a cleanup function.
1175
+ * @typeParam T - the type of the data that the event will provide
1018
1176
  */
1019
- greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1177
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1178
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1179
+ hasListeners(name:string):boolean;
1020
1180
  /**
1021
- * a filter condition checking if the current value is less than or equal to the given parameter
1022
- * @param term -
1023
- * @return {@link dh.FilterCondition}
1181
+ * Removes an event listener added to this table.
1182
+ * @param name -
1183
+ * @param callback -
1184
+ * @return
1185
+ * @typeParam T -
1024
1186
  */
1025
- lessThanOrEqualTo(term:FilterValue):FilterCondition;
1187
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1026
1188
  /**
1027
- * a filter condition checking if the current value is in the given set of values
1028
- * @param terms -
1029
- * @return {@link dh.FilterCondition}
1189
+ * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
1190
+ * do not support reverse.
1191
+ * @return {@link dh.Sort}
1030
1192
  */
1031
- in(terms:FilterValue[]):FilterCondition;
1193
+ static reverse():Sort;
1194
+ }
1195
+
1196
+
1197
+ /**
1198
+ * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1199
+ * column.
1200
+ */
1201
+ export class Column {
1032
1202
  /**
1033
- * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1034
- * lower case
1035
- * @param terms -
1036
- * @return {@link dh.FilterCondition}
1203
+ * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1204
+ * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1205
+ * @return String
1037
1206
  */
1038
- inIgnoreCase(terms:FilterValue[]):FilterCondition;
1207
+ readonly constituentType?:string|null;
1208
+ readonly description?:string|null;
1209
+
1210
+ protected constructor();
1211
+
1039
1212
  /**
1040
- * a filter condition checking that the current value is not in the given set of values
1041
- * @param terms -
1042
- * @return {@link dh.FilterCondition}
1213
+ * the value for this column in the given row. Type will be consistent with the type of the Column.
1214
+ * @param row -
1215
+ * @return Any
1043
1216
  */
1044
- notIn(terms:FilterValue[]):FilterCondition;
1217
+ get(row:Row):any;
1218
+ getFormat(row:Row):Format;
1045
1219
  /**
1046
- * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1047
- * upper vs lower case
1048
- * @param terms -
1049
- * @return {@link dh.FilterCondition}
1220
+ * Creates a sort builder object, to be used when sorting by this column.
1221
+ * @return {@link dh.Sort}
1050
1222
  */
1051
- notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1223
+ sort():Sort;
1052
1224
  /**
1053
- * a filter condition checking if the given value contains the given string value
1054
- * @param term -
1055
- * @return {@link dh.FilterCondition}
1225
+ * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1226
+ * operation, or as a builder to create a filter operation.
1227
+ * @return {@link dh.FilterValue}
1056
1228
  */
1057
- contains(term:FilterValue):FilterCondition;
1229
+ filter():FilterValue;
1058
1230
  /**
1059
- * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1060
- * lower case
1061
- * @param term -
1062
- * @return {@link dh.FilterCondition}
1231
+ * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1232
+ * @param expression -
1233
+ * @return {@link dh.CustomColumn}
1063
1234
  */
1064
- containsIgnoreCase(term:FilterValue):FilterCondition;
1235
+ formatColor(expression:string):CustomColumn;
1065
1236
  /**
1066
- * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1067
- * use Java regex syntax
1068
- * @param pattern -
1069
- * @return {@link dh.FilterCondition}
1237
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1238
+ * @param expression -
1239
+ * @return {@link dh.CustomColumn}
1070
1240
  */
1071
- matches(pattern:FilterValue):FilterCondition;
1241
+ formatNumber(expression:string):CustomColumn;
1072
1242
  /**
1073
- * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1074
- * differences of upper vs lower case. Regex patterns use Java regex syntax
1075
- * @param pattern -
1076
- * @return {@link dh.FilterCondition}
1243
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1244
+ * @param expression -
1245
+ * @return {@link dh.CustomColumn}
1077
1246
  */
1078
- matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1247
+ formatDate(expression:string):CustomColumn;
1248
+ toString():string;
1079
1249
  /**
1080
- * a filter condition checking if the current value is a true boolean
1081
- * @return {@link dh.FilterCondition}
1250
+ * Label for this column.
1251
+ * @return String
1082
1252
  */
1083
- isTrue():FilterCondition;
1253
+ get name():string;
1084
1254
  /**
1085
- * a filter condition checking if the current value is a false boolean
1086
- * @return {@link dh.FilterCondition}
1255
+ * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1256
+ * <b>isUncoalesced</b> property on <b>Table</b>)
1257
+ * @return boolean
1087
1258
  */
1088
- isFalse():FilterCondition;
1259
+ get isPartitionColumn():boolean;
1089
1260
  /**
1090
- * a filter condition checking if the current value is a null value
1091
- * @return {@link dh.FilterCondition}
1261
+ *
1262
+ * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1263
+ * @return int
1092
1264
  */
1093
- isNull():FilterCondition;
1265
+ get index():number;
1266
+ get isSortable():boolean;
1094
1267
  /**
1095
- * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1096
- * functions that can be invoked on a String:
1097
- * <ul>
1098
- * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1099
- * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1100
- * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1101
- * regular expression</li>
1102
- * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1103
- * <p>
1104
- * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1105
- * </p>
1106
- * </li>
1107
- * </ul>
1108
- * @param method -
1109
- * @param args -
1110
- * @return
1268
+ * Type of the row data that can be found in this column.
1269
+ * @return String
1111
1270
  */
1112
- invoke(method:string, ...args:FilterValue[]):FilterCondition;
1113
- toString():string;
1271
+ get type():string;
1114
1272
  /**
1115
- * Constructs a string for the filter API from the given parameter.
1116
- * @param input -
1117
- * @return
1273
+ * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1274
+ * table using <b>applyCustomColumns</b> with the parameters specified.
1275
+ * @param expression -
1276
+ * @return {@link dh.CustomColumn}
1118
1277
  */
1119
- static ofString(input:any):FilterValue;
1278
+ static formatRowColor(expression:string):CustomColumn;
1120
1279
  /**
1121
- * Constructs a boolean for the filter API from the given parameter.
1122
- * @param b -
1123
- * @return
1280
+ * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1281
+ * @param name -
1282
+ * @param expression -
1283
+ * @return {@link dh.CustomColumn}
1124
1284
  */
1125
- static ofBoolean(b:boolean):FilterValue;
1285
+ static createCustomColumn(name:string, expression:string):CustomColumn;
1126
1286
  }
1127
1287
 
1288
+ export class CoreClient implements HasEventHandling {
1289
+ static readonly EVENT_CONNECT:string;
1290
+ static readonly EVENT_DISCONNECT:string;
1291
+ static readonly EVENT_RECONNECT:string;
1292
+ static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1293
+ static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1294
+ static readonly EVENT_REQUEST_FAILED:string;
1295
+ static readonly EVENT_REQUEST_STARTED:string;
1296
+ static readonly EVENT_REQUEST_SUCCEEDED:string;
1297
+ static readonly LOGIN_TYPE_PASSWORD:string;
1298
+ static readonly LOGIN_TYPE_ANONYMOUS:string;
1128
1299
 
1129
- /**
1130
- * Event fired when a command is issued from the client.
1131
- */
1132
- export class CommandInfo {
1133
- constructor(code:string, result:Promise<dh.ide.CommandResult>);
1300
+ constructor(serverUrl:string, connectOptions?:ConnectOptions);
1134
1301
 
1135
- get result():Promise<dh.ide.CommandResult>;
1136
- get code():string;
1302
+ running():Promise<CoreClient>;
1303
+ getServerUrl():string;
1304
+ getAuthConfigValues():Promise<string[][]>;
1305
+ login(credentials:LoginCredentials):Promise<void>;
1306
+ relogin(token:RefreshToken):Promise<void>;
1307
+ onConnected(timeoutInMillis?:number):Promise<void>;
1308
+ getServerConfigValues():Promise<string[][]>;
1309
+ getStorageService():dh.storage.StorageService;
1310
+ getAsIdeConnection():Promise<IdeConnection>;
1311
+ disconnect():void;
1312
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1313
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1314
+ hasListeners(name:string):boolean;
1315
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1137
1316
  }
1138
1317
 
1139
1318
  /**
1140
- * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
1141
- * this type TableMap.
1142
- * @deprecated
1319
+ * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
1320
+ * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
1321
+ * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
1143
1322
  */
1144
- export class TableMap {
1145
- static readonly EVENT_KEYADDED:string;
1146
- static readonly EVENT_DISCONNECT:string;
1147
- static readonly EVENT_RECONNECT:string;
1148
- static readonly EVENT_RECONNECTFAILED:string;
1149
-
1323
+ export class RangeSet {
1150
1324
  protected constructor();
1325
+
1326
+ static ofRange(first:number, last:number):RangeSet;
1327
+ static ofItems(rows:number[]):RangeSet;
1328
+ static ofRanges(ranges:RangeSet[]):RangeSet;
1329
+ static ofSortedRanges(ranges:RangeSet[]):RangeSet;
1330
+ /**
1331
+ * a new iterator over all indexes in this collection.
1332
+ * @return Iterator of {@link dh.LongWrapper}
1333
+ */
1334
+ iterator():Iterator<LongWrapper>;
1335
+ /**
1336
+ * The total count of items contained in this collection. In some cases this can be expensive to compute, and
1337
+ * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
1338
+ * property each time through a loop).
1339
+ * @return double
1340
+ */
1341
+ get size():number;
1151
1342
  }
1152
1343
 
1153
- export class QueryInfo {
1154
- static readonly EVENT_TABLE_OPENED:string;
1344
+ /**
1345
+ * Presently, this is the entrypoint into the Deephaven JS API. By creating an instance of this with the server URL and
1346
+ * some options, JS applications can run code on the server, and interact with available exportable objects.
1347
+ */
1348
+ export class IdeConnection implements HasEventHandling {
1349
+ /**
1350
+ * @deprecated
1351
+ */
1352
+ static readonly HACK_CONNECTION_FAILURE:string;
1155
1353
  static readonly EVENT_DISCONNECT:string;
1156
1354
  static readonly EVENT_RECONNECT:string;
1157
- static readonly EVENT_CONNECT:string;
1355
+ static readonly EVENT_SHUTDOWN:string;
1158
1356
 
1159
- protected constructor();
1357
+ /**
1358
+ * creates a new instance, from which console sessions can be made. <b>options</b> are optional.
1359
+ * @param serverUrl - The url used when connecting to the server. Read-only.
1360
+ * @param connectOptions - Optional Object
1361
+ * @param fromJava - Optional boolean
1362
+ * @deprecated
1363
+ */
1364
+ constructor(serverUrl:string, connectOptions?:ConnectOptions, fromJava?:boolean);
1365
+
1366
+ /**
1367
+ * closes the current connection, releasing any resources on the server or client.
1368
+ */
1369
+ close():void;
1370
+ running():Promise<IdeConnection>;
1371
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
1372
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
1373
+ /**
1374
+ * Register a callback function to handle any log messages that are emitted on the server. Returns a function ,
1375
+ * which can be invoked to remove this log handler. Any log handler registered in this way will receive as many old
1376
+ * log messages as are presently available.
1377
+ * @param callback -
1378
+ * @return {@link io.deephaven.web.shared.fu.JsRunnable}
1379
+ */
1380
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
1381
+ startSession(type:string):Promise<IdeSession>;
1382
+ getConsoleTypes():Promise<Array<string>>;
1383
+ getWorkerHeapInfo():Promise<WorkerHeapInfo>;
1384
+ /**
1385
+ * Listen for events on this object.
1386
+ * @param name - the name of the event to listen for
1387
+ * @param callback - a function to call when the event occurs
1388
+ * @return Returns a cleanup function.
1389
+ * @typeParam T - the type of the data that the event will provide
1390
+ */
1391
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1392
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1393
+ hasListeners(name:string):boolean;
1394
+ /**
1395
+ * Removes an event listener added to this table.
1396
+ * @param name -
1397
+ * @param callback -
1398
+ * @return
1399
+ * @typeParam T -
1400
+ */
1401
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1160
1402
  }
1161
1403
 
1162
1404
  /**
@@ -1251,530 +1493,367 @@ export namespace dh {
1251
1493
  }
1252
1494
 
1253
1495
  /**
1254
- * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
1255
- * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
1256
- * methods return a new Sort instance.
1496
+ * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
1497
+ * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
1498
+ *
1499
+ * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
1500
+ * "private" table instance does, since the original cannot modify the subscription, and the private instance must
1501
+ * forward data to it.
1502
+ *
1503
+ * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
1504
+ * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
1505
+ * viewports to make it less expensive to compute for large tables.
1257
1506
  */
1258
- export class Sort {
1259
- static readonly ASCENDING:string;
1260
- static readonly DESCENDING:string;
1261
- static readonly REVERSE:string;
1507
+ export class TableSubscription implements HasEventHandling {
1508
+ /**
1509
+ * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
1510
+ * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
1511
+ * allowing access to the entire range of items currently in the subscribed columns.
1512
+ */
1513
+ static readonly EVENT_UPDATED:string;
1262
1514
 
1263
1515
  protected constructor();
1264
1516
 
1265
1517
  /**
1266
- * Builds a Sort instance to sort values in ascending order.
1267
- * @return {@link dh.Sort}
1268
- */
1269
- asc():Sort;
1270
- /**
1271
- * Builds a Sort instance to sort values in descending order.
1272
- * @return {@link dh.Sort}
1273
- */
1274
- desc():Sort;
1275
- /**
1276
- * Builds a Sort instance which takes the absolute value before applying order.
1277
- * @return {@link dh.Sort}
1278
- */
1279
- abs():Sort;
1280
- toString():string;
1281
- /**
1282
- * True if the absolute value of the column should be used when sorting; defaults to false.
1283
- * @return boolean
1518
+ * Stops the subscription on the server.
1284
1519
  */
1285
- get isAbs():boolean;
1520
+ close():void;
1521
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1522
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1523
+ hasListeners(name:string):boolean;
1524
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1286
1525
  /**
1287
- * The column which is sorted.
1526
+ * The columns that were subscribed to when this subscription was created
1288
1527
  * @return {@link dh.Column}
1289
1528
  */
1290
- get column():Column;
1291
- /**
1292
- * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
1293
- * @return String
1294
- */
1295
- get direction():string;
1529
+ get columns():Array<Column>;
1296
1530
  }
1297
1531
 
1298
- export class CustomColumn {
1299
- static readonly TYPE_FORMAT_COLOR:string;
1300
- static readonly TYPE_FORMAT_NUMBER:string;
1301
- static readonly TYPE_FORMAT_DATE:string;
1302
- static readonly TYPE_NEW:string;
1532
+ /**
1533
+ * Event fired when a command is issued from the client.
1534
+ */
1535
+ export class CommandInfo {
1536
+ constructor(code:string, result:Promise<dh.ide.CommandResult>);
1303
1537
 
1304
- protected constructor();
1538
+ get result():Promise<dh.ide.CommandResult>;
1539
+ get code():string;
1540
+ }
1305
1541
 
1306
- valueOf():string;
1307
- toString():string;
1542
+ /**
1543
+ * Configuration object for running Table.treeTable to produce a hierarchical view of a given "flat" table.
1544
+ *
1545
+ * Like TotalsTableConfig, `TreeTableConfig` supports an operation map indicating how to aggregate the data, as well as
1546
+ * an array of column names which will be the layers in the roll-up tree, grouped at each level. An additional optional
1547
+ * value can be provided describing the strategy the engine should use when grouping the rows.
1548
+ */
1549
+ export class TreeTableConfig {
1308
1550
  /**
1309
- * The expression to evaluate this custom column.
1310
- * @return String
1551
+ * The column representing the unique ID for each item
1311
1552
  */
1312
- get expression():string;
1553
+ idColumn:string;
1313
1554
  /**
1314
- * The name of the column to use.
1315
- * @return String
1555
+ * The column representing the parent ID for each item
1316
1556
  */
1317
- get name():string;
1557
+ parentColumn:string;
1318
1558
  /**
1319
- * Type of custom column. One of
1320
- *
1321
- * <ul>
1322
- * <li>FORMAT_COLOR</li>
1323
- * <li>FORMAT_NUMBER</li>
1324
- * <li>FORMAT_DATE</li>
1325
- * <li>NEW</li>
1326
- * </ul>
1327
- * @return String
1559
+ * Optional parameter indicating if items with an invalid parent ID should be promoted to root. Defaults to false.
1328
1560
  */
1329
- get type():string;
1561
+ promoteOrphansToRoot:boolean;
1562
+
1563
+ constructor();
1330
1564
  }
1331
1565
 
1332
- /**
1333
- * Provides access to data in a table. Note that several methods present their response through Promises. This allows
1334
- * the client to both avoid actually connecting to the server until necessary, and also will permit some changes not to
1335
- * inform the UI right away that they have taken place.
1336
- */
1337
- export class Table implements JoinableTable, HasEventHandling {
1338
- readonly description?:string|null;
1339
- readonly pluginName?:string|null;
1340
- readonly layoutHints?:null|LayoutHints;
1341
- static readonly EVENT_SIZECHANGED:string;
1342
- static readonly EVENT_UPDATED:string;
1343
- static readonly EVENT_ROWADDED:string;
1344
- static readonly EVENT_ROWREMOVED:string;
1345
- static readonly EVENT_ROWUPDATED:string;
1346
- static readonly EVENT_SORTCHANGED:string;
1347
- static readonly EVENT_FILTERCHANGED:string;
1348
- static readonly EVENT_CUSTOMCOLUMNSCHANGED:string;
1349
- static readonly EVENT_DISCONNECT:string;
1350
- static readonly EVENT_RECONNECT:string;
1351
- static readonly EVENT_RECONNECTFAILED:string;
1352
- static readonly EVENT_REQUEST_FAILED:string;
1353
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1354
- static readonly SIZE_UNCOALESCED:number;
1566
+ export class LoginCredentials {
1567
+ type?:string|null;
1568
+ username?:string|null;
1569
+ token?:string|null;
1355
1570
 
1571
+ constructor();
1572
+ }
1573
+
1574
+ export class LongWrapper {
1356
1575
  protected constructor();
1357
1576
 
1358
- batch(userCode:(arg0:unknown)=>void):Promise<Table>;
1359
- /**
1360
- * Retrieve a column by the given name. You should prefer to always retrieve a new Column instance instead of
1361
- * caching a returned value.
1362
- * @param key -
1363
- * @return {@link dh.Column}
1364
- */
1365
- findColumn(key:string):Column;
1366
- /**
1367
- * Retrieve multiple columns specified by the given names.
1368
- * @param keys -
1369
- * @return {@link dh.Column} array
1370
- */
1371
- findColumns(keys:string[]):Column[];
1372
- isBlinkTable():boolean;
1373
- /**
1374
- * If .hasInputTable is true, you may call this method to gain access to an InputTable object which can be used to
1375
- * mutate the data within the table. If the table is not an Input Table, the promise will be immediately rejected.
1376
- * @return Promise of dh.InputTable
1377
- */
1378
- inputTable():Promise<InputTable>;
1379
- /**
1380
- * Indicates that this Table instance will no longer be used, and its connection to the server can be cleaned up.
1381
- */
1382
- close():void;
1383
- getAttributes():string[];
1384
- /**
1385
- * null if no property exists, a string if it is an easily serializable property, or a ```Promise
1386
- * &lt;Table&gt;``` that will either resolve with a table or error out if the object can't be passed to JS.
1387
- * @param attributeName -
1388
- * @return Object
1389
- */
1390
- getAttribute(attributeName:string):unknown|undefined|null;
1391
- /**
1392
- * Replace the currently set sort on this table. Returns the previously set value. Note that the sort property will
1393
- * immediately return the new value, but you may receive update events using the old sort before the new sort is
1394
- * applied, and the <b>sortchanged</b> event fires. Reusing existing, applied sorts may enable this to perform
1395
- * better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b> will
1396
- * not.
1397
- * @param sort -
1398
- * @return {@link dh.Sort} array
1399
- */
1400
- applySort(sort:Sort[]):Array<Sort>;
1401
- /**
1402
- * Replace the currently set filters on the table. Returns the previously set value. Note that the filter property
1403
- * will immediately return the new value, but you may receive update events using the old filter before the new one
1404
- * is applied, and the <b>filterchanged</b> event fires. Reusing existing, applied filters may enable this to
1405
- * perform better on the server. The <b>updated</b> event will also fire, but <b>rowadded</b> and <b>rowremoved</b>
1406
- * will not.
1407
- * @param filter -
1408
- * @return {@link dh.FilterCondition} array
1409
- */
1410
- applyFilter(filter:FilterCondition[]):Array<FilterCondition>;
1411
- /**
1412
- * used when adding new filter and sort operations to the table, as long as they are present.
1413
- * @param customColumns -
1414
- * @return {@link dh.CustomColumn} array
1415
- */
1416
- applyCustomColumns(customColumns:Array<string|CustomColumn>):Array<CustomColumn>;
1417
- /**
1418
- * If the columns parameter is not provided, all columns will be used. If the updateIntervalMs parameter is not
1419
- * provided, a default of one second will be used. Until this is called, no data will be available. Invoking this
1420
- * will result in events to be fired once data becomes available, starting with an `updated` event and a
1421
- * <b>rowadded</b> event per row in that range. The returned object allows the viewport to be closed when no longer
1422
- * needed.
1423
- * @param firstRow -
1424
- * @param lastRow -
1425
- * @param columns -
1426
- * @param updateIntervalMs -
1427
- * @return {@link dh.TableViewportSubscription}
1428
- */
1429
- setViewport(firstRow:number, lastRow:number, columns?:Array<Column>|undefined|null, updateIntervalMs?:number|undefined|null):TableViewportSubscription;
1430
- /**
1431
- * Gets the currently visible viewport. If the current set of operations has not yet resulted in data, it will not
1432
- * resolve until that data is ready. If this table is closed before the promise resolves, it will be rejected - to
1433
- * separate the lifespan of this promise from the table itself, call
1434
- * {@link TableViewportSubscription.getViewportData} on the result from {@link Table.setViewport}.
1435
- * @return Promise of {@link dh.TableData}
1436
- */
1437
- getViewportData():Promise<TableData>;
1438
- /**
1439
- * Creates a subscription to the specified columns, across all rows in the table. The optional parameter
1440
- * updateIntervalMs may be specified to indicate how often the server should send updates, defaulting to one second
1441
- * if omitted. Useful for charts or taking a snapshot of the table atomically. The initial snapshot will arrive in a
1442
- * single event, but later changes will be sent as updates. However, this may still be very expensive to run from a
1443
- * browser for very large tables. Each call to subscribe creates a new subscription, which must have <b>close()</b>
1444
- * called on it to stop it, and all events are fired from the TableSubscription instance.
1445
- * @param columns -
1446
- * @param updateIntervalMs -
1447
- * @return {@link dh.TableSubscription}
1448
- */
1449
- subscribe(columns:Array<Column>, updateIntervalMs?:number):TableSubscription;
1577
+ static ofString(str:string):LongWrapper;
1578
+ asNumber():number;
1579
+ valueOf():string;
1580
+ toString():string;
1581
+ }
1582
+
1583
+ export class Ide {
1584
+ constructor();
1585
+
1450
1586
  /**
1451
- * a new table containing the distinct tuples of values from the given columns that are present in the original
1452
- * table. This table can be manipulated as any other table. Sorting is often desired as the default sort is the
1453
- * order of appearance of values from the original table.
1454
- * @param columns -
1455
- * @return Promise of dh.Table
1587
+ * @deprecated
1456
1588
  */
1457
- selectDistinct(columns:Column[]):Promise<Table>;
1589
+ getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1458
1590
  /**
1459
- * Creates a new copy of this table, so it can be sorted and filtered separately, and maintain a different viewport.
1460
- * @return Promise of dh.Table
1591
+ * @deprecated
1461
1592
  */
1462
- copy():Promise<Table>;
1593
+ static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1594
+ }
1595
+
1596
+ /**
1597
+ * Describes data that can be filtered, either a column reference or a literal value. Used this way, the type of a value
1598
+ * can be specified so that values which are ambiguous or not well supported in JS will not be confused with Strings or
1599
+ * imprecise numbers (e.g., nanosecond-precision date values). Additionally, once wrapped in this way, methods can be
1600
+ * called on these value literal instances. These instances are immutable - any method called on them returns a new
1601
+ * instance.
1602
+ */
1603
+ export class FilterValue {
1604
+ protected constructor();
1605
+
1463
1606
  /**
1464
- * a promise that will resolve to a Totals Table of this table. This table will obey the configurations provided as
1465
- * a parameter, or will use the table's default if no parameter is provided, and be updated once per second as
1466
- * necessary. Note that multiple calls to this method will each produce a new TotalsTable which must have close()
1467
- * called on it when not in use.
1468
- * @param config -
1469
- * @return Promise of dh.TotalsTable
1607
+ * Constructs a number for the filter API from the given parameter. Can also be used on the values returned from
1608
+ * {@link TableData.get} for DateTime values. To create
1609
+ * a filter with a date, use <b>dh.DateWrapper.ofJsDate</b> or
1610
+ * {@link i18n.DateTimeFormat.parse}. To create a filter with a
1611
+ * 64-bit long integer, use {@link LongWrapper.ofString}.
1612
+ * @param input - the number to wrap as a FilterValue
1613
+ * @return an immutable FilterValue that can be built into a filter
1470
1614
  */
1471
- getTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1615
+ static ofNumber(input:LongWrapper|number):FilterValue;
1472
1616
  /**
1473
- * a promise that will resolve to a Totals Table of this table, ignoring any filters. See <b>getTotalsTable()</b>
1474
- * above for more specifics.
1475
- * @param config -
1476
- * @return promise of dh.TotalsTable
1617
+ * a filter condition checking if the current value is equal to the given parameter
1618
+ * @param term -
1619
+ * @return {@link dh.FilterCondition}
1477
1620
  */
1478
- getGrandTotalsTable(config?:TotalsTableConfig|undefined|null):Promise<TotalsTable>;
1621
+ eq(term:FilterValue):FilterCondition;
1479
1622
  /**
1480
- * a promise that will resolve to a new roll-up <b>TreeTable</b> of this table. Multiple calls to this method will
1481
- * each produce a new <b>TreeTable</b> which must have close() called on it when not in use.
1482
- * @param configObject -
1483
- * @return Promise of dh.TreeTable
1623
+ * a filter condition checking if the current value is equal to the given parameter, ignoring differences of upper
1624
+ * vs lower case
1625
+ * @param term -
1626
+ * @return {@link dh.FilterCondition}
1484
1627
  */
1485
- rollup(configObject:RollupConfig):Promise<TreeTable>;
1628
+ eqIgnoreCase(term:FilterValue):FilterCondition;
1486
1629
  /**
1487
- * a promise that will resolve to a new `TreeTable` of this table. Multiple calls to this method will each produce a
1488
- * new `TreeTable` which must have close() called on it when not in use.
1489
- * @param configObject -
1490
- * @return Promise dh.TreeTable
1630
+ * a filter condition checking if the current value is not equal to the given parameter
1631
+ * @param term -
1632
+ * @return {@link dh.FilterCondition}
1491
1633
  */
1492
- treeTable(configObject:TreeTableConfig):Promise<TreeTable>;
1634
+ notEq(term:FilterValue):FilterCondition;
1493
1635
  /**
1494
- * a "frozen" version of this table (a server-side snapshot of the entire source table). Viewports on the frozen
1495
- * table will not update. This does not change the original table, and the new table will not have any of the client
1496
- * side sorts/filters/columns. New client side sorts/filters/columns can be added to the frozen copy.
1497
- * @return Promise of dh.Table
1636
+ * a filter condition checking if the current value is not equal to the given parameter, ignoring differences of
1637
+ * upper vs lower case
1638
+ * @param term -
1639
+ * @return {@link dh.FilterCondition}
1498
1640
  */
1499
- freeze():Promise<Table>;
1500
- snapshot(baseTable:Table, doInitialSnapshot?:boolean, stampColumns?:string[]):Promise<Table>;
1641
+ notEqIgnoreCase(term:FilterValue):FilterCondition;
1501
1642
  /**
1502
- *
1503
- * @inheritDoc
1504
- * @deprecated
1643
+ * a filter condition checking if the current value is greater than the given parameter
1644
+ * @param term -
1645
+ * @return {@link dh.FilterCondition}
1505
1646
  */
1506
- join(joinType:string, rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1507
- asOfJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, asOfMatchRule?:string|undefined|null):Promise<Table>;
1508
- crossJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>|undefined|null, reserveBits?:number|undefined|null):Promise<Table>;
1509
- exactJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1510
- naturalJoin(rightTable:JoinableTable, columnsToMatch:Array<string>, columnsToAdd?:Array<string>):Promise<Table>;
1511
- byExternal(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1647
+ greaterThan(term:FilterValue):FilterCondition;
1512
1648
  /**
1513
- * Creates a new PartitionedTable from the contents of the current table, partitioning data based on the specified
1514
- * keys.
1515
- * @param keys -
1516
- * @param dropKeys -
1517
- * @return Promise dh.PartitionedTable
1649
+ * a filter condition checking if the current value is less than the given parameter
1650
+ * @param term -
1651
+ * @return {@link dh.FilterCondition}
1518
1652
  */
1519
- partitionBy(keys:object, dropKeys?:boolean):Promise<PartitionedTable>;
1653
+ lessThan(term:FilterValue):FilterCondition;
1520
1654
  /**
1521
- * a promise that will resolve to ColumnStatistics for the column of this table.
1522
- * @param column -
1523
- * @return Promise of dh.ColumnStatistics
1655
+ * a filter condition checking if the current value is greater than or equal to the given parameter
1656
+ * @param term -
1657
+ * @return {@link dh.FilterCondition}
1524
1658
  */
1525
- getColumnStatistics(column:Column):Promise<ColumnStatistics>;
1659
+ greaterThanOrEqualTo(term:FilterValue):FilterCondition;
1526
1660
  /**
1527
- * Seek the row matching the data provided
1528
- * @param startingRow - Row to start the seek from
1529
- * @param column - Column to seek for value on
1530
- * @param valueType - Type of value provided
1531
- * @param seekValue - Value to seek
1532
- * @param insensitive - Optional value to flag a search as case-insensitive. Defaults to `false`.
1533
- * @param contains - Optional value to have the seek value do a contains search instead of exact equality. Defaults to
1534
- * `false`.
1535
- * @param isBackwards - Optional value to seek backwards through the table instead of forwards. Defaults to `false`.
1536
- * @return A promise that resolves to the row value found.
1661
+ * a filter condition checking if the current value is less than or equal to the given parameter
1662
+ * @param term -
1663
+ * @return {@link dh.FilterCondition}
1537
1664
  */
1538
- seekRow(startingRow:number, column:Column, valueType:ValueTypeType, seekValue:any, insensitive?:boolean|undefined|null, contains?:boolean|undefined|null, isBackwards?:boolean|undefined|null):Promise<number>;
1539
- toString():string;
1665
+ lessThanOrEqualTo(term:FilterValue):FilterCondition;
1540
1666
  /**
1541
- * True if this table represents a user Input Table (created by InputTable.newInputTable). When true, you may call
1542
- * .inputTable() to add or remove data from the underlying table.
1543
- * @return boolean
1667
+ * a filter condition checking if the current value is in the given set of values
1668
+ * @param terms -
1669
+ * @return {@link dh.FilterCondition}
1544
1670
  */
1545
- get hasInputTable():boolean;
1671
+ in(terms:FilterValue[]):FilterCondition;
1546
1672
  /**
1547
- * The columns that are present on this table. This is always all possible columns. If you specify fewer columns in
1548
- * .setViewport(), you will get only those columns in your ViewportData. <b>Number size</b> The total count of rows
1549
- * in the table. The size can and will change; see the <b>sizechanged</b> event for details. Size will be negative
1550
- * in exceptional cases (eg. the table is uncoalesced, see the <b>isUncoalesced</b> property for details).
1551
- * @return {@link dh.Column} array
1673
+ * a filter condition checking if the current value is in the given set of values, ignoring differences of upper vs
1674
+ * lower case
1675
+ * @param terms -
1676
+ * @return {@link dh.FilterCondition}
1552
1677
  */
1553
- get columns():Array<Column>;
1678
+ inIgnoreCase(terms:FilterValue[]):FilterCondition;
1554
1679
  /**
1555
- * The default configuration to be used when building a <b>TotalsTable</b> for this table.
1556
- * @return dh.TotalsTableConfig
1680
+ * a filter condition checking that the current value is not in the given set of values
1681
+ * @param terms -
1682
+ * @return {@link dh.FilterCondition}
1557
1683
  */
1558
- get totalsTableConfig():TotalsTableConfig;
1684
+ notIn(terms:FilterValue[]):FilterCondition;
1559
1685
  /**
1560
- * An ordered list of Sorts to apply to the table. To update, call <b>applySort()</b>. Note that this getter will
1561
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
1562
- * for the <b>sortchanged</b> event to know when to update the UI.
1563
- * @return {@link dh.Sort} array
1686
+ * a filter condition checking that the current value is not in the given set of values, ignoring differences of
1687
+ * upper vs lower case
1688
+ * @param terms -
1689
+ * @return {@link dh.FilterCondition}
1564
1690
  */
1565
- get sort():Array<Sort>;
1691
+ notInIgnoreCase(terms:FilterValue[]):FilterCondition;
1566
1692
  /**
1567
- * An ordered list of custom column formulas to add to the table, either adding new columns or replacing existing
1568
- * ones. To update, call <b>applyCustomColumns()</b>.
1569
- * @return {@link dh.CustomColumn} array
1693
+ * a filter condition checking if the given value contains the given string value
1694
+ * @param term -
1695
+ * @return {@link dh.FilterCondition}
1570
1696
  */
1571
- get customColumns():Array<CustomColumn>;
1697
+ contains(term:FilterValue):FilterCondition;
1572
1698
  /**
1573
- * True if this table may receive updates from the server, including size changed events, updated events after
1574
- * initial snapshot.
1575
- * @return boolean
1699
+ * a filter condition checking if the given value contains the given string value, ignoring differences of upper vs
1700
+ * lower case
1701
+ * @param term -
1702
+ * @return {@link dh.FilterCondition}
1576
1703
  */
1577
- get isRefreshing():boolean;
1704
+ containsIgnoreCase(term:FilterValue):FilterCondition;
1578
1705
  /**
1579
- * An ordered list of Filters to apply to the table. To update, call applyFilter(). Note that this getter will
1580
- * return the new value immediately, even though it may take a little time to update on the server. You may listen
1581
- * for the <b>filterchanged</b> event to know when to update the UI.
1582
- * @return {@link dh.FilterCondition} array
1706
+ * a filter condition checking if the given value matches the provided regular expressions string. Regex patterns
1707
+ * use Java regex syntax
1708
+ * @param pattern -
1709
+ * @return {@link dh.FilterCondition}
1583
1710
  */
1584
- get filter():Array<FilterCondition>;
1711
+ matches(pattern:FilterValue):FilterCondition;
1585
1712
  /**
1586
- * The total count of the rows in the table, excluding any filters. Unlike <b>size</b>, changes to this value will
1587
- * not result in any event. <b>Sort[] sort</b> an ordered list of Sorts to apply to the table. To update, call
1588
- * applySort(). Note that this getter will return the new value immediately, even though it may take a little time
1589
- * to update on the server. You may listen for the <b>sortchanged</b> event to know when to update the UI.
1590
- * @return double
1713
+ * a filter condition checking if the given value matches the provided regular expressions string, ignoring
1714
+ * differences of upper vs lower case. Regex patterns use Java regex syntax
1715
+ * @param pattern -
1716
+ * @return {@link dh.FilterCondition}
1591
1717
  */
1592
- get totalSize():number;
1718
+ matchesIgnoreCase(pattern:FilterValue):FilterCondition;
1593
1719
  /**
1594
- * The total count of rows in the table. The size can and will change; see the <b>sizechanged</b> event for details.
1595
- * Size will be negative in exceptional cases (e.g., the table is uncoalesced; see the <b>isUncoalesced</b>
1596
- * property). for details).
1597
- * @return double
1720
+ * a filter condition checking if the current value is a true boolean
1721
+ * @return {@link dh.FilterCondition}
1598
1722
  */
1599
- get size():number;
1723
+ isTrue():FilterCondition;
1600
1724
  /**
1601
- * True if this table has been closed.
1602
- * @return boolean
1725
+ * a filter condition checking if the current value is a false boolean
1726
+ * @return {@link dh.FilterCondition}
1603
1727
  */
1604
- get isClosed():boolean;
1728
+ isFalse():FilterCondition;
1605
1729
  /**
1606
- * Read-only. True if this table is uncoalesced. Set a viewport or filter on the partition columns to coalesce the
1607
- * table. Check the <b>isPartitionColumn</b> property on the table columns to retrieve the partition columns. Size
1608
- * will be unavailable until table is coalesced.
1609
- * @return boolean
1730
+ * a filter condition checking if the current value is a null value
1731
+ * @return {@link dh.FilterCondition}
1610
1732
  */
1611
- get isUncoalesced():boolean;
1733
+ isNull():FilterCondition;
1612
1734
  /**
1613
- * Listen for events on this object.
1614
- * @param name - the name of the event to listen for
1615
- * @param callback - a function to call when the event occurs
1616
- * @return Returns a cleanup function.
1617
- * @typeParam T - the type of the data that the event will provide
1735
+ * a filter condition invoking the given method on the current value, with the given parameters. Currently supported
1736
+ * functions that can be invoked on a String:
1737
+ * <ul>
1738
+ * <li><b>startsWith</b>: Returns true if the current string value starts with the supplied string argument</li>
1739
+ * <li><b>endsWith</b>: Returns true if the current string value ends with the supplied string argument</li>
1740
+ * <li><b>matches</b>: Returns true if the current string value matches the supplied string argument used as a Java
1741
+ * regular expression</li>
1742
+ * <li><b>contains</b>: Returns true if the current string value contains the supplied string argument
1743
+ * <p>
1744
+ * When invoking against a constant, this should be avoided in favor of FilterValue.contains
1745
+ * </p>
1746
+ * </li>
1747
+ * </ul>
1748
+ * @param method -
1749
+ * @param args -
1750
+ * @return
1618
1751
  */
1619
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1620
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1621
- hasListeners(name:string):boolean;
1752
+ invoke(method:string, ...args:FilterValue[]):FilterCondition;
1753
+ toString():string;
1622
1754
  /**
1623
- * Removes an event listener added to this table.
1624
- * @param name -
1625
- * @param callback -
1755
+ * Constructs a string for the filter API from the given parameter.
1756
+ * @param input -
1626
1757
  * @return
1627
- * @typeParam T -
1628
1758
  */
1629
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1759
+ static ofString(input:any):FilterValue;
1630
1760
  /**
1631
- * a Sort than can be used to reverse a table. This can be passed into n array in applySort. Note that Tree Tables
1632
- * do not support reverse.
1633
- * @return {@link dh.Sort}
1761
+ * Constructs a boolean for the filter API from the given parameter.
1762
+ * @param b -
1763
+ * @return
1634
1764
  */
1635
- static reverse():Sort;
1765
+ static ofBoolean(b:boolean):FilterValue;
1636
1766
  }
1637
1767
 
1638
- export class Ide {
1639
- constructor();
1768
+ export class DateWrapper extends LongWrapper {
1769
+ protected constructor();
1770
+
1771
+ static ofJsDate(date:Date):DateWrapper;
1772
+ asDate():Date;
1773
+ }
1640
1774
 
1775
+ /**
1776
+ * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
1777
+ * indicating how that table was configured when it was declared, and each Totals Table has a similar property
1778
+ * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
1779
+ * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
1780
+ * of <b>TotalsTableConfig</b> will be supplied.
1781
+ *
1782
+ * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
1783
+ * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
1784
+ * expected formats.
1785
+ */
1786
+ export class TotalsTableConfig {
1641
1787
  /**
1642
1788
  * @deprecated
1643
1789
  */
1644
- getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1790
+ static readonly COUNT:string;
1645
1791
  /**
1646
1792
  * @deprecated
1647
1793
  */
1648
- static getExistingSession(websocketUrl:string, authToken:string, serviceId:string, language:string):Promise<IdeSession>;
1649
- }
1650
-
1651
- export class CoreClient implements HasEventHandling {
1652
- static readonly EVENT_CONNECT:string;
1653
- static readonly EVENT_DISCONNECT:string;
1654
- static readonly EVENT_RECONNECT:string;
1655
- static readonly EVENT_RECONNECT_AUTH_FAILED:string;
1656
- static readonly EVENT_REFRESH_TOKEN_UPDATED:string;
1657
- static readonly EVENT_REQUEST_FAILED:string;
1658
- static readonly EVENT_REQUEST_STARTED:string;
1659
- static readonly EVENT_REQUEST_SUCCEEDED:string;
1660
- static readonly LOGIN_TYPE_PASSWORD:string;
1661
- static readonly LOGIN_TYPE_ANONYMOUS:string;
1662
-
1663
- constructor(serverUrl:string, connectOptions?:ConnectOptions);
1664
-
1665
- running():Promise<CoreClient>;
1666
- getServerUrl():string;
1667
- getAuthConfigValues():Promise<string[][]>;
1668
- login(credentials:LoginCredentials):Promise<void>;
1669
- relogin(token:RefreshToken):Promise<void>;
1670
- onConnected(timeoutInMillis?:number):Promise<void>;
1671
- getServerConfigValues():Promise<string[][]>;
1672
- getStorageService():dh.storage.StorageService;
1673
- getAsIdeConnection():Promise<IdeConnection>;
1674
- disconnect():void;
1675
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
1676
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
1677
- hasListeners(name:string):boolean;
1678
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
1679
- }
1680
-
1681
- /**
1682
- * Describes the structure of the column, and if desired can be used to get access to the data to be rendered in this
1683
- * column.
1684
- */
1685
- export class Column {
1794
+ static readonly MIN:string;
1686
1795
  /**
1687
- * If this column is part of a roll-up tree table, represents the type of the row data that can be found in this
1688
- * column for leaf nodes if includeConstituents is enabled. Otherwise, it is <b>null</b>.
1689
- * @return String
1796
+ * @deprecated
1690
1797
  */
1691
- readonly constituentType?:string|null;
1692
- readonly description?:string|null;
1693
-
1694
- protected constructor();
1695
-
1798
+ static readonly MAX:string;
1696
1799
  /**
1697
- * the value for this column in the given row. Type will be consistent with the type of the Column.
1698
- * @param row -
1699
- * @return Any
1800
+ * @deprecated
1700
1801
  */
1701
- get(row:Row):any;
1702
- getFormat(row:Row):Format;
1802
+ static readonly SUM:string;
1703
1803
  /**
1704
- * Creates a sort builder object, to be used when sorting by this column.
1705
- * @return {@link dh.Sort}
1804
+ * @deprecated
1706
1805
  */
1707
- sort():Sort;
1806
+ static readonly ABS_SUM:string;
1708
1807
  /**
1709
- * Creates a new value for use in filters based on this column. Used either as a parameter to another filter
1710
- * operation, or as a builder to create a filter operation.
1711
- * @return {@link dh.FilterValue}
1808
+ * @deprecated
1712
1809
  */
1713
- filter():FilterValue;
1810
+ static readonly VAR:string;
1714
1811
  /**
1715
- * a <b>CustomColumn</b> object to apply using `applyCustomColumns` with the expression specified.
1716
- * @param expression -
1717
- * @return {@link dh.CustomColumn}
1812
+ * @deprecated
1718
1813
  */
1719
- formatColor(expression:string):CustomColumn;
1814
+ static readonly AVG:string;
1720
1815
  /**
1721
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1722
- * @param expression -
1723
- * @return {@link dh.CustomColumn}
1816
+ * @deprecated
1724
1817
  */
1725
- formatNumber(expression:string):CustomColumn;
1818
+ static readonly STD:string;
1726
1819
  /**
1727
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1728
- * @param expression -
1729
- * @return {@link dh.CustomColumn}
1820
+ * @deprecated
1730
1821
  */
1731
- formatDate(expression:string):CustomColumn;
1732
- toString():string;
1822
+ static readonly FIRST:string;
1733
1823
  /**
1734
- * Label for this column.
1735
- * @return String
1824
+ * @deprecated
1736
1825
  */
1737
- get name():string;
1826
+ static readonly LAST:string;
1738
1827
  /**
1739
- * True if this column is a partition column. Partition columns are used for filtering uncoalesced tables (see
1740
- * <b>isUncoalesced</b> property on <b>Table</b>)
1741
- * @return boolean
1828
+ * @deprecated
1742
1829
  */
1743
- get isPartitionColumn():boolean;
1830
+ static readonly SKIP:string;
1744
1831
  /**
1745
- *
1746
- * @deprecated do not use. Internal index of the column in the table, to be used as a key on the Row.
1747
- * @return int
1832
+ * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
1748
1833
  */
1749
- get index():number;
1750
- get isSortable():boolean;
1834
+ showTotalsByDefault:boolean;
1751
1835
  /**
1752
- * Type of the row data that can be found in this column.
1753
- * @return String
1836
+ * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
1754
1837
  */
1755
- get type():string;
1838
+ showGrandTotalsByDefault:boolean;
1756
1839
  /**
1757
- * Format entire rows colors using the expression specified. Returns a <b>CustomColumn</b> object to apply to a
1758
- * table using <b>applyCustomColumns</b> with the parameters specified.
1759
- * @param expression -
1760
- * @return {@link dh.CustomColumn}
1840
+ * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
1761
1841
  */
1762
- static formatRowColor(expression:string):CustomColumn;
1842
+ defaultOperation:AggregationOperationType;
1763
1843
  /**
1764
- * a <b>CustomColumn</b> object to apply using <b>applyCustomColumns</b> with the expression specified.
1765
- * @param name -
1766
- * @param expression -
1767
- * @return {@link dh.CustomColumn}
1844
+ * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
1845
+ * Table. If a column is omitted, the defaultOperation is used.
1768
1846
  */
1769
- static createCustomColumn(name:string, expression:string):CustomColumn;
1770
- }
1771
-
1772
- export class LoginCredentials {
1773
- type?:string|null;
1774
- username?:string|null;
1775
- token?:string|null;
1847
+ operationMap:{ [key: string]: Array<AggregationOperationType>; };
1848
+ /**
1849
+ * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
1850
+ * these columns. See also `Table.selectDistinct`.
1851
+ */
1852
+ groupBy:Array<string>;
1776
1853
 
1777
1854
  constructor();
1855
+
1856
+ toString():string;
1778
1857
  }
1779
1858
 
1780
1859
  /**
@@ -1807,6 +1886,89 @@ export namespace dh {
1807
1886
  constructor();
1808
1887
  }
1809
1888
 
1889
+ /**
1890
+ * Presently optional and not used by the server, this allows the client to specify some authentication details. String
1891
+ * authToken <i>- base 64 encoded auth token. String serviceId -</i> The service ID to use for the connection.
1892
+ */
1893
+ export class ConnectOptions {
1894
+ headers:{ [key: string]: string; };
1895
+
1896
+ constructor();
1897
+ }
1898
+
1899
+ /**
1900
+ * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
1901
+ * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
1902
+ * instance.
1903
+ */
1904
+ export class FilterCondition {
1905
+ protected constructor();
1906
+
1907
+ /**
1908
+ * the opposite of this condition
1909
+ * @return FilterCondition
1910
+ */
1911
+ not():FilterCondition;
1912
+ /**
1913
+ * a condition representing the current condition logically ANDed with the other parameters
1914
+ * @param filters -
1915
+ * @return FilterCondition
1916
+ */
1917
+ and(...filters:FilterCondition[]):FilterCondition;
1918
+ /**
1919
+ * a condition representing the current condition logically ORed with the other parameters
1920
+ * @param filters -
1921
+ * @return FilterCondition.
1922
+ */
1923
+ or(...filters:FilterCondition[]):FilterCondition;
1924
+ /**
1925
+ * a string suitable for debugging showing the details of this condition.
1926
+ * @return String.
1927
+ */
1928
+ toString():string;
1929
+ get columns():Array<Column>;
1930
+ /**
1931
+ * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
1932
+ * functions:
1933
+ * <ul>
1934
+ * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
1935
+ * than the third</li>
1936
+ * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
1937
+ * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
1938
+ * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
1939
+ * "not a number"</i></li>
1940
+ * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
1941
+ * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
1942
+ * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
1943
+ * expression</li>
1944
+ * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
1945
+ * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
1946
+ * <p>
1947
+ * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
1948
+ * method should be used in other cases
1949
+ * </p>
1950
+ * </li>
1951
+ * </ul>
1952
+ * @param function -
1953
+ * @param args -
1954
+ * @return dh.FilterCondition
1955
+ */
1956
+ static invoke(func:string, ...args:FilterValue[]):FilterCondition;
1957
+ /**
1958
+ * a filter condition which will check if the given value can be found in any supported column on whatever table
1959
+ * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
1960
+ * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
1961
+ * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
1962
+ * String columns, the given value will match any column which contains this string in a case-insensitive search. An
1963
+ * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
1964
+ * {@link dh.Column.filter}).
1965
+ * @param value -
1966
+ * @param columns -
1967
+ * @return dh.FilterCondition
1968
+ */
1969
+ static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
1970
+ }
1971
+
1810
1972
  /**
1811
1973
  * Behaves like a {@link dh.Table} externally, but data, state, and viewports are managed by an entirely different
1812
1974
  * mechanism, and so reimplemented here.
@@ -1974,394 +2136,241 @@ export namespace dh {
1974
2136
  get includeConstituents():boolean;
1975
2137
  get groupedColumns():Array<Column>;
1976
2138
  /**
1977
- * True if this table has been closed.
1978
- * @return boolean
1979
- */
1980
- get isClosed():boolean;
1981
- /**
1982
- * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
1983
- * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
1984
- * when considering collapse/expand states).
1985
- * @return double
1986
- */
1987
- get size():number;
1988
- /**
1989
- * The columns that can be shown in this Tree Table.
1990
- * @return {@link dh.Column} array
1991
- */
1992
- get columns():Array<Column>;
1993
- /**
1994
- * The current sort configuration of this Tree Table
1995
- * @return {@link dh.Sort} array.
1996
- */
1997
- get sort():Array<Sort>;
1998
- /**
1999
- * True if this table may receive updates from the server, including size changed events, updated events after
2000
- * initial snapshot.
2001
- * @return boolean
2002
- */
2003
- get isRefreshing():boolean;
2004
- /**
2005
- * Listen for events on this object.
2006
- * @param name - the name of the event to listen for
2007
- * @param callback - a function to call when the event occurs
2008
- * @return Returns a cleanup function.
2009
- * @typeParam T - the type of the data that the event will provide
2010
- */
2011
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2012
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2013
- hasListeners(name:string):boolean;
2014
- /**
2015
- * Removes an event listener added to this table.
2016
- * @param name -
2017
- * @param callback -
2018
- * @return
2019
- * @typeParam T -
2020
- */
2021
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2022
- }
2023
-
2024
- /**
2025
- * Deprecated for use in Deephaven Core.
2026
- * @deprecated
2027
- */
2028
- export class Client {
2029
- static readonly EVENT_REQUEST_FAILED:string;
2030
- static readonly EVENT_REQUEST_STARTED:string;
2031
- static readonly EVENT_REQUEST_SUCCEEDED:string;
2032
-
2033
- constructor();
2034
- }
2035
-
2036
- export class LongWrapper {
2037
- protected constructor();
2038
-
2039
- static ofString(str:string):LongWrapper;
2040
- asNumber():number;
2041
- valueOf():string;
2042
- toString():string;
2043
- }
2044
-
2045
- /**
2046
- * This class allows iteration over non-contiguous indexes. In the future, this will support the EcmaScript 2015
2047
- * Iteration protocol, but for now has one method which returns an iterator, and also supports querying the size.
2048
- * Additionally, we may add support for creating RangeSet objects to better serve some use cases.
2049
- */
2050
- export class RangeSet {
2051
- protected constructor();
2052
-
2053
- static ofRange(first:number, last:number):RangeSet;
2054
- static ofItems(rows:number[]):RangeSet;
2055
- static ofRanges(ranges:RangeSet[]):RangeSet;
2056
- static ofSortedRanges(ranges:RangeSet[]):RangeSet;
2057
- /**
2058
- * a new iterator over all indexes in this collection.
2059
- * @return Iterator of {@link dh.LongWrapper}
2060
- */
2061
- iterator():Iterator<LongWrapper>;
2062
- /**
2063
- * The total count of items contained in this collection. In some cases this can be expensive to compute, and
2064
- * generally should not be needed except for debugging purposes, or preallocating space (i.e., do not call this
2065
- * property each time through a loop).
2066
- * @return double
2067
- */
2068
- get size():number;
2069
- }
2070
-
2071
- /**
2072
- * Describes a filter which can be applied to a table. Replacing these instances may be more expensive than reusing
2073
- * them. These instances are immutable - all operations that compose them to build bigger expressions return a new
2074
- * instance.
2075
- */
2076
- export class FilterCondition {
2077
- protected constructor();
2078
-
2079
- /**
2080
- * the opposite of this condition
2081
- * @return FilterCondition
2082
- */
2083
- not():FilterCondition;
2084
- /**
2085
- * a condition representing the current condition logically ANDed with the other parameters
2086
- * @param filters -
2087
- * @return FilterCondition
2088
- */
2089
- and(...filters:FilterCondition[]):FilterCondition;
2090
- /**
2091
- * a condition representing the current condition logically ORed with the other parameters
2092
- * @param filters -
2093
- * @return FilterCondition.
2094
- */
2095
- or(...filters:FilterCondition[]):FilterCondition;
2096
- /**
2097
- * a string suitable for debugging showing the details of this condition.
2098
- * @return String.
2099
- */
2100
- toString():string;
2101
- get columns():Array<Column>;
2102
- /**
2103
- * a filter condition invoking a static function with the given parameters. Currently supported Deephaven static
2104
- * functions:
2105
- * <ul>
2106
- * <li><b>inRange</b>: Given three comparable values, returns true if the first is less than the second but greater
2107
- * than the third</li>
2108
- * <li><b>isInf</b>:Returns true if the given number is <i>infinity</i></li>
2109
- * <li><b>isNaN</b>:Returns true if the given number is <i>not a number</i></li>
2110
- * <li><b>isNormal</b>:Returns true if the given number <i>is not null</i>, <i>is not infinity</i>, and <i>is not
2111
- * "not a number"</i></li>
2112
- * <li><b>startsWith</b>:Returns true if the first string starts with the second string</li>
2113
- * <li><b>endsWith</b>Returns true if the first string ends with the second string</li>
2114
- * <li><b>matches</b>:Returns true if the first string argument matches the second string used as a Java regular
2115
- * expression</li>
2116
- * <li><b>contains</b>:Returns true if the first string argument contains the second string as a substring</li>
2117
- * <li><b>in</b>:Returns true if the first string argument can be found in the second array argument.
2118
- * <p>
2119
- * Note that the array can only be specified as a column reference at this time - typically the `FilterValue.in`
2120
- * method should be used in other cases
2121
- * </p>
2122
- * </li>
2123
- * </ul>
2124
- * @param function -
2125
- * @param args -
2126
- * @return dh.FilterCondition
2127
- */
2128
- static invoke(func:string, ...args:FilterValue[]):FilterCondition;
2129
- /**
2130
- * a filter condition which will check if the given value can be found in any supported column on whatever table
2131
- * this FilterCondition is passed to. This FilterCondition is somewhat unique in that it need not be given a column
2132
- * instance, but will adapt to any table. On numeric columns, with a value passed in which can be parsed as a
2133
- * number, the column will be filtered to numbers which equal, or can be "rounded" effectively to this number. On
2134
- * String columns, the given value will match any column which contains this string in a case-insensitive search. An
2135
- * optional second argument can be passed, an array of `FilterValue` from the columns to limit this search to (see
2136
- * {@link dh.Column.filter}).
2137
- * @param value -
2138
- * @param columns -
2139
- * @return dh.FilterCondition
2140
- */
2141
- static search(value:FilterValue, columns?:FilterValue[]):FilterCondition;
2142
- }
2143
-
2144
- /**
2145
- * Represents a non-viewport subscription to a table, and all data currently known to be present in the subscribed
2146
- * columns. This class handles incoming snapshots and deltas, and fires events to consumers to notify of data changes.
2147
- *
2148
- * Unlike {@link dh.TableViewportSubscription}, the "original" table does not have a reference to this instance, only the
2149
- * "private" table instance does, since the original cannot modify the subscription, and the private instance must
2150
- * forward data to it.
2151
- *
2152
- * Represents a subscription to the table on the server. Changes made to the table will not be reflected here - the
2153
- * subscription must be closed and a new one optioned to see those changes. The event model is slightly different from
2154
- * viewports to make it less expensive to compute for large tables.
2155
- */
2156
- export class TableSubscription implements HasEventHandling {
2157
- /**
2158
- * Indicates that some new data is available on the client, either an initial snapshot or a delta update. The
2159
- * <b>detail</b> field of the event will contain a TableSubscriptionEventData detailing what has changed, or
2160
- * allowing access to the entire range of items currently in the subscribed columns.
2161
- */
2162
- static readonly EVENT_UPDATED:string;
2163
-
2164
- protected constructor();
2165
-
2166
- /**
2167
- * Stops the subscription on the server.
2168
- */
2169
- close():void;
2170
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2171
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2172
- hasListeners(name:string):boolean;
2173
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2174
- /**
2175
- * The columns that were subscribed to when this subscription was created
2176
- * @return {@link dh.Column}
2177
- */
2178
- get columns():Array<Column>;
2179
- }
2180
-
2181
- /**
2182
- * Describes how a Totals Table will be generated from its parent table. Each table has a default (which may be null)
2183
- * indicating how that table was configured when it was declared, and each Totals Table has a similar property
2184
- * describing how it was created. Both the <b>Table.getTotalsTable</b> and <b>Table.getGrandTotalsTable</b> methods take
2185
- * this config as an optional parameter - without it, the table's default will be used, or if null, a default instance
2186
- * of <b>TotalsTableConfig</b> will be supplied.
2187
- *
2188
- * This class has a no-arg constructor, allowing an instance to be made with the default values provided. However, any
2189
- * JS object can be passed in to the methods which accept instances of this type, provided their values adhere to the
2190
- * expected formats.
2191
- */
2192
- export class TotalsTableConfig {
2193
- /**
2194
- * @deprecated
2195
- */
2196
- static readonly COUNT:string;
2197
- /**
2198
- * @deprecated
2199
- */
2200
- static readonly MIN:string;
2201
- /**
2202
- * @deprecated
2203
- */
2204
- static readonly MAX:string;
2205
- /**
2206
- * @deprecated
2207
- */
2208
- static readonly SUM:string;
2209
- /**
2210
- * @deprecated
2211
- */
2212
- static readonly ABS_SUM:string;
2213
- /**
2214
- * @deprecated
2215
- */
2216
- static readonly VAR:string;
2217
- /**
2218
- * @deprecated
2219
- */
2220
- static readonly AVG:string;
2221
- /**
2222
- * @deprecated
2223
- */
2224
- static readonly STD:string;
2225
- /**
2226
- * @deprecated
2227
- */
2228
- static readonly FIRST:string;
2229
- /**
2230
- * @deprecated
2139
+ * True if this table has been closed.
2140
+ * @return boolean
2231
2141
  */
2232
- static readonly LAST:string;
2142
+ get isClosed():boolean;
2233
2143
  /**
2234
- * @deprecated
2144
+ * The current number of rows given the table's contents and the various expand/collapse states of each node. (No
2145
+ * totalSize is provided at this time; its definition becomes unclear between roll-up and tree tables, especially
2146
+ * when considering collapse/expand states).
2147
+ * @return double
2235
2148
  */
2236
- static readonly SKIP:string;
2149
+ get size():number;
2237
2150
  /**
2238
- * Specifies if a Totals Table should be expanded by default in the UI. Defaults to false.
2151
+ * The columns that can be shown in this Tree Table.
2152
+ * @return {@link dh.Column} array
2239
2153
  */
2240
- showTotalsByDefault:boolean;
2154
+ get columns():Array<Column>;
2241
2155
  /**
2242
- * Specifies if a Grand Totals Table should be expanded by default in the UI. Defaults to false.
2156
+ * The current sort configuration of this Tree Table
2157
+ * @return {@link dh.Sort} array.
2243
2158
  */
2244
- showGrandTotalsByDefault:boolean;
2159
+ get sort():Array<Sort>;
2245
2160
  /**
2246
- * Specifies the default operation for columns that do not have a specific operation applied; defaults to "Sum".
2161
+ * True if this table may receive updates from the server, including size changed events, updated events after
2162
+ * initial snapshot.
2163
+ * @return boolean
2247
2164
  */
2248
- defaultOperation:AggregationOperationType;
2165
+ get isRefreshing():boolean;
2249
2166
  /**
2250
- * Mapping from each column name to the aggregation(s) that should be applied to that column in the resulting Totals
2251
- * Table. If a column is omitted, the defaultOperation is used.
2167
+ * Listen for events on this object.
2168
+ * @param name - the name of the event to listen for
2169
+ * @param callback - a function to call when the event occurs
2170
+ * @return Returns a cleanup function.
2171
+ * @typeParam T - the type of the data that the event will provide
2252
2172
  */
2253
- operationMap:{ [key: string]: Array<AggregationOperationType>; };
2173
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2174
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2175
+ hasListeners(name:string):boolean;
2254
2176
  /**
2255
- * Groupings to use when generating the Totals Table. One row will exist for each unique set of values observed in
2256
- * these columns. See also `Table.selectDistinct`.
2177
+ * Removes an event listener added to this table.
2178
+ * @param name -
2179
+ * @param callback -
2180
+ * @return
2181
+ * @typeParam T -
2257
2182
  */
2258
- groupBy:Array<string>;
2183
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2184
+ }
2259
2185
 
2260
- constructor();
2186
+ /**
2187
+ * Wrap BigDecimal values for use in JS. Provides text formatting for display and access to the underlying value.
2188
+ */
2189
+ export class BigDecimalWrapper {
2190
+ protected constructor();
2261
2191
 
2192
+ static ofString(value:string):BigDecimalWrapper;
2193
+ asNumber():number;
2194
+ valueOf():string;
2262
2195
  toString():string;
2263
2196
  }
2264
2197
 
2265
2198
  /**
2266
- * A js type for operating on input tables.
2267
- *
2268
- * Represents a User Input Table, which can have data added to it from other sources.
2269
- *
2270
- * You may add rows using dictionaries of key-value tuples (representing columns by name), add tables containing all the
2271
- * key/value columns to add, or delete tables containing the keys to delete. Each operation is atomic, and will either
2272
- * succeed completely or fail completely. To guarantee order of operations, apply an operation and wait for the response
2273
- * before sending the next operation.
2274
- *
2275
- * Each table has one or more key columns, where each unique combination of keys will appear at most once in the table.
2276
- *
2277
- * To view the results of the Input Table, you should use standard table operations on the InputTable's source Table
2278
- * object.
2199
+ * Exists to keep the dh.TableMap namespace so that the web UI can remain compatible with the DHE API, which still calls
2200
+ * this type TableMap.
2201
+ * @deprecated
2279
2202
  */
2280
- export class InputTable {
2203
+ export class TableMap {
2204
+ static readonly EVENT_KEYADDED:string;
2205
+ static readonly EVENT_DISCONNECT:string;
2206
+ static readonly EVENT_RECONNECT:string;
2207
+ static readonly EVENT_RECONNECTFAILED:string;
2208
+
2209
+ protected constructor();
2210
+ }
2211
+
2212
+ /**
2213
+ * Describes a Sort present on the table. No visible constructor, created through the use of Column.sort(), will be tied
2214
+ * to that particular column data. Sort instances are immutable, and use a builder pattern to make modifications. All
2215
+ * methods return a new Sort instance.
2216
+ */
2217
+ export class Sort {
2218
+ static readonly ASCENDING:string;
2219
+ static readonly DESCENDING:string;
2220
+ static readonly REVERSE:string;
2221
+
2281
2222
  protected constructor();
2282
2223
 
2283
2224
  /**
2284
- * Adds a single row to the table. For each key or value column name in the Input Table, we retrieve that javascript
2285
- * property at that name and validate it can be put into the given column type.
2286
- * @param row -
2287
- * @param userTimeZone -
2288
- * @return Promise of dh.InputTable
2289
- */
2290
- addRow(row:{ [key: string]: any; }, userTimeZone?:string):Promise<InputTable>;
2291
- /**
2292
- * Add multiple rows to a table.
2293
- * @param rows -
2294
- * @param userTimeZone -
2295
- * @return Promise of dh.InputTable
2296
- */
2297
- addRows(rows:{ [key: string]: any; }[], userTimeZone?:string):Promise<InputTable>;
2298
- /**
2299
- * Add an entire table to this Input Table. Only column names that match the definition of the input table will be
2300
- * copied, and all key columns must have values filled in. This only copies the current state of the source table;
2301
- * future updates to the source table will not be reflected in the Input Table. The returned promise will be
2302
- * resolved to the same InputTable instance this method was called upon once the server returns.
2303
- * @param tableToAdd -
2304
- * @return Promise of dh.InputTable
2225
+ * Builds a Sort instance to sort values in ascending order.
2226
+ * @return {@link dh.Sort}
2305
2227
  */
2306
- addTable(tableToAdd:Table):Promise<InputTable>;
2228
+ asc():Sort;
2307
2229
  /**
2308
- * Add multiple tables to this Input Table.
2309
- * @param tablesToAdd -
2310
- * @return Promise of dh.InputTable
2230
+ * Builds a Sort instance to sort values in descending order.
2231
+ * @return {@link dh.Sort}
2311
2232
  */
2312
- addTables(tablesToAdd:Table[]):Promise<InputTable>;
2233
+ desc():Sort;
2313
2234
  /**
2314
- * Deletes an entire table from this Input Table. Key columns must match the Input Table.
2315
- * @param tableToDelete -
2316
- * @return Promise of dh.InputTable
2235
+ * Builds a Sort instance which takes the absolute value before applying order.
2236
+ * @return {@link dh.Sort}
2317
2237
  */
2318
- deleteTable(tableToDelete:Table):Promise<InputTable>;
2238
+ abs():Sort;
2239
+ toString():string;
2319
2240
  /**
2320
- * Delete multiple tables from this Input Table.
2321
- * @param tablesToDelete -
2322
- * @return
2241
+ * True if the absolute value of the column should be used when sorting; defaults to false.
2242
+ * @return boolean
2323
2243
  */
2324
- deleteTables(tablesToDelete:Table[]):Promise<InputTable>;
2244
+ get isAbs():boolean;
2325
2245
  /**
2326
- * A list of the key columns, by name
2327
- * @return String array.
2246
+ * The column which is sorted.
2247
+ * @return {@link dh.Column}
2328
2248
  */
2329
- get keys():string[];
2249
+ get column():Column;
2330
2250
  /**
2331
- * A list of the value columns, by name
2332
- * @return String array.
2251
+ * The direction of this sort, either <b>ASC</b>, <b>DESC</b>, or <b>REVERSE</b>.
2252
+ * @return String
2333
2253
  */
2334
- get values():string[];
2254
+ get direction():string;
2255
+ }
2256
+
2257
+ export class CustomColumn {
2258
+ static readonly TYPE_FORMAT_COLOR:string;
2259
+ static readonly TYPE_FORMAT_NUMBER:string;
2260
+ static readonly TYPE_FORMAT_DATE:string;
2261
+ static readonly TYPE_NEW:string;
2262
+
2263
+ protected constructor();
2264
+
2265
+ valueOf():string;
2266
+ toString():string;
2335
2267
  /**
2336
- * A list of the key columns.
2337
- * @return Column array.
2268
+ * The expression to evaluate this custom column.
2269
+ * @return String
2338
2270
  */
2339
- get keyColumns():Column[];
2271
+ get expression():string;
2340
2272
  /**
2341
- * A list of the value Column objects
2342
- * @return {@link dh.Column} array.
2273
+ * The name of the column to use.
2274
+ * @return String
2343
2275
  */
2344
- get valueColumns():Column[];
2276
+ get name():string;
2345
2277
  /**
2346
- * The source table for this Input Table
2347
- * @return dh.table
2278
+ * Type of custom column. One of
2279
+ *
2280
+ * <ul>
2281
+ * <li>FORMAT_COLOR</li>
2282
+ * <li>FORMAT_NUMBER</li>
2283
+ * <li>FORMAT_DATE</li>
2284
+ * <li>NEW</li>
2285
+ * </ul>
2286
+ * @return String
2348
2287
  */
2349
- get table():Table;
2288
+ get type():string;
2350
2289
  }
2351
2290
 
2352
- export class DateWrapper extends LongWrapper {
2291
+ export class IdeSession implements HasEventHandling {
2292
+ static readonly EVENT_COMMANDSTARTED:string;
2293
+ static readonly EVENT_REQUEST_FAILED:string;
2294
+
2353
2295
  protected constructor();
2354
2296
 
2355
- static ofJsDate(date:Date):DateWrapper;
2356
- asDate():Date;
2297
+ /**
2298
+ * Load the named table, with columns and size information already fully populated.
2299
+ * @param name -
2300
+ * @param applyPreviewColumns - optional boolean
2301
+ * @return {@link Promise} of {@link dh.Table}
2302
+ */
2303
+ getTable(name:string, applyPreviewColumns?:boolean):Promise<Table>;
2304
+ /**
2305
+ * Load the named Figure, including its tables and tablemaps as needed.
2306
+ * @param name -
2307
+ * @return promise of dh.plot.Figure
2308
+ */
2309
+ getFigure(name:string):Promise<dh.plot.Figure>;
2310
+ /**
2311
+ * Loads the named tree table or roll-up table, with column data populated. All nodes are collapsed by default, and
2312
+ * size is presently not available until the viewport is first set.
2313
+ * @param name -
2314
+ * @return {@link Promise} of {@link dh.TreeTable}
2315
+ */
2316
+ getTreeTable(name:string):Promise<TreeTable>;
2317
+ getHierarchicalTable(name:string):Promise<TreeTable>;
2318
+ getPartitionedTable(name:string):Promise<PartitionedTable>;
2319
+ getObject(definitionObject:dh.ide.VariableDescriptor):Promise<any>;
2320
+ newTable(columnNames:string[], types:string[], data:string[][], userTimeZone:string):Promise<Table>;
2321
+ /**
2322
+ * Merges the given tables into a single table. Assumes all tables have the same structure.
2323
+ * @param tables -
2324
+ * @return {@link Promise} of {@link dh.Table}
2325
+ */
2326
+ mergeTables(tables:Table[]):Promise<Table>;
2327
+ bindTableToVariable(table:Table, name:string):Promise<void>;
2328
+ subscribeToFieldUpdates(callback:(arg0:dh.ide.VariableChanges)=>void):()=>void;
2329
+ close():void;
2330
+ runCode(code:string):Promise<dh.ide.CommandResult>;
2331
+ onLogMessage(callback:(arg0:dh.ide.LogItem)=>void):()=>void;
2332
+ openDocument(params:object):void;
2333
+ changeDocument(params:object):void;
2334
+ getCompletionItems(params:object):Promise<Array<dh.lsp.CompletionItem>>;
2335
+ getSignatureHelp(params:object):Promise<Array<dh.lsp.SignatureInformation>>;
2336
+ getHover(params:object):Promise<dh.lsp.Hover>;
2337
+ closeDocument(params:object):void;
2338
+ /**
2339
+ * Creates an empty table with the specified number of rows. Optionally columns and types may be specified, but all
2340
+ * values will be null.
2341
+ * @param size -
2342
+ * @return {@link Promise} of {@link dh.Table}
2343
+ */
2344
+ emptyTable(size:number):Promise<Table>;
2345
+ /**
2346
+ * Creates a new table that ticks automatically every "periodNanos" nanoseconds. A start time may be provided; if so
2347
+ * the table will be populated with the interval from the specified date until now.
2348
+ * @param periodNanos -
2349
+ * @param startTime -
2350
+ * @return {@link Promise} of {@link dh.Table}
2351
+ */
2352
+ timeTable(periodNanos:number, startTime?:DateWrapper):Promise<Table>;
2353
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2354
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2355
+ hasListeners(name:string):boolean;
2356
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2357
2357
  }
2358
2358
 
2359
2359
 
2360
- type SearchDisplayModeType = string;
2361
- export class SearchDisplayMode {
2362
- static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2363
- static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2364
- static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2360
+ /**
2361
+ * A set of string constants that can be used to describe the different objects the JS API can export.
2362
+ */
2363
+ type VariableTypeType = string;
2364
+ export class VariableType {
2365
+ static readonly TABLE:VariableTypeType;
2366
+ static readonly TREETABLE:VariableTypeType;
2367
+ static readonly HIERARCHICALTABLE:VariableTypeType;
2368
+ static readonly TABLEMAP:VariableTypeType;
2369
+ static readonly PARTITIONEDTABLE:VariableTypeType;
2370
+ static readonly FIGURE:VariableTypeType;
2371
+ static readonly OTHERWIDGET:VariableTypeType;
2372
+ static readonly PANDAS:VariableTypeType;
2373
+ static readonly TREEMAP:VariableTypeType;
2365
2374
  }
2366
2375
 
2367
2376
  /**
@@ -2385,6 +2394,13 @@ export namespace dh {
2385
2394
  static readonly SKIP:AggregationOperationType;
2386
2395
  }
2387
2396
 
2397
+ type SearchDisplayModeType = string;
2398
+ export class SearchDisplayMode {
2399
+ static readonly SEARCH_DISPLAY_DEFAULT:SearchDisplayModeType;
2400
+ static readonly SEARCH_DISPLAY_HIDE:SearchDisplayModeType;
2401
+ static readonly SEARCH_DISPLAY_SHOW:SearchDisplayModeType;
2402
+ }
2403
+
2388
2404
  type ValueTypeType = string;
2389
2405
  export class ValueType {
2390
2406
  static readonly STRING:ValueTypeType;
@@ -2395,34 +2411,10 @@ export namespace dh {
2395
2411
  static readonly BOOLEAN:ValueTypeType;
2396
2412
  }
2397
2413
 
2398
- /**
2399
- * A set of string constants that can be used to describe the different objects the JS API can export.
2400
- */
2401
- type VariableTypeType = string;
2402
- export class VariableType {
2403
- static readonly TABLE:VariableTypeType;
2404
- static readonly TREETABLE:VariableTypeType;
2405
- static readonly HIERARCHICALTABLE:VariableTypeType;
2406
- static readonly TABLEMAP:VariableTypeType;
2407
- static readonly PARTITIONEDTABLE:VariableTypeType;
2408
- static readonly FIGURE:VariableTypeType;
2409
- static readonly OTHERWIDGET:VariableTypeType;
2410
- static readonly PANDAS:VariableTypeType;
2411
- static readonly TREEMAP:VariableTypeType;
2412
- }
2413
-
2414
2414
  }
2415
2415
 
2416
2416
  export namespace dh.ide {
2417
2417
 
2418
- /**
2419
- * Specifies a type and either id or name (but not both).
2420
- */
2421
- export interface VariableDescriptor {
2422
- type:string;
2423
- id?:string|null;
2424
- name?:string|null;
2425
- }
2426
2418
  /**
2427
2419
  * Represents a serialized fishlib LogRecord, suitable for display on javascript clients. A log entry sent from the
2428
2420
  * server.
@@ -2445,30 +2437,6 @@ export namespace dh.ide {
2445
2437
  get message():string;
2446
2438
  }
2447
2439
  /**
2448
- * Describes changes in the current set of variables in the script session. Note that variables that changed value
2449
- * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2450
- * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2451
- * new types.
2452
- */
2453
- export interface VariableChanges {
2454
- /**
2455
- *
2456
- * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2457
- * different type.
2458
- */
2459
- get removed():Array<VariableDefinition>;
2460
- /**
2461
- *
2462
- * @return The variables that were created by this operation, or have a new type.
2463
- */
2464
- get created():Array<VariableDefinition>;
2465
- /**
2466
- *
2467
- * @return The variables that changed value during this operation.
2468
- */
2469
- get updated():Array<VariableDefinition>;
2470
- }
2471
- /**
2472
2440
  * Indicates the result of code run on the server.
2473
2441
  */
2474
2442
  export interface CommandResult {
@@ -2511,22 +2479,206 @@ export namespace dh.ide {
2511
2479
  * The name of the variable, to be used when rendering it to a user
2512
2480
  * @return String
2513
2481
  */
2514
- get title():string;
2482
+ get title():string;
2483
+ /**
2484
+ * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2485
+ * reasonable to put in the title
2486
+ * @return String
2487
+ */
2488
+ get applicationId():string;
2489
+ /**
2490
+ * The name of the application which provided this variable
2491
+ * @return String
2492
+ */
2493
+ get applicationName():string;
2494
+ }
2495
+ /**
2496
+ * Describes changes in the current set of variables in the script session. Note that variables that changed value
2497
+ * without changing type will be included as <b>updated</b>, but if a new value with one type replaces an old value with
2498
+ * a different type, this will be included as an entry in both <b>removed</b> and <b>created</b> to indicate the old and
2499
+ * new types.
2500
+ */
2501
+ export interface VariableChanges {
2502
+ /**
2503
+ *
2504
+ * @return The variables that no longer exist after this operation, or were replaced by some variable with a
2505
+ * different type.
2506
+ */
2507
+ get removed():Array<VariableDefinition>;
2508
+ /**
2509
+ *
2510
+ * @return The variables that were created by this operation, or have a new type.
2511
+ */
2512
+ get created():Array<VariableDefinition>;
2513
+ /**
2514
+ *
2515
+ * @return The variables that changed value during this operation.
2516
+ */
2517
+ get updated():Array<VariableDefinition>;
2518
+ }
2519
+ /**
2520
+ * Specifies a type and either id or name (but not both).
2521
+ */
2522
+ export interface VariableDescriptor {
2523
+ type:string;
2524
+ id?:string|null;
2525
+ name?:string|null;
2526
+ }
2527
+ }
2528
+
2529
+ export namespace dh.i18n {
2530
+
2531
+ /**
2532
+ * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2533
+ *
2534
+ * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2535
+ * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2536
+ * BigDecimal.
2537
+ */
2538
+ export class NumberFormat {
2539
+ /**
2540
+ * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2541
+ * function, which will create and cache an instance so that later calls share the same instance.
2542
+ * @param pattern -
2543
+ */
2544
+ constructor(pattern:string);
2545
+
2546
+ /**
2547
+ * a number format instance matching the specified format. If this format has not been specified before, a new
2548
+ * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2549
+ * take advantage of caching
2550
+ * @param pattern -
2551
+ * @return dh.i18n.NumberFormat
2552
+ */
2553
+ static getFormat(pattern:string):NumberFormat;
2554
+ /**
2555
+ * Parses the given text using the cached format matching the given pattern.
2556
+ * @param pattern -
2557
+ * @param text -
2558
+ * @return double
2559
+ */
2560
+ static parse(pattern:string, text:string):number;
2561
+ /**
2562
+ * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2563
+ * format matching the given pattern string.
2564
+ * @param pattern -
2565
+ * @param number -
2566
+ * @return String
2567
+ */
2568
+ static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2569
+ /**
2570
+ * Parses the given text using this instance's pattern into a JS Number.
2571
+ * @param text -
2572
+ * @return double
2573
+ */
2574
+ parse(text:string):number;
2575
+ /**
2576
+ * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2577
+ * @param number -
2578
+ * @return String
2579
+ */
2580
+ format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2581
+ toString():string;
2582
+ }
2583
+
2584
+
2585
+ /**
2586
+ * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
2587
+ * additional 6 decimal places after the rest of the number.
2588
+ *
2589
+ * Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
2590
+ * and assuming it to be a lossy nano value, and parsing into a js Date.
2591
+ *
2592
+ *
2593
+ * Utility class to parse and format various date/time values, using the same format patterns as are supported by the
2594
+ * standard Java implementation used in the Deephaven server and swing client.
2595
+ *
2596
+ * As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
2597
+ * with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
2598
+ * however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
2599
+ * still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
2600
+ * object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
2601
+ * to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
2602
+ * `asDate()` to return a JS `Date` value.
2603
+ *
2604
+ *
2605
+ * Caveats:
2606
+ *
2607
+ *
2608
+ * - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
2609
+ * short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
2610
+ * browser to emit the user's own timezone.
2611
+ */
2612
+ export class DateTimeFormat {
2613
+ static readonly NANOS_PER_MILLI:number;
2614
+
2615
+ /**
2616
+ * Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
2617
+ * function, which will create and cache an instance so that later calls share the same instance.
2618
+ * @param pattern -
2619
+ */
2620
+ constructor(pattern:string);
2621
+
2622
+ /**
2623
+ *
2624
+ * @param pattern -
2625
+ * @return a date format instance matching the specified format. If this format has not been specified before, a new
2626
+ * instance will be created and stored for later reuse.
2627
+ */
2628
+ static getFormat(pattern:string):DateTimeFormat;
2629
+ /**
2630
+ * Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
2631
+ * `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
2632
+ * the instance method for more details on input objects.
2633
+ * @param pattern -
2634
+ * @param date -
2635
+ * @param timeZone -
2636
+ * @return
2637
+ */
2638
+ static format(pattern:string, date:any, timeZone?:TimeZone):string;
2639
+ /**
2640
+ * Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
2641
+ * @param pattern -
2642
+ * @param text -
2643
+ * @return
2644
+ */
2645
+ static parseAsDate(pattern:string, text:string):Date;
2646
+ /**
2647
+ * Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
2648
+ * A `TimeZone` object can optionally be provided to parse to a desired timezone.
2649
+ * @param pattern -
2650
+ * @param text -
2651
+ * @param tz -
2652
+ * @return
2653
+ */
2654
+ static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
2655
+ /**
2656
+ * Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
2657
+ * include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
2658
+ * nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
2659
+ * expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
2660
+ * date/time in that timezone.
2661
+ * @param date -
2662
+ * @param timeZone -
2663
+ * @return String
2664
+ */
2665
+ format(date:any, timeZone?:TimeZone):string;
2515
2666
  /**
2516
- * Optional description for the variable's contents, typically used to provide more detail that wouldn't be
2517
- * reasonable to put in the title
2518
- * @return String
2667
+ * Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
2668
+ * nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
2669
+ * @param text -
2670
+ * @param tz -
2671
+ * @return
2519
2672
  */
2520
- get applicationId():string;
2673
+ parse(text:string, tz?:TimeZone):dh.DateWrapper;
2521
2674
  /**
2522
- * The name of the application which provided this variable
2523
- * @return String
2675
+ * Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
2676
+ * @param text -
2677
+ * @return
2524
2678
  */
2525
- get applicationName():string;
2679
+ parseAsDate(text:string):Date;
2680
+ toString():string;
2526
2681
  }
2527
- }
2528
-
2529
- export namespace dh.i18n {
2530
2682
 
2531
2683
  /**
2532
2684
  * Represents the timezones supported by Deephaven. Can be used to format dates, taking into account the offset changing
@@ -2639,176 +2791,59 @@ export namespace dh.i18n {
2639
2791
  get id():string;
2640
2792
  }
2641
2793
 
2642
- /**
2643
- * Largely an exported wrapper for the GWT DateFormat, but also includes support for formatting nanoseconds as an
2644
- * additional 6 decimal places after the rest of the number.
2645
- *
2646
- * Other concerns that this handles includes accepting a js Date and ignoring the lack of nanos, accepting a js Number
2647
- * and assuming it to be a lossy nano value, and parsing into a js Date.
2648
- *
2649
- *
2650
- * Utility class to parse and format various date/time values, using the same format patterns as are supported by the
2651
- * standard Java implementation used in the Deephaven server and swing client.
2652
- *
2653
- * As Deephaven internally uses nanosecond precision to record dates, this API expects nanoseconds in most use cases,
2654
- * with the one exception of the JS `Date` type, which is not capable of more precision than milliseconds. Note,
2655
- * however, that when passing nanoseconds as a JS `Number` there is likely to be some loss of precision, though this is
2656
- * still supported for easier interoperability with other JS code. The values returned by `parse()` will be an opaque
2657
- * object wrapping the full precision of the specified date, However, this object supports `toString()` and `valueOf()`
2658
- * to return a string representation of that value, as well as a `asNumber()` to return a JS `Number` value and a
2659
- * `asDate()` to return a JS `Date` value.
2660
- *
2661
- *
2662
- * Caveats:
2663
- *
2664
- *
2665
- * - The `D` format (for "day of year") is not supported by this implementation at this time. - The `%t` format for
2666
- * short timezone code is not supported by this implementation at this time, though `z` will work as expected in the
2667
- * browser to emit the user's own timezone.
2668
- */
2669
- export class DateTimeFormat {
2670
- static readonly NANOS_PER_MILLI:number;
2794
+ }
2671
2795
 
2672
- /**
2673
- * Creates a new date/time format instance. This generally should be avoided in favor of the static `getFormat`
2674
- * function, which will create and cache an instance so that later calls share the same instance.
2675
- * @param pattern -
2676
- */
2677
- constructor(pattern:string);
2796
+ export namespace dh.plot {
2678
2797
 
2679
- /**
2680
- *
2681
- * @param pattern -
2682
- * @return a date format instance matching the specified format. If this format has not been specified before, a new
2683
- * instance will be created and stored for later reuse.
2684
- */
2685
- static getFormat(pattern:string):DateTimeFormat;
2686
- /**
2687
- * Accepts a variety of input objects to interpret as a date, and formats them using the specified pattern. A
2688
- * `TimeZone` object can optionally be provided to format this date as the current date/time in that timezone.See
2689
- * the instance method for more details on input objects.
2690
- * @param pattern -
2691
- * @param date -
2692
- * @param timeZone -
2693
- * @return
2694
- */
2695
- static format(pattern:string, date:any, timeZone?:TimeZone):string;
2696
- /**
2697
- * Parses the given input string using the provided pattern, and returns a JS `Date` object in milliseconds.
2698
- * @param pattern -
2699
- * @param text -
2700
- * @return
2701
- */
2702
- static parseAsDate(pattern:string, text:string):Date;
2703
- /**
2704
- * Parses the given input string using the provided pattern, and returns a wrapped Java `long` value in nanoseconds.
2705
- * A `TimeZone` object can optionally be provided to parse to a desired timezone.
2706
- * @param pattern -
2707
- * @param text -
2708
- * @param tz -
2709
- * @return
2710
- */
2711
- static parse(pattern:string, text:string, tz?:TimeZone):dh.DateWrapper;
2712
- /**
2713
- * Takes a variety of objects to interpret as a date, and formats them using this instance's pattern. Inputs can
2714
- * include a <b>String</b> value of a number expressed in nanoseconds, a <b>Number</b> value expressed in
2715
- * nanoseconds, a JS <b>Date</b> object (necessarily in milliseconds), or a wrapped Java <b>long</b> value,
2716
- * expressed in nanoseconds. A <b>TimeZone</b> object can optionally be provided to format this date as the current
2717
- * date/time in that timezone.
2718
- * @param date -
2719
- * @param timeZone -
2720
- * @return String
2721
- */
2722
- format(date:any, timeZone?:TimeZone):string;
2723
- /**
2724
- * Parses the given string using this instance's pattern, and returns a wrapped Java <b>long</b> value in
2725
- * nanoseconds. A <b>TimeZone</b> object can optionally be provided to parse to a desired timezone.
2726
- * @param text -
2727
- * @param tz -
2728
- * @return
2729
- */
2730
- parse(text:string, tz?:TimeZone):dh.DateWrapper;
2731
- /**
2732
- * Parses the given string using this instance's pattern, and returns a JS <b>Date</b> object in milliseconds.
2733
- * @param text -
2734
- * @return
2735
- */
2736
- parseAsDate(text:string):Date;
2737
- toString():string;
2798
+ export interface OneClick {
2799
+ setValueForColumn(columnName:string, value:any):void;
2800
+ getValueForColumn(columName:string):any;
2801
+ get requireAllFiltersToDisplay():boolean;
2802
+ get columns():dh.Column[];
2738
2803
  }
2739
-
2740
2804
  /**
2741
- * Exported wrapper of the GWT NumberFormat, plus LongWrapper support
2742
- *
2743
- * Utility class to parse and format numbers, using the same format patterns as are supported by the standard Java
2744
- * implementation used in the Deephaven server and swing client. Works for numeric types including BigInteger and
2745
- * BigDecimal.
2805
+ * Provides access to the data for displaying in a figure.
2746
2806
  */
2747
- export class NumberFormat {
2748
- /**
2749
- * Creates a new number format instance. This generally should be avoided in favor of the static `getFormat`
2750
- * function, which will create and cache an instance so that later calls share the same instance.
2751
- * @param pattern -
2752
- */
2753
- constructor(pattern:string);
2807
+ export interface Series {
2808
+ readonly isLinesVisible?:boolean|null;
2809
+ readonly pointLabelFormat?:string|null;
2810
+ readonly yToolTipPattern?:string|null;
2811
+ readonly shapeSize?:number|null;
2812
+ readonly xToolTipPattern?:string|null;
2813
+ readonly isShapesVisible?:boolean|null;
2754
2814
 
2815
+ subscribe(forceDisableDownsample?:DownsampleOptions):void;
2755
2816
  /**
2756
- * a number format instance matching the specified format. If this format has not been specified before, a new
2757
- * instance will be created and cached for later reuse. Prefer this method to calling the constructor directly to
2758
- * take advantage of caching
2759
- * @param pattern -
2760
- * @return dh.i18n.NumberFormat
2761
- */
2762
- static getFormat(pattern:string):NumberFormat;
2763
- /**
2764
- * Parses the given text using the cached format matching the given pattern.
2765
- * @param pattern -
2766
- * @param text -
2767
- * @return double
2768
- */
2769
- static parse(pattern:string, text:string):number;
2770
- /**
2771
- * Formats the specified number (or Java <b>long</b>, <b>BigInteger</b> or <b>BigDecimal</b> value) using the cached
2772
- * format matching the given pattern string.
2773
- * @param pattern -
2774
- * @param number -
2775
- * @return String
2817
+ * Disable updates for this Series.
2776
2818
  */
2777
- static format(pattern:string, number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2819
+ unsubscribe():void;
2820
+ get shape():string;
2778
2821
  /**
2779
- * Parses the given text using this instance's pattern into a JS Number.
2780
- * @param text -
2781
- * @return double
2822
+ * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2823
+ * the axis.
2824
+ * @return {@link dh.plot.SeriesDataSource}
2782
2825
  */
2783
- parse(text:string):number;
2826
+ get sources():SeriesDataSource[];
2827
+ get lineColor():string;
2784
2828
  /**
2785
- * Formats the specified number (or Java `long`, `BigInteger` or `BigDecimal` value) using this instance's pattern.
2786
- * @param number -
2787
- * @return String
2829
+ * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2830
+ * @return int
2788
2831
  */
2789
- format(number:number|dh.BigIntegerWrapper|dh.BigDecimalWrapper|dh.LongWrapper):string;
2790
- toString():string;
2791
- }
2792
-
2793
-
2794
- }
2795
-
2796
- export namespace dh.plot {
2797
-
2798
- /**
2799
- * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2800
- */
2801
- export interface MultiSeries {
2832
+ get plotStyle():SeriesPlotStyleType;
2833
+ get oneClick():OneClick;
2834
+ get gradientVisible():boolean;
2835
+ get shapeColor():string;
2802
2836
  /**
2803
- * The name for this multi-series.
2837
+ * The name for this series.
2804
2838
  * @return String
2805
2839
  */
2806
2840
  get name():string;
2807
2841
  /**
2808
- * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2809
- * @return int
2842
+ * indicates that this series belongs to a MultiSeries, null otherwise
2843
+ * @return dh.plot.MultiSeries
2810
2844
  */
2811
- get plotStyle():SeriesPlotStyleType;
2845
+ get multiSeries():MultiSeries;
2846
+ get shapeLabel():string;
2812
2847
  }
2813
2848
  /**
2814
2849
  * Defines one axis used with by series. These instances will be found both on the Chart and the Series instances, and
@@ -2856,81 +2891,46 @@ export namespace dh.plot {
2856
2891
  get majorTicksVisible():boolean;
2857
2892
  get ticksFont():string;
2858
2893
  /**
2859
- * The unique id for this axis.
2860
- * @return String
2861
- */
2862
- get id():string;
2863
- /**
2864
- * The position for this axis. See <b>AxisPosition</b> enum for more details.
2865
- * @return int
2866
- */
2867
- get position():AxisPositionType;
2868
- /**
2869
- * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2870
- * transform.
2871
- * @return dh.calendar.BusinessCalendar
2872
- */
2873
- get businessCalendar():dh.calendar.BusinessCalendar;
2874
- /**
2875
- * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2876
- * @return int
2877
- */
2878
- get formatType():AxisFormatTypeType;
2879
- get minRange():number;
2880
- }
2881
- export interface FigureDataUpdatedEvent {
2882
- getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2883
- get series():Series[];
2884
- }
2885
- export interface OneClick {
2886
- setValueForColumn(columnName:string, value:any):void;
2887
- getValueForColumn(columName:string):any;
2888
- get requireAllFiltersToDisplay():boolean;
2889
- get columns():dh.Column[];
2890
- }
2891
- /**
2892
- * Provides access to the data for displaying in a figure.
2893
- */
2894
- export interface Series {
2895
- readonly isLinesVisible?:boolean|null;
2896
- readonly pointLabelFormat?:string|null;
2897
- readonly yToolTipPattern?:string|null;
2898
- readonly shapeSize?:number|null;
2899
- readonly xToolTipPattern?:string|null;
2900
- readonly isShapesVisible?:boolean|null;
2901
-
2902
- subscribe(forceDisableDownsample?:DownsampleOptions):void;
2894
+ * The unique id for this axis.
2895
+ * @return String
2896
+ */
2897
+ get id():string;
2903
2898
  /**
2904
- * Disable updates for this Series.
2899
+ * The position for this axis. See <b>AxisPosition</b> enum for more details.
2900
+ * @return int
2905
2901
  */
2906
- unsubscribe():void;
2907
- get shape():string;
2902
+ get position():AxisPositionType;
2908
2903
  /**
2909
- * Contains details on how to access data within the chart for this series. keyed with the way that this series uses
2910
- * the axis.
2911
- * @return {@link dh.plot.SeriesDataSource}
2904
+ * The calendar with the business hours and holidays to transform plot data against. Defaults to null, or no
2905
+ * transform.
2906
+ * @return dh.calendar.BusinessCalendar
2912
2907
  */
2913
- get sources():SeriesDataSource[];
2914
- get lineColor():string;
2908
+ get businessCalendar():dh.calendar.BusinessCalendar;
2915
2909
  /**
2916
- * The plotting style to use for this series. See <b>SeriesPlotStyle</b> enum for more details.
2910
+ * The type for this axis. See <b>AxisFormatType</b> enum for more details.
2917
2911
  * @return int
2918
2912
  */
2919
- get plotStyle():SeriesPlotStyleType;
2920
- get oneClick():OneClick;
2921
- get gradientVisible():boolean;
2922
- get shapeColor():string;
2913
+ get formatType():AxisFormatTypeType;
2914
+ get minRange():number;
2915
+ }
2916
+ export interface FigureDataUpdatedEvent {
2917
+ getArray(series:Series, sourceType:number, mappingFunc?:(arg0:any)=>any):Array<any>;
2918
+ get series():Series[];
2919
+ }
2920
+ /**
2921
+ * Describes a template that will be used to make new series instances when a new table added to a plotBy.
2922
+ */
2923
+ export interface MultiSeries {
2923
2924
  /**
2924
- * The name for this series.
2925
+ * The name for this multi-series.
2925
2926
  * @return String
2926
2927
  */
2927
2928
  get name():string;
2928
2929
  /**
2929
- * indicates that this series belongs to a MultiSeries, null otherwise
2930
- * @return dh.plot.MultiSeries
2930
+ * The plotting style to use for the series that will be created. See <b>SeriesPlotStyle</b> enum for more details.
2931
+ * @return int
2931
2932
  */
2932
- get multiSeries():MultiSeries;
2933
- get shapeLabel():string;
2933
+ get plotStyle():SeriesPlotStyleType;
2934
2934
  }
2935
2935
  /**
2936
2936
  * Describes how to access and display data required within a series.
@@ -2954,92 +2954,39 @@ export namespace dh.plot {
2954
2954
  }
2955
2955
 
2956
2956
  /**
2957
- * Provide the details for a chart.
2958
- */
2959
- export class Chart implements dh.HasEventHandling {
2960
- /**
2961
- * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
2962
- */
2963
- static readonly EVENT_SERIES_ADDED:string;
2964
- /**
2965
- * The title of the chart.
2966
- * @return String
2967
- */
2968
- readonly title?:string|null;
2969
-
2970
- protected constructor();
2971
-
2972
- addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
2973
- nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
2974
- hasListeners(name:string):boolean;
2975
- removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
2976
- get column():number;
2977
- get showLegend():boolean;
2978
- /**
2979
- * The axes used in this chart.
2980
- * @return dh.plot.Axis
2981
- */
2982
- get axes():Axis[];
2983
- get is3d():boolean;
2984
- get titleFont():string;
2985
- get colspan():number;
2986
- get titleColor():string;
2987
- get series():Series[];
2988
- get rowspan():number;
2989
- /**
2990
- * The type of this chart, see <b>ChartType</b> enum for more details.
2991
- * @return int
2992
- */
2993
- get chartType():ChartTypeType;
2994
- get row():number;
2995
- get legendColor():string;
2996
- get legendFont():string;
2997
- get multiSeries():MultiSeries[];
2998
- }
2999
-
3000
- export class DownsampleOptions {
3001
- /**
3002
- * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3003
- * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3004
- * series.subscribe().
3005
- */
3006
- static MAX_SERIES_SIZE:number;
3007
- /**
3008
- * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3009
- * downsampling disabled, the series will not load data.
3010
- */
3011
- static MAX_SUBSCRIPTION_SIZE:number;
3012
- /**
3013
- * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3014
- * axes are configured.
3015
- */
3016
- static readonly DEFAULT:DownsampleOptions;
3017
- /**
3018
- * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3019
- * the limit of MAX_SUBSCRIPTION_SIZE.
3020
- */
3021
- static readonly DISABLE:DownsampleOptions;
3022
-
3023
- protected constructor();
3024
- }
3025
-
3026
- /**
3027
- * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3028
- * underlying table, but also support a mapping function to let client code translate data in some way for display and
3029
- * keep that cached as well.
2957
+ * Provides the details for a figure.
2958
+ *
2959
+ * The Deephaven JS API supports automatic lossless downsampling of time-series data, when that data is plotted in one
2960
+ * or more line series. Using a scatter plot or a X-axis of some type other than DateTime will prevent this feature from
2961
+ * being applied to a series. To enable this feature, invoke <b>Axis.range(...)</b> to specify the length in pixels of
2962
+ * the axis on the screen, and the range of values that are visible, and the server will use that width (and range, if
2963
+ * any) to reduce the number of points sent to the client.
2964
+ *
2965
+ * Downsampling can also be controlled when calling either <b>Figure.subscribe()</b> or <b>Series.subscribe()</b> - both
2966
+ * can be given an optional <b>dh.plot.DownsampleOptions</b> argument. Presently only two valid values exist,
2967
+ * <b>DEFAULT</b>, and <b>DISABLE</b>, and if no argument is specified, <b>DEFAULT</b> is assumed. If there are more
2968
+ * than 30,000 rows in a table, downsampling will be encouraged - data will not load without calling
2969
+ * <b>subscribe(DISABLE)</b> or enabling downsampling via <b>Axis.range(...)</b>. If there are more than 200,000 rows,
2970
+ * data will refuse to load without downsampling and <b>subscribe(DISABLE)</b> would have no effect.
2971
+ *
2972
+ * Downsampled data looks like normal data, except that select items have been removed if they would be redundant in the
2973
+ * UI given the current configuration. Individual rows are intact, so that a tooltip or some other UI item is sure to be
2974
+ * accurate and consistent, and at least the highest and lowest value for each axis will be retained as well, to ensure
2975
+ * that the "important" values are visible.
2976
+ *
2977
+ * Four events exist to help with interacting with downsampled data, all fired from the <b>Figure</b> instance itself.
2978
+ * First, <b>downsampleneeded</b> indicates that more than 30,000 rows would be fetched, and so specifying downsampling
2979
+ * is no longer optional - it must either be enabled (calling <b>axis.range(...)</b>), or disabled. If the figure is
2980
+ * configured for downsampling, when a change takes place that requires that the server perform some downsampling work,
2981
+ * the <b>downsamplestarted</b> event will first be fired, which can be used to present a brief loading message,
2982
+ * indicating to the user why data is not ready yet - when the server side process is complete,
2983
+ * <b>downsamplefinished</b> will be fired. These events will repeat when the range changes, such as when zooming,
2984
+ * panning, or resizing the figure. Finally, <b>downsamplefailed</b> indicates that something when wrong when
2985
+ * downsampling, or possibly that downsampling cannot be disabled due to the number of rows in the table.
2986
+ *
2987
+ * At this time, not marked as a ServerObject, due to internal implementation issues which leave the door open to
2988
+ * client-created figures.
3030
2989
  */
3031
- export class ChartData {
3032
- constructor(table:dh.Table);
3033
-
3034
- update(tableData:dh.SubscriptionTableData):void;
3035
- getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3036
- /**
3037
- * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3038
- * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3039
- */
3040
- removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3041
- }
3042
-
3043
2990
  export class Figure implements dh.HasEventHandling {
3044
2991
  /**
3045
2992
  * The title of the figure.
@@ -3083,7 +3030,8 @@ export namespace dh.plot {
3083
3030
  */
3084
3031
  static readonly EVENT_DOWNSAMPLENEEDED:string;
3085
3032
 
3086
- static create(config:FigureDescriptor):Promise<Figure>;
3033
+ protected constructor();
3034
+
3087
3035
  subscribe(forceDisableDownsample?:DownsampleOptions):void;
3088
3036
  /**
3089
3037
  * Disable updates for all series in this figure.
@@ -3122,6 +3070,7 @@ export namespace dh.plot {
3122
3070
  * @typeParam T -
3123
3071
  */
3124
3072
  removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3073
+ static create(config:FigureDescriptor):Promise<Figure>;
3125
3074
  }
3126
3075
 
3127
3076
  /**
@@ -3141,6 +3090,82 @@ export namespace dh.plot {
3141
3090
  constructor();
3142
3091
  }
3143
3092
 
3093
+ /**
3094
+ * Helper class for plot downsampling methods.
3095
+ */
3096
+ export class Downsample {
3097
+ protected constructor();
3098
+
3099
+ /**
3100
+ * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3101
+ * the same visual fidelity as the original table, but with fewer rows.
3102
+ * @param table - The table to downsample.
3103
+ * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3104
+ * @param yCols - The names of the Y columns to downsample.
3105
+ * @param width - The width of the visible area in pixels.
3106
+ * @param xRange - The visible range as `[start, end]` or null to always use all data.
3107
+ * @return A promise that resolves to the downsampled table.
3108
+ */
3109
+ static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3110
+ }
3111
+
3112
+ export class FigureSourceException {
3113
+ table:dh.Table;
3114
+ source:SeriesDataSource;
3115
+
3116
+ protected constructor();
3117
+ }
3118
+
3119
+ export class FigureFetchError {
3120
+ error:object;
3121
+ errors:Array<string>;
3122
+
3123
+ protected constructor();
3124
+ }
3125
+
3126
+ export class SeriesDescriptor {
3127
+ plotStyle:string;
3128
+ name?:string|null;
3129
+ linesVisible?:boolean|null;
3130
+ shapesVisible?:boolean|null;
3131
+ gradientVisible?:boolean|null;
3132
+ lineColor?:string|null;
3133
+ pointLabelFormat?:string|null;
3134
+ xToolTipPattern?:string|null;
3135
+ yToolTipPattern?:string|null;
3136
+ shapeLabel?:string|null;
3137
+ shapeSize?:number|null;
3138
+ shapeColor?:string|null;
3139
+ shape?:string|null;
3140
+ dataSources:Array<SourceDescriptor>;
3141
+
3142
+ constructor();
3143
+ }
3144
+
3145
+ export class AxisDescriptor {
3146
+ formatType:string;
3147
+ type:string;
3148
+ position:string;
3149
+ log?:boolean|null;
3150
+ label?:string|null;
3151
+ labelFont?:string|null;
3152
+ ticksFont?:string|null;
3153
+ formatPattern?:string|null;
3154
+ color?:string|null;
3155
+ minRange?:number|null;
3156
+ maxRange?:number|null;
3157
+ minorTicksVisible?:boolean|null;
3158
+ majorTicksVisible?:boolean|null;
3159
+ minorTickCount?:number|null;
3160
+ gapBetweenMajorTicks?:number|null;
3161
+ majorTickLocations?:Array<number>|null;
3162
+ tickLabelAngle?:number|null;
3163
+ invert?:boolean|null;
3164
+ isTimeAxis?:boolean|null;
3165
+
3166
+ constructor();
3167
+ }
3168
+
3144
3169
  export class ChartDescriptor {
3145
3170
  colspan?:number|null;
3146
3171
  rowspan?:number|null;
@@ -3159,29 +3184,56 @@ export namespace dh.plot {
3159
3184
  }
3160
3185
 
3161
3186
  /**
3162
- * Helper class for plot downsampling methods.
3187
+ * Provide the details for a chart.
3163
3188
  */
3164
- export class Downsample {
3189
+ export class Chart implements dh.HasEventHandling {
3190
+ /**
3191
+ * a new series was added to this chart as part of a multi-series. The series instance is the detail for this event.
3192
+ */
3193
+ static readonly EVENT_SERIES_ADDED:string;
3194
+ /**
3195
+ * The title of the chart.
3196
+ * @return String
3197
+ */
3198
+ readonly title?:string|null;
3199
+
3165
3200
  protected constructor();
3166
3201
 
3202
+ addEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):()=>void;
3203
+ nextEvent<T>(eventName:string, timeoutInMillis?:number):Promise<CustomEvent<T>>;
3204
+ hasListeners(name:string):boolean;
3205
+ removeEventListener<T>(name:string, callback:(e:CustomEvent<T>)=>void):boolean;
3206
+ get column():number;
3207
+ get showLegend():boolean;
3167
3208
  /**
3168
- * Downsamples a table so that the data can be used for a time-series line plot. The downsampled table should have
3169
- * the same visual fidelity as the original table, but with fewer rows.
3170
- * @param table - The table to downsample.
3171
- * @param xCol - The name of the X column to downsample. Must be an Instant or long.
3172
- * @param yCols - The names of the Y columns to downsample.
3173
- * @param width - The width of the visible area in pixels.
3174
- * @param xRange - The visible range as `[start, end]` or null to always use all data.
3175
- * @return A promise that resolves to the downsampled table.
3209
+ * The axes used in this chart.
3210
+ * @return dh.plot.Axis
3211
+ */
3212
+ get axes():Axis[];
3213
+ get is3d():boolean;
3214
+ get titleFont():string;
3215
+ get colspan():number;
3216
+ get titleColor():string;
3217
+ get series():Series[];
3218
+ get rowspan():number;
3219
+ /**
3220
+ * The type of this chart, see <b>ChartType</b> enum for more details.
3221
+ * @return int
3176
3222
  */
3177
- static runChartDownsample(table:dh.Table, xCol:string, yCols:string[], width:number, xRange?:dh.LongWrapper[]|undefined|null):Promise<dh.Table>;
3223
+ get chartType():ChartTypeType;
3224
+ get row():number;
3225
+ get legendColor():string;
3226
+ get legendFont():string;
3227
+ get multiSeries():MultiSeries[];
3178
3228
  }
3179
3229
 
3180
- export class FigureFetchError {
3181
- error:object;
3182
- errors:Array<string>;
3230
+ export class SourceDescriptor {
3231
+ axis:AxisDescriptor;
3232
+ table:dh.Table;
3233
+ columnName:string;
3234
+ type:string;
3183
3235
 
3184
- protected constructor();
3236
+ constructor();
3185
3237
  }
3186
3238
 
3187
3239
  export class SeriesDataSourceException {
@@ -3191,65 +3243,74 @@ export namespace dh.plot {
3191
3243
  get message():string;
3192
3244
  }
3193
3245
 
3194
- export class AxisDescriptor {
3195
- formatType:string;
3196
- type:string;
3197
- position:string;
3198
- log?:boolean|null;
3199
- label?:string|null;
3200
- labelFont?:string|null;
3201
- ticksFont?:string|null;
3202
- formatPattern?:string|null;
3203
- color?:string|null;
3204
- minRange?:number|null;
3205
- maxRange?:number|null;
3206
- minorTicksVisible?:boolean|null;
3207
- majorTicksVisible?:boolean|null;
3208
- minorTickCount?:number|null;
3209
- gapBetweenMajorTicks?:number|null;
3210
- majorTickLocations?:Array<number>|null;
3211
- tickLabelAngle?:number|null;
3212
- invert?:boolean|null;
3213
- isTimeAxis?:boolean|null;
3214
-
3215
- constructor();
3216
- }
3217
-
3218
- export class SourceDescriptor {
3219
- axis:AxisDescriptor;
3220
- table:dh.Table;
3221
- columnName:string;
3222
- type:string;
3246
+ /**
3247
+ * Helper class to manage snapshots and deltas and keep not only a contiguous JS array of data per column in the
3248
+ * underlying table, but also support a mapping function to let client code translate data in some way for display and
3249
+ * keep that cached as well.
3250
+ */
3251
+ export class ChartData {
3252
+ constructor(table:dh.Table);
3223
3253
 
3224
- constructor();
3254
+ update(tableData:dh.SubscriptionTableData):void;
3255
+ getColumn(columnName:string, mappingFunc:(arg0:any)=>any, currentUpdate:dh.TableData):Array<any>;
3256
+ /**
3257
+ * Removes some column from the cache, avoiding extra computation on incoming events, and possibly freeing some
3258
+ * memory. If this pair of column name and map function are requested again, it will be recomputed from scratch.
3259
+ */
3260
+ removeColumn(columnName:string, mappingFunc:(arg0:any)=>any):void;
3225
3261
  }
3226
3262
 
3227
- export class FigureSourceException {
3228
- table:dh.Table;
3229
- source:SeriesDataSource;
3263
+ export class DownsampleOptions {
3264
+ /**
3265
+ * Max number of items in the series before DEFAULT will not attempt to load the series without downsampling. Above
3266
+ * this size if downsample fails or is not applicable, the series won't be loaded unless DISABLE is passed to
3267
+ * series.subscribe().
3268
+ */
3269
+ static MAX_SERIES_SIZE:number;
3270
+ /**
3271
+ * Max number of items in the series where the subscription will be allowed at all. Above this limit, even with
3272
+ * downsampling disabled, the series will not load data.
3273
+ */
3274
+ static MAX_SUBSCRIPTION_SIZE:number;
3275
+ /**
3276
+ * Flag to let the API decide what data will be available, based on the nature of the data, the series, and how the
3277
+ * axes are configured.
3278
+ */
3279
+ static readonly DEFAULT:DownsampleOptions;
3280
+ /**
3281
+ * Flat to entirely disable downsampling, and force all data to load, no matter how many items that would be, up to
3282
+ * the limit of MAX_SUBSCRIPTION_SIZE.
3283
+ */
3284
+ static readonly DISABLE:DownsampleOptions;
3230
3285
 
3231
3286
  protected constructor();
3232
3287
  }
3233
3288
 
3234
- export class SeriesDescriptor {
3235
- plotStyle:string;
3236
- name?:string|null;
3237
- linesVisible?:boolean|null;
3238
- shapesVisible?:boolean|null;
3239
- gradientVisible?:boolean|null;
3240
- lineColor?:string|null;
3241
- pointLabelFormat?:string|null;
3242
- xToolTipPattern?:string|null;
3243
- yToolTipPattern?:string|null;
3244
- shapeLabel?:string|null;
3245
- shapeSize?:number|null;
3246
- shapeColor?:string|null;
3247
- shape?:string|null;
3248
- dataSources:Array<SourceDescriptor>;
3249
3289
 
3250
- constructor();
3290
+ type AxisTypeType = number;
3291
+ export class AxisType {
3292
+ static readonly X:AxisTypeType;
3293
+ static readonly Y:AxisTypeType;
3294
+ static readonly SHAPE:AxisTypeType;
3295
+ static readonly SIZE:AxisTypeType;
3296
+ static readonly LABEL:AxisTypeType;
3297
+ static readonly COLOR:AxisTypeType;
3251
3298
  }
3252
3299
 
3300
+ /**
3301
+ * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3302
+ * those series should be rendered.
3303
+ */
3304
+ type ChartTypeType = number;
3305
+ export class ChartType {
3306
+ static readonly XY:ChartTypeType;
3307
+ static readonly PIE:ChartTypeType;
3308
+ static readonly OHLC:ChartTypeType;
3309
+ static readonly CATEGORY:ChartTypeType;
3310
+ static readonly XYZ:ChartTypeType;
3311
+ static readonly CATEGORY_3D:ChartTypeType;
3312
+ static readonly TREEMAP:ChartTypeType;
3313
+ }
3253
3314
 
3254
3315
  type SeriesPlotStyleType = number;
3255
3316
  export class SeriesPlotStyle {
@@ -3267,12 +3328,6 @@ export namespace dh.plot {
3267
3328
  static readonly TREEMAP:SeriesPlotStyleType;
3268
3329
  }
3269
3330
 
3270
- type AxisFormatTypeType = number;
3271
- export class AxisFormatType {
3272
- static readonly CATEGORY:AxisFormatTypeType;
3273
- static readonly NUMBER:AxisFormatTypeType;
3274
- }
3275
-
3276
3331
  type AxisPositionType = number;
3277
3332
  export class AxisPosition {
3278
3333
  static readonly TOP:AxisPositionType;
@@ -3282,31 +3337,6 @@ export namespace dh.plot {
3282
3337
  static readonly NONE:AxisPositionType;
3283
3338
  }
3284
3339
 
3285
- type AxisTypeType = number;
3286
- export class AxisType {
3287
- static readonly X:AxisTypeType;
3288
- static readonly Y:AxisTypeType;
3289
- static readonly SHAPE:AxisTypeType;
3290
- static readonly SIZE:AxisTypeType;
3291
- static readonly LABEL:AxisTypeType;
3292
- static readonly COLOR:AxisTypeType;
3293
- }
3294
-
3295
- /**
3296
- * This enum describes what kind of chart is being drawn. This may limit what kinds of series can be found on it, or how
3297
- * those series should be rendered.
3298
- */
3299
- type ChartTypeType = number;
3300
- export class ChartType {
3301
- static readonly XY:ChartTypeType;
3302
- static readonly PIE:ChartTypeType;
3303
- static readonly OHLC:ChartTypeType;
3304
- static readonly CATEGORY:ChartTypeType;
3305
- static readonly XYZ:ChartTypeType;
3306
- static readonly CATEGORY_3D:ChartTypeType;
3307
- static readonly TREEMAP:ChartTypeType;
3308
- }
3309
-
3310
3340
  /**
3311
3341
  * This enum describes the source it is in, and how this aspect of the data in the series should be used to render the
3312
3342
  * item. For example, a point in a error-bar plot might have a X value, three Y values (Y, Y_LOW, Y_HIGH), and some
@@ -3336,42 +3366,48 @@ export namespace dh.plot {
3336
3366
  static readonly HOVER_TEXT:SourceTypeType;
3337
3367
  }
3338
3368
 
3369
+ type AxisFormatTypeType = number;
3370
+ export class AxisFormatType {
3371
+ static readonly CATEGORY:AxisFormatTypeType;
3372
+ static readonly NUMBER:AxisFormatTypeType;
3373
+ }
3374
+
3339
3375
  }
3340
3376
 
3341
3377
  export namespace dh.lsp {
3342
3378
 
3343
- export class MarkupContent {
3344
- kind:string;
3345
- value:string;
3346
-
3347
- constructor();
3348
- }
3349
-
3350
- export class ParameterInformation {
3379
+ export class SignatureInformation {
3351
3380
  label:string;
3352
3381
  documentation:MarkupContent;
3382
+ parameters:Array<ParameterInformation>;
3383
+ activeParameter:number;
3353
3384
 
3354
3385
  constructor();
3355
3386
  }
3356
3387
 
3357
- export class TextDocumentContentChangeEvent {
3358
- range:Range;
3359
- rangeLength:number;
3360
- text:string;
3388
+ export class Position {
3389
+ line:number;
3390
+ character:number;
3361
3391
 
3362
3392
  constructor();
3393
+
3394
+ lessThan(start:Position):boolean;
3395
+ lessOrEqual(start:Position):boolean;
3396
+ greaterThan(end:Position):boolean;
3397
+ greaterOrEqual(end:Position):boolean;
3398
+ copy():Position;
3363
3399
  }
3364
3400
 
3365
- export class Hover {
3366
- contents:MarkupContent;
3401
+ export class TextEdit {
3367
3402
  range:Range;
3403
+ text:string;
3368
3404
 
3369
3405
  constructor();
3370
3406
  }
3371
3407
 
3372
- export class TextEdit {
3373
- range:Range;
3374
- text:string;
3408
+ export class MarkupContent {
3409
+ kind:string;
3410
+ value:string;
3375
3411
 
3376
3412
  constructor();
3377
3413
  }
@@ -3385,24 +3421,17 @@ export namespace dh.lsp {
3385
3421
  isInside(innerStart:Position, innerEnd:Position):boolean;
3386
3422
  }
3387
3423
 
3388
- export class Position {
3389
- line:number;
3390
- character:number;
3424
+ export class ParameterInformation {
3425
+ label:string;
3426
+ documentation:MarkupContent;
3391
3427
 
3392
3428
  constructor();
3393
-
3394
- lessThan(start:Position):boolean;
3395
- lessOrEqual(start:Position):boolean;
3396
- greaterThan(end:Position):boolean;
3397
- greaterOrEqual(end:Position):boolean;
3398
- copy():Position;
3399
3429
  }
3400
3430
 
3401
- export class SignatureInformation {
3402
- label:string;
3403
- documentation:MarkupContent;
3404
- parameters:Array<ParameterInformation>;
3405
- activeParameter:number;
3431
+ export class TextDocumentContentChangeEvent {
3432
+ range:Range;
3433
+ rangeLength:number;
3434
+ text:string;
3406
3435
 
3407
3436
  constructor();
3408
3437
  }
@@ -3424,27 +3453,17 @@ export namespace dh.lsp {
3424
3453
  constructor();
3425
3454
  }
3426
3455
 
3427
- }
3456
+ export class Hover {
3457
+ contents:MarkupContent;
3458
+ range:Range;
3459
+
3460
+ constructor();
3461
+ }
3428
3462
 
3463
+ }
3429
3464
 
3430
3465
  export namespace dh.calendar {
3431
3466
 
3432
- export interface Holiday {
3433
- /**
3434
- * The date of the Holiday.
3435
- * @return {@link dh.LocalDateWrapper}
3436
- */
3437
- get date():dh.LocalDateWrapper;
3438
- /**
3439
- * The business periods that are open on the holiday.
3440
- * @return dh.calendar.BusinessPeriod
3441
- */
3442
- get businessPeriods():Array<BusinessPeriod>;
3443
- }
3444
- export interface BusinessPeriod {
3445
- get close():string;
3446
- get open():string;
3447
- }
3448
3467
  /**
3449
3468
  * Defines a calendar with business hours and holidays.
3450
3469
  */
@@ -3475,6 +3494,22 @@ export namespace dh.calendar {
3475
3494
  */
3476
3495
  get businessPeriods():Array<BusinessPeriod>;
3477
3496
  }
3497
+ export interface BusinessPeriod {
3498
+ get close():string;
3499
+ get open():string;
3500
+ }
3501
+ export interface Holiday {
3502
+ /**
3503
+ * The date of the Holiday.
3504
+ * @return {@link dh.LocalDateWrapper}
3505
+ */
3506
+ get date():dh.LocalDateWrapper;
3507
+ /**
3508
+ * The business periods that are open on the holiday.
3509
+ * @return dh.calendar.BusinessPeriod
3510
+ */
3511
+ get businessPeriods():Array<BusinessPeriod>;
3512
+ }
3478
3513
 
3479
3514
  type DayOfWeekType = string;
3480
3515
  export class DayOfWeek {
@@ -3490,3 +3525,4 @@ export namespace dh.calendar {
3490
3525
  }
3491
3526
 
3492
3527
  }
3528
+