mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 18:01:39 +00:00
Initial Move from Azure DevOps to GitHub
This commit is contained in:
83
src/Contracts/ActionContracts.ts
Normal file
83
src/Contracts/ActionContracts.ts
Normal file
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* Data Explorer tab kinds
|
||||
*/
|
||||
export enum TabKind {
|
||||
SQLDocuments,
|
||||
MongoDocuments,
|
||||
TableEntities,
|
||||
Graph,
|
||||
SQLQuery,
|
||||
ScaleSettings
|
||||
}
|
||||
|
||||
/**
|
||||
* Data Explorer pane kinds
|
||||
*/
|
||||
export enum PaneKind {
|
||||
AddCollection,
|
||||
CassandraAddCollection,
|
||||
DeleteCollection,
|
||||
DeleteDatabase,
|
||||
GlobalSettings,
|
||||
AdHocAccess,
|
||||
SwitchDirectory
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters to pass to DataExplorer in order to have it perform a given action
|
||||
*/
|
||||
export interface DataExplorerAction {
|
||||
actionType: ActionType | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open tab action
|
||||
*/
|
||||
export interface OpenTab extends DataExplorerAction {
|
||||
tabKind: TabKind | string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open collection tab action
|
||||
*/
|
||||
export interface OpenCollectionTab extends OpenTab {
|
||||
databaseResourceId: string;
|
||||
collectionResourceId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Open query tab action
|
||||
*/
|
||||
export interface OpenQueryTab extends OpenCollectionTab {
|
||||
query: QueryInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Query info will be looked at in the order given in this interface (i.e. if text is provided, everything else is ignored)
|
||||
*/
|
||||
export interface QueryInfo {
|
||||
text?: string;
|
||||
partitionKeys?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Open pane action
|
||||
*/
|
||||
export interface OpenPane extends DataExplorerAction {
|
||||
paneKind: PaneKind | string;
|
||||
}
|
||||
|
||||
export interface OpenSampleNotebook extends DataExplorerAction {
|
||||
path: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* The types of actions that the DataExplorer supports performing upon opening.
|
||||
*/
|
||||
export enum ActionType {
|
||||
OpenTab,
|
||||
OpenCollectionTab,
|
||||
OpenPane,
|
||||
TransmitCachedData,
|
||||
OpenSampleNotebook
|
||||
}
|
||||
Reference in New Issue
Block a user