1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-10-06 01:27:49 +03:00

Merge branch 'master' into graceful-js-task-runner-termination

This commit is contained in:
Tomi Turtiainen 2024-10-02 14:29:58 +03:00
commit b42ab1c9e3
No known key found for this signature in database
14 changed files with 374 additions and 61 deletions

View File

@ -1,7 +0,0 @@
{
"$schema": "../scenario.schema.json",
"name": "CodeNodeJsOnceForEach",
"description": "A JS Code Node that runs once for each item and adds, modifies and removes properties. The data of 5 items is generated using DebugHelper Node, and returned with RespondToWebhook Node.",
"scenarioData": { "workflowFiles": ["js-code-node-once-for-each.json"] },
"scriptPath": "js-code-node-once-for-each.script.js"
}

View File

@ -1,9 +1,31 @@
{
"createdAt": "2024-08-06T12:19:51.268Z",
"updatedAt": "2024-08-06T12:20:45.000Z",
"name": "JS Code Node Once For Each",
"name": "JS Code Node",
"active": true,
"nodes": [
{
"parameters": {
"respondWith": "allIncomingItems",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [1280, 460],
"id": "0067e317-09b8-478a-8c50-e19b4c9e294c",
"name": "Respond to Webhook"
},
{
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Add new field\n$input.item.json.age = 10 + Math.floor(Math.random() * 30);\n// Mutate existing field\n$input.item.json.password = $input.item.json.password.split('').map(() => '*').join(\"\")\n// Remove field\ndelete $input.item.json.lastname\n// New object field\nconst emailParts = $input.item.json.email.split(\"@\")\n$input.item.json.emailData = {\n user: emailParts[0],\n domain: emailParts[1]\n}\n\nreturn $input.item;"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [1040, 460],
"id": "56d751c0-0d30-43c3-89fa-bebf3a9d436f",
"name": "OnceForEachItemJSCode"
},
{
"parameters": {
"httpMethod": "POST",
@ -13,68 +35,23 @@
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [0, 0],
"id": "849350b3-4212-4416-a462-1cf331157d37",
"position": [580, 460],
"id": "417d749d-156c-4ffe-86ea-336f702dc5da",
"name": "Webhook",
"webhookId": "34ca1895-ccf4-4a4a-8bb8-a042f5edb567"
},
{
"parameters": {
"respondWith": "allIncomingItems",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [660, 0],
"id": "f0660aa1-8a65-490f-b5cd-f8d134070c13",
"name": "Respond to Webhook"
},
{
"parameters": {
"category": "randomData",
"randomDataCount": 5
},
"type": "n8n-nodes-base.debugHelper",
"typeVersion": 1,
"position": [220, 0],
"id": "50f1efe8-bd2d-4061-9f51-b38c0e3daeb2",
"name": "DebugHelper"
},
{
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "// Add new field\n$input.item.json.age = 10 + Math.floor(Math.random() * 30);\n// Mutate existing field\n$input.item.json.password = $input.item.json.password.split('').map(() => '*').join(\"\")\n// Remove field\ndelete $input.item.json.lastname\n// New object field\nconst emailParts = $input.item.json.email.split(\"@\")\n$input.item.json.emailData = {\n user: emailParts[0],\n domain: emailParts[1]\n}\n\nreturn $input.item;"
"jsCode": "const digits = '0123456789';\nconst uppercaseLetters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst lowercaseLetters = uppercaseLetters.toLowerCase();\nconst alphabet = [digits, uppercaseLetters, lowercaseLetters].join('').split('')\n\nconst randomInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;\nconst randomItem = (arr) => arr.at(randomInt(0, arr.length - 1))\nconst randomString = (len) => Array.from({ length: len }).map(() => randomItem(alphabet)).join('')\n\nconst randomUid = () => [8,4,4,4,8].map(len => randomString(len)).join(\"-\")\nconst randomEmail = () => `${randomString(8)}@${randomString(10)}.com`\n\nconst randomPerson = () => ({\n uid: randomUid(),\n email: randomEmail(),\n firstname: randomString(5),\n lastname: randomString(12),\n password: randomString(10)\n})\n\nreturn Array.from({ length: 100 }).map(() => ({\n json: randomPerson()\n}))"
},
"id": "c30db155-73ca-48b9-8860-c3fe7a0926fb",
"name": "Code",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [440, 0],
"id": "f9f2f865-e228-403d-8e47-72308359e207",
"name": "OnceForEachItemJSCode"
"position": [820, 460]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "DebugHelper",
"type": "main",
"index": 0
}
]
]
},
"DebugHelper": {
"main": [
[
{
"node": "OnceForEachItemJSCode",
"type": "main",
"index": 0
}
]
]
},
"OnceForEachItemJSCode": {
"main": [
[
@ -85,6 +62,28 @@
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Code": {
"main": [
[
{
"node": "OnceForEachItemJSCode",
"type": "main",
"index": 0
}
]
]
}
},
"settings": { "executionOrder": "v1" },

View File

@ -0,0 +1,7 @@
{
"$schema": "../scenario.schema.json",
"name": "CodeNodeJs",
"description": "A JS Code Node that first generates 100 items and then runs once for each item and adds, modifies and removes properties. The data returned with RespondToWebhook Node.",
"scenarioData": { "workflowFiles": ["js-code-node.json"] },
"scriptPath": "js-code-node.script.js"
}

View File

@ -12,7 +12,7 @@ export default function () {
try {
const body = JSON.parse(r.body);
return Array.isArray(body) ? body.length === 5 : false;
return Array.isArray(body) ? body.length === 100 : false;
} catch (error) {
console.error('Error parsing response body: ', error);
return false;

View File

@ -109,17 +109,22 @@ export class DocumentGithubLoader implements INodeType {
0,
)) as CharacterTextSplitter | undefined;
const { index } = this.addInputData(NodeConnectionType.AiDocument, [
[{ json: { repository, branch, ignorePaths, recursive } }],
]);
const docs = new GithubRepoLoader(repository, {
branch,
ignorePaths: (ignorePaths ?? '').split(',').map((p) => p.trim()),
recursive,
accessToken: (credentials.accessToken as string) || '',
apiUrl: credentials.server as string,
});
const loadedDocs = textSplitter
? await textSplitter.splitDocuments(await docs.load())
: await docs.load();
this.addOutputData(NodeConnectionType.AiDocument, index, [[{ json: { loadedDocs } }]]);
return {
response: logWrapper(loadedDocs, this),
};

View File

@ -0,0 +1,36 @@
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
export class SysdigApi implements ICredentialType {
name = 'sysdigApi';
displayName = 'Sysdig API';
documentationUrl = 'sysdig';
icon = { light: 'file:icons/Sysdig.Black.svg', dark: 'file:icons/Sysdig.White.svg' } as const;
httpRequestNode = {
name: 'Sysdig',
docsUrl: 'https://docs.sysdig.com/en/docs/developer-tools/sysdig-api/',
apiBaseUrl: 'https://app.us1.sysdig.com',
};
properties: INodeProperties[] = [
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
},
},
};
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 914 285" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,27,-516.569)">
<g transform="matrix(1,0,0,1,48,258.555)">
<g transform="matrix(3.3098,0,0,2.3938,3.39912,300.975)">
<rect id="Artboard1" x="-23.687" y="-17.947" width="276.15" height="119" style="fill:none;"/>
<g transform="matrix(1.406,0,0,1.94401,-100.713,-73.9948)">
<g id="Artboard11" serif:id="Artboard1">
<g>
<g id="ef34e798-518f-4388-ac79-8e481fcb331f">
<path d="M98.358,65.739C98.517,68.39 97.361,70.956 95.271,72.594C93.043,74.164 90.351,74.938 87.63,74.792C83.25,74.81 78.996,73.311 75.594,70.553L78.996,65.32C82.065,67.553 85.013,68.669 87.84,68.669C90.072,68.669 91.188,67.971 91.189,66.576L91.189,66.471C91.189,65.704 90.613,65.059 89.462,64.535C89.043,64.361 87.683,63.925 85.38,63.227C79.798,61.587 77.007,58.779 77.007,54.802L77.007,54.697C76.915,52.144 78.043,49.693 80.042,48.103C82.103,46.51 84.661,45.694 87.264,45.801C91.001,45.791 94.653,46.924 97.73,49.045L94.695,54.54C91.729,52.796 89.2,51.924 87.107,51.923C85.153,51.923 84.176,52.569 84.176,53.859L84.176,53.964C84.176,54.663 84.752,55.291 85.903,55.848C86.356,56.057 87.682,56.546 89.881,57.313C91.912,57.916 93.837,58.835 95.584,60.035C97.355,61.344 98.389,63.431 98.358,65.634L98.358,65.739ZM117.701,74.949C116.619,77.844 115.415,79.868 114.09,81.019C112.501,82.27 110.51,82.902 108.491,82.798C106.004,82.805 103.562,82.136 101.426,80.862L104.095,75.106C105.108,75.774 106.284,76.153 107.496,76.205C108.709,76.231 109.818,75.499 110.27,74.373L99.281,46.219L107.706,46.219L114.09,65.32L120.213,46.219L128.481,46.219L117.701,74.949ZM150.889,65.739C151.048,68.39 149.892,70.956 147.802,72.594C145.575,74.164 142.882,74.938 140.162,74.792C135.782,74.81 131.528,73.311 128.126,70.553L131.527,65.32C134.597,67.553 137.545,68.669 140.371,68.669C142.603,68.669 143.72,67.971 143.72,66.576L143.72,66.471C143.72,65.704 143.144,65.059 141.993,64.535C141.574,64.361 140.214,63.925 137.911,63.227C132.329,61.587 129.538,58.779 129.539,54.802L129.539,54.697C129.446,52.144 130.574,49.693 132.574,48.103C134.634,46.51 137.193,45.694 139.795,45.801C143.532,45.791 147.185,46.924 150.261,49.045L147.226,54.54C144.26,52.796 141.731,51.924 139.638,51.923C137.684,51.923 136.707,52.569 136.708,53.859L136.708,53.964C136.708,54.663 137.283,55.291 138.435,55.848C138.888,56.057 140.213,56.546 142.412,57.313C144.444,57.916 146.369,58.835 148.116,60.034C149.887,61.344 150.921,63.432 150.889,65.634L150.889,65.739ZM175.16,74.269L175.16,71.809C172.728,73.868 169.605,74.934 166.421,74.792C163.083,74.855 159.869,73.504 157.577,71.076C154.961,68.355 153.653,64.762 153.653,60.296L153.653,60.191C153.653,55.726 154.943,52.133 157.525,49.412C159.833,46.977 163.066,45.626 166.421,45.696C169.542,45.584 172.615,46.504 175.16,48.313L175.16,36.067L183.115,36.067L183.115,74.269L175.16,74.269ZM175.265,60.192C175.343,58.14 174.631,56.135 173.277,54.592C172.07,53.2 170.304,52.413 168.462,52.447C166.63,52.409 164.87,53.175 163.648,54.54C162.257,56.085 161.525,58.114 161.607,60.191L161.607,60.296C161.531,62.357 162.263,64.368 163.648,65.896C164.875,67.261 166.627,68.041 168.462,68.041C170.298,68.041 172.049,67.261 173.277,65.896C174.631,64.353 175.343,62.348 175.265,60.296L175.265,60.192ZM187.929,43.132L187.929,36.067L196.302,36.067L196.302,43.132L187.929,43.132ZM188.138,74.269L188.138,46.22L196.093,46.22L196.093,74.269L188.138,74.269ZM230.382,67.937C230.382,73.135 229.074,76.921 226.457,79.292C223.945,81.595 220.038,82.746 214.735,82.746C210.423,82.808 206.162,81.801 202.333,79.816L205.054,73.327C207.933,74.994 211.199,75.878 214.526,75.891C219.864,75.891 222.532,73.693 222.533,69.297L222.533,68.983C219.917,71.006 216.68,72.061 213.375,71.966C210.14,72.052 207.004,70.824 204.688,68.565C202.131,66.01 200.762,62.494 200.92,58.883L200.92,58.779C200.764,55.158 202.154,51.636 204.74,49.098C207.04,46.845 210.157,45.617 213.375,45.696C216.589,45.616 219.751,46.53 222.428,48.313L222.428,46.22L230.382,46.22L230.382,67.937ZM222.533,58.779C222.582,57.011 221.854,55.308 220.544,54.121C217.772,51.691 213.583,51.691 210.811,54.121C209.528,55.323 208.822,57.021 208.874,58.779L208.874,58.883C208.814,60.657 209.52,62.374 210.811,63.593C212.14,64.794 213.886,65.433 215.677,65.372C217.477,65.43 219.229,64.771 220.544,63.541C221.855,62.354 222.582,60.651 222.533,58.883L222.533,58.779Z" style="fill-rule:nonzero;"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 914 285" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(1,0,0,1,27,-23.569)">
<g transform="matrix(1,0,0,1,48,-234.445)">
<g transform="matrix(3.3098,0,0,2.3938,3.39912,300.975)">
<rect id="Artboard1" x="-23.687" y="-17.947" width="276.15" height="119" style="fill:none;"/>
<g transform="matrix(1.406,0,0,1.94401,-100.713,-73.9948)">
<g id="Artboard11" serif:id="Artboard1">
<g>
<g id="ef34e798-518f-4388-ac79-8e481fcb331f">
<path d="M98.358,65.739C98.517,68.39 97.361,70.956 95.271,72.594C93.043,74.164 90.351,74.938 87.63,74.792C83.25,74.81 78.996,73.311 75.594,70.553L78.996,65.32C82.065,67.553 85.013,68.669 87.84,68.669C90.072,68.669 91.188,67.971 91.189,66.576L91.189,66.471C91.189,65.704 90.613,65.059 89.462,64.535C89.043,64.361 87.683,63.925 85.38,63.227C79.798,61.587 77.007,58.779 77.007,54.802L77.007,54.697C76.915,52.144 78.043,49.693 80.042,48.103C82.103,46.51 84.661,45.694 87.264,45.801C91.001,45.791 94.653,46.924 97.73,49.045L94.695,54.54C91.729,52.796 89.2,51.924 87.107,51.923C85.153,51.923 84.176,52.569 84.176,53.859L84.176,53.964C84.176,54.663 84.752,55.291 85.903,55.848C86.356,56.057 87.682,56.546 89.881,57.313C91.912,57.916 93.837,58.835 95.584,60.035C97.355,61.344 98.389,63.431 98.358,65.634L98.358,65.739ZM117.701,74.949C116.619,77.844 115.415,79.868 114.09,81.019C112.501,82.27 110.51,82.902 108.491,82.798C106.004,82.805 103.562,82.136 101.426,80.862L104.095,75.106C105.108,75.774 106.284,76.153 107.496,76.205C108.709,76.231 109.818,75.499 110.27,74.373L99.281,46.219L107.706,46.219L114.09,65.32L120.213,46.219L128.481,46.219L117.701,74.949ZM150.889,65.739C151.048,68.39 149.892,70.956 147.802,72.594C145.575,74.164 142.882,74.938 140.162,74.792C135.782,74.81 131.528,73.311 128.126,70.553L131.527,65.32C134.597,67.553 137.545,68.669 140.371,68.669C142.603,68.669 143.72,67.971 143.72,66.576L143.72,66.471C143.72,65.704 143.144,65.059 141.993,64.535C141.574,64.361 140.214,63.925 137.911,63.227C132.329,61.587 129.538,58.779 129.539,54.802L129.539,54.697C129.446,52.144 130.574,49.693 132.574,48.103C134.634,46.51 137.193,45.694 139.795,45.801C143.532,45.791 147.185,46.924 150.261,49.045L147.226,54.54C144.26,52.796 141.731,51.924 139.638,51.923C137.684,51.923 136.707,52.569 136.708,53.859L136.708,53.964C136.708,54.663 137.283,55.291 138.435,55.848C138.888,56.057 140.213,56.546 142.412,57.313C144.444,57.916 146.369,58.835 148.116,60.034C149.887,61.344 150.921,63.432 150.889,65.634L150.889,65.739ZM175.16,74.269L175.16,71.809C172.728,73.868 169.605,74.934 166.421,74.792C163.083,74.855 159.869,73.504 157.577,71.076C154.961,68.355 153.653,64.762 153.653,60.296L153.653,60.191C153.653,55.726 154.943,52.133 157.525,49.412C159.833,46.977 163.066,45.626 166.421,45.696C169.542,45.584 172.615,46.504 175.16,48.313L175.16,36.067L183.115,36.067L183.115,74.269L175.16,74.269ZM175.265,60.192C175.343,58.14 174.631,56.135 173.277,54.592C172.07,53.2 170.304,52.413 168.462,52.447C166.63,52.409 164.87,53.175 163.648,54.54C162.257,56.085 161.525,58.114 161.607,60.191L161.607,60.296C161.531,62.357 162.263,64.368 163.648,65.896C164.875,67.261 166.627,68.041 168.462,68.041C170.298,68.041 172.049,67.261 173.277,65.896C174.631,64.353 175.343,62.348 175.265,60.296L175.265,60.192ZM187.929,43.132L187.929,36.067L196.302,36.067L196.302,43.132L187.929,43.132ZM188.138,74.269L188.138,46.22L196.093,46.22L196.093,74.269L188.138,74.269ZM230.382,67.937C230.382,73.135 229.074,76.921 226.457,79.292C223.945,81.595 220.038,82.746 214.735,82.746C210.423,82.808 206.162,81.801 202.333,79.816L205.054,73.327C207.933,74.994 211.199,75.878 214.526,75.891C219.864,75.891 222.532,73.693 222.533,69.297L222.533,68.983C219.917,71.006 216.68,72.061 213.375,71.966C210.14,72.052 207.004,70.824 204.688,68.565C202.131,66.01 200.762,62.494 200.92,58.883L200.92,58.779C200.764,55.158 202.154,51.636 204.74,49.098C207.04,46.845 210.157,45.617 213.375,45.696C216.589,45.616 219.751,46.53 222.428,48.313L222.428,46.22L230.382,46.22L230.382,67.937ZM222.533,58.779C222.582,57.011 221.854,55.308 220.544,54.121C217.772,51.691 213.583,51.691 210.811,54.121C209.528,55.323 208.822,57.021 208.874,58.779L208.874,58.883C208.814,60.657 209.52,62.374 210.811,63.593C212.14,64.794 213.886,65.433 215.677,65.372C217.477,65.43 219.229,64.771 220.544,63.541C221.855,62.354 222.582,60.651 222.533,58.883L222.533,58.779Z" style="fill:white;fill-rule:nonzero;"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -394,6 +394,44 @@ export const clientFields: INodeProperties[] = [
],
default: 'invoices',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 'active',
},
{
name: 'Archived',
value: 'archived',
},
{
name: 'Deleted',
value: 'deleted',
},
],
default: 'active',
},
{
displayName: 'Created At',
name: 'createdAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Updated At',
name: 'updatedAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Is Deleted',
name: 'isDeleted',
type: 'boolean',
default: false,
},
],
},
];

