Set up request

This commit is contained in:
Iván Ovejero 2022-05-04 14:59:06 +02:00
parent 2f8bff7676
commit 77747f8455
2 changed files with 6 additions and 0 deletions

View file

@ -184,6 +184,7 @@ export interface IRestApi {
retryExecution(id: string, loadWorkflow?: boolean): Promise<boolean>;
getTimezones(): Promise<IDataObject>;
getBinaryBufferString(dataPath: string): Promise<string>;
getScopes: (credentialType: string) => Promise<string[]>;
}
export interface INodeTranslationHeaders {

View file

@ -195,6 +195,11 @@ export const restApi = Vue.extend({
getBinaryBufferString: (dataPath: string): Promise<string> => {
return self.restApi().makeRestApiRequest('GET', `/data/${dataPath}`);
},
// Returns scopes for OAuth credential types
getScopes: (credentialType: string): Promise<string[]> => {
return self.restApi().makeRestApiRequest('GET', '/oauth2-credential/scopes', { credentialType });
},
};
},
},