@limetech/n8n-nodes-lime 2.7.0-dev.1 → 3.1.0
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/.devcontainer/devcontainer.json +44 -0
- package/.devcontainer/docker-compose.yml +27 -0
- package/.gitattributes +34 -0
- package/.nvmrc +1 -0
- package/CHANGELOG.md +17 -5
- package/README.md +40 -47
- package/credentials/index.ts +0 -1
- package/dist/credentials/index.d.ts +0 -1
- package/dist/credentials/index.js +0 -1
- package/dist/credentials/index.js.map +1 -1
- package/dist/nodes/index.d.ts +0 -1
- package/dist/nodes/index.js +0 -1
- package/dist/nodes/index.js.map +1 -1
- package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +1 -4
- package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -3
- package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +0 -2
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +0 -43
- package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -1
- package/dist/nodes/lime-crm/methods/index.d.ts +2 -2
- package/dist/nodes/lime-crm/methods/index.js +1 -4
- package/dist/nodes/lime-crm/methods/index.js.map +1 -1
- package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +0 -1
- package/dist/nodes/lime-crm/methods/resourceMapping.js +0 -46
- package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -1
- package/dist/nodes/lime-crm/models/limetype.d.ts +0 -1
- package/dist/nodes/lime-crm/resources/data/index.d.ts +1 -1
- package/dist/nodes/lime-crm/resources/data/index.js +0 -20
- package/dist/nodes/lime-crm/resources/data/index.js.map +1 -1
- package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +0 -4
- package/dist/nodes/lime-crm/resources/data/operations/index.js +1 -5
- package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/index.d.ts +0 -1
- package/dist/nodes/lime-crm/transport/index.js +1 -6
- package/dist/nodes/lime-crm/transport/index.js.map +1 -1
- package/dist/nodes/lime-crm/transport/limetypes.js +4 -15
- package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
- package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
- package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/dist/package.json +5 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/index.ts +0 -1
- package/nodes/lime-crm/LimeCrmNode.node.ts +0 -6
- package/nodes/lime-crm/methods/getLimetypeProperties.ts +0 -84
- package/nodes/lime-crm/methods/index.ts +0 -3
- package/nodes/lime-crm/methods/resourceMapping.ts +0 -76
- package/nodes/lime-crm/models/limetype.ts +0 -1
- package/nodes/lime-crm/resources/data/index.ts +1 -34
- package/nodes/lime-crm/resources/data/operations/index.ts +0 -17
- package/nodes/lime-crm/transport/index.ts +0 -8
- package/nodes/lime-crm/transport/limetypes.ts +8 -26
- package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
- package/nodes/lime-forms/assets/lime-crm.svg +1 -0
- package/package.json +6 -13
- package/credentials/FortnoxApi.credentials.ts +0 -61
- package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
- package/dist/credentials/FortnoxApi.credentials.js +0 -57
- package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
- package/dist/nodes/fortnox/Fortnox.node.js +0 -95
- package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
- package/dist/nodes/fortnox/Fortnox.node.json +0 -18
- package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
- package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
- package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
- package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/dist/nodes/fortnox/commons.d.ts +0 -25
- package/dist/nodes/fortnox/commons.js +0 -44
- package/dist/nodes/fortnox/commons.js.map +0 -1
- package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/dist/nodes/fortnox/index.d.ts +0 -6
- package/dist/nodes/fortnox/index.js +0 -23
- package/dist/nodes/fortnox/index.js.map +0 -1
- package/dist/nodes/fortnox/model.d.ts +0 -20
- package/dist/nodes/fortnox/model.js +0 -3
- package/dist/nodes/fortnox/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
- package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -7
- package/dist/nodes/fortnox/resources/customers/index.js +0 -85
- package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
- package/dist/nodes/fortnox/resources/customers/model.js +0 -3
- package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
- package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -9
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
- package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
- package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
- package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +0 -5
- package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
- package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
- package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
- package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
- package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -7
- package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
- package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
- package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -147
- package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
- package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
- package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
- package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
- package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +0 -4
- package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
- package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
- package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
- package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
- package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
- package/dist/nodes/fortnox/transport/index.d.ts +0 -3
- package/dist/nodes/fortnox/transport/index.js +0 -76
- package/dist/nodes/fortnox/transport/index.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.d.ts +0 -5
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js +0 -230
- package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js +0 -241
- package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js.map +0 -1
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.d.ts +0 -9
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js +0 -16
- package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js.map +0 -1
- package/dist/nodes/lime-crm/transport/bulkimport.d.ts +0 -41
- package/dist/nodes/lime-crm/transport/bulkimport.js +0 -86
- package/dist/nodes/lime-crm/transport/bulkimport.js.map +0 -1
- package/dist/nodes/lime-forms/lime-forms.svg +0 -6
- package/docker-compose.yml +0 -0
- package/nodes/fortnox/Fortnox.node.json +0 -18
- package/nodes/fortnox/Fortnox.node.ts +0 -102
- package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
- package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
- package/nodes/fortnox/commons.ts +0 -94
- package/nodes/fortnox/fortnoxLogo.svg +0 -15
- package/nodes/fortnox/index.ts +0 -6
- package/nodes/fortnox/model.ts +0 -25
- package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
- package/nodes/fortnox/resources/customers/index.ts +0 -53
- package/nodes/fortnox/resources/customers/model.ts +0 -107
- package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
- package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
- package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
- package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
- package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
- package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
- package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
- package/nodes/fortnox/resources/invoice/index.ts +0 -49
- package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
- package/nodes/fortnox/resources/invoice/model.ts +0 -156
- package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
- package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
- package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
- package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
- package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
- package/nodes/fortnox/transport/errorCodes.ts +0 -62
- package/nodes/fortnox/transport/index.ts +0 -106
- package/nodes/lime-crm/resources/data/operations/bulkImportCommons.ts +0 -323
- package/nodes/lime-crm/resources/data/operations/createManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.ts +0 -364
- package/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.ts +0 -44
- package/nodes/lime-crm/transport/bulkimport.ts +0 -271
- package/nodes/lime-forms/lime-forms.svg +0 -6
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeProperties,
|
|
4
|
-
IDataObject,
|
|
5
|
-
NodeOperationError,
|
|
6
|
-
} from 'n8n-workflow';
|
|
7
|
-
import { apiRequest } from '../../../transport';
|
|
8
|
-
import { CustomerResponse } from '../model';
|
|
9
|
-
import { code as currencyCode } from 'currency-codes';
|
|
10
|
-
|
|
11
|
-
export const description = {
|
|
12
|
-
name: 'Update Customer',
|
|
13
|
-
value: 'update',
|
|
14
|
-
description: 'Update an existing customer',
|
|
15
|
-
action: 'Update a customer',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const updateProperties: INodeProperties[] = [
|
|
19
|
-
{
|
|
20
|
-
displayName: 'Name',
|
|
21
|
-
name: 'Name',
|
|
22
|
-
type: 'string',
|
|
23
|
-
default: '',
|
|
24
|
-
description: 'Customer name',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
displayName: 'Active',
|
|
28
|
-
name: 'Active',
|
|
29
|
-
type: 'boolean',
|
|
30
|
-
default: true,
|
|
31
|
-
description: 'Whether the customer is active',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
displayName: 'Address 1',
|
|
35
|
-
name: 'Address1',
|
|
36
|
-
type: 'string',
|
|
37
|
-
default: '',
|
|
38
|
-
description: "Customer's primary address",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
displayName: 'Address 2',
|
|
42
|
-
name: 'Address2',
|
|
43
|
-
type: 'string',
|
|
44
|
-
default: '',
|
|
45
|
-
description: "Customer's secondary address",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
displayName: 'City',
|
|
49
|
-
name: 'City',
|
|
50
|
-
type: 'string',
|
|
51
|
-
default: '',
|
|
52
|
-
description: "Customer's city",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
displayName: 'Comments',
|
|
56
|
-
name: 'Comments',
|
|
57
|
-
type: 'string',
|
|
58
|
-
default: '',
|
|
59
|
-
description: 'Comments about the customer',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
displayName: 'Currency',
|
|
63
|
-
name: 'Currency',
|
|
64
|
-
type: 'string',
|
|
65
|
-
default: '',
|
|
66
|
-
description: "Customer's currency code, e.g., SEK, EUR",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
displayName: 'Cost Center',
|
|
70
|
-
name: 'CostCenter',
|
|
71
|
-
type: 'string',
|
|
72
|
-
default: '',
|
|
73
|
-
description: "Customer's cost center",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
displayName: 'Country',
|
|
77
|
-
name: 'Country',
|
|
78
|
-
type: 'string',
|
|
79
|
-
default: '',
|
|
80
|
-
description: "Customer's country",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
displayName: 'Country Code',
|
|
84
|
-
name: 'CountryCode',
|
|
85
|
-
type: 'string',
|
|
86
|
-
default: '',
|
|
87
|
-
description: "Customer's country code",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
displayName: 'Email',
|
|
91
|
-
name: 'Email',
|
|
92
|
-
type: 'string',
|
|
93
|
-
default: '',
|
|
94
|
-
description: "Customer's email address",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
displayName: 'External Reference',
|
|
98
|
-
name: 'ExternalReference',
|
|
99
|
-
type: 'string',
|
|
100
|
-
default: '',
|
|
101
|
-
description: 'External reference for the customer',
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
displayName: 'Fax',
|
|
105
|
-
name: 'Fax',
|
|
106
|
-
type: 'string',
|
|
107
|
-
default: '',
|
|
108
|
-
description: "Customer's fax number",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
displayName: 'GLN',
|
|
112
|
-
name: 'GLN',
|
|
113
|
-
type: 'string',
|
|
114
|
-
default: '',
|
|
115
|
-
description: 'Global Location Number',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
displayName: 'Organisation Number',
|
|
119
|
-
name: 'OrganisationNumber',
|
|
120
|
-
type: 'string',
|
|
121
|
-
default: '',
|
|
122
|
-
description: "Customer's organisation number",
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
displayName: 'Phone 1',
|
|
126
|
-
name: 'Phone1',
|
|
127
|
-
type: 'string',
|
|
128
|
-
default: '',
|
|
129
|
-
description: "Customer's primary phone number",
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
displayName: 'Phone 2',
|
|
133
|
-
name: 'Phone2',
|
|
134
|
-
type: 'string',
|
|
135
|
-
default: '',
|
|
136
|
-
description: "Customer's secondary phone number",
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
displayName: 'Type',
|
|
140
|
-
name: 'Type',
|
|
141
|
-
type: 'options',
|
|
142
|
-
options: [
|
|
143
|
-
{
|
|
144
|
-
name: 'Private',
|
|
145
|
-
value: 'PRIVATE',
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
name: 'Company',
|
|
149
|
-
value: 'COMPANY',
|
|
150
|
-
},
|
|
151
|
-
],
|
|
152
|
-
default: 'COMPANY',
|
|
153
|
-
description: 'Type of customer',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
displayName: 'VAT Number',
|
|
157
|
-
name: 'VATNumber',
|
|
158
|
-
type: 'string',
|
|
159
|
-
default: '',
|
|
160
|
-
description: "Customer's VAT number",
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
displayName: 'VAT Type',
|
|
164
|
-
name: 'VATType',
|
|
165
|
-
type: 'options',
|
|
166
|
-
options: [
|
|
167
|
-
{
|
|
168
|
-
name: 'SE VAT',
|
|
169
|
-
value: 'SEVAT',
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: 'SE Reversed VAT',
|
|
173
|
-
value: 'SEREVERSEDVAT',
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
name: 'EU Reversed VAT',
|
|
177
|
-
value: 'EUREVERSEDVAT',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: 'EU VAT',
|
|
181
|
-
value: 'EUVAT',
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
name: 'Export',
|
|
185
|
-
value: 'EXPORT',
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
default: 'SEVAT',
|
|
189
|
-
description: 'Type of VAT applied',
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
displayName: 'Website',
|
|
193
|
-
name: 'WWW',
|
|
194
|
-
type: 'string',
|
|
195
|
-
default: '',
|
|
196
|
-
description: "Customer's website URL",
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
displayName: 'ZIP Code',
|
|
200
|
-
name: 'ZipCode',
|
|
201
|
-
type: 'string',
|
|
202
|
-
default: '',
|
|
203
|
-
description: "Customer's ZIP/postal code",
|
|
204
|
-
},
|
|
205
|
-
];
|
|
206
|
-
|
|
207
|
-
export const properties: INodeProperties[] = [
|
|
208
|
-
{
|
|
209
|
-
displayName: 'Customer Number',
|
|
210
|
-
name: 'customerNumber',
|
|
211
|
-
type: 'string',
|
|
212
|
-
required: true,
|
|
213
|
-
default: '',
|
|
214
|
-
description: 'Unique identifier for customer',
|
|
215
|
-
displayOptions: {
|
|
216
|
-
show: {
|
|
217
|
-
resource: ['customer'],
|
|
218
|
-
operation: ['update'],
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
displayName: 'Fields',
|
|
224
|
-
name: 'fields',
|
|
225
|
-
type: 'collection',
|
|
226
|
-
placeholder: 'Add Field',
|
|
227
|
-
default: {},
|
|
228
|
-
displayOptions: {
|
|
229
|
-
show: {
|
|
230
|
-
resource: ['customer'],
|
|
231
|
-
operation: ['update'],
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
options: [...updateProperties],
|
|
235
|
-
},
|
|
236
|
-
];
|
|
237
|
-
|
|
238
|
-
export async function execute(
|
|
239
|
-
this: IExecuteFunctions,
|
|
240
|
-
i: number
|
|
241
|
-
): Promise<CustomerResponse> {
|
|
242
|
-
const customerNumber = this.getNodeParameter('customerNumber', i) as string;
|
|
243
|
-
const fields = this.getNodeParameter('fields', i, {}) as IDataObject;
|
|
244
|
-
|
|
245
|
-
if (Object.keys(fields).length === 0) {
|
|
246
|
-
throw new NodeOperationError(
|
|
247
|
-
this.getNode(),
|
|
248
|
-
'At least one field must be provided for update'
|
|
249
|
-
);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
if (fields.name && fields.name === '') {
|
|
253
|
-
throw new NodeOperationError(
|
|
254
|
-
this.getNode(),
|
|
255
|
-
'Customer name cannot be empty'
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
if (fields.Currency) {
|
|
260
|
-
fields.Currency = String(fields.Currency).toUpperCase();
|
|
261
|
-
if (currencyCode(fields.Currency) === undefined) {
|
|
262
|
-
throw new NodeOperationError(
|
|
263
|
-
this.getNode(),
|
|
264
|
-
`Invalid currency code: ${fields.Currency}. Use ISO 4217 currency code.`
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const body = {
|
|
270
|
-
Customer: {
|
|
271
|
-
...fields,
|
|
272
|
-
},
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
|
|
276
|
-
|
|
277
|
-
return await apiRequest<CustomerResponse>(
|
|
278
|
-
this,
|
|
279
|
-
{
|
|
280
|
-
method: 'PUT',
|
|
281
|
-
endpoint: endpoint,
|
|
282
|
-
body: body,
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
id: customerNumber,
|
|
286
|
-
}
|
|
287
|
-
);
|
|
288
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { INodeProperties, NodePropertyTypes } from 'n8n-workflow';
|
|
2
|
-
|
|
3
|
-
const sortByDefinitions = [
|
|
4
|
-
['Customer Number', 'customernumber'],
|
|
5
|
-
['Name', 'name'],
|
|
6
|
-
];
|
|
7
|
-
|
|
8
|
-
function createSortProperties(parameters: string[][]): INodeProperties[] {
|
|
9
|
-
const options = parameters.map(([displayName, fieldName]) => {
|
|
10
|
-
return {
|
|
11
|
-
name: displayName,
|
|
12
|
-
value: fieldName,
|
|
13
|
-
description: `Sort by ${displayName.toLowerCase()}`,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
return [
|
|
18
|
-
{
|
|
19
|
-
displayName: 'Sort by',
|
|
20
|
-
name: 'sortby',
|
|
21
|
-
type: 'options' as NodePropertyTypes,
|
|
22
|
-
noDataExpression: true,
|
|
23
|
-
options: options,
|
|
24
|
-
default: options[0].value,
|
|
25
|
-
placeholder: 'Select a field to sort by',
|
|
26
|
-
description: 'Select a field to sort by',
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const sortParameters: INodeProperties[] =
|
|
32
|
-
createSortProperties(sortByDefinitions);
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import {
|
|
3
|
-
createOptionParameter,
|
|
4
|
-
createParameter,
|
|
5
|
-
ParameterDefinition,
|
|
6
|
-
OptionParameterDefinition,
|
|
7
|
-
} from '../../commons';
|
|
8
|
-
|
|
9
|
-
const optionParametersDefinitions: OptionParameterDefinition[] = [
|
|
10
|
-
{
|
|
11
|
-
displayName: 'Invoice Status',
|
|
12
|
-
name: 'filter',
|
|
13
|
-
parameters: [
|
|
14
|
-
['Cancelled', 'cancelled'],
|
|
15
|
-
['Fully Paid', 'fullypaid'],
|
|
16
|
-
['Unbooked', 'unbooked'],
|
|
17
|
-
['Unpaid', 'unpaid'],
|
|
18
|
-
['Unpaid And Overdue', 'unpaidoverdue'],
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
displayName: 'Invoice Type',
|
|
23
|
-
name: 'InvoiceType',
|
|
24
|
-
parameters: [
|
|
25
|
-
['Invoice', 'invoice'],
|
|
26
|
-
['Agreement Invoice', 'agreementinvoice'],
|
|
27
|
-
['Intrest Invoice', 'intrestinvoice'],
|
|
28
|
-
['Summery Invoice', 'summaryinvoice'],
|
|
29
|
-
['Cash Invoice', 'cashinvoice'],
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
const parametersDefinitions: ParameterDefinition[] = [
|
|
35
|
-
['Account Number From', 'accountnumberfrom', 'string', '', {}],
|
|
36
|
-
['Account Number To', 'accountnumberto', 'string', '', {}],
|
|
37
|
-
['Article Description', 'articledescription', 'string', '', {}],
|
|
38
|
-
['Article Number', 'articlenumber', 'string', '', {}],
|
|
39
|
-
['Cost Center', 'costcenter', 'string', '', {}],
|
|
40
|
-
['Credit', 'credit', 'string', '', {}],
|
|
41
|
-
['Currency', 'currency', 'string', '', {}],
|
|
42
|
-
['Customer Name', 'customername', 'string', '', {}],
|
|
43
|
-
['Customer Number', 'customernumber', 'string', '', {}],
|
|
44
|
-
['Document Number', 'documentnumber', 'string', '', {}],
|
|
45
|
-
[
|
|
46
|
-
'External Invoice Reference 1',
|
|
47
|
-
'externalinvoicereference1',
|
|
48
|
-
'string',
|
|
49
|
-
'',
|
|
50
|
-
{},
|
|
51
|
-
],
|
|
52
|
-
[
|
|
53
|
-
'External Invoice Reference 2',
|
|
54
|
-
'externalinvoicereference2',
|
|
55
|
-
'string',
|
|
56
|
-
'',
|
|
57
|
-
{},
|
|
58
|
-
],
|
|
59
|
-
['From Date', 'fromdate', 'string', '', {}],
|
|
60
|
-
['From Final Pay Date', 'fromfinalpaydate', 'string', '', {}],
|
|
61
|
-
['Label', 'label', 'string', '', {}],
|
|
62
|
-
['Last Modified', 'lastmodified', 'string', '', {}],
|
|
63
|
-
['Not Completed', 'notcomplete', 'string', '', {}],
|
|
64
|
-
['OCR', 'ocr', 'string', '', {}],
|
|
65
|
-
['Our Reference', 'ourreference', 'string', '', {}],
|
|
66
|
-
['Project', 'project', 'string', '', {}],
|
|
67
|
-
['Sent', 'sent', 'boolean', false, {}],
|
|
68
|
-
['To Date', 'todate', 'string', '', {}],
|
|
69
|
-
['To Final Pay Date', 'tofinalpaydate', 'string', '', {}],
|
|
70
|
-
['Your Order Number', 'yourordernumber', 'string', '', {}],
|
|
71
|
-
['Your Reference', 'yourreference', 'string', '', {}],
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
export const filterParameters: INodeProperties[] = [
|
|
75
|
-
...optionParametersDefinitions.map((option) =>
|
|
76
|
-
createOptionParameter(option)
|
|
77
|
-
),
|
|
78
|
-
...parametersDefinitions.map(
|
|
79
|
-
([displayName, name, filterType, defaultValue, typeOptions]) =>
|
|
80
|
-
createParameter(
|
|
81
|
-
displayName,
|
|
82
|
-
name,
|
|
83
|
-
filterType,
|
|
84
|
-
defaultValue,
|
|
85
|
-
typeOptions
|
|
86
|
-
)
|
|
87
|
-
),
|
|
88
|
-
];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IExecuteFunctions,
|
|
3
|
-
INodeProperties,
|
|
4
|
-
NodePropertyTypes,
|
|
5
|
-
} from 'n8n-workflow';
|
|
6
|
-
|
|
7
|
-
import * as operations from './operations';
|
|
8
|
-
import { N8NOperationModuleHandler } from '../../../modules';
|
|
9
|
-
|
|
10
|
-
const moduleHandler = new N8NOperationModuleHandler([
|
|
11
|
-
operations.createSingleInvoice,
|
|
12
|
-
operations.getManyInvoices,
|
|
13
|
-
operations.getSingleInvoice,
|
|
14
|
-
operations.updateSingleInvoice,
|
|
15
|
-
]);
|
|
16
|
-
|
|
17
|
-
export const invoiceProperties: INodeProperties[] = [
|
|
18
|
-
{
|
|
19
|
-
displayName: 'Operation',
|
|
20
|
-
name: 'operation',
|
|
21
|
-
type: 'options' as NodePropertyTypes,
|
|
22
|
-
noDataExpression: true,
|
|
23
|
-
displayOptions: {
|
|
24
|
-
show: {
|
|
25
|
-
resource: ['invoice'],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
options: moduleHandler.getDescriptions(),
|
|
29
|
-
default: 'getAll',
|
|
30
|
-
},
|
|
31
|
-
...moduleHandler.getProperties(),
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
export async function invoiceOperations(
|
|
35
|
-
this: IExecuteFunctions,
|
|
36
|
-
{ operation, i }: { operation: string; i: number }
|
|
37
|
-
) {
|
|
38
|
-
if (operation === 'create') {
|
|
39
|
-
return await operations.createSingleInvoice.execute.call(this, i);
|
|
40
|
-
} else if (operation === 'get') {
|
|
41
|
-
return await operations.getSingleInvoice.execute.call(this, i);
|
|
42
|
-
} else if (operation === 'getAll') {
|
|
43
|
-
return await operations.getManyInvoices.execute.call(this, i);
|
|
44
|
-
} else if (operation === 'update') {
|
|
45
|
-
return await operations.updateSingleInvoice.execute.call(this, i);
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
export * from './operations';
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
import { INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import {
|
|
3
|
-
createCollectionParameter,
|
|
4
|
-
createOptionParameter,
|
|
5
|
-
createParameter,
|
|
6
|
-
CollectionParameterDefinition,
|
|
7
|
-
OptionParameterDefinition,
|
|
8
|
-
ParameterDefinition,
|
|
9
|
-
} from '../../commons';
|
|
10
|
-
|
|
11
|
-
const optionParametersDefinitions: OptionParameterDefinition[] = [
|
|
12
|
-
{
|
|
13
|
-
displayName: 'Invoice Type',
|
|
14
|
-
name: 'InvoiceType',
|
|
15
|
-
parameters: [
|
|
16
|
-
['Invoice', 'INVOICE'],
|
|
17
|
-
['Agreement Invoice', 'AGREEMENTINVOICE'],
|
|
18
|
-
['Intrest Invoice', 'INTRESTINVOICE'],
|
|
19
|
-
['Summery Invoice', 'SUMMARYINVOICE'],
|
|
20
|
-
['Cash Invoice', 'CASHINVOICE'],
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
displayName: 'Language',
|
|
25
|
-
name: 'Language',
|
|
26
|
-
parameters: [
|
|
27
|
-
['Svenska', 'SV'],
|
|
28
|
-
['English', 'EN'],
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
displayName: 'Tax Reduction Type',
|
|
33
|
-
name: 'TaxReductionType',
|
|
34
|
-
parameters: [
|
|
35
|
-
['None', 'none'],
|
|
36
|
-
['Rot', 'rot'],
|
|
37
|
-
['Rut', 'rut'],
|
|
38
|
-
['Green', 'green'],
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
const collectionParametersDefinitions: CollectionParameterDefinition[] = [
|
|
44
|
-
{
|
|
45
|
-
displayName: 'EDI Information',
|
|
46
|
-
name: 'EDIInformation',
|
|
47
|
-
parameters: [
|
|
48
|
-
[
|
|
49
|
-
'EDI Global Location Number',
|
|
50
|
-
'EDIGlobalLocationNumber',
|
|
51
|
-
'string',
|
|
52
|
-
'',
|
|
53
|
-
{},
|
|
54
|
-
],
|
|
55
|
-
[
|
|
56
|
-
'EDI Global Location Number Delivery',
|
|
57
|
-
'EDIGlobalLocationNumberDelivery',
|
|
58
|
-
'string',
|
|
59
|
-
'',
|
|
60
|
-
{},
|
|
61
|
-
],
|
|
62
|
-
['EDI Invoice Extra1', 'EDIInvoiceExtra1', 'string', '', {}],
|
|
63
|
-
['EDI Invoice Extra2', 'EDIInvoiceExtra2', 'string', '', {}],
|
|
64
|
-
[
|
|
65
|
-
'EDI Our Electronic Reference',
|
|
66
|
-
'EDIOurElectronicReference',
|
|
67
|
-
'string',
|
|
68
|
-
'',
|
|
69
|
-
{},
|
|
70
|
-
],
|
|
71
|
-
[
|
|
72
|
-
'EDI Your Electronic Reference',
|
|
73
|
-
'EDIYourElectronicReference',
|
|
74
|
-
'string',
|
|
75
|
-
'',
|
|
76
|
-
{},
|
|
77
|
-
],
|
|
78
|
-
],
|
|
79
|
-
multipleValues: false,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
displayName: 'Email Information',
|
|
83
|
-
name: 'EmailInformation',
|
|
84
|
-
parameters: [
|
|
85
|
-
['Email Address BCC', 'EmailAddressBCC', 'string', '', {}],
|
|
86
|
-
['Email Address CC', 'EmailAddressCC', 'string', '', {}],
|
|
87
|
-
['Email Address From', 'EmailAddressFrom', 'string', '', {}],
|
|
88
|
-
['Email Address To', 'EmailAddressTo', 'string', '', {}],
|
|
89
|
-
['Email Body', 'EmailBody', 'string', '', {}],
|
|
90
|
-
['Email Subject', 'EmailSubject', 'string', '', {}],
|
|
91
|
-
],
|
|
92
|
-
multipleValues: false,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
displayName: 'Invoice Rows',
|
|
96
|
-
name: 'InvoiceRows',
|
|
97
|
-
parameters: [
|
|
98
|
-
['Account Number', 'AccountNumber', 'number', 0, {}],
|
|
99
|
-
['Article Number', 'ArticleNumber', 'string', '', {}],
|
|
100
|
-
['Cost Center', 'CostCenter', 'string', '', {}],
|
|
101
|
-
['Delivered Quantity', 'DeliveredQuantity', 'string', '', {}],
|
|
102
|
-
['Description', 'Description', 'string', '', {}],
|
|
103
|
-
['Discount', 'Discount', 'number', 0, { numberPrecision: 2 }],
|
|
104
|
-
['Discount Type', 'DiscountType', 'string', '', {}],
|
|
105
|
-
['House Work', 'HouseWork', 'boolean', false, {}],
|
|
106
|
-
[
|
|
107
|
-
'House Work Hours To Report',
|
|
108
|
-
'HouseWorkHoursToReport',
|
|
109
|
-
'number',
|
|
110
|
-
0,
|
|
111
|
-
{},
|
|
112
|
-
],
|
|
113
|
-
['House Work Type', 'HouseWorkType', 'string', '', {}],
|
|
114
|
-
['Price', 'Price', 'number', 0, { numberPrecision: 2 }],
|
|
115
|
-
['Project', 'Project', 'string', '', {}],
|
|
116
|
-
['Row ID', 'RowId', 'number', 0, {}],
|
|
117
|
-
['Stock Point Code', 'StockPointCode', 'string', '', {}],
|
|
118
|
-
['Unit', 'Unit', 'string', '', {}],
|
|
119
|
-
['VAT', 'VAT', 'number', 0, {}],
|
|
120
|
-
['VAT Code', 'VATCode', 'string', '', {}],
|
|
121
|
-
],
|
|
122
|
-
multipleValues: true,
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
displayName: 'Labels',
|
|
126
|
-
name: 'Labels',
|
|
127
|
-
parameters: [['Label ID', 'Id', 'number', 0, {}]],
|
|
128
|
-
multipleValues: true,
|
|
129
|
-
},
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
const parametersDefinitions: ParameterDefinition[] = [
|
|
133
|
-
['Address1', 'Address1', 'string', '', {}],
|
|
134
|
-
['Address2', 'Address2', 'string', '', {}],
|
|
135
|
-
[
|
|
136
|
-
'Administration Fee',
|
|
137
|
-
'AdministrationFee',
|
|
138
|
-
'number',
|
|
139
|
-
0,
|
|
140
|
-
{ numberPrecision: 2 },
|
|
141
|
-
],
|
|
142
|
-
['City', 'City', 'string', '', {}],
|
|
143
|
-
['Comments', 'Comments', 'string', '', {}],
|
|
144
|
-
['Cost Center', 'CostCenter', 'string', '', {}],
|
|
145
|
-
['Country', 'Country', 'string', '', {}],
|
|
146
|
-
['Credit Invoice Reference', 'CreditInvoiceReference', 'string', '', {}],
|
|
147
|
-
['Currency', 'Currency', 'string', '', {}],
|
|
148
|
-
['Currency Rate', 'CurrencyRate', 'number', 0, { numberPrecision: 2 }],
|
|
149
|
-
['Currency Unit', 'CurrencyUnit', 'number', 0, {}],
|
|
150
|
-
['Customer Name', 'CustomerName', 'string', '', {}],
|
|
151
|
-
['Delivery Address1', 'DeliveryAddress1', 'string', '', {}],
|
|
152
|
-
['Delivery Address2', 'DeliveryAddress2', 'string', '', {}],
|
|
153
|
-
['Delivery City', 'DeliveryCity', 'string', '', {}],
|
|
154
|
-
['Delivery Country', 'DeliveryCountry', 'string', '', {}],
|
|
155
|
-
['Delivery Date', 'DeliveryDate', 'string', '', {}],
|
|
156
|
-
['Delivery Name', 'DeliveryName', 'string', '', {}],
|
|
157
|
-
['Delivery Zip Code', 'DeliveryZipCode', 'string', '', {}],
|
|
158
|
-
['Document Number', 'DocumentNumber', 'string', '', {}],
|
|
159
|
-
['Due Date', 'DueDate', 'string', '', {}],
|
|
160
|
-
['EU Quarterly Report', 'EuQuarterlyReport', 'boolean', false, {}],
|
|
161
|
-
[
|
|
162
|
-
'External Invoice Reference1',
|
|
163
|
-
'ExternalInvoiceReference1',
|
|
164
|
-
'string',
|
|
165
|
-
'',
|
|
166
|
-
{},
|
|
167
|
-
],
|
|
168
|
-
[
|
|
169
|
-
'External Invoice Reference2',
|
|
170
|
-
'ExternalInvoiceReference2',
|
|
171
|
-
'string',
|
|
172
|
-
'',
|
|
173
|
-
{},
|
|
174
|
-
],
|
|
175
|
-
['Freight', 'Freight', 'number', 0, { numberPrecision: 2 }],
|
|
176
|
-
['Invoice Date', 'InvoiceDate', 'string', '', {}],
|
|
177
|
-
['Not Completed', 'NotCompleted', 'boolean', false, {}],
|
|
178
|
-
['OCR', 'OCR', 'string', '', {}],
|
|
179
|
-
['Our Reference', 'OurReference', 'string', '', {}],
|
|
180
|
-
['Outbound Date', 'OutboundDate', 'string', '', {}],
|
|
181
|
-
['Payment Way', 'PaymentWay', 'string', '', {}],
|
|
182
|
-
['Phone1', 'Phone1', 'string', '', {}],
|
|
183
|
-
['Phone2', 'Phone2', 'string', '', {}],
|
|
184
|
-
['Price List', 'PriceList', 'string', '', {}],
|
|
185
|
-
['Print Template', 'PrintTemplate', 'string', '', {}],
|
|
186
|
-
['Project', 'Project', 'string', '', {}],
|
|
187
|
-
['Remarks', 'Remarks', 'string', '', {}],
|
|
188
|
-
['Terms Of Delivery', 'TermsOfDelivery', 'string', '', {}],
|
|
189
|
-
['Terms Of Payment', 'TermsOfPayment', 'string', '', {}],
|
|
190
|
-
['VAT Included', 'VatIncluded', 'boolean', false, {}],
|
|
191
|
-
['Way Of Delivery', 'WayOfDelivery', 'string', '', {}],
|
|
192
|
-
['Your Order Number', 'YourOrderNumber', 'string', '', {}],
|
|
193
|
-
['Your Reference', 'YourReference', 'string', '', {}],
|
|
194
|
-
['Zip Code', 'ZipCode', 'string', '', {}],
|
|
195
|
-
];
|
|
196
|
-
|
|
197
|
-
export const invoiceParameters: INodeProperties[] = [
|
|
198
|
-
...parametersDefinitions.map(
|
|
199
|
-
([displayName, name, parameterType, defaultValue, typeOptions]) =>
|
|
200
|
-
createParameter(
|
|
201
|
-
displayName,
|
|
202
|
-
name,
|
|
203
|
-
parameterType,
|
|
204
|
-
defaultValue,
|
|
205
|
-
typeOptions
|
|
206
|
-
)
|
|
207
|
-
),
|
|
208
|
-
...collectionParametersDefinitions.map((collection) =>
|
|
209
|
-
createCollectionParameter(collection)
|
|
210
|
-
),
|
|
211
|
-
...optionParametersDefinitions.map((option) =>
|
|
212
|
-
createOptionParameter(option)
|
|
213
|
-
),
|
|
214
|
-
];
|