n8n/packages/nodes-base/credentials/GristApi.credentials.ts
Iván Ovejero 4bce33a530
Add Grist node (#2158)
* Implement Grist node with List/Append/Update/Delete operations

* 🔨 Refactor Grist node

* 🔨 Make API key required

* 🔨 Complete create/upate operations

* 🔨 Fix item index in docId and tableId

* 🔨 Simplify continueOnFail item

* 👕 Nodelinter pass

* 👕 Fix lint

* 👕 Resort imports

*  Improvements

* 🔨 Simplify with optional access operator

* 🔨 Simplify row ID processing in deletion

* 🚧 Add stub for cred test

Pending change to core

*  Add workaround for cred test

* 🔥 Remove excess items check

* ✏️ Rename fields

* 🐛 Fix numeric filter

* ✏️ Add feedback from Product

* 🔥 Remove superfluous key

*  Small change

*  Fix subtitle and improve how data gets returned

Co-authored-by: Alex Hall <alex.mojaki@gmail.com>
Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-09-29 19:10:39 -05:00

51 lines
831 B
TypeScript

import {
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class GristApi implements ICredentialType {
name = 'gristApi';
displayName = 'Grist API';
documentationUrl = 'grist';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Plan Type',
name: 'planType',
type: 'options',
default: 'free',
options: [
{
name: 'Free',
value: 'free',
},
{
name: 'Paid',
value: 'paid',
},
],
},
{
displayName: 'Custom Subdomain',
name: 'customSubdomain',
type: 'string',
default: '',
required: true,
description: 'Custom subdomain of your team',
displayOptions: {
show: {
planType: [
'paid',
],
},
},
},
];
}