-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
7 changed files
with
1,846 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
components/supervisor-api/typescript-rest/control.swagger.json
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,54 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "control.proto", | ||
"version": "version not set" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "ControlService" | ||
} | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": {}, | ||
"definitions": { | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"typeUrl": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string", | ||
"format": "byte" | ||
} | ||
} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
}, | ||
"supervisorExposePortResponse": { | ||
"type": "object" | ||
} | ||
} | ||
} |
145 changes: 145 additions & 0 deletions
145
components/supervisor-api/typescript-rest/info.swagger.json
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,145 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "info.proto", | ||
"version": "version not set" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "InfoService" | ||
} | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/v1/info/workspace": { | ||
"get": { | ||
"operationId": "InfoService_WorkspaceInfo", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/supervisorWorkspaceInfoResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"InfoService" | ||
] | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"WorkspaceInfoResponseGitpodAPI": { | ||
"type": "object", | ||
"properties": { | ||
"endpoint": { | ||
"type": "string", | ||
"title": "endpoint is the websocket URL on which the token-accessible Gitpod API is served on" | ||
}, | ||
"host": { | ||
"type": "string", | ||
"description": "host is the host of the endpoint. Use this host to ask supervisor a token." | ||
} | ||
} | ||
}, | ||
"WorkspaceInfoResponseRepository": { | ||
"type": "object", | ||
"properties": { | ||
"owner": { | ||
"type": "string", | ||
"title": "owner is the repository owner" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"title": "name is the repository name" | ||
} | ||
} | ||
}, | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"typeUrl": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string", | ||
"format": "byte" | ||
} | ||
} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
}, | ||
"supervisorWorkspaceInfoResponse": { | ||
"type": "object", | ||
"properties": { | ||
"workspaceId": { | ||
"type": "string", | ||
"description": "workspace_id is the workspace ID of this workspace." | ||
}, | ||
"instanceId": { | ||
"type": "string", | ||
"description": "instance_id is the instance ID of this workspace." | ||
}, | ||
"checkoutLocation": { | ||
"type": "string", | ||
"title": "checkout_location is the path where we initialized the workspace content" | ||
}, | ||
"workspaceLocationFile": { | ||
"type": "string", | ||
"description": "file means the workspace root is a file describing the workspace layout." | ||
}, | ||
"workspaceLocationFolder": { | ||
"type": "string", | ||
"description": "folder means the workspace root is a simple folder." | ||
}, | ||
"userHome": { | ||
"type": "string", | ||
"description": "user_home is the path to the user's home." | ||
}, | ||
"gitpodApi": { | ||
"$ref": "#/definitions/WorkspaceInfoResponseGitpodAPI", | ||
"description": "GitpodAPI provides information to reach the Gitpod server API." | ||
}, | ||
"gitpodHost": { | ||
"type": "string", | ||
"description": "gitpod_host provides Gitpod host URL." | ||
}, | ||
"workspaceContextUrl": { | ||
"type": "string", | ||
"description": "workspace_context_url is an URL for which the workspace was created." | ||
}, | ||
"repository": { | ||
"$ref": "#/definitions/WorkspaceInfoResponseRepository", | ||
"title": "repository is a repository from which this workspace was created" | ||
} | ||
} | ||
} | ||
} | ||
} |
181 changes: 181 additions & 0 deletions
181
components/supervisor-api/typescript-rest/notification.swagger.json
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,181 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "notification.proto", | ||
"version": "version not set" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "NotificationService" | ||
} | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/v1/notification/notify": { | ||
"post": { | ||
"summary": "Prompts the user and asks for a decision. Typically called by some external process.\nIf the list of actions is empty this service returns immediately,\notherwise it blocks until the user has made their choice.", | ||
"operationId": "NotificationService_Notify", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/supervisorNotifyResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"NotificationService" | ||
] | ||
} | ||
}, | ||
"/v1/notification/respond": { | ||
"post": { | ||
"summary": "Report a user's choice as a response to a notification. Typically called by the IDE.", | ||
"operationId": "NotificationService_Respond", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/supervisorRespondResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"NotificationService" | ||
] | ||
} | ||
}, | ||
"/v1/notification/subscribe": { | ||
"get": { | ||
"summary": "Subscribe to notifications. Typically called by the IDE.", | ||
"operationId": "NotificationService_Subscribe", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.(streaming responses)", | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"result": { | ||
"$ref": "#/definitions/supervisorSubscribeResponse" | ||
}, | ||
"error": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
}, | ||
"title": "Stream result of supervisorSubscribeResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"NotificationService" | ||
] | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"NotifyRequestLevel": { | ||
"type": "string", | ||
"enum": [ | ||
"ERROR", | ||
"WARNING", | ||
"INFO" | ||
], | ||
"default": "ERROR" | ||
}, | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"typeUrl": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string", | ||
"format": "byte" | ||
} | ||
} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
}, | ||
"supervisorNotifyRequest": { | ||
"type": "object", | ||
"properties": { | ||
"level": { | ||
"$ref": "#/definitions/NotifyRequestLevel" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"actions": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"title": "if actions are empty, Notify will return immediately" | ||
} | ||
} | ||
}, | ||
"supervisorNotifyResponse": { | ||
"type": "object", | ||
"properties": { | ||
"action": { | ||
"type": "string", | ||
"title": "action chosen by the user or empty string if cancelled" | ||
} | ||
} | ||
}, | ||
"supervisorRespondResponse": { | ||
"type": "object" | ||
}, | ||
"supervisorSubscribeResponse": { | ||
"type": "object", | ||
"properties": { | ||
"requestId": { | ||
"type": "string", | ||
"format": "uint64" | ||
}, | ||
"request": { | ||
"$ref": "#/definitions/supervisorNotifyRequest" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.