// Copyright (c) 2025-2026 Probo Inc . // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY // AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR // OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR // PERFORMANCE OF THIS SOFTWARE. import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, Icon, INodeProperties, } from 'n8n-workflow'; export class ProboApi implements ICredentialType { name = 'proboApi'; displayName = 'Probo API'; icon: Icon = { light: 'file:../icons/probo-light.svg', dark: 'file:../icons/probo.svg' }; documentationUrl = 'https://www.getprobo.com/docs'; properties: INodeProperties[] = [ { displayName: 'Probo Server', name: 'server', type: 'string', default: 'https://us.console.getprobo.com', description: 'The server to connect to.', }, { displayName: 'API Key', name: 'apiKey', type: 'string', typeOptions: { password: true }, default: '', }, ]; authenticate: IAuthenticateGeneric = { type: 'generic', properties: { headers: { Authorization: '=Bearer {{$credentials?.apiKey}}', }, }, }; test: ICredentialTestRequest = { request: { baseURL: '={{$credentials?.server}}', url: '/api/console/v1/graphql', method: 'POST', headers: { 'Content-Type': 'application/json', }, body: { query: 'query { viewer { id } }', }, }, }; }