2020-12-02 02:24:25 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const jobOperations: INodeProperties[] = [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2020-12-02 02:54:10 -08:00
|
|
|
description: 'Choose an operation',
|
2020-12-02 02:24:25 -08:00
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'job',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get job details',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a job',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Report',
|
|
|
|
value: 'report',
|
|
|
|
description: 'Get job report',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a job report',
|
2020-12-02 02:24:25 -08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-12-02 02:24:25 -08:00
|
|
|
|
2020-12-02 02:54:10 -08:00
|
|
|
export const jobFields: INodeProperties[] = [
|
2020-12-02 02:24:25 -08:00
|
|
|
{
|
|
|
|
displayName: 'Job ID',
|
|
|
|
name: 'jobId',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
2020-12-02 02:54:10 -08:00
|
|
|
displayOptions: {
|
2020-12-02 02:24:25 -08:00
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'job',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2020-12-02 02:54:10 -08:00
|
|
|
default: '',
|
2020-12-02 02:24:25 -08:00
|
|
|
description: 'ID of the job',
|
|
|
|
},
|
|
|
|
];
|