2022-08-17 08:50:24 -07:00
|
|
|
import { INodeProperties } from 'n8n-workflow';
|
2021-05-29 17:42:25 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const publicStatusPageOperations: INodeProperties[] = [
|
2021-05-29 17:42:25 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-05-29 17:42:25 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a public status page',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a public status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Delete',
|
|
|
|
value: 'delete',
|
|
|
|
description: 'Delete a public status page',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Delete a public status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a public status page',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Get a public status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
2022-09-07 07:51:14 -07:00
|
|
|
name: 'Get Many',
|
2021-05-29 17:42:25 -07:00
|
|
|
value: 'getAll',
|
2022-09-13 03:36:36 -07:00
|
|
|
description: 'Get many public status pages',
|
2022-09-08 08:10:13 -07:00
|
|
|
action: 'Get many public status pages',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
// Got deactivated because it did not work reliably. Looks like it is on the UptimeRobot
|
|
|
|
// side but we deactivate for now just to be sure
|
|
|
|
// {
|
|
|
|
// name: 'Update',
|
|
|
|
// value: 'update',
|
|
|
|
// description: 'Update a public status page',
|
|
|
|
// },
|
|
|
|
],
|
|
|
|
default: 'getAll',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-05-29 17:42:25 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const publicStatusPageFields: INodeProperties[] = [
|
2021-05-29 17:42:25 -07:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* publicStatusPage:create */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Friendly Name',
|
|
|
|
name: 'friendlyName',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['create'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The friendly name of the status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Monitor IDs',
|
|
|
|
name: 'monitors',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['create'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Monitor IDs to be displayed in status page (the values are separated with a dash (-) or 0 for all monitors)',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Additional Fields',
|
|
|
|
name: 'additionalFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['create'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Custom Domain',
|
|
|
|
name: 'custom_domain',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The domain or subdomain that the status page will run on',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
|
|
|
type: 'string',
|
2022-09-12 00:36:50 -07:00
|
|
|
typeOptions: { password: true },
|
2021-05-29 17:42:25 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The password for the status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Sort',
|
|
|
|
name: 'sort',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Friendly Name (A-Z)',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Friendly Name (Z-A)',
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Status (Up-Down-Paused)',
|
|
|
|
value: 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Status (Down-Up-Paused)',
|
|
|
|
value: 4,
|
|
|
|
},
|
|
|
|
],
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The sorting of the status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* publicStatusPage:delete */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['delete', 'get'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the public status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* publicStatusPage:getAll */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['getAll'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: false,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['getAll'],
|
|
|
|
returnAll: [false],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
maxValue: 100,
|
|
|
|
},
|
|
|
|
default: 50,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Max number of results to return',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Filters',
|
|
|
|
name: 'filters',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['getAll'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Public Status Page IDs',
|
|
|
|
name: 'psps',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Public status pages IDs separated with dash, e.g. 236-1782-4790',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* publicStatusPage:update */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'ID',
|
|
|
|
name: 'id',
|
|
|
|
type: 'string',
|
|
|
|
required: true,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['update'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The ID of the public status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Update Fields',
|
|
|
|
name: 'updateFields',
|
|
|
|
type: 'collection',
|
|
|
|
placeholder: 'Add Field',
|
|
|
|
default: {},
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['publicStatusPage'],
|
|
|
|
operation: ['update'],
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
displayName: 'Custom Domain',
|
|
|
|
name: 'custom_domain',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The domain or subdomain that the status page will run on',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Friendly Name',
|
|
|
|
name: 'friendly_name',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The friendly name of the status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Monitor IDs',
|
|
|
|
name: 'monitors',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
2022-08-17 08:50:24 -07:00
|
|
|
description:
|
|
|
|
'Monitor IDs to be displayed in status page (the values are separated with a dash (-) or 0 for all monitors)',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
|
|
|
type: 'string',
|
2022-09-12 00:36:50 -07:00
|
|
|
typeOptions: { password: true },
|
2021-05-29 17:42:25 -07:00
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The password for the status page',
|
2021-05-29 17:42:25 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Sort',
|
|
|
|
name: 'sort',
|
|
|
|
type: 'options',
|
|
|
|
default: '',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Friendly Name (A-Z)',
|
|
|
|
value: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Friendly Name (Z-A)',
|
|
|
|
value: 2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Status (Up-Down-Paused)',
|
|
|
|
value: 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Status (Down-Up-Paused)',
|
|
|
|
value: 4,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
description: 'The sorting of the status page',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|