Skip to content

Commit

Permalink
feat(VSCode): Define metadata API
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip committed Sep 16, 2024
1 parent 6915343 commit 972d250
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/ui/src/multiplying-architecture/KaotoEditorChannelApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,30 @@ export interface KaotoEditorChannelApi extends KogitoEditorChannelApi {
* Returns the Kaoto VSCode settings defined.
*/
getVSCodeKaotoSettings(): Promise<ISettingsModel>;

/**
* Get metadata querying a Kaoto metadata file.
* @param key The key to retrieve the metadata from the Kaoto metadata file
*/
getMetadata<T>(key: string): Promise<T | undefined>;

/**
* Save metadata to a Kaoto metadata file.
* @param key The key to set the metadata
* @param metadata The metadata to be saved
*/
setMetadata<T>(key: string, metadata: T): Promise<void>;

/**
* Retrieve resource content
* @param path The path of the resource
*/
getResourceContent(path: string): Promise<string | undefined>;

/**
* Save resource content
* @param path The path of the resource
* @param content The content to be saved
*/
saveResourceContent(path: string, content: string): Promise<void>;
}

0 comments on commit 972d250

Please sign in to comment.