@deephaven/jsapi-types 0.59.1-deferred-api.8 → 1.0.0-dev0.33.0

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