2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2021-07-10 04:44:23 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const cameraProxyOperations: INodeProperties[] = [
|
2021-07-10 04:44:23 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-07-10 04:44:23 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['cameraProxy'],
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get Screenshot',
|
|
|
|
value: 'getScreenshot',
|
|
|
|
description: 'Get the camera screenshot',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a screenshot',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'getScreenshot',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-07-10 04:44:23 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const cameraProxyFields: INodeProperties[] = [
|
2021-07-10 04:44:23 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* cameraProxy:getScreenshot */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
2022-06-03 10:23:49 -07:00
|
|
|
displayName: 'Camera Entity Name or ID',
|
2021-07-10 04:44:23 -07:00
|
|
|
name: 'cameraEntityId',
|
2021-10-17 09:48:24 -07:00
|
|
|
type: 'options',
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
2021-10-17 09:48:24 -07:00
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getCameraEntities',
|
|
|
|
},
|
2021-07-10 04:44:23 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['getScreenshot'],
|
|
|
|
resource: ['cameraProxy'],
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Binary Property',
|
|
|
|
name: 'binaryPropertyName',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: 'data',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
operation: ['getScreenshot'],
|
|
|
|
resource: ['cameraProxy'],
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Name of the binary property to which to write the data of the read file',
|
2021-07-10 04:44:23 -07:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|