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,145 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import * as create from './create.operation';
|
||||
import * as del from './delete.operation';
|
||||
import * as get from './get.operation';
|
||||
import * as getAll from './getAll.operation';
|
||||
import * as update from './update.operation';
|
||||
import { CURRENT_VERSION } from '../../helpers/constants';
|
||||
import { handleError } from '../../helpers/errorHandler';
|
||||
import {
|
||||
deleteGroupMembers,
|
||||
simplifyGetAllGroupsResponse,
|
||||
simplifyGetGroupsResponse,
|
||||
} from '../../helpers/utils';
|
||||
|
||||
export const description: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'getAll',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create group',
|
||||
description: 'Create a new group',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '',
|
||||
body: {
|
||||
Action: 'CreateGroup',
|
||||
Version: CURRENT_VERSION,
|
||||
GroupName: '={{ $parameter["groupName"] }}',
|
||||
},
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
output: {
|
||||
postReceive: [handleError],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete group',
|
||||
description: 'Delete an existing group',
|
||||
routing: {
|
||||
send: {
|
||||
preSend: [deleteGroupMembers],
|
||||
},
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '',
|
||||
body: {
|
||||
Action: 'DeleteGroup',
|
||||
Version: CURRENT_VERSION,
|
||||
GroupName: '={{ $parameter["group"] }}',
|
||||
},
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
output: {
|
||||
postReceive: [handleError],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get group',
|
||||
description: 'Retrieve details of an existing group',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '',
|
||||
body: {
|
||||
Action: 'GetGroup',
|
||||
Version: CURRENT_VERSION,
|
||||
GroupName: '={{ $parameter["group"] }}',
|
||||
},
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
output: {
|
||||
postReceive: [handleError, simplifyGetGroupsResponse],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many groups',
|
||||
description: 'Retrieve a list of groups',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '',
|
||||
body: {
|
||||
Action: 'ListGroups',
|
||||
Version: CURRENT_VERSION,
|
||||
},
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
output: {
|
||||
postReceive: [handleError, simplifyGetAllGroupsResponse],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
action: 'Update group',
|
||||
description: 'Update an existing group',
|
||||
routing: {
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: '',
|
||||
body: {
|
||||
Action: 'UpdateGroup',
|
||||
Version: CURRENT_VERSION,
|
||||
GroupName: '={{ $parameter["group"] }}',
|
||||
NewGroupName: '={{ $parameter["groupName"] }}',
|
||||
},
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
output: {
|
||||
postReceive: [handleError],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
...create.description,
|
||||
...del.description,
|
||||
...get.description,
|
||||
...getAll.description,
|
||||
...update.description,
|
||||
];
|
||||
@@ -0,0 +1,43 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { updateDisplayOptions } from 'n8n-workflow';
|
||||
|
||||
import { validatePath } from '../../helpers/utils';
|
||||
import { groupNameParameter, pathParameter } from '../common';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
...groupNameParameter,
|
||||
description: 'The name of the new group to create',
|
||||
placeholder: 'e.g. GroupName',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
...pathParameter,
|
||||
placeholder: 'e.g. /division_abc/engineering/',
|
||||
description: 'The path to the group, if it is not included, it defaults to a slash (/)',
|
||||
routing: {
|
||||
send: {
|
||||
preSend: [validatePath],
|
||||
property: 'Path',
|
||||
type: 'query',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
placeholder: 'Add Option',
|
||||
type: 'collection',
|
||||
},
|
||||
];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
operation: ['create'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
@@ -0,0 +1,20 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { updateDisplayOptions } from 'n8n-workflow';
|
||||
|
||||
import { groupLocator } from '../common';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
...groupLocator,
|
||||
description: 'Select the group you want to delete',
|
||||
},
|
||||
];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { updateDisplayOptions } from 'n8n-workflow';
|
||||
|
||||
import { groupLocator } from '../common';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
...groupLocator,
|
||||
description: 'Select the group you want to retrieve',
|
||||
},
|
||||
{
|
||||
displayName: 'Include Users',
|
||||
name: 'includeUsers',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to include a list of users in the group',
|
||||
},
|
||||
];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
operation: ['get'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { updateDisplayOptions } from 'n8n-workflow';
|
||||
|
||||
import { paginationParameters } from '../common';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
...paginationParameters,
|
||||
{
|
||||
displayName: 'Include Users',
|
||||
name: 'includeUsers',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to include a list of users in the group',
|
||||
},
|
||||
];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
@@ -0,0 +1,47 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { updateDisplayOptions } from 'n8n-workflow';
|
||||
|
||||
import { validatePath } from '../../helpers/utils';
|
||||
import { groupLocator, groupNameParameter, pathParameter } from '../common';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
...groupLocator,
|
||||
description: 'Select the group you want to update',
|
||||
},
|
||||
{
|
||||
...groupNameParameter,
|
||||
description: 'The new name of the group',
|
||||
placeholder: 'e.g. GroupName',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
...pathParameter,
|
||||
placeholder: 'e.g. /division_abc/engineering/',
|
||||
description: 'The new path to the group, if it is not included, it defaults to a slash (/)',
|
||||
routing: {
|
||||
send: {
|
||||
preSend: [validatePath],
|
||||
property: 'NewPath',
|
||||
type: 'query',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
resource: ['group'],
|
||||
operation: ['update'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
Reference in New Issue
Block a user