2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-11-18 22:47:26 -08:00
|
|
|
|
|
|
|
const scopes = [
|
|
|
|
'https://www.googleapis.com/auth/userinfo.email',
|
|
|
|
'https://www.googleapis.com/auth/firebase.database',
|
|
|
|
'https://www.googleapis.com/auth/firebase',
|
|
|
|
];
|
|
|
|
|
|
|
|
export class GoogleFirebaseRealtimeDatabaseOAuth2Api implements ICredentialType {
|
|
|
|
name = 'googleFirebaseRealtimeDatabaseOAuth2Api';
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['googleOAuth2Api'];
|
2020-11-18 22:47:26 -08:00
|
|
|
displayName = 'Google Firebase Realtime Database OAuth2 API';
|
|
|
|
documentationUrl = 'google';
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-11-18 22:47:26 -08:00
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'hidden',
|
2020-11-18 22:47:26 -08:00
|
|
|
default: scopes.join(' '),
|
|
|
|
},
|
2022-04-14 00:19:45 -07:00
|
|
|
{
|
|
|
|
displayName: 'Region',
|
|
|
|
name: 'region',
|
|
|
|
type: 'options',
|
|
|
|
default: 'firebaseio.com',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'us-central1',
|
|
|
|
value: 'firebaseio.com',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'europe-west1',
|
|
|
|
value: 'europe-west1.firebasedatabase.app',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'asia-southeast1',
|
|
|
|
value: 'asia-southeast1.firebasedatabase.app',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-11-18 22:47:26 -08:00
|
|
|
];
|
|
|
|
}
|