-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for configuration service end-points
This adds APIs to the tsp-client to use the end-points newly defined in TSP: - eclipse-cdt-cloud/trace-server-protocol#93 - eclipse-cdt-cloud/trace-server-protocol#92 Signed-off-by: Bernd Hufmann <[email protected]>
- Loading branch information
Showing
8 changed files
with
390 additions
and
15 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
tsp-typescript-client/fixtures/tsp-client/configuration-0.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,9 @@ | ||
{ | ||
"id": "my-config-1-id", | ||
"name": "My configuration 1", | ||
"description": "My configuration 1 description", | ||
"sourceTypeId": "my-source-type-1-id", | ||
"parameters": { | ||
"path": "/home/user/tmp" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tsp-typescript-client/fixtures/tsp-client/fetch-configuration-sources-0.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,18 @@ | ||
[ | ||
{ | ||
"id": "my-source-type-1-id", | ||
"name": "My configuration source 1", | ||
"description": "My configuration source 1 description", | ||
"configParamDescriptors": [ | ||
{ | ||
"keyName": "path", | ||
"description": "path description", | ||
"dataType": "STRING", | ||
"isRequired": "True" | ||
}, | ||
{ | ||
"keyName": "test1" | ||
} | ||
] | ||
} | ||
] |
16 changes: 16 additions & 0 deletions
16
tsp-typescript-client/fixtures/tsp-client/fetch-configurations-0.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,16 @@ | ||
[ | ||
{ | ||
"id": "my-config-1-id", | ||
"name": "My configuration 1", | ||
"description": "My configuration 1 description", | ||
"sourceTypeId": "my-source-type-1-id", | ||
"parameters": { | ||
"path": "/home/user/tmp" | ||
} | ||
}, | ||
{ | ||
"id": "my-config-2-id", | ||
"name": "My configuration 2", | ||
"sourceTypeId": "my-source-type-1-id" | ||
} | ||
] |
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,51 @@ | ||
|
||
/** | ||
* Model of a configuration source type | ||
*/ | ||
export interface ConfigurationSourceType { | ||
/** | ||
* Unique identifier of the configuration source type | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* The name of the configuration source type | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* A short description of this configuration source type. | ||
*/ | ||
description?: string; | ||
|
||
/** | ||
* A list of query parameter keys to be passed when creating | ||
* configuration instance of this type | ||
*/ | ||
configParamDescriptors: ConfigParamDescriptor[]; | ||
} | ||
|
||
/** | ||
* Model of a configuration parameter descriptor | ||
*/ | ||
export interface ConfigParamDescriptor { | ||
/** | ||
* The unique name of the key | ||
*/ | ||
keyName: string; | ||
|
||
/** | ||
* A short description. | ||
*/ | ||
description?: string; | ||
|
||
/** | ||
* The data type string, e.g. use NUMBER for numbers, or STRING as strings | ||
*/ | ||
dataType?: string; | ||
|
||
/** | ||
* If parameter needs to in the query parameters or not. Default is false. | ||
*/ | ||
isRequired?: boolean; | ||
} |
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,56 @@ | ||
|
||
/** | ||
* Model of a configuration instance | ||
*/ | ||
export interface Configuration { | ||
/** | ||
* Unique identifier of the configuration | ||
*/ | ||
id: string; | ||
|
||
/** | ||
* The name of the configuration | ||
*/ | ||
name: string; | ||
|
||
/** | ||
* A short description of this configuration | ||
*/ | ||
description?: string; | ||
|
||
/** | ||
* the configuration source type ID | ||
*/ | ||
sourceTypeId: string; | ||
|
||
/** | ||
* Optional informational map of parameters to return. | ||
* Can be used to show more details to users of the configuration instance. | ||
*/ | ||
parameters?: Record<string, any>; | ||
} | ||
|
||
/** | ||
* Model of a configuration parameter descriptor | ||
*/ | ||
export interface ConfigParamDescriptor { | ||
/** | ||
* The unique name of the key | ||
*/ | ||
keyName: string; | ||
|
||
/** | ||
* A short description. | ||
*/ | ||
description?: string; | ||
|
||
/** | ||
* The data type string, e.g. use NUMBER for numbers, or STRING as strings | ||
*/ | ||
dataType?: string; | ||
|
||
/** | ||
* If parameter needs to in the query parameters or not. Default is false. | ||
*/ | ||
isRequired?: boolean; | ||
} |
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
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
Oops, something went wrong.