@deephaven-enterprise/jsapi-coreplus-types 1.20240517.518 → 2026.1.44

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.
@@ -0,0 +1,878 @@
1
+ declare module '@deephaven/jsapi-types' {
2
+ // Minimum TypeScript Version: 4.3
3
+ // Generated using com.vertispan.tsdefs.doclet.TsDoclet
4
+ export namespace dh.coreplus.pivot {
5
+
6
+ /**
7
+ * Analog of {@link dh.Column}, but specific to pivot tables. Represents a named, typed set of values in the pivot table
8
+ * that can be read.
9
+ */
10
+ export class PivotSource {
11
+ protected constructor();
12
+
13
+ /**
14
+ * Creates a new {@link dh.coreplus.pivot.PivotSort} for this source. The sort object then can be made to be ascending or descending,
15
+ * using {@link PivotSort.asc} or {@link PivotSort.desc}.
16
+ * @see {@link dh.Column.sort}
17
+ * @return a new {@link dh.coreplus.pivot.PivotSort} for this source
18
+ */
19
+ sort():PivotSort;
20
+ /**
21
+ * Creates a new {@link dh.FilterValue} for this source. The filter value can used as a builder to create a
22
+ * {@link dh.FilterCondition} or used as a parameter to another filter operation
23
+ * @see {@link dh.FilterCondition}
24
+ * @return a new {@link dh.FilterValue} for this source
25
+ */
26
+ filter():dh.FilterValue;
27
+ /**
28
+ * The name of this source.
29
+ */
30
+ get name():string;
31
+ /**
32
+ * True if the data type in this source is sortable.
33
+ */
34
+ get isSortable():boolean;
35
+ /**
36
+ * The description of this source, if any.
37
+ */
38
+ get description():string;
39
+ /**
40
+ * The type of this source.
41
+ */
42
+ get type():string;
43
+ }
44
+
45
+ /**
46
+ * Tool to request the server pivot a table and return the results.
47
+ */
48
+ export class PivotService implements dh.HasEventHandling {
49
+ protected constructor();
50
+
51
+ /**
52
+ * Given a server object, finds or creates a pivot service talking to that same server. If the instance is a
53
+ * PivotService, it will be wrapped and returned. The initial call for a given worker must be either a PivotTable or
54
+ * a PivotService.
55
+ * @param object - some instance that lives on the server to be connected to.
56
+ * @return a promise that will resolve to a PivotService instance
57
+ */
58
+ static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):Promise<PivotService>;
59
+ /**
60
+ * Creates a pivot table from the given options - a source table, row keys, column keys, and aggregations.
61
+ * @param options - to use when creating the pivot table
62
+ * @return a Promise that resolves to a PivotTable instance
63
+ */
64
+ createPivotTable(options:PivotCreationOptions):Promise<PivotTable>;
65
+ addEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):()=>void;
66
+ nextEvent<T>(arg0:string, arg1?:number):Promise<dh.Event<T>>;
67
+ hasListeners(arg0:string):boolean;
68
+ removeEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):boolean;
69
+ }
70
+
71
+ /**
72
+ * Options for creating a pivot table.
73
+ */
74
+ export class PivotCreationOptions {
75
+ source:dh.JoinableTable;
76
+ rowKeys:string[];
77
+ columnKeys:string[];
78
+ aggregations:{ [key: string]: Array<string>; };
79
+
80
+ protected constructor();
81
+
82
+ toString():string;
83
+ }
84
+
85
+ /**
86
+ * Provides the details for an updated event from a pivot table subscription. Unlike
87
+ * {@link dh.TableData}, this class offers a matrix of data for each value column, and
88
+ * row/column expand state, depth, and grand totals.
89
+ */
90
+ export class PivotSnapshot {
91
+ protected constructor();
92
+
93
+ /**
94
+ * Returns the grand total for a given value source in the pivot table.
95
+ * <p>
96
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
97
+ * @param value - the value source to read, must have been included in the subscription
98
+ * @return the grand total for the given value source
99
+ */
100
+ getGrandTotal(value:PivotSource):any;
101
+ /**
102
+ * Reads a value from the pivot table data for a given position in the grid.
103
+ * <p>
104
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
105
+ * @param value - the value source to read, must have been included in the subscription
106
+ * @param rowPosition - the row position within the pivot table
107
+ * @param colPosition - the column position within the pivot table
108
+ * @return the value present in the pivot table at the given position
109
+ */
110
+ getValue(value:PivotSource, rowPosition:number, colPosition:number):any;
111
+ /**
112
+ * Data specific to the column dimension of the pivot table, including the groups, depth of each column, whether
113
+ * each column is expanded, and the totals for each column.
114
+ */
115
+ get columns():DimensionData;
116
+ /**
117
+ * Data specific to the row dimension of the pivot table, including the groups, depth of each row, whether each row
118
+ * is expanded, and the totals for each row.
119
+ */
120
+ get rows():DimensionData;
121
+ /**
122
+ * The value sources that were included in the subscription and can be read from this snapshot.
123
+ */
124
+ get valueSources():Array<PivotSource>;
125
+ }
126
+
127
+ /**
128
+ * This type is an analog of {@link dh.Sort}, with a few differences:
129
+ * <ul>
130
+ * <li>The {@link column} property always returns null, and instead there is a {@link name} property</li>
131
+ * <li>Reverse is not supported</li>
132
+ * </ul>
133
+ *
134
+ * A PivotSort doesn't sort the columns of the pivot directly, but sorts the keys uses for columns or rows.
135
+ */
136
+ export class PivotSort {
137
+ static readonly ASCENDING:string;
138
+ static readonly DESCENDING:string;
139
+
140
+ protected constructor();
141
+
142
+ /**
143
+ * Builds a Sort instance to sort values in ascending order.
144
+ * @return {@link dh.coreplus.pivot.PivotSort}
145
+ */
146
+ asc():PivotSort;
147
+ /**
148
+ * Builds a Sort instance to sort values in descending order.
149
+ * @return {@link dh.coreplus.pivot.PivotSort}
150
+ */
151
+ desc():PivotSort;
152
+ /**
153
+ * Builds a Sort instance which takes the absolute value before applying order.
154
+ * @return {@link dh.coreplus.pivot.PivotSort}
155
+ */
156
+ abs():PivotSort;
157
+ toString():string;
158
+ /**
159
+ * True if the absolute value of the column should be used when sorting; defaults to false.
160
+ * @return boolean
161
+ */
162
+ get isAbs():boolean;
163
+ /**
164
+ * The column which is sorted.
165
+ * @return {@link dh.Column}
166
+ */
167
+ get column():dh.Column;
168
+ /**
169
+ * The name of the column which is sorted.
170
+ * @return String
171
+ */
172
+ get name():string;
173
+ /**
174
+ * The direction of this sort, either <b>ASC</b> or <b>DESC</b>.
175
+ * @return String
176
+ */
177
+ get direction():string;
178
+ }
179
+
180
+ /**
181
+ * Describes the desired subscription for a pivot table.
182
+ */
183
+ export class PivotSubscriptionOptions {
184
+ rows:dh.RangeSet|dh.SimpleRange;
185
+ columns:dh.RangeSet|dh.SimpleRange;
186
+ sources:Array<PivotSource>;
187
+ updateIntervalMs?:number|null;
188
+
189
+ constructor();
190
+ }
191
+
192
+ /**
193
+ * Describes the desired snapshot for a pivot table.
194
+ */
195
+ export class PivotSnapshotOptions {
196
+ /**
197
+ * The rows to include in the snapshot.
198
+ */
199
+ rows:dh.RangeSet|dh.SimpleRange;
200
+ /**
201
+ * The columns to include in the snapshot
202
+ */
203
+ columns:dh.RangeSet|dh.SimpleRange;
204
+ /**
205
+ * The aggregated sources to include in the snapshot
206
+ */
207
+ sources:Array<PivotSource>;
208
+
209
+ constructor();
210
+ }
211
+
212
+ /**
213
+ * Represents a PivotTable on the Deephaven server, with support for sorting, filtering, and viewports with
214
+ * expand/collapse on rows and columns.
215
+ */
216
+ export class PivotTable implements dh.HasEventHandling {
217
+ /**
218
+ * Event fired when the pivot table has received a new snapshot, reflecting the current viewport, expansions, and
219
+ * applied sorts and filters. Detail object is a {@link dh.coreplus.pivot.PivotSnapshot}.
220
+ */
221
+ static readonly EVENT_UPDATED:string;
222
+ /**
223
+ * Indicates that connection to the server has been lost - to reconnect, fetch this pivot again once the server
224
+ * connection has been restored.
225
+ */
226
+ static readonly EVENT_DISCONNECT:string;
227
+ /**
228
+ *
229
+ * @deprecated Pivot tables never fire this event, listen for {@link #EVENT_DISCONNECT} and then wait for the server
230
+ * to reconnect and refetch the pivot table.
231
+ */
232
+ static readonly EVENT_RECONNECT:string;
233
+ /**
234
+ *
235
+ * @deprecated Pivot tables never fire this event.
236
+ */
237
+ static readonly EVENT_RECONNECTFAILED:string;
238
+
239
+ /**
240
+ * Creates a client PivotTable instance from a {@link dh.Widget} that has been exported from the server.
241
+ * @param widget - a PivotTable widget that has been fetched from the server
242
+ */
243
+ constructor(widget:dh.Widget);
244
+
245
+ /**
246
+ * Returns a Promise that resolves to the underlying source table used to create this PivotTable. The returned table
247
+ * is a new export that the caller is responsible for closing.
248
+ * @return a Promise that resolves to the source JsTable
249
+ */
250
+ getSourceTable():Promise<dh.Table>;
251
+ /**
252
+ * Changes the row sorts of this pivot table. The row sorts may contain sorts of both the row and value sources.
253
+ * @param rowSorts - row and value sorts to apply to the rows of this pivot table
254
+ * @return the previous row sorts
255
+ */
256
+ applyRowSort(rowSorts:PivotSort[]):Array<PivotSort>;
257
+ /**
258
+ * Changes the column sorts of this pivot table. The column sorts may contain sorts of both the column and value
259
+ * sources.
260
+ * @param colSorts - column and value sorts to apply to the columns of this pivot table
261
+ * @return the previous column sorts
262
+ */
263
+ applyColumnSort(colSorts:PivotSort[]):Array<PivotSort>;
264
+ /**
265
+ * Changes the filter conditions of this pivot table. The filter array may contain any number of conditions, which
266
+ * will be AND'd together. Only row and column sources can be filtered, not value sources.
267
+ * @param filter - Row and column filter conditions to apply to this pivot table.
268
+ * @return the previous filter conditions
269
+ */
270
+ applyFilter(filter:dh.FilterCondition[]):Array<dh.FilterCondition>;
271
+ /**
272
+ * Expands the row at the given position.
273
+ * @param position - the position of the row to expand
274
+ * @param expandDescendants - if true, also expands all descendants of the row, defaults to false
275
+ */
276
+ expandRow(position:number, expandDescendants?:boolean):void;
277
+ /**
278
+ * Expanded the "totals" row, the root of the tree on the row dimension. Calling this after
279
+ * {@link PivotTable.collapseRootRow} can be used to restore the initial state of the pivot table, where only the root is
280
+ * expanded.
281
+ * @param expandDescendants - true to recursively expand all descendants, false to only expand the root level.
282
+ * Defaults to false.
283
+ */
284
+ expandRootRow(expandDescendants?:boolean):void;
285
+ /**
286
+ * Expanded the "totals" column, the root of the tree on the column dimension. Calling this after
287
+ * {@link PivotTable.collapseRootColumn} can be used to restore the initial state of the pivot table, where only the root is
288
+ * expanded.
289
+ * @param expandDescendants - true to recursively expand all descendants, false to only expand the root level.
290
+ * Defaults to false.
291
+ */
292
+ expandRootColumn(expandDescendants?:boolean):void;
293
+ /**
294
+ * Collapses the "totals" row, the root of the tree on the row dimension. After calling this method, the pivot table
295
+ * will apparently only have one row.
296
+ */
297
+ collapseRootRow():void;
298
+ /**
299
+ * Collapses the "totals" column, the root of the tree on the column dimension. After calling this method, the pivot
300
+ * table will apparently only have one column.
301
+ */
302
+ collapseRootColumn():void;
303
+ /**
304
+ * Sets the expansion state of the "totals" row, the root of the tree on the row dimension.
305
+ * @param isExpanded - if true, the root row will be expanded, if false, it will be collapsed
306
+ * @param expandDescendants - if true, also expands all descendants of the root row, defaults to false. Ignored if
307
+ * isExpanded is false
308
+ */
309
+ setRootRowExpanded(isExpanded:boolean, expandDescendants?:boolean):void;
310
+ /**
311
+ * Sets the expansion state of the "totals" column, the root of the tree on the column dimension.
312
+ * @param isExpanded - if true, the root column will be expanded, if false, it will be collapsed
313
+ * @param expandDescendants - if true, also expands all descendants of the root column, defaults to false. Ignored if
314
+ * isExpanded is false
315
+ */
316
+ setRootColumnExpanded(isExpanded:boolean, expandDescendants?:boolean):void;
317
+ /**
318
+ * Collapses the row at the given position.
319
+ * @param position - the position of the row to collapse
320
+ */
321
+ collapseRow(position:number):void;
322
+ /**
323
+ * Sets the expansion state of the row at the given position.
324
+ * @param position - the position of the row to set the expansion state for
325
+ * @param isExpanded - if true, the row will be expanded, if false, it will be collapsed
326
+ * @param expandDescendants - if true, also expands all descendants of the row, defaults to false. Ignored if
327
+ * isExpanded is false.
328
+ */
329
+ setRowExpanded(position:number, isExpanded:boolean, expandDescendants?:boolean):void;
330
+ /**
331
+ * Expands the column at the given position.
332
+ * @param position - the position of the column to expand
333
+ * @param expandDescendants - if true, also expands all descendants of the column, defaults to false
334
+ */
335
+ expandColumn(position:number, expandDescendants?:boolean):void;
336
+ /**
337
+ * Collapses the column at the given position.
338
+ * @param position - the position of the column to collapse
339
+ */
340
+ collapseColumn(position:number):void;
341
+ /**
342
+ * Sets the expansion state of the column at the given position.
343
+ * @param position - the position of the column to set the expansion state for
344
+ * @param isExpanded - if true, the column will be expanded, if false, it will be collapsed
345
+ * @param expandDescendants - if true, also expands all descendants of the column, defaults to false. Ignored if
346
+ * isExpanded is false.
347
+ */
348
+ setColumnExpanded(position:number, isExpanded:boolean, expandDescendants?:boolean):void;
349
+ /**
350
+ * Expands all rows and columns in this pivot table, including all descendants of any expanded rows or columns.
351
+ * @deprecated Use {@link #expandRootRow} and {@link #expandRootColumn} instead to control rows and columns
352
+ */
353
+ expandAll():void;
354
+ /**
355
+ * Collapses all rows and columns in this pivot table, including all descendants of any expanded rows or columns.
356
+ * @deprecated This method is probably not helpful - it reflects the behavior in rollups, but collapsing both
357
+ * dimensions leads to a single cell for each value source. Use {@link #collapseRootRow} and
358
+ * {@link #collapseRootColumn} (independently or jointly) if that is the behavior you want, and possible
359
+ * expand the root row/column to see the initial contents.
360
+ */
361
+ collapseAll():void;
362
+ setViewport(options:PivotSubscriptionOptions):void;
363
+ /**
364
+ * Returns a promise that will resolve to a {@link dh.coreplus.pivot.PivotSnapshot} instance containing a snapshot of the current
365
+ * state of this pivot table (including filters, sorts, and expand state) within the bounds of the specified rows,
366
+ * columns, and value sources.
367
+ * @param options - options for the snapshot, see {@link dh.coreplus.pivot.PivotSnapshotOptions} for details
368
+ * @return Promise of {@link dh.coreplus.pivot.PivotSnapshot}
369
+ */
370
+ createSnapshot(options:PivotSnapshotOptions):Promise<PivotSnapshot>;
371
+ /**
372
+ * Closes this pivot table, releasing all resources and subscriptions associated with it.
373
+ */
374
+ close():void;
375
+ /**
376
+ * a new copy of this pivot table, so it can be sorted and filtered separately, and maintain a different viewport.
377
+ * Unlike Table, this will _not_ copy the filter or sort, since pivot table viewport semantics differ, and without a
378
+ * viewport set, the pivot table doesn't evaluate these settings, and they aren't readable on the properties.
379
+ * Expanded state is also not copied.
380
+ * @return Promise of dh.coreplus.pivot.PivotTable
381
+ */
382
+ copy():Promise<PivotTable>;
383
+ /**
384
+ * The current filter configuration of this Tree Table.
385
+ * @return {@link dh.FilterCondition} array
386
+ */
387
+ get filter():Array<dh.FilterCondition>;
388
+ /**
389
+ * The current column sort configuration of this PivotTable.
390
+ * @return {@link dh.coreplus.pivot.PivotSort} array
391
+ */
392
+ get columnSort():Array<PivotSort>;
393
+ /**
394
+ * True if this pivot table is closed.
395
+ */
396
+ get isClosed():boolean;
397
+ /**
398
+ * The sources that represent the columns of this pivot table.
399
+ */
400
+ get columnSources():Array<PivotSource>;
401
+ /**
402
+ * The current row sort configuration of this PivotTable.
403
+ * @return {@link dh.coreplus.pivot.PivotSort} array
404
+ */
405
+ get rowSort():Array<PivotSort>;
406
+ /**
407
+ * True if this pivot table's subscription may receive updates from the server.
408
+ */
409
+ get isRefreshing():boolean;
410
+ /**
411
+ * The sources that represent the rows of this pivot table.
412
+ */
413
+ get rowSources():Array<PivotSource>;
414
+ /**
415
+ * The sources that represent the values of this pivot table.
416
+ */
417
+ get valueSources():Array<PivotSource>;
418
+ addEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):()=>void;
419
+ nextEvent<T>(arg0:string, arg1?:number):Promise<dh.Event<T>>;
420
+ hasListeners(arg0:string):boolean;
421
+ removeEventListener<T>(arg0:string, arg1:(arg0:dh.Event<T>)=>void):boolean;
422
+ }
423
+
424
+ /**
425
+ * For either the row or column dimension, this class provides access to dimension-specific metadata and data made
426
+ * available by the viewport subscription.
427
+ */
428
+ export class DimensionData {
429
+ protected constructor();
430
+
431
+ /**
432
+ * Given a position in this dimension, returns true if the item can be expanded to show children.
433
+ * @param position - the position in the dimension
434
+ * @return true if the item can be expanded
435
+ */
436
+ hasChildren(position:number):boolean;
437
+ /**
438
+ * Given a position in this dimension, returns true if the item is already expanded. Any item that cannot be
439
+ * expanded will return false.
440
+ * @param position - the position in the dimension
441
+ * @return true if the item is expanded
442
+ */
443
+ isExpanded(position:number):boolean;
444
+ /**
445
+ * Given a position in this dimension, returns the depth of the item in the hierarchy. The root level is 1, all
446
+ * items at the top level are then at depth 2, and so on.
447
+ * @param position - the position in the dimension
448
+ * @return the depth of the item in the hierarchy
449
+ */
450
+ getDepth(position:number):number;
451
+ /**
452
+ * Given a position in this dimension, returns the keys for that item. The keys are the values of the grouping
453
+ * columns, and the values then represent the aggregated values for the underlying table.
454
+ * <p>
455
+ * Types of the keys are provided by
456
+ * {@link PivotTable.getColDim}/{@link PivotTable.getRowDim}.
457
+ * @param position - the position in the dimension
458
+ * @return an array of key values for the item at the given position
459
+ */
460
+ getKeys(position:number):any[];
461
+ /**
462
+ * Given a position in this dimension, returns the total for the item in the dimension at that position.
463
+ * <p>
464
+ * The type of this data will match the type of the provided {@link dh.coreplus.pivot.PivotSource}.
465
+ * @param position - the position in the dimension
466
+ * @param value - the value source to read, must have been included in the subscription
467
+ * @return the total for the item at the given position in this dimension
468
+ */
469
+ getTotal(position:number, value:PivotSource):any;
470
+ /**
471
+ * The first position in this dimension that is present in this snapshot.
472
+ */
473
+ get offset():number;
474
+ /**
475
+ * Number of elements in this dimension that are present in this snapshot.
476
+ */
477
+ get count():number;
478
+ /**
479
+ * The total number of elements in this dimension, given the current expansion state. Viewports past the end of
480
+ * this will not be fully populated.
481
+ */
482
+ get totalCount():number;
483
+ }
484
+
485
+ }
486
+
487
+ export namespace dh.coreplus.schema {
488
+
489
+ /**
490
+ * JS API for the Schema Service <a href="https://deephaven.io/enterprise/docs/data-guide/tables-and-schemas/">Deephaven
491
+ * schema documentation</a>
492
+ */
493
+ export class SchemaApiService {
494
+ /**
495
+ * The name of the Schema API Service. Used by the client for the name in the variable descriptor when calling
496
+ * getObject from the core connection.
497
+ */
498
+ static readonly NAME:string;
499
+ /**
500
+ * The type of the Schema API Service. Used by the client for the type in the variable descriptor when calling
501
+ * getObject from the core connection.
502
+ */
503
+ static readonly TYPE:string;
504
+
505
+ protected constructor();
506
+
507
+ /**
508
+ * Gets a new SchemaApiService instance. Used to get, save, and delete xml schemas.
509
+ * @param object - some instance that lives on the server to be connected to.
510
+ * @return a new JsSchemaApiService instance
511
+ */
512
+ static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):SchemaApiService;
513
+ /**
514
+ * Gets the schema xml String for a given namespace and table name.
515
+ * @param namespace - the namespace of the schema
516
+ * @param tableName - the table name of the schema
517
+ * @return a Promise that resolves to the schema xml string for the given namespace and table name
518
+ */
519
+ getSchemaXml(namespace:string, tableName:string):Promise<string>;
520
+ /**
521
+ * Saves a schema xml String to the Schema Service. Uses the namespace and table name from the xml.
522
+ * @param xmlString - the xml string for the schema to save
523
+ * @param noCompile - indicates that the server should skip compiling loggers and listeners
524
+ * @return a promise that resolves on successful save
525
+ */
526
+ saveSchemaXml(xmlString:string, noCompile:boolean):Promise<void>;
527
+ /**
528
+ * Deletes a schema from the Schema Service using the provided namespace and table name.
529
+ * @param namespace - the namespace of the schema
530
+ * @param tableName - the table name of the schema
531
+ * @return a promise that resolves on successful delete
532
+ */
533
+ deleteSchema(namespace:string, tableName:string):Promise<void>;
534
+ /**
535
+ * Requests the schema api service reload the schema table names table.
536
+ * @return a promise that resolves on successful reload
537
+ */
538
+ reloadTable():Promise<void>;
539
+ /**
540
+ * Checks if table names exist.
541
+ * @param ids - the ids to check in the format "namespace.tableName"
542
+ * @return an array of the ids found to exist
543
+ */
544
+ checkTableNamesExist(ids:string[]):Promise<string[]>;
545
+ /**
546
+ * Gets table names for a namespace.
547
+ * @param namespace - the namespace for the table names
548
+ * @return a promise that resolves to an array of table names
549
+ */
550
+ getTableNames(namespace:string):Promise<string[]>;
551
+ }
552
+
553
+ }
554
+
555
+ export namespace io.deephaven.web.coreplus.client.acl {
556
+
557
+ export class JsAclGetPermissionsResponse {
558
+ protected constructor();
559
+
560
+ getTable():Promise<dh.Table>;
561
+ get partial():boolean;
562
+ get full():boolean;
563
+ }
564
+
565
+ }
566
+
567
+ export namespace dh.coreplus.csv {
568
+
569
+ /**
570
+ * JS API for the CSV API Service
571
+ */
572
+ export class CsvApiService {
573
+ /**
574
+ * The name of the CSV API Service. Used by the client for the name in the variable descriptor when calling
575
+ * getObject from the core connection.
576
+ */
577
+ static readonly NAME:string;
578
+ /**
579
+ * The type of the CSV API Service. Used by the client for the type in the variable descriptor when calling
580
+ * getObject from the core connection.
581
+ */
582
+ static readonly TYPE:string;
583
+
584
+ protected constructor();
585
+
586
+ /**
587
+ * Gets a new JsCsvApiService instance.
588
+ * @param object - some instance that lives on the server to be connected to.
589
+ * @return a new JsCsvApiService instance
590
+ */
591
+ static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):CsvApiService;
592
+ /**
593
+ * Creates a table from a csv file located at the path on the server.
594
+ * @param path - the path of the CSV file
595
+ * @param fileFormat - optional file format, if blank this create a default format
596
+ * @param delimiter - optional delimiter to use, ignored if blank
597
+ * @param skipHeaderLines - number of header lines to skip
598
+ * @param skipFooterLines - number of footer lines to skip
599
+ * @param trim - if the parser should trim
600
+ * @param noHeader - if there is no header in the file
601
+ * @param maxRows - the max number of rows to read
602
+ * @return a promise that resolves to a table
603
+ */
604
+ tableFromCsvFile(path:string, fileFormat:string, delimiter:string, skipHeaderLines:number, skipFooterLines:number, trim:boolean, noHeader:boolean, maxRows:number):Promise<dh.Table>;
605
+ /**
606
+ * Creates a table from a string containing csv.
607
+ * @param csvString - the path of the CSV file
608
+ * @param fileFormat - optional file format, if blank this create a default format
609
+ * @param delimiter - optional delimiter to use, ignored if blank
610
+ * @param skipHeaderLines - number of header lines to skip
611
+ * @param skipFooterLines - number of footer lines to skip
612
+ * @param trim - if the parser should trim
613
+ * @param noHeader - if there is no header in the file
614
+ * @param maxRows - the max number of rows to read
615
+ * @return a promise that resolves to a table
616
+ */
617
+ tableFromCsvString(csvString:string, fileFormat:string, delimiter:string, skipHeaderLines:number, skipFooterLines:number, trim:boolean, noHeader:boolean, maxRows:number):Promise<dh.Table>;
618
+ /**
619
+ * Get a preview table for a CSV import source.
620
+ * @param schemaXml - the schema as an xml string
621
+ * @param importSourceName - the import source name
622
+ * @param partitionFormula - the partition formula
623
+ * @param intradayPartitionColumn - the intraday partition column
624
+ * @param trim - if the parser should trim
625
+ * @param noHeader - if there is no header in the file
626
+ * @param delimiter - if there is no header in the file
627
+ * @param skipLines - number of lines to skip
628
+ * @param skipFooterLines - number of footer lines to skip
629
+ * @param fileFormat - optional file format, if null this creates a default format
630
+ * @param constant - the constant
631
+ * @param strict - if the parser should use strict mode
632
+ * @param partitionSubstitution - the partition substitution
633
+ * @param substitutionDateFormat - the substitution date format
634
+ * @param sourceFile - the source file
635
+ * @param sourceGlob - the source glob
636
+ * @param sourceDirectory - the source directory
637
+ * @return a promise that resolves to a table
638
+ */
639
+ csvImportSourcePreview(schemaXml:string, importSourceName:string, partitionFormula:string, intradayPartitionColumn:string, trim:boolean, noHeader:boolean, delimiter:string, skipLines:number, skipFooterLines:number, fileFormat:string, constant:string, strict:boolean, partitionSubstitution:string, substitutionDateFormat:string, sourceFile:string, sourceGlob:string, sourceDirectory:string):Promise<dh.Table>;
640
+ /**
641
+ * Infers a schema from a csv file located at the path on the server.
642
+ * @param path - the path of the CSV file
643
+ * @param namespace - the schema namespace
644
+ * @param tableName - the schema tableName
645
+ * @param importSourceName - the import source name
646
+ * @param bestFit - if the parser should best fit columns
647
+ * @param fileFormat - optional file format, if blank this create a default format
648
+ * @param delimiter - optional delimiter to use, ignored if blank
649
+ * @param skipHeaderLines - number of header lines to skip
650
+ * @param skipFooterLines - number of footer lines to skip
651
+ * @param trim - if the parser should trim
652
+ * @param noHeader - if there is no header in the file
653
+ * @param maxRows - the max number of rows to read
654
+ * @param partitionColumn - the partition column
655
+ * @param columnNames - column names if noHeader is set
656
+ * @return a promise that resolves to a string
657
+ */
658
+ schemaFromCsvFile(path:string, namespace:string, tableName:string, importSourceName:string, bestFit:boolean, fileFormat:string, delimiter:string, skipHeaderLines:number, skipFooterLines:number, trim:boolean, noHeader:boolean, maxRows:number, partitionColumn:string, columnNames:string[]):Promise<string>;
659
+ /**
660
+ * Infers a schema from a string containing csv.
661
+ * @param csvString - a string containing csv
662
+ * @param namespace - the schema namespace
663
+ * @param tableName - the schema tableName
664
+ * @param importSourceName - the import source name
665
+ * @param bestFit - if the parser should best fit columns
666
+ * @param fileFormat - optional file format, if blank this create a default format
667
+ * @param delimiter - optional delimiter to use, ignored if blank
668
+ * @param skipHeaderLines - number of header lines to skip
669
+ * @param skipFooterLines - number of footer lines to skip
670
+ * @param trim - if the parser should trim
671
+ * @param noHeader - if there is no header in the file
672
+ * @param maxRows - the max number of rows to read
673
+ * @param partitionColumn - the partition column
674
+ * @param columnNames - column names if noHeader is set
675
+ * @return a promise that resolves to a string
676
+ */
677
+ schemaFromCsvString(csvString:string, namespace:string, tableName:string, importSourceName:string, bestFit:boolean, fileFormat:string, delimiter:string, skipHeaderLines:number, skipFooterLines:number, trim:boolean, noHeader:boolean, maxRows:number, partitionColumn:string, columnNames:string[]):Promise<string>;
678
+ }
679
+
680
+ }
681
+
682
+ export namespace dh.coreplus.jdbc {
683
+
684
+ /**
685
+ * JS API for the JDBC API Service
686
+ */
687
+ export class JdbcApiService {
688
+ /**
689
+ * The name of the JDBC API Service. Used by the client for the name in the variable descriptor when calling
690
+ * getObject from the core connection.
691
+ */
692
+ static readonly NAME:string;
693
+ /**
694
+ * The type of the JDBC API Service. Used by the client for the type in the variable descriptor when calling
695
+ * getObject from the core connection.
696
+ */
697
+ static readonly TYPE:string;
698
+
699
+ protected constructor();
700
+
701
+ /**
702
+ * Gets a new JsJdbcApiService instance.
703
+ * @param object - some instance that lives on the server to be connected to.
704
+ * @return a new JsJdbcApiService instance
705
+ */
706
+ static getInstance(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable):JdbcApiService;
707
+ /**
708
+ * Connects to a JDBC session.
709
+ * @param driverName - the JDBC driver name
710
+ * @param uri - the JDBC URI
711
+ * @param userName - the user name
712
+ * @param password - the password
713
+ * @return a promise that resolves to the session ID
714
+ */
715
+ connect(driverName:string, uri:string, userName:string, password:string):Promise<Number>;
716
+ /**
717
+ * Disconnects a JDBC session.
718
+ * @param sessionId - the session ID
719
+ * @return a promise that resolves on successful disconnect
720
+ */
721
+ disconnect(sessionId:number):Promise<void>;
722
+ /**
723
+ * Gets the catalog names as a Table for a session.
724
+ * @param sessionId - the session id
725
+ * @return a promise that resolves to a Table
726
+ */
727
+ getCatalogNamesTable(sessionId:number):Promise<dh.Table>;
728
+ /**
729
+ * Gets the table names as a Table for a session and catalog name.
730
+ * @param sessionId - the session id
731
+ * @param catalogName - the catalog name
732
+ * @return a promise that resolves to a Table
733
+ */
734
+ getTableNamesTable(sessionId:number, catalogName:string):Promise<dh.Table>;
735
+ /**
736
+ * Generates a schema from a jdbc query.
737
+ * @param sessionId - the session id
738
+ * @param catalog - the catalog
739
+ * @param query - the jdbc query
740
+ * @param namespace - the schema namespace
741
+ * @param tableName - the schema table name
742
+ * @param assessmentMethod - the assessment method for type inference
743
+ * @return a promise that resolves to a schema xml string
744
+ */
745
+ generateSchema(sessionId:number, catalog:string, query:string, namespace:string, tableName:string, assessmentMethod:string):Promise<string>;
746
+ /**
747
+ * Gets a preview table for a jdbc query.
748
+ * @param sessionId - the session id
749
+ * @param catalog - the catalog
750
+ * @param query - the jdbc query
751
+ * @param maxRows - the max rows for the table
752
+ * @return a promise that resolves to a table
753
+ */
754
+ queryTable(sessionId:number, catalog:string, query:string, maxRows:number):Promise<dh.Table>;
755
+ /**
756
+ * Get a preview table for a JDBC import source.
757
+ * @param sessionId - the session id
758
+ * @param catalog - the catalog
759
+ * @param query - the jdbc query
760
+ * @param schemaXml - the schema as an xml string
761
+ * @param importSourceName - the import source name
762
+ * @param partitionFormula - the partition formula
763
+ * @param intradayPartitionColumn - the intraday partition column
764
+ * @param strict - if the parser should use strict mode
765
+ * @param partitionSubstitution - the partition substitution
766
+ * @return a preview table for the query
767
+ */
768
+ jdbcImportSourcePreview(sessionId:number, catalog:string, query:string, schemaXml:string, importSourceName:string, partitionFormula:string, intradayPartitionColumn:string, strict:boolean, partitionSubstitution:string, substitutionDateFormat:string):Promise<dh.Table>;
769
+ }
770
+
771
+ }
772
+
773
+ export namespace dh.coreplus.web.client.utils {
774
+
775
+ /**
776
+ * JS API for the Web Client Utils Service This is a generic utility service for web clients.
777
+ */
778
+ export class WebClientUtilsService {
779
+ /**
780
+ * The name of the Web Client Utils Service. Used by the client for the name in the variable descriptor when calling
781
+ * getObject from the core connection.
782
+ */
783
+ static readonly NAME:string;
784
+ /**
785
+ * The type of the Web Client UtilsService. Used by the client for the type in the variable descriptor when calling
786
+ * getObject from the core connection.
787
+ */
788
+ static readonly TYPE:string;
789
+
790
+ /**
791
+ * Creates a new WebClientUtilsService instance. Used to analyze permissions for a user on a namespace/table.
792
+ * @param object - some instance that lives on the server to be connected to.
793
+ * @throws RuntimeException if the object is not of the correct type
794
+ */
795
+ constructor(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable);
796
+
797
+ /**
798
+ * Get business dates for a given calendar between startDate and endDate.
799
+ * @param calendarName - the name of the calendar
800
+ * @param startDate - the start date
801
+ * @param endDate - the end date
802
+ * @return a promise that resolves to an array of business dates
803
+ */
804
+ getBusinessDates(calendarName:string, startDate:string, endDate:string):Promise<string[]>;
805
+ close():void;
806
+ }
807
+
808
+ }
809
+
810
+ export namespace dh.coreplus.acl {
811
+
812
+ /**
813
+ * JS API for the ACL Service <a href="https://deephaven.io/enterprise/docs/sys-admin/permissions/acls/">Deephaven ACL
814
+ * documentation</a>
815
+ */
816
+ export class AclService {
817
+ /**
818
+ * The name of the ACL Service. Used by the client for the name in the variable descriptor when calling getObject
819
+ * from the core connection.
820
+ */
821
+ static readonly NAME:string;
822
+ /**
823
+ * The type of the Acl API Service. Used by the client for the type in the variable descriptor when calling
824
+ * getObject from the core connection.
825
+ */
826
+ static readonly TYPE:string;
827
+
828
+ /**
829
+ * Creates a new AclService instance. Used to analyze permissions for a user on a namespace/table.
830
+ * @param object - some instance that lives on the server to be connected to.
831
+ * @throws RuntimeException if the object is not of the correct type
832
+ */
833
+ constructor(object:dh.Table|dh.Widget|dh.WidgetExportedObject|dh.PartitionedTable|dh.TotalsTable|dh.TreeTable);
834
+
835
+ getPermissions(user:string, namespace:string, tableName:string, showGroupsWithoutAcls:boolean):Promise<io.deephaven.web.coreplus.client.acl.JsAclGetPermissionsResponse>;
836
+ close():void;
837
+ }
838
+
839
+ }
840
+
841
+ export namespace dh.coreplus {
842
+
843
+ /**
844
+ * Simple range consisting only of start and end numbers.
845
+ * @deprecated Use {@link io.deephaven.web.client.api.subscription.DataOptions.SimpleRange} instead.
846
+ */
847
+ export interface SimpleRange extends dh.SimpleRange { }
848
+
849
+ /**
850
+ * A {@link dh.ColumnRestriction} that constrains a column to one of a fixed set of allowed values. The allowed values may
851
+ * originate from string, boolean, integer, long, float, or double enum restrictions, but are always normalized to their
852
+ * canonical string representation at construction time (e.g. the integer `10000` becomes `"10000"`, the
853
+ * boolean `true` becomes `"true"`).
854
+ * <p>
855
+ * {@link validate} performs an <em>exact</em> string match against these canonical representations. A value that the
856
+ * server would accept through its own lenient parsing (e.g. `"1e4"` for the integer `10000`, or
857
+ * `"10000.0"` for the integer `10000`) will fail client-side validation even though it may succeed on the
858
+ * server. Callers should treat a `null` result from {@link validate} as a definitive pass, but a non-null result
859
+ * as a client-side hint only — the server remains the authoritative source of truth.
860
+ */
861
+ export class EnumColumnRestriction extends dh.ColumnRestriction {
862
+ protected constructor();
863
+
864
+ validate(value:any):string|undefined|null;
865
+ /**
866
+ * The canonical string representations of the allowed values for this column. These are the only values that
867
+ * {@link EnumColumnRestriction.validate} will accept; the server may permit additional representations (e.g. alternate numeric formats).
868
+ * @return The allowed values as canonical strings
869
+ */
870
+ get allowedValues():Array<string>;
871
+ get type():string;
872
+ }
873
+
874
+ }
875
+
876
+ }
877
+
878
+ export { dh } from '@deephaven/jsapi-types';