2022-08-01 13:47:55 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2020-04-26 12:56:50 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const templateOperations: INodeProperties[] = [
|
2020-04-26 12:56:50 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-04-26 12:56:50 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['template'],
|
2020-04-26 12:56:50 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a template',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a template',
|
2020-04-26 12:56:50 -07:00
|
|
|
},
|
|
|
|
{
|
2022-09-07 07:51:14 -07:00
|
|
|
name: 'Get Many',
|
2020-04-26 12:56:50 -07:00
|
|
|
value: 'getAll',
|
2022-09-13 03:36:36 -07:00
|
|
|
description: 'Get many templates',
|
2022-09-08 08:10:13 -07:00
|
|
|
action: 'Get many templates',
|
2020-04-26 12:56:50 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-04-26 12:56:50 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const templateFields: INodeProperties[] = [
|
2022-08-01 13:47:55 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* template:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
2020-04-26 12:56:50 -07:00
|
|
|
{
|
|
|
|
displayName: 'Template ID',
|
|
|
|
name: 'templateId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-01 13:47:55 -07:00
|
|
|
resource: ['template'],
|
|
|
|
operation: ['get'],
|
2020-04-26 12:56:50 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Unique identifier for the template',
|
2020-04-26 12:56:50 -07:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|