mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-29 06:29:42 -08:00
91a5bc3bc4
* allow qbo to use accounting or payment scopes separately * added purchase get and getall * removed irrelevant field options * ⚡ Sort alphabetically * 🔥 Remove unused file * ✏️ Fix description casing * ⚡ Add credentials type * ✏️ Fix resource dividers * 🔨 Format import * ✏️ Fix documentation link * ⚡ Refactor credentials * ⚡ Use multiOptions for scopes * 🔥 Remove payment scope The payment scope is used only by the QuickBooks Payments API, but this node implements the QuickBooks Online API, which only needs the accounting scope. * 🚚 Rename node to QuickBooks Online This reflects the specific API implemented in this node and allows for a future QuickBooks Payments node. Until node versioning is released, only display name changed. Co-authored-by: Calvin Tan <calvin14@gmail.com>
64 lines
1.3 KiB
TypeScript
64 lines
1.3 KiB
TypeScript
import {
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
// https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization
|
|
|
|
export class QuickBooksOAuth2Api implements ICredentialType {
|
|
name = 'quickBooksOAuth2Api';
|
|
extends = [
|
|
'oAuth2Api',
|
|
];
|
|
displayName = 'QuickBooks Online OAuth2 API';
|
|
documentationUrl = 'quickbooks';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Authorization URL',
|
|
name: 'authUrl',
|
|
type: 'hidden',
|
|
default: 'https://appcenter.intuit.com/connect/oauth2',
|
|
},
|
|
{
|
|
displayName: 'Access Token URL',
|
|
name: 'accessTokenUrl',
|
|
type: 'hidden',
|
|
default: 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer',
|
|
},
|
|
{
|
|
displayName: 'Scope',
|
|
name: 'scope',
|
|
type: 'hidden',
|
|
default: 'com.intuit.quickbooks.accounting',
|
|
},
|
|
{
|
|
displayName: 'Auth URI Query Parameters',
|
|
name: 'authQueryParameters',
|
|
type: 'hidden',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Authentication',
|
|
name: 'authentication',
|
|
type: 'hidden',
|
|
default: 'header',
|
|
},
|
|
{
|
|
displayName: 'Environment',
|
|
name: 'environment',
|
|
type: 'options',
|
|
default: 'production',
|
|
options: [
|
|
{
|
|
name: 'Production',
|
|
value: 'production',
|
|
},
|
|
{
|
|
name: 'Sandbox',
|
|
value: 'sandbox',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
}
|