diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 71e40c37608..0e87d36ad6b 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -5821,6 +5821,11 @@ declare module 'vscode' { setKeysForSync(keys: string[]): void; }; + /** + * A storage utility for secrets. + */ + readonly secrets: SecretStorage; + /** * The uri of the directory containing the extension. */ @@ -5958,6 +5963,48 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } + /** + * The event data that is fired when a secret is added or removed. + */ + export interface SecretStorageChangeEvent { + /** + * The key of the secret that has changed. + */ + readonly key: string; + } + + /** + * Represents a storage utility for secrets, information that is + * sensitive. + */ + export interface SecretStorage { + /** + * Retrieve a secret that was stored with key. Returns undefined if there + * is no password matching that key. + * @param key The key the secret was stored under. + * @returns The stored value or `undefined`. + */ + get(key: string): Thenable; + + /** + * Store a secret under a given key. + * @param key The key to store the secret under. + * @param value The secret. + */ + store(key: string, value: string): Thenable; + + /** + * Remove a secret from storage. + * @param key The key the secret was stored under. + */ + delete(key: string): Thenable; + + /** + * Fires when a secret is stored or deleted. + */ + onDidChange: Event; + } + /** * Represents a color theme kind. */ diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 20bcb3a15bf..804c153ab74 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -2507,57 +2507,7 @@ declare module 'vscode' { export function openExternal(target: Uri, options?: OpenExternalOptions): Thenable; } - //#endregion - - //#region https://github.com/microsoft/vscode/issues/112249 - - /** - * The event data that is fired when a secret is added or removed. - */ - export interface SecretStorageChangeEvent { - /** - * The key of the secret that has changed. - */ - readonly key: string; - } - - /** - * Represents a storage utility for secrets, information that is - * sensitive. - */ - export interface SecretStorage { - /** - * Retrieve a secret that was stored with key. Returns undefined if there - * is no password matching that key. - * @param key The key the password was stored under. - * @returns The stored value or `undefined`. - */ - get(key: string): Thenable; - - /** - * Store a secret under a given key. - * @param key The key to store the password under. - * @param value The password. - */ - store(key: string, value: string): Thenable; - - /** - * Remove a secret from storage. - * @param key The key the password was stored under. - */ - delete(key: string): Thenable; - - /** - * Fires when a secret is set or deleted. - */ - onDidChange: Event; - } - - export interface ExtensionContext { - readonly secrets: SecretStorage; - } - - //#endregion + //#endregionn //#region https://github.com/Microsoft/vscode/issues/15178