mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-13 20:29:27 +00:00
[atl-1217] sketchbook explorer local & remote
This commit is contained in:
committed by
Francesco Stasi
parent
e6cbefb880
commit
4c536ec8fc
@@ -0,0 +1,30 @@
|
||||
import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
|
||||
import { AuthOptions } from '../../node/auth/types';
|
||||
|
||||
export interface AuthenticationSession {
|
||||
readonly id: string;
|
||||
readonly accessToken: string;
|
||||
readonly account: AuthenticationSessionAccountInformation;
|
||||
readonly scopes: ReadonlyArray<string>;
|
||||
}
|
||||
export interface AuthenticationSessionAccountInformation {
|
||||
readonly id: string;
|
||||
readonly email: string;
|
||||
readonly label: string;
|
||||
readonly picture: string;
|
||||
}
|
||||
|
||||
export const AuthenticationServicePath = '/services/authentication-service';
|
||||
export const AuthenticationService = Symbol('AuthenticationService');
|
||||
export interface AuthenticationService
|
||||
extends JsonRpcServer<AuthenticationServiceClient> {
|
||||
login(): Promise<AuthenticationSession>;
|
||||
logout(): Promise<void>;
|
||||
session(): Promise<AuthenticationSession | undefined>;
|
||||
disposeClient(client: AuthenticationServiceClient): void;
|
||||
setOptions(authOptions: AuthOptions): void;
|
||||
}
|
||||
|
||||
export interface AuthenticationServiceClient {
|
||||
notifySessionDidChange(session?: AuthenticationSession | undefined): void;
|
||||
}
|
||||
@@ -23,6 +23,11 @@ export interface SketchesService {
|
||||
*/
|
||||
loadSketch(uri: string): Promise<Sketch>;
|
||||
|
||||
/**
|
||||
* Unlike `loadSketch`, this method gracefully resolves to `undefined` instead or rejecting if the `uri` is not a sketch folder.
|
||||
*/
|
||||
maybeLoadSketch(uri: string): Promise<Sketch | undefined>;
|
||||
|
||||
/**
|
||||
* Creates a new sketch folder in the temp location.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user