@limetech/n8n-nodes-lime 2.3.1-dev.1 → 2.5.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/lint.yml +1 -1
- package/.github/workflows/release.yml +16 -2
- package/.github/workflows/test-and-build.yml +0 -15
- package/.releaserc.json +1 -0
- package/CHANGELOG.md +42 -2
- package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
- package/dist/credentials/FortnoxApi.credentials.js +57 -0
- package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
- package/dist/credentials/LimeCrmApi.credentials.d.ts +9 -0
- package/dist/credentials/LimeCrmApi.credentials.js +70 -0
- package/dist/credentials/LimeCrmApi.credentials.js.map +1 -0
- package/dist/credentials/index.d.ts +2 -0
- package/dist/credentials/index.js +19 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/nodes/errorHandling.d.ts +11 -0
- package/dist/nodes/errorHandling.js +20 -0
- package/dist/nodes/errorHandling.js.map +1 -0
- package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
- package/dist/nodes/fortnox/Fortnox.node.js +95 -0
- package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
- package/dist/nodes/fortnox/Fortnox.node.json +18 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
- package/dist/nodes/fortnox/commons.d.ts +25 -0
- package/dist/nodes/fortnox/commons.js +44 -0
- package/dist/nodes/fortnox/commons.js.map +1 -0
- package/dist/nodes/fortnox/fortnoxLogo.svg +15 -0
- package/dist/nodes/fortnox/index.d.ts +6 -0
- package/dist/nodes/fortnox/index.js +23 -0
- package/dist/nodes/fortnox/index.js.map +1 -0
- package/dist/nodes/fortnox/model.d.ts +20 -0
- package/dist/nodes/fortnox/model.js +3 -0
- package/dist/nodes/fortnox/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/index.d.ts +7 -0
- package/dist/nodes/fortnox/resources/customers/index.js +85 -0
- package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
- package/dist/nodes/fortnox/resources/customers/model.js +3 -0
- package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +281 -0
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +9 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +38 -0
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +38 -0
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +5 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js +42 -0
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +261 -0
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +7 -0
- package/dist/nodes/fortnox/resources/invoice/index.js +81 -0
- package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +147 -0
- package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
- package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +37 -0
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +4 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +41 -0
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +1 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +10 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +64 -0
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
- package/dist/nodes/fortnox/transport/errorCodes.js +50 -0
- package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
- package/dist/nodes/fortnox/transport/index.d.ts +3 -0
- package/dist/nodes/fortnox/transport/index.js +76 -0
- package/dist/nodes/fortnox/transport/index.js.map +1 -0
- package/dist/nodes/index.d.ts +4 -0
- package/dist/nodes/index.js +21 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +19 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +122 -0
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +215 -0
- package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
- package/dist/nodes/lime-crm/assets/lime-crm.svg +1 -0
- package/dist/nodes/lime-crm/index.d.ts +9 -0
- package/dist/nodes/lime-crm/index.js +26 -0
- package/dist/nodes/lime-crm/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +5 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +47 -0
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.d.ts +2 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.js +20 -0
- package/dist/nodes/lime-crm/methods/getLimetypes.js.map +1 -0
- package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
- package/dist/nodes/lime-crm/methods/index.js +15 -0
- package/dist/nodes/lime-crm/methods/index.js.map +1 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +4 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js +71 -0
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -0
- package/dist/nodes/lime-crm/models/constants.d.ts +9 -0
- package/dist/nodes/lime-crm/models/constants.js +10 -0
- package/dist/nodes/lime-crm/models/constants.js.map +1 -0
- package/dist/nodes/lime-crm/models/index.d.ts +6 -0
- package/dist/nodes/lime-crm/models/index.js +13 -0
- package/dist/nodes/lime-crm/models/index.js.map +1 -0
- package/dist/nodes/lime-crm/models/limeobject.d.ts +4 -0
- package/dist/nodes/lime-crm/models/limeobject.js +3 -0
- package/dist/nodes/lime-crm/models/limeobject.js.map +1 -0
- package/dist/nodes/lime-crm/models/limetype.d.ts +24 -0
- package/dist/nodes/lime-crm/models/limetype.js +3 -0
- package/dist/nodes/lime-crm/models/limetype.js.map +1 -0
- package/dist/nodes/lime-crm/models/propertyTypes.d.ts +4 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js +5 -0
- package/dist/nodes/lime-crm/models/propertyTypes.js.map +1 -0
- package/dist/nodes/lime-crm/models/users.d.ts +13 -0
- package/dist/nodes/lime-crm/models/users.js +3 -0
- package/dist/nodes/lime-crm/models/users.js.map +1 -0
- package/dist/nodes/lime-crm/models/webhook.d.ts +18 -0
- package/dist/nodes/lime-crm/models/webhook.js +3 -0
- package/dist/nodes/lime-crm/models/webhook.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/admin/index.js +89 -0
- package/dist/nodes/lime-crm/resources/admin/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js +123 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js +87 -0
- package/dist/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.d.ts +2 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js +39 -0
- package/dist/nodes/lime-crm/resources/admin/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/data/index.js +108 -0
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js +124 -0
- package/dist/nodes/lime-crm/resources/data/operations/createSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js +52 -0
- package/dist/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js +299 -0
- package/dist/nodes/lime-crm/resources/data/operations/getManyObjects.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.d.ts +9 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js +125 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleFile.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js +79 -0
- package/dist/nodes/lime-crm/resources/data/operations/getSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +6 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js +43 -0
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js +146 -0
- package/dist/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/index.d.ts +7 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js +93 -0
- package/dist/nodes/lime-crm/resources/metadata/index.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.d.ts +10 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js +16 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js +113 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.d.ts +11 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js +37 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.js.map +1 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.d.ts +3 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js +40 -0
- package/dist/nodes/lime-crm/resources/metadata/operations/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/commons.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/commons.js +52 -0
- package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
- package/dist/nodes/lime-crm/transport/files.d.ts +26 -0
- package/dist/nodes/lime-crm/transport/files.js +96 -0
- package/dist/nodes/lime-crm/transport/files.js.map +1 -0
- package/dist/nodes/lime-crm/transport/index.d.ts +7 -0
- package/dist/nodes/lime-crm/transport/index.js +32 -0
- package/dist/nodes/lime-crm/transport/index.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeQuery.d.ts +10 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js +18 -0
- package/dist/nodes/lime-crm/transport/limeQuery.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limeobjects.d.ts +16 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js +76 -0
- package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
- package/dist/nodes/lime-crm/transport/limetypes.d.ts +33 -0
- package/dist/nodes/lime-crm/transport/limetypes.js +85 -0
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
- package/dist/nodes/lime-crm/transport/users.d.ts +6 -0
- package/dist/nodes/lime-crm/transport/users.js +159 -0
- package/dist/nodes/lime-crm/transport/users.js.map +1 -0
- package/dist/nodes/lime-crm/transport/webhooks.d.ts +14 -0
- package/dist/nodes/lime-crm/transport/webhooks.js +51 -0
- package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
- package/dist/nodes/lime-crm/utils/files.d.ts +8 -0
- package/dist/nodes/lime-crm/utils/files.js +103 -0
- package/dist/nodes/lime-crm/utils/files.js.map +1 -0
- package/dist/nodes/lime-crm/utils/hmac.d.ts +1 -0
- package/dist/nodes/lime-crm/utils/hmac.js +11 -0
- package/dist/nodes/lime-crm/utils/hmac.js.map +1 -0
- package/dist/nodes/lime-crm/utils/index.d.ts +4 -0
- package/dist/nodes/lime-crm/utils/index.js +16 -0
- package/dist/nodes/lime-crm/utils/index.js.map +1 -0
- package/dist/nodes/lime-crm/utils/webhook.d.ts +2 -0
- package/dist/nodes/lime-crm/utils/webhook.js +34 -0
- package/dist/nodes/lime-crm/utils/webhook.js.map +1 -0
- package/dist/nodes/modules.d.ts +12 -0
- package/dist/nodes/modules.js +16 -0
- package/dist/nodes/modules.js.map +1 -0
- package/dist/nodes/response.d.ts +18 -0
- package/dist/nodes/response.js +3 -0
- package/dist/nodes/response.js.map +1 -0
- package/dist/package.json +69 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/nodes/errorHandling.ts +60 -0
- package/nodes/lime-crm/LimeCrmNode.node.ts +8 -0
- package/nodes/lime-crm/LimeCrmTrigger.node.ts +19 -5
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +3 -1
- package/nodes/lime-crm/methods/getLimetypes.ts +2 -1
- package/nodes/lime-crm/methods/index.ts +5 -0
- package/nodes/lime-crm/methods/resourceMapping.ts +141 -0
- package/nodes/lime-crm/models/limetype.ts +18 -0
- package/nodes/lime-crm/resources/admin/index.ts +9 -4
- package/nodes/lime-crm/resources/admin/operations/getManyUsers.operation.ts +10 -2
- package/nodes/lime-crm/resources/admin/operations/getSingleUser.operation.ts +14 -15
- package/nodes/lime-crm/resources/data/index.ts +15 -6
- package/nodes/lime-crm/resources/data/operations/createSingleObject.operation.ts +25 -71
- package/nodes/lime-crm/resources/data/operations/deleteSingleObject.operation.ts +7 -2
- package/nodes/lime-crm/resources/data/operations/getManyObjects.operation.ts +6 -2
- package/nodes/lime-crm/resources/data/operations/getSingleFile.operation.ts +15 -3
- package/nodes/lime-crm/resources/data/operations/getSingleObject.operation.ts +15 -6
- package/nodes/lime-crm/resources/data/operations/updateSingleObject.operation.ts +41 -57
- package/nodes/lime-crm/resources/metadata/index.ts +7 -3
- package/nodes/lime-crm/resources/metadata/operations/getAllLimetypes.operation.ts +6 -2
- package/nodes/lime-crm/resources/metadata/operations/getSingleFileMetadata.operation.ts +18 -15
- package/nodes/lime-crm/resources/metadata/operations/getSingleLimetype.operation.ts +8 -3
- package/nodes/lime-crm/transport/commons.ts +34 -20
- package/nodes/lime-crm/transport/files.ts +72 -47
- package/nodes/lime-crm/transport/limeQuery.ts +2 -2
- package/nodes/lime-crm/transport/limeobjects.ts +22 -10
- package/nodes/lime-crm/transport/limetypes.ts +37 -16
- package/nodes/lime-crm/transport/users.ts +74 -38
- package/nodes/lime-crm/transport/webhooks.ts +5 -4
- package/nodes/lime-crm/utils/files.ts +27 -10
- package/nodes/lime-crm/utils/index.ts +1 -1
- package/nodes/response.ts +41 -3
- package/package.json +4 -2
- package/tests/nodes/lime-crm/methods.spec.ts +91 -0
- package/tests/nodes/lime-crm/utils.spec.ts +60 -25
- package/nodes/lime-crm/utils/propertyAdapters.ts +0 -75
- package/restore_script/README +0 -42
- package/restore_script/api_key_upload.txt +0 -0
- package/restore_script/cli.py +0 -73
- package/restore_script/download.py +0 -73
- package/restore_script/main.py +0 -19
- package/restore_script/poetry.lock +0 -162
- package/restore_script/pyproject.toml +0 -15
- package/restore_script/transfer.py +0 -41
- package/restore_script/upload.py +0 -66
- package/restore_script/utils.py +0 -42
- /package/{restore_script/api_key_download.txt → Dockerfile} +0 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.properties = exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const transport_1 = require("../../../transport");
|
|
7
|
+
const currency_codes_1 = require("currency-codes");
|
|
8
|
+
exports.description = {
|
|
9
|
+
name: 'Update Customer',
|
|
10
|
+
value: 'update',
|
|
11
|
+
description: 'Update an existing customer',
|
|
12
|
+
action: 'Update a customer',
|
|
13
|
+
};
|
|
14
|
+
const updateProperties = [
|
|
15
|
+
{
|
|
16
|
+
displayName: 'Name',
|
|
17
|
+
name: 'Name',
|
|
18
|
+
type: 'string',
|
|
19
|
+
default: '',
|
|
20
|
+
description: 'Customer name',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Active',
|
|
24
|
+
name: 'Active',
|
|
25
|
+
type: 'boolean',
|
|
26
|
+
default: true,
|
|
27
|
+
description: 'Whether the customer is active',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
displayName: 'Address 1',
|
|
31
|
+
name: 'Address1',
|
|
32
|
+
type: 'string',
|
|
33
|
+
default: '',
|
|
34
|
+
description: "Customer's primary address",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Address 2',
|
|
38
|
+
name: 'Address2',
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: '',
|
|
41
|
+
description: "Customer's secondary address",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'City',
|
|
45
|
+
name: 'City',
|
|
46
|
+
type: 'string',
|
|
47
|
+
default: '',
|
|
48
|
+
description: "Customer's city",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Comments',
|
|
52
|
+
name: 'Comments',
|
|
53
|
+
type: 'string',
|
|
54
|
+
default: '',
|
|
55
|
+
description: 'Comments about the customer',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Currency',
|
|
59
|
+
name: 'Currency',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: '',
|
|
62
|
+
description: "Customer's currency code, e.g., SEK, EUR",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Cost Center',
|
|
66
|
+
name: 'CostCenter',
|
|
67
|
+
type: 'string',
|
|
68
|
+
default: '',
|
|
69
|
+
description: "Customer's cost center",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Country',
|
|
73
|
+
name: 'Country',
|
|
74
|
+
type: 'string',
|
|
75
|
+
default: '',
|
|
76
|
+
description: "Customer's country",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Country Code',
|
|
80
|
+
name: 'CountryCode',
|
|
81
|
+
type: 'string',
|
|
82
|
+
default: '',
|
|
83
|
+
description: "Customer's country code",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Email',
|
|
87
|
+
name: 'Email',
|
|
88
|
+
type: 'string',
|
|
89
|
+
default: '',
|
|
90
|
+
description: "Customer's email address",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
displayName: 'External Reference',
|
|
94
|
+
name: 'ExternalReference',
|
|
95
|
+
type: 'string',
|
|
96
|
+
default: '',
|
|
97
|
+
description: 'External reference for the customer',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Fax',
|
|
101
|
+
name: 'Fax',
|
|
102
|
+
type: 'string',
|
|
103
|
+
default: '',
|
|
104
|
+
description: "Customer's fax number",
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'GLN',
|
|
108
|
+
name: 'GLN',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: '',
|
|
111
|
+
description: 'Global Location Number',
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
displayName: 'Organisation Number',
|
|
115
|
+
name: 'OrganisationNumber',
|
|
116
|
+
type: 'string',
|
|
117
|
+
default: '',
|
|
118
|
+
description: "Customer's organisation number",
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Phone 1',
|
|
122
|
+
name: 'Phone1',
|
|
123
|
+
type: 'string',
|
|
124
|
+
default: '',
|
|
125
|
+
description: "Customer's primary phone number",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Phone 2',
|
|
129
|
+
name: 'Phone2',
|
|
130
|
+
type: 'string',
|
|
131
|
+
default: '',
|
|
132
|
+
description: "Customer's secondary phone number",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
displayName: 'Type',
|
|
136
|
+
name: 'Type',
|
|
137
|
+
type: 'options',
|
|
138
|
+
options: [
|
|
139
|
+
{
|
|
140
|
+
name: 'Private',
|
|
141
|
+
value: 'PRIVATE',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: 'Company',
|
|
145
|
+
value: 'COMPANY',
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
default: 'COMPANY',
|
|
149
|
+
description: 'Type of customer',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
displayName: 'VAT Number',
|
|
153
|
+
name: 'VATNumber',
|
|
154
|
+
type: 'string',
|
|
155
|
+
default: '',
|
|
156
|
+
description: "Customer's VAT number",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
displayName: 'VAT Type',
|
|
160
|
+
name: 'VATType',
|
|
161
|
+
type: 'options',
|
|
162
|
+
options: [
|
|
163
|
+
{
|
|
164
|
+
name: 'SE VAT',
|
|
165
|
+
value: 'SEVAT',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: 'SE Reversed VAT',
|
|
169
|
+
value: 'SEREVERSEDVAT',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'EU Reversed VAT',
|
|
173
|
+
value: 'EUREVERSEDVAT',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'EU VAT',
|
|
177
|
+
value: 'EUVAT',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'Export',
|
|
181
|
+
value: 'EXPORT',
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
default: 'SEVAT',
|
|
185
|
+
description: 'Type of VAT applied',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
displayName: 'Website',
|
|
189
|
+
name: 'WWW',
|
|
190
|
+
type: 'string',
|
|
191
|
+
default: '',
|
|
192
|
+
description: "Customer's website URL",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
displayName: 'ZIP Code',
|
|
196
|
+
name: 'ZipCode',
|
|
197
|
+
type: 'string',
|
|
198
|
+
default: '',
|
|
199
|
+
description: "Customer's ZIP/postal code",
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
exports.properties = [
|
|
203
|
+
{
|
|
204
|
+
displayName: 'Customer Number',
|
|
205
|
+
name: 'customerNumber',
|
|
206
|
+
type: 'string',
|
|
207
|
+
required: true,
|
|
208
|
+
default: '',
|
|
209
|
+
description: 'Unique identifier for customer',
|
|
210
|
+
displayOptions: {
|
|
211
|
+
show: {
|
|
212
|
+
resource: ['customer'],
|
|
213
|
+
operation: ['update'],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
displayName: 'Fields',
|
|
219
|
+
name: 'fields',
|
|
220
|
+
type: 'collection',
|
|
221
|
+
placeholder: 'Add Field',
|
|
222
|
+
default: {},
|
|
223
|
+
displayOptions: {
|
|
224
|
+
show: {
|
|
225
|
+
resource: ['customer'],
|
|
226
|
+
operation: ['update'],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
options: [...updateProperties],
|
|
230
|
+
},
|
|
231
|
+
];
|
|
232
|
+
async function execute(i) {
|
|
233
|
+
const customerNumber = this.getNodeParameter('customerNumber', i);
|
|
234
|
+
const fields = this.getNodeParameter('fields', i, {});
|
|
235
|
+
if (Object.keys(fields).length === 0) {
|
|
236
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'At least one field must be provided for update');
|
|
237
|
+
}
|
|
238
|
+
if (fields.name && fields.name === '') {
|
|
239
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Customer name cannot be empty');
|
|
240
|
+
}
|
|
241
|
+
if (fields.Currency) {
|
|
242
|
+
fields.Currency = String(fields.Currency).toUpperCase();
|
|
243
|
+
if ((0, currency_codes_1.code)(fields.Currency) === undefined) {
|
|
244
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid currency code: ${fields.Currency}. Use ISO 4217 currency code.`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const body = {
|
|
248
|
+
Customer: {
|
|
249
|
+
...fields,
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
|
|
253
|
+
return await (0, transport_1.apiRequest)(this, {
|
|
254
|
+
method: 'PUT',
|
|
255
|
+
endpoint: endpoint,
|
|
256
|
+
body: body,
|
|
257
|
+
}, {
|
|
258
|
+
id: customerNumber,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=update.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/update.operation.ts"],"names":[],"mappings":";;;AA6OA,0BAkDC;AA/RD,+CAKsB;AACtB,kDAAgD;AAEhD,mDAAsD;AAEzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,6BAA6B;IAC1C,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEF,MAAM,gBAAgB,GAAsB;IACxC;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,eAAe;KAC/B;IACD;QACI,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,gCAAgC;KAChD;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;KAC5C;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;KAC9C;IACD;QACI,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iBAAiB;KACjC;IACD;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6BAA6B;KAC7C;IACD;QACI,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EA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CAAC;QAClB,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;QACxD,IAAI,IAAA,qBAAY,EAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;YAC9C,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,0BAA0B,MAAM,CAAC,QAAQ,+BAA+B,CAC3E,CAAC;QACN,CAAC;IACL,CAAC;IAED,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE;YACN,GAAG,MAAM;SACZ;KACJ,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IAEpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortParameters = void 0;
|
|
4
|
+
const sortByDefinitions = [
|
|
5
|
+
['Customer Number', 'customernumber'],
|
|
6
|
+
['Name', 'name'],
|
|
7
|
+
];
|
|
8
|
+
function createSortProperties(parameters) {
|
|
9
|
+
const options = parameters.map(([displayName, fieldName]) => {
|
|
10
|
+
return {
|
|
11
|
+
name: displayName,
|
|
12
|
+
value: fieldName,
|
|
13
|
+
description: `Sort by ${displayName.toLowerCase()}`,
|
|
14
|
+
};
|
|
15
|
+
});
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Sort by',
|
|
19
|
+
name: 'sortby',
|
|
20
|
+
type: 'options',
|
|
21
|
+
noDataExpression: true,
|
|
22
|
+
options: options,
|
|
23
|
+
default: options[0].value,
|
|
24
|
+
placeholder: 'Select a field to sort by',
|
|
25
|
+
description: 'Select a field to sort by',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
exports.sortParameters = createSortProperties(sortByDefinitions);
|
|
30
|
+
//# sourceMappingURL=sortParameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/sortParameters.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACtB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;IACrC,CAAC,MAAM,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,SAAS,oBAAoB,CAAC,UAAsB;IAChD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE;QACxD,OAAO;YACH,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,WAAW,WAAW,CAAC,WAAW,EAAE,EAAE;SACtD,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,OAAO;QACH;YACI,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,SAA8B;YACpC,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK;YACzB,WAAW,EAAE,2BAA2B;YACxC,WAAW,EAAE,2BAA2B;SAC3C;KACJ,CAAC;AACN,CAAC;AAEY,QAAA,cAAc,GACvB,oBAAoB,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterParameters = void 0;
|
|
4
|
+
const commons_1 = require("../../commons");
|
|
5
|
+
const optionParametersDefinitions = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Invoice Status',
|
|
8
|
+
name: 'filter',
|
|
9
|
+
parameters: [
|
|
10
|
+
['Cancelled', 'cancelled'],
|
|
11
|
+
['Fully Paid', 'fullypaid'],
|
|
12
|
+
['Unbooked', 'unbooked'],
|
|
13
|
+
['Unpaid', 'unpaid'],
|
|
14
|
+
['Unpaid And Overdue', 'unpaidoverdue'],
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Invoice Type',
|
|
19
|
+
name: 'InvoiceType',
|
|
20
|
+
parameters: [
|
|
21
|
+
['Invoice', 'invoice'],
|
|
22
|
+
['Agreement Invoice', 'agreementinvoice'],
|
|
23
|
+
['Intrest Invoice', 'intrestinvoice'],
|
|
24
|
+
['Summery Invoice', 'summaryinvoice'],
|
|
25
|
+
['Cash Invoice', 'cashinvoice'],
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
const parametersDefinitions = [
|
|
30
|
+
['Account Number From', 'accountnumberfrom', 'string', '', {}],
|
|
31
|
+
['Account Number To', 'accountnumberto', 'string', '', {}],
|
|
32
|
+
['Article Description', 'articledescription', 'string', '', {}],
|
|
33
|
+
['Article Number', 'articlenumber', 'string', '', {}],
|
|
34
|
+
['Cost Center', 'costcenter', 'string', '', {}],
|
|
35
|
+
['Credit', 'credit', 'string', '', {}],
|
|
36
|
+
['Currency', 'currency', 'string', '', {}],
|
|
37
|
+
['Customer Name', 'customername', 'string', '', {}],
|
|
38
|
+
['Customer Number', 'customernumber', 'string', '', {}],
|
|
39
|
+
['Document Number', 'documentnumber', 'string', '', {}],
|
|
40
|
+
[
|
|
41
|
+
'External Invoice Reference 1',
|
|
42
|
+
'externalinvoicereference1',
|
|
43
|
+
'string',
|
|
44
|
+
'',
|
|
45
|
+
{},
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
'External Invoice Reference 2',
|
|
49
|
+
'externalinvoicereference2',
|
|
50
|
+
'string',
|
|
51
|
+
'',
|
|
52
|
+
{},
|
|
53
|
+
],
|
|
54
|
+
['From Date', 'fromdate', 'string', '', {}],
|
|
55
|
+
['From Final Pay Date', 'fromfinalpaydate', 'string', '', {}],
|
|
56
|
+
['Label', 'label', 'string', '', {}],
|
|
57
|
+
['Last Modified', 'lastmodified', 'string', '', {}],
|
|
58
|
+
['Not Completed', 'notcomplete', 'string', '', {}],
|
|
59
|
+
['OCR', 'ocr', 'string', '', {}],
|
|
60
|
+
['Our Reference', 'ourreference', 'string', '', {}],
|
|
61
|
+
['Project', 'project', 'string', '', {}],
|
|
62
|
+
['Sent', 'sent', 'boolean', false, {}],
|
|
63
|
+
['To Date', 'todate', 'string', '', {}],
|
|
64
|
+
['To Final Pay Date', 'tofinalpaydate', 'string', '', {}],
|
|
65
|
+
['Your Order Number', 'yourordernumber', 'string', '', {}],
|
|
66
|
+
['Your Reference', 'yourreference', 'string', '', {}],
|
|
67
|
+
];
|
|
68
|
+
exports.filterParameters = [
|
|
69
|
+
...optionParametersDefinitions.map((option) => (0, commons_1.createOptionParameter)(option)),
|
|
70
|
+
...parametersDefinitions.map(([displayName, name, filterType, defaultValue, typeOptions]) => (0, commons_1.createParameter)(displayName, name, filterType, defaultValue, typeOptions)),
|
|
71
|
+
];
|
|
72
|
+
//# sourceMappingURL=filterParameters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/filterParameters.ts"],"names":[],"mappings":";;;AACA,2CAKuB;AAEvB,MAAM,2BAA2B,GAAgC;IAC7D;QACI,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,CAAC,WAAW,EAAE,WAAW,CAAC;YAC1B,CAAC,YAAY,EAAE,WAAW,CAAC;YAC3B,CAAC,UAAU,EAAE,UAAU,CAAC;YACxB,CAAC,QAAQ,EAAE,QAAQ,CAAC;YACpB,CAAC,oBAAoB,EAAE,eAAe,CAA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,EAAE,WAAW,CAAC,EAAE,EAAE,CAC3D,IAAA,yBAAe,EACX,WAAW,EACX,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,WAAW,CACd,CACR;CACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const invoiceProperties: INodeProperties[];
|
|
3
|
+
export declare function invoiceOperations(this: IExecuteFunctions, { operation, i }: {
|
|
4
|
+
operation: string;
|
|
5
|
+
i: number;
|
|
6
|
+
}): Promise<import("./model").CreateInvoiceResponse | import("./model").GetInvoiceResponse | import("./model").GetAllInvoicesResponse | null>;
|
|
7
|
+
export * from './operations';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.invoiceProperties = void 0;
|
|
40
|
+
exports.invoiceOperations = invoiceOperations;
|
|
41
|
+
const operations = __importStar(require("./operations"));
|
|
42
|
+
const modules_1 = require("../../../modules");
|
|
43
|
+
const moduleHandler = new modules_1.N8NOperationModuleHandler([
|
|
44
|
+
operations.createSingleInvoice,
|
|
45
|
+
operations.getManyInvoices,
|
|
46
|
+
operations.getSingleInvoice,
|
|
47
|
+
operations.updateSingleInvoice,
|
|
48
|
+
]);
|
|
49
|
+
exports.invoiceProperties = [
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Operation',
|
|
52
|
+
name: 'operation',
|
|
53
|
+
type: 'options',
|
|
54
|
+
noDataExpression: true,
|
|
55
|
+
displayOptions: {
|
|
56
|
+
show: {
|
|
57
|
+
resource: ['invoice'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
options: moduleHandler.getDescriptions(),
|
|
61
|
+
default: 'getAll',
|
|
62
|
+
},
|
|
63
|
+
...moduleHandler.getProperties(),
|
|
64
|
+
];
|
|
65
|
+
async function invoiceOperations({ operation, i }) {
|
|
66
|
+
if (operation === 'create') {
|
|
67
|
+
return await operations.createSingleInvoice.execute.call(this, i);
|
|
68
|
+
}
|
|
69
|
+
else if (operation === 'get') {
|
|
70
|
+
return await operations.getSingleInvoice.execute.call(this, i);
|
|
71
|
+
}
|
|
72
|
+
else if (operation === 'getAll') {
|
|
73
|
+
return await operations.getManyInvoices.execute.call(this, i);
|
|
74
|
+
}
|
|
75
|
+
else if (operation === 'update') {
|
|
76
|
+
return await operations.updateSingleInvoice.execute.call(this, i);
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
__exportStar(require("./operations"), exports);
|
|
81
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,8CAcC;AAzCD,yDAA2C;AAC3C,8CAA6D;AAE7D,MAAM,aAAa,GAAG,IAAI,mCAAyB,CAAC;IAChD,UAAU,CAAC,mBAAmB;IAC9B,UAAU,CAAC,eAAe;IAC1B,UAAU,CAAC,gBAAgB;IAC3B,UAAU,CAAC,mBAAmB;CACjC,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAsB;IAChD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAA8B;QACpC,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,aAAa,CAAC,eAAe,EAAE;QACxC,OAAO,EAAE,QAAQ;KACpB;IACD,GAAG,aAAa,CAAC,aAAa,EAAE;CACnC,CAAC;AAEK,KAAK,UAAU,iBAAiB,CAEnC,EAAE,SAAS,EAAE,CAAC,EAAoC;IAElD,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,MAAM,UAAU,CAAC,mBAAmB,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