diff --git a/packages/n8n-node/nodes/Probo/actions/trustCenter/index.ts b/packages/n8n-node/nodes/Probo/actions/trustCenter/index.ts index d35209eab..7900ada71 100644 --- a/packages/n8n-node/nodes/Probo/actions/trustCenter/index.ts +++ b/packages/n8n-node/nodes/Probo/actions/trustCenter/index.ts @@ -22,6 +22,8 @@ import * as getAllFilesOp from './getAllFiles.operation'; import * as deleteFileOp from './deleteFile.operation'; import * as createExternalUrlOp from './createExternalUrl.operation'; import * as deleteExternalUrlOp from './deleteExternalUrl.operation'; +import * as setAliasOp from './setAlias.operation'; +import * as removeAliasOp from './removeAlias.operation'; export const description: INodeProperties[] = [ { @@ -83,6 +85,18 @@ export const description: INodeProperties[] = [ description: 'Get many trust center references', action: 'Get many trust center references', }, + { + name: 'Remove Alias', + value: 'removeAlias', + description: 'Remove a trust center alias from a resource', + action: 'Remove a trust center alias', + }, + { + name: 'Set Alias', + value: 'setAlias', + description: 'Set a trust center alias for a document, file, or audit', + action: 'Set a trust center alias', + }, { name: 'Update', value: 'update', @@ -101,6 +115,8 @@ export const description: INodeProperties[] = [ ...deleteFileOp.description, ...createExternalUrlOp.description, ...deleteExternalUrlOp.description, + ...setAliasOp.description, + ...removeAliasOp.description, ]; export { @@ -113,4 +129,6 @@ export { deleteFileOp as deleteFile, createExternalUrlOp as createExternalUrl, deleteExternalUrlOp as deleteExternalUrl, + setAliasOp as setAlias, + removeAliasOp as removeAlias, }; diff --git a/packages/n8n-node/nodes/Probo/actions/trustCenter/removeAlias.operation.ts b/packages/n8n-node/nodes/Probo/actions/trustCenter/removeAlias.operation.ts new file mode 100644 index 000000000..4db4809a9 --- /dev/null +++ b/packages/n8n-node/nodes/Probo/actions/trustCenter/removeAlias.operation.ts @@ -0,0 +1,57 @@ +// Copyright (c) 2025-2026 Probo Inc . +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; +import { proboApiRequest } from '../../GenericFunctions'; + +export const description: INodeProperties[] = [ + { + displayName: 'Resource ID', + name: 'resourceId', + type: 'string', + displayOptions: { + show: { + resource: ['trustCenter'], + operation: ['removeAlias'], + }, + }, + default: '', + description: 'Document, trust center file, or audit ID', + required: true, + }, +]; + +export async function execute( + this: IExecuteFunctions, + itemIndex: number, +): Promise { + const resourceId = this.getNodeParameter('resourceId', itemIndex) as string; + + const query = ` + mutation RemoveTrustCenterAlias($input: RemoveTrustCenterAliasInput!) { + removeTrustCenterAlias(input: $input) { + deletedResourceId + } + } + `; + + const responseData = await proboApiRequest.call(this, query, { + input: { resourceId }, + }); + + return { + json: responseData, + pairedItem: { item: itemIndex }, + }; +} diff --git a/packages/n8n-node/nodes/Probo/actions/trustCenter/setAlias.operation.ts b/packages/n8n-node/nodes/Probo/actions/trustCenter/setAlias.operation.ts new file mode 100644 index 000000000..7d4f8e355 --- /dev/null +++ b/packages/n8n-node/nodes/Probo/actions/trustCenter/setAlias.operation.ts @@ -0,0 +1,75 @@ +// Copyright (c) 2025-2026 Probo Inc . +// +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +// AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +// PERFORMANCE OF THIS SOFTWARE. + +import type { INodeProperties, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow'; +import { proboApiRequest } from '../../GenericFunctions'; + +export const description: INodeProperties[] = [ + { + displayName: 'Resource ID', + name: 'resourceId', + type: 'string', + displayOptions: { + show: { + resource: ['trustCenter'], + operation: ['setAlias'], + }, + }, + default: '', + description: 'Document, trust center file, or audit ID', + required: true, + }, + { + displayName: 'Alias', + name: 'alias', + type: 'string', + displayOptions: { + show: { + resource: ['trustCenter'], + operation: ['setAlias'], + }, + }, + default: '', + description: 'Human-readable alias slug', + required: true, + }, +]; + +export async function execute( + this: IExecuteFunctions, + itemIndex: number, +): Promise { + const resourceId = this.getNodeParameter('resourceId', itemIndex) as string; + const alias = this.getNodeParameter('alias', itemIndex) as string; + + const query = ` + mutation SetTrustCenterAlias($input: SetTrustCenterAliasInput!) { + setTrustCenterAlias(input: $input) { + alias { + resourceId + alias + } + } + } + `; + + const responseData = await proboApiRequest.call(this, query, { + input: { resourceId, alias }, + }); + + return { + json: responseData, + pairedItem: { item: itemIndex }, + }; +}