File tree Expand file tree Collapse file tree 2 files changed +406
-0
lines changed
Expand file tree Collapse file tree 2 files changed +406
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright (c) Microsoft Corporation. All rights reserved.
2+ // Licensed under the MIT License.
3+
4+ 'use strict' ;
5+
6+ import { QuickPickItem } from 'vscode' ;
7+
8+ interface IJupyterServerUri {
9+ baseUrl : string ;
10+ token : string ;
11+
12+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13+ authorizationHeader : any ; // JSON object for authorization header.
14+ expiration ?: Date ; // Date/time when header expires and should be refreshed.
15+ displayName : string ;
16+ }
17+
18+ type JupyterServerUriHandle = string ;
19+
20+ export interface IJupyterUriProvider {
21+ readonly id : string ; // Should be a unique string (like a guid)
22+ getQuickPickEntryItems ( ) : QuickPickItem [ ] ;
23+ handleQuickPick (
24+ item : QuickPickItem ,
25+ backEnabled : boolean
26+ ) : Promise < JupyterServerUriHandle | 'back' | undefined > ;
27+ getServerUri ( handle : JupyterServerUriHandle ) : Promise < IJupyterServerUri > ;
28+ }
29+
30+ interface IDataFrameInfo {
31+ columns ?: { key : string ; type : ColumnType } [ ] ;
32+ indexColumn ?: string ;
33+ rowCount ?: number ;
34+ }
35+
36+ export interface IDataViewerDataProvider {
37+ dispose ( ) : void ;
38+ getDataFrameInfo ( ) : Promise < IDataFrameInfo > ;
39+ getAllRows ( ) : Promise < IRowsResponse > ;
40+ getRows ( start : number , end : number ) : Promise < IRowsResponse > ;
41+ }
42+
43+ enum ColumnType {
44+ String = 'string' ,
45+ Number = 'number' ,
46+ Bool = 'bool' ,
47+ }
48+
49+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
50+ type IRowsResponse = any [ ] ;
You can’t perform that action at this time.
0 commit comments