mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
2a3cbf3fc8
* 🐛 Fix get all operation for v4 * 🔨 Fix create operation * 🔨 Fix update operation * 🔨 Fix delete operation * 🔨 Fix get operation * 🔨 Fix Return All * 👕 Fix nodelinter issues * ⚡ Add Credential Test * 🔨 Code improvement * 👕 Fix lint issue * Removed extra /api from Get All on v4 Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
54 lines
982 B
TypeScript
54 lines
982 B
TypeScript
import {
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class StrapiApi implements ICredentialType {
|
|
name = 'strapiApi';
|
|
displayName = 'Strapi API';
|
|
documentationUrl = 'strapi';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Email',
|
|
name: 'email',
|
|
type: 'string',
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Password',
|
|
name: 'password',
|
|
type: 'string',
|
|
typeOptions: {
|
|
password: true,
|
|
},
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'URL',
|
|
name: 'url',
|
|
type: 'string',
|
|
default: '',
|
|
placeholder: 'https://api.example.com',
|
|
},
|
|
{
|
|
displayName: 'API Version',
|
|
name: 'apiVersion',
|
|
default: 'v3',
|
|
type: 'options',
|
|
description: 'The version of api to be used',
|
|
options: [
|
|
{
|
|
name: 'Version 4',
|
|
value: 'v4',
|
|
description: 'API version supported by Strapi 4',
|
|
},
|
|
{
|
|
name: 'Version 3',
|
|
value: 'v3',
|
|
description: 'API version supported by Strapi 3',
|
|
},
|
|
],
|
|
},
|
|
];
|
|
}
|