View File

@ -441,6 +441,68 @@ export const invoiceFields: INodeProperties[] = [
],
default: 'client',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 'active',
},
{
name: 'Archived',
value: 'archived',
},
{
name: 'Deleted',
value: 'deleted',
},
],
default: 'active',
},
{
displayName: 'Created At',
name: 'createdAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Updated At',
name: 'updatedAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Is Deleted',
name: 'isDeleted',
type: 'boolean',
default: false,
},
{
displayName: 'Client Status',
name: 'clientStatus',
type: 'options',
options: [
{
name: 'All',
value: 'all',
},
{
name: 'Paid',
value: 'paid',
},
{
name: 'Unpaid',
value: 'unpaid',
},
{
name: 'Overdue',
value: 'overdue',
},
],
default: 'all',
},
],
},
];

View File

@ -434,6 +434,18 @@ export class InvoiceNinja implements INodeType {
if (options.include) {
qs.include = options.include as string;
}
if (options.status) {
qs.status = options.status as string;
}
if (options.createdAt) {
qs.created_at = options.createdAt as string;
}
if (options.updatedAt) {
qs.updated_at = options.updatedAt as string;
}
if (options.isDeleted) {
qs.is_deleted = options.isDeleted as boolean;
}
if (returnAll) {
responseData = await invoiceNinjaApiRequestAllItems.call(
this,
@ -619,7 +631,27 @@ export class InvoiceNinja implements INodeType {
qs.include = options.include as string;
}
if (options.invoiceNumber) {
qs.invoice_number = options.invoiceNumber as string;
if (apiVersion === 'v4') {
qs.invoice_number = options.invoiceNumber as string;
} else if (apiVersion === 'v5') {
// eslint-disable-next-line id-denylist
qs.number = options.invoiceNumber as string;
}
}
if (options.status) {
qs.status = options.status as string;
}
if (options.createdAt) {
qs.created_at = options.createdAt as string;
}
if (options.updatedAt) {
qs.updated_at = options.updatedAt as string;
}
if (options.isDeleted) {
qs.is_deleted = options.isDeleted as boolean;
}
if (options.clientStatus) {
qs.client_status = options.clientStatus as string;
}
if (returnAll) {
responseData = await invoiceNinjaApiRequestAllItems.call(
@ -799,6 +831,18 @@ export class InvoiceNinja implements INodeType {
if (options.include) {
qs.include = options.include as string;
}
if (options.status) {
qs.status = options.status as string;
}
if (options.createdAt) {
qs.created_at = options.createdAt as string;
}
if (options.updatedAt) {
qs.updated_at = options.updatedAt as string;
}
if (options.isDeleted) {
qs.is_deleted = options.isDeleted as boolean;
}
if (returnAll) {
responseData = await invoiceNinjaApiRequestAllItems.call(
this,
@ -1178,6 +1222,18 @@ export class InvoiceNinja implements INodeType {
if (options.invoiceNumber) {
qs.invoice_number = options.invoiceNumber as string;
}
if (options.status) {
qs.status = options.status as string;
}
if (options.createdAt) {
qs.created_at = options.createdAt as string;
}
if (options.updatedAt) {
qs.updated_at = options.updatedAt as string;
}
if (options.isDeleted) {
qs.is_deleted = options.isDeleted as boolean;
}
if (returnAll) {
responseData = await invoiceNinjaApiRequestAllItems.call(
this,

View File

@ -584,6 +584,44 @@ export const paymentFields: INodeProperties[] = [
],
default: 'client',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 'active',
},
{
name: 'Archived',
value: 'archived',
},
{
name: 'Deleted',
value: 'deleted',
},
],
default: 'active',
},
{
displayName: 'Created At',
name: 'createdAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Updated At',
name: 'updatedAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Is Deleted',
name: 'isDeleted',
type: 'boolean',
default: false,
},
],
},
];

View File

@ -435,6 +435,44 @@ export const quoteFields: INodeProperties[] = [
],
default: 'client',
},
{
displayName: 'Status',
name: 'status',
type: 'options',
options: [
{
name: 'Active',
value: 'active',
},
{
name: 'Archived',
value: 'archived',
},
{
name: 'Deleted',
value: 'deleted',
},
],
default: 'active',
},
{
displayName: 'Created At',
name: 'createdAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Updated At',
name: 'updatedAt',
type: 'dateTime',
default: '',
},
{
displayName: 'Is Deleted',
name: 'isDeleted',
type: 'boolean',
default: false,
},
],
},
];

View File

@ -331,6 +331,7 @@
"dist/credentials/SurveyMonkeyApi.credentials.js",
"dist/credentials/SurveyMonkeyOAuth2Api.credentials.js",
"dist/credentials/SyncroMspApi.credentials.js",
"dist/credentials/SysdigApi.credentials.js",
"dist/credentials/TaigaApi.credentials.js",
"dist/credentials/TapfiliateApi.credentials.js",
"dist/credentials/TelegramApi.credentials.js",