2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-11-11 00:44:53 -08:00
|
|
|
|
|
|
|
export class StrapiApi implements ICredentialType {
|
|
|
|
name = 'strapiApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-11-11 00:44:53 -08:00
|
|
|
displayName = 'Strapi API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-11-16 01:35:09 -08:00
|
|
|
documentationUrl = 'strapi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-11-11 00:44:53 -08:00
|
|
|
{
|
|
|
|
displayName: 'Email',
|
|
|
|
name: 'email',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2022-06-20 07:54:01 -07:00
|
|
|
placeholder: 'name@email.com',
|
2020-11-11 00:44:53 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-11-11 00:45:50 -08:00
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
2020-11-11 00:44:53 -08:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'url',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-11-11 00:44:53 -08:00
|
|
|
default: '',
|
2020-11-11 00:45:50 -08:00
|
|
|
placeholder: 'https://api.example.com',
|
2020-11-11 00:44:53 -08:00
|
|
|
},
|
2022-03-12 01:56:34 -08:00
|
|
|
{
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-11-11 00:44:53 -08:00
|
|
|
];
|
|
|
|
}
|