first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const attachmentOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description:
|
||||
'Gets the metadata of a message attachment. The attachment data is fetched using the media API.',
|
||||
action: 'Get an attachment',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const attachmentFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* attachments:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Attachment Name',
|
||||
name: 'attachmentName',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['attachment'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*"',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,150 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const incomingWebhookOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Creates a message through incoming webhook (no chat bot needed)',
|
||||
action: 'Create an incoming webhook',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
},
|
||||
];
|
||||
|
||||
export const incomingWebhookFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* incomingWebhook:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName:
|
||||
'See <a href="https://developers.google.com/chat/how-tos/webhooks" target="_blank">Google Chat Guide</a> To Webhooks',
|
||||
name: 'jsonNotice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Incoming Webhook URL',
|
||||
name: 'incomingWebhookUrl',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'URL for the incoming webhook',
|
||||
},
|
||||
{
|
||||
displayName: 'JSON Parameters',
|
||||
name: 'jsonParameters',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to pass the message object as JSON',
|
||||
},
|
||||
{
|
||||
displayName: 'Message',
|
||||
name: 'messageUi',
|
||||
type: 'collection',
|
||||
required: true,
|
||||
placeholder: 'Add option',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [false],
|
||||
},
|
||||
},
|
||||
default: { text: '' },
|
||||
description: 'The message object',
|
||||
options: [
|
||||
{
|
||||
displayName: 'Text',
|
||||
name: 'text',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The message text',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'See <a href="https://developers.google.com/chat/reference/rest/v1/spaces.messages#Message" target="_blank">Google Chat Guide</a> To Creating Messages',
|
||||
name: 'jsonNotice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Message (JSON)',
|
||||
name: 'messageJson',
|
||||
type: 'json',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Message input as JSON Object or JSON String',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['incomingWebhook'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Thread Key',
|
||||
name: 'threadKey',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Thread identifier which groups messages into a single thread. Has no effect if thread field, corresponding to an existing thread, is set in message. Example: spaces/AAAAMpdlehY/threads/MZ8fXhZXGkk.',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,58 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const mediaOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['media'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Download',
|
||||
value: 'download',
|
||||
description: 'Download media',
|
||||
action: 'Download media',
|
||||
},
|
||||
],
|
||||
default: 'download',
|
||||
},
|
||||
];
|
||||
|
||||
export const mediaFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* media:download */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Resource Name',
|
||||
name: 'resourceName',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['media'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Name of the media that is being downloaded',
|
||||
},
|
||||
{
|
||||
displayName: 'Put Output File in Field',
|
||||
name: 'binaryPropertyName',
|
||||
type: 'string',
|
||||
default: 'data',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['media'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
hint: 'The name of the output binary field to put the file in',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,76 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { getPagingParameters } from '../GenericFunctions';
|
||||
|
||||
export const memberOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['member'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a membership',
|
||||
action: 'Get a member',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many memberships in a space',
|
||||
action: 'Get many members',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const memberFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Member ID',
|
||||
name: 'memberId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['member'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Member to be retrieved in the form "spaces/*/members/*"',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* member:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Space Name or ID',
|
||||
name: 'spaceId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getSpaces',
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['member'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
default: [],
|
||||
description:
|
||||
'The name of the space for which to retrieve members, in the form "spaces/*". Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
},
|
||||
|
||||
...getPagingParameters('member'),
|
||||
];
|
||||
@@ -0,0 +1,390 @@
|
||||
import { SEND_AND_WAIT_OPERATION, type INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const messageOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a message',
|
||||
action: 'Create a message',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a message',
|
||||
action: 'Delete a message',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a message',
|
||||
action: 'Get a message',
|
||||
},
|
||||
{
|
||||
name: 'Send and Wait for Response',
|
||||
value: SEND_AND_WAIT_OPERATION,
|
||||
description: 'Send a message and wait for response',
|
||||
action: 'Send message and wait for response',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a message',
|
||||
action: 'Update a message',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
},
|
||||
];
|
||||
|
||||
export const spaceIdProperty: INodeProperties = {
|
||||
displayName: 'Space Name or ID',
|
||||
name: 'spaceId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getSpaces',
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
||||
};
|
||||
|
||||
export const messageFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* message:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
...spaceIdProperty,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'JSON Parameters',
|
||||
name: 'jsonParameters',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to pass the message object as JSON',
|
||||
},
|
||||
{
|
||||
displayName: 'Message',
|
||||
name: 'messageUi',
|
||||
type: 'collection',
|
||||
required: true,
|
||||
placeholder: 'Add Message',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [false],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Text',
|
||||
name: 'text',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
// { // TODO: get cards from the UI (check the Slack node, specifically the blocks parameter under message: post)
|
||||
// displayName: 'Cards',
|
||||
// name: 'cards',
|
||||
// placeholder: 'Add Cards',
|
||||
// type: 'fixedCollection',
|
||||
// default: '',
|
||||
// typeOptions: {
|
||||
// multipleValues: true,
|
||||
// },
|
||||
// description: 'Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images',
|
||||
// options: [
|
||||
// {
|
||||
// name: 'metadataValues',
|
||||
// displayName: 'Metadata',
|
||||
// values: [
|
||||
// {
|
||||
// displayName: 'Name',
|
||||
// name: 'name',
|
||||
// type: 'string',
|
||||
// default: '',
|
||||
// description: 'Name of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Header',
|
||||
// name: 'header',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Header of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Sections',
|
||||
// name: 'sections',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Sections of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Actions',
|
||||
// name: 'cardActions',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Actions of the card',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'See <a href="https://developers.google.com/chat/reference/rest/v1/spaces.messages#Message" target="_blank">Google Chat Guide</a> To Creating Messages',
|
||||
name: 'jsonNotice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Message (JSON)',
|
||||
name: 'messageJson',
|
||||
type: 'json',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Message input as JSON Object or JSON String',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
// {
|
||||
// displayName: 'Thread Key',
|
||||
// name: 'threadKey',
|
||||
// type: 'string',
|
||||
// default: '',
|
||||
// description: 'Thread identifier which groups messages into a single thread. Has no effect if thread field, corresponding to an existing thread, is set in message. Example: spaces/AAAAMpdlehY/threads/MZ8fXhZXGkk.',
|
||||
// },
|
||||
{
|
||||
displayName: 'Request ID',
|
||||
name: 'requestId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'A unique request ID for this message. If a message has already been created in the space with this request ID, the subsequent request will return the existing message and no new message will be created.',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* messages:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Message ID',
|
||||
name: 'messageId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Resource name of the message to be deleted, in the form "spaces//messages/"',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* message:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Message ID',
|
||||
name: 'messageId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Resource name of the message to be retrieved, in the form "spaces//messages/"',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* message:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Message ID',
|
||||
name: 'messageId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Resource name of the message to be updated, in the form "spaces//messages/"',
|
||||
},
|
||||
{
|
||||
displayName: 'JSON Parameters',
|
||||
name: 'jsonParameters',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Whether to pass the update fields object as JSON',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFieldsUi',
|
||||
type: 'collection',
|
||||
required: true,
|
||||
placeholder: 'Add option',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
jsonParameters: [false],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Text',
|
||||
name: 'text',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
// { // TODO: get cards from the UI (check the Slack node, specifically the blocks parameter under message: post)
|
||||
// displayName: 'Cards',
|
||||
// name: 'cards',
|
||||
// placeholder: 'Add Cards',
|
||||
// type: 'fixedCollection',
|
||||
// default: '',
|
||||
// typeOptions: {
|
||||
// multipleValues: true,
|
||||
// },
|
||||
// description: 'Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images',
|
||||
// options: [
|
||||
// {
|
||||
// name: 'metadataValues',
|
||||
// displayName: 'Metadata',
|
||||
// values: [
|
||||
// {
|
||||
// displayName: 'Name',
|
||||
// name: 'name',
|
||||
// type: 'string',
|
||||
// default: '',
|
||||
// description: 'Name of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Header',
|
||||
// name: 'header',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Header of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Sections',
|
||||
// name: 'sections',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Sections of the card',
|
||||
// },
|
||||
// {
|
||||
// displayName: 'Actions',
|
||||
// name: 'cardActions',
|
||||
// type: 'json',
|
||||
// default: '',
|
||||
// description: 'Actions of the card',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'See <a href="https://developers.google.com/chat/reference/rest/v1/spaces.messages#Message" target="_blank">Google Chat Guide</a> To Creating Messages',
|
||||
name: 'jsonNotice',
|
||||
type: 'notice',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields (JSON)',
|
||||
name: 'updateFieldsJson',
|
||||
type: 'json',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
jsonParameters: [true],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Message input as JSON Object or JSON String',
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,58 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { getPagingParameters } from '../GenericFunctions';
|
||||
|
||||
export const spaceOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
noDataExpression: true,
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['space'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
description: 'Get a space',
|
||||
action: 'Get a space',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
description: 'Get many spaces the caller is a member of',
|
||||
action: 'Get many spaces',
|
||||
},
|
||||
],
|
||||
default: 'get',
|
||||
},
|
||||
];
|
||||
|
||||
export const spaceFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* space:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Space ID',
|
||||
name: 'spaceId',
|
||||
type: 'string',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['space'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Resource name of the space, in the form "spaces/*"',
|
||||
},
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* space:getAll */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
...getPagingParameters('space'),
|
||||
];
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './AttachmentDescription';
|
||||
export * from './IncomingWebhookDescription';
|
||||
export * from './MediaDescription';
|
||||
export * from './MemberDescription';
|
||||
export * from './MessageDescription';
|
||||
export * from './SpaceDescription';
|
||||
Reference in New Issue
Block a user