-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
export interface WorkspaceEntity<T> { | ||
name: string; | ||
data: T; | ||
} | ||
|
||
export enum EntityType { | ||
Directory = 'directory', | ||
File = 'file', | ||
} | ||
|
||
export interface BaseEntity { | ||
id: string; | ||
name: string; | ||
description: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
} | ||
|
||
export interface RestResponse { | ||
status: number; | ||
bytes: number; | ||
headers: Record<string, string>; | ||
body: string; | ||
bodyType: string; | ||
} | ||
|
||
export interface RestProperties { | ||
method: string; | ||
url: string; | ||
headers: Record<string, string>; | ||
body: string; | ||
bodyType: string; | ||
response: RestResponse; | ||
} | ||
|
||
export interface RestEntity extends BaseEntity { | ||
type: EntityType; | ||
properties: RestProperties; | ||
} | ||
|
||
export interface GraphqlEntity extends BaseEntity {} | ||
export interface WebsocketEntity extends BaseEntity {} | ||
export interface SocketIoEntity extends BaseEntity {} | ||
export interface MqttEntity extends BaseEntity {} | ||
export interface SmtpEntity extends BaseEntity {} | ||
|
||
export interface IWorkspaceEntities { | ||
rest: WorkspaceEntity<RestEntity>; | ||
graphql: WorkspaceEntity<GraphqlEntity>; | ||
websocket: WorkspaceEntity<WebsocketEntity>; | ||
socketio: WorkspaceEntity<SocketIoEntity>; | ||
mqtt: WorkspaceEntity<MqttEntity>; | ||
smtp: WorkspaceEntity<SmtpEntity>; | ||
} | ||
|
||
export interface IWorkspace { | ||
name: string; | ||
entities: IWorkspaceEntities; | ||
} |