From 2dfd5a7c7e04df5fa2cf3e3e0896cb522903807a Mon Sep 17 00:00:00 2001 From: Deborah Barnard Date: Thu, 30 Jun 2022 11:41:15 +0100 Subject: [PATCH] wip --- .../creating-nodes/build/declarative-style-node.md | 8 +++++--- .../creating-nodes/reference/credentials-files.md | 2 +- .../creating-nodes/reference/node-base-files.md | 10 +++++----- .../creating-nodes/reference/paired-items.md | 8 ++++---- styles/Vocab/default/accept.txt | 2 ++ 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/integrations/creating-nodes/build/declarative-style-node.md b/docs/integrations/creating-nodes/build/declarative-style-node.md index 77c8fa0ad..43195a97d 100644 --- a/docs/integrations/creating-nodes/build/declarative-style-node.md +++ b/docs/integrations/creating-nodes/build/declarative-style-node.md @@ -272,7 +272,7 @@ Add the following to the `properties` array, after the `resource` object: routing: { request: { method: 'GET', - url: '/mars-photos/api/v1/{{roverName}}/photos' + url: '/mars-photos/api/v1/={{roverName}}/photos' } } } @@ -320,8 +320,10 @@ export class NasaPicsApi implements ICredentialType { authenticate = { type: 'generic', properties: { - key: 'api_key', - value: '={{$credentials.apiKey}}', + qs: { + 'api_key': '={{$credentials.apiKey}}' + } + }, } as IAuthenticateGeneric; } diff --git a/docs/integrations/creating-nodes/reference/credentials-files.md b/docs/integrations/creating-nodes/reference/credentials-files.md index 535b6b5b6..4d5b3adb4 100644 --- a/docs/integrations/creating-nodes/reference/credentials-files.md +++ b/docs/integrations/creating-nodes/reference/credentials-files.md @@ -29,4 +29,4 @@ Object. #### qs -Object. Stands for "query string". \ No newline at end of file +Object. Stands for "query string." \ No newline at end of file diff --git a/docs/integrations/creating-nodes/reference/node-base-files.md b/docs/integrations/creating-nodes/reference/node-base-files.md index 9578feced..0e36de549 100644 --- a/docs/integrations/creating-nodes/reference/node-base-files.md +++ b/docs/integrations/creating-nodes/reference/node-base-files.md @@ -15,7 +15,7 @@ The node base file follows this basic structure: 2. Create a class for the node 3. Within the node class, create a `description` object, which defines the node. -A programmatic-style node also has an `execute()` method, which reads incoming data and parameters, then builds a request. The declarative style handles this using the `routing` key in the `properties` object, within `descriptions`. +detailsA programmatic-style node also has an `execute()` method, which reads incoming data and parameters, then builds a request. The declarative style handles this using the `routing` key in the `properties` object, within `descriptions`. ### Outline structure for a declarative-style node @@ -97,8 +97,8 @@ Array of object. This parameter tells n8n the credential options. Each object de The object must include: -* `name`: the credential name. Must match the prefix of the credential file. For example, `AsanaAPI` links to the `name` property in `AsanaApi.credential.ts`. [TODO: double check exact name] -* `required`: boolean. Specify whether authentication is required to use this node. +* `name`: the credential name. Must match the `name` property in the credential file. For example, `name: 'asanaApi'` in in [`Asana.node.ts`](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/Asana/Asana.node.ts){:target=_blank .external-class} links to `name = 'asanaApi'` in [`AsanaApi.credential.ts`](https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/credentials/AsanaApi.credentials.ts){:target=_blank .external-class}. +* `required`: Boolean. Specify whether authentication is required to use this node. ### requestDefaults @@ -124,7 +124,7 @@ A resource object includes the following parameters: * `displayName`: String. This should always be `Resource`. * `name`: String. This should always be `resource`. * `type`: String. Tells n8n which UI element to use, and what type of input to expect. For example, `options` results in n8n adding a dropdown that allows users to choose one option. Refer to [Node UI elements](/integrations/creating-nodes/reference/ui-elements/) for more information. -* `noDataExpression`: Boolean. Must always be `true`. [TODO: ask Ivan what it actually does - affects frontend somehow] +* `noDataExpression`: Boolean. Prevents using an expression for the parameter. Must always be `true` for `resource`. #### Operations @@ -133,7 +133,7 @@ The operations object defines the available operations on a resource. * `displayName`: String. This should always be `Options`. * `name`: String. This should always be `option`. * `type`: String. Tells n8n which UI element to use, and what type of input to expect. For example, `dateTime` results in n8n adding a date picker. Refer to [Node UI elements](/integrations/creating-nodes/reference/ui-elements/) for more information. -* `noDataExpression`: Boolean. [TODO: what is this? see above] +* `noDataExpression`: Boolean. Prevents using an expression for the parameter. Must always be `true` for `operation`. * `action`: String. This parameter combines the resource and operation. You should always include it, as n8n will use it in future versions. For example, given a resource called `"Card"` and an operation `"Get all"`, your action is `"Get all cards"`. ### methods diff --git a/docs/integrations/creating-nodes/reference/paired-items.md b/docs/integrations/creating-nodes/reference/paired-items.md index 4db0ceae5..6dd39365d 100644 --- a/docs/integrations/creating-nodes/reference/paired-items.md +++ b/docs/integrations/creating-nodes/reference/paired-items.md @@ -1,13 +1,13 @@ # Paired items !!! note "Programmatic-style nodes only" - The information in this document applies to programmatic-style nodes. If you're using declarative style, n8n handles paired items for you automatically. + This guidance applies to programmatic-style nodes. If you're using declarative style, n8n handles paired items for you automatically. An n8n node operation consumes input items and produces output items. n8n generates an output item from a single input item, except in the Merge node, or any other node that combines or sums items. -To ensure that n8n works, it needs to know which input item a given output item comes from. If this information is missing, expressions on other nodes may break. +n8n needs to know which input item a given output item comes from. If this information is missing, expressions in other nodes may break. -You must provide item pairing information when returning the output of your operations. You can do this using the `pairedInput` [TODO: pairedInput or pairedItem?] key, at the same level as the `json` key in your output: +You must provide item pairing information when returning the output of your operations. You can do this using the `pairedItem` key, at the same level as the `json` key in your output: [TODO: clarify wtf is going on here] ```js @@ -15,6 +15,6 @@ You must provide item pairing information when returning the output of your oper json: { ... }, - pairedInput: 3 // The index of the corresponding input item + pairedItem: 3 // The index of the corresponding input item }] ``` \ No newline at end of file diff --git a/styles/Vocab/default/accept.txt b/styles/Vocab/default/accept.txt index 04518ab11..a5a374ba6 100644 --- a/styles/Vocab/default/accept.txt +++ b/styles/Vocab/default/accept.txt @@ -1,6 +1,8 @@ Asana Axios backend +Boolean +boolean Clockify Cron Dockerfile