Page MenuHomeSealhub

No OneTemporary

diff --git a/nodes/Phabricator/Phabricator.node.ts b/nodes/Phabricator/Phabricator.node.ts
index 4ad6051..6b0be60 100644
--- a/nodes/Phabricator/Phabricator.node.ts
+++ b/nodes/Phabricator/Phabricator.node.ts
@@ -1,80 +1,80 @@
-import { INodeType, INodeTypeDescription } from 'n8n-workflow';
+import { INodeType, INodeTypeDescription, INodePropertyRouting } from 'n8n-workflow';
import { methods, apps, short_descriptions, fields } from './methods';
export class Phabricator implements INodeType {
description: INodeTypeDescription = {
displayName: 'Phabricator',
name: 'phabricator',
icon: 'file:phabricator.svg',
group: ['transform'],
version: 1,
subtitle: '={{$parameter["operation"]}}',
description: 'Interact with Phabricator',
defaults: {
name: 'Phabricator',
},
inputs: ['main'],
outputs: ['main'],
credentials: [
{
name: 'phabricatorApi',
required: true,
},
],
requestDefaults: {
method: 'POST',
baseURL: 'https://hub.sealcode.org',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
},
properties: [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: apps.map((method) => ({
name: method,
value: method,
action: method,
description: `Call ${method} Conduit method`,
- routing: {
- request: {
- method: <const>'GET',
- url: `/api/${method}`,
- },
- },
})),
default: 'user.whoami',
},
...apps.map((app) => ({
displayName: 'Operation',
name: 'operation',
type: <const>'options',
noDataExpression: true,
description: 'Choose an operation',
required: true,
displayOptions: {
show: {
resource: [app],
},
},
options: Object.entries(methods)
.filter(([method_name]) => {
return method_name.startsWith(app + '.');
})
.map(([method_name, method]) => ({
name: method_name,
value: method_name,
description: method.description,
action:
method_name.split('.').slice(1).join('.') + ': ' + short_descriptions[method_name],
+ routing: {
+ request: {
+ method: <const>'POST',
+ url: '/api/' + method_name,
+ },
+ },
})),
default: Object.keys(methods).filter((method_name) => method_name.startsWith(app + '.'))[0],
})),
...fields,
],
};
}

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 8, 12:35 (18 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1034587
Default Alt Text
(2 KB)

Event Timeline