@limetech/n8n-nodes-lime 2.6.1 → 3.0.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/CHANGELOG.md +10 -0
- 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/package.json +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/index.ts +0 -1
- package/package.json +1 -9
- 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/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
|
@@ -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
|
-
];
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { ResponseModel } from '../../model';
|
|
2
|
-
|
|
3
|
-
export interface InvoiceBase {
|
|
4
|
-
'@url': string;
|
|
5
|
-
Balance: number;
|
|
6
|
-
Booked: boolean;
|
|
7
|
-
Cancelled: boolean;
|
|
8
|
-
CostCenter: string;
|
|
9
|
-
Currency: string;
|
|
10
|
-
CurrencyRate: string;
|
|
11
|
-
CurrencyUnit: number;
|
|
12
|
-
CustomerName: string;
|
|
13
|
-
CustomerNumber: string;
|
|
14
|
-
DocumentNumber: string;
|
|
15
|
-
DueDate: string;
|
|
16
|
-
ExternalInvoiceReference1: string;
|
|
17
|
-
ExternalInvoiceReference2: string;
|
|
18
|
-
InvoiceDate: string;
|
|
19
|
-
InvoiceType: string;
|
|
20
|
-
NoxFinans: boolean;
|
|
21
|
-
OCR: string;
|
|
22
|
-
VoucherNumber: number | string | null;
|
|
23
|
-
VoucherSeries: string | null;
|
|
24
|
-
VoucherYear: number | string | null;
|
|
25
|
-
WayOfDelivery: string;
|
|
26
|
-
TermsOfPayment: string;
|
|
27
|
-
Project: string;
|
|
28
|
-
Sent: boolean;
|
|
29
|
-
Total: number;
|
|
30
|
-
FinalPayDate: string | null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface EDIInformation {
|
|
34
|
-
EDIGlobalLocationNumber: string | null;
|
|
35
|
-
EDIGlobalLocationNumberDelivery: string | null;
|
|
36
|
-
EDIInvoiceExtra1: string | null;
|
|
37
|
-
EDIInvoiceExtra2: string | null;
|
|
38
|
-
EDIOurElectronicReference: string | null;
|
|
39
|
-
EDIYourElectronicReference: string | null;
|
|
40
|
-
EDIStatus: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface EmailInformation {
|
|
44
|
-
EmailAddressFrom: string | null;
|
|
45
|
-
EmailAddressTo: string | null;
|
|
46
|
-
EmailAddressCC: string | null;
|
|
47
|
-
EmailAddressBCC: string | null;
|
|
48
|
-
EmailSubject: string;
|
|
49
|
-
EmailBody: string;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface InvoiceRow {
|
|
53
|
-
AccountNumber: number;
|
|
54
|
-
ArticleNumber: string;
|
|
55
|
-
ContributionPercent: string;
|
|
56
|
-
ContributionValue: string;
|
|
57
|
-
Cost: number;
|
|
58
|
-
CostCenter: string;
|
|
59
|
-
DeliveredQuantity: string;
|
|
60
|
-
Description: string;
|
|
61
|
-
Discount: number;
|
|
62
|
-
DiscountType: string;
|
|
63
|
-
HouseWork: boolean;
|
|
64
|
-
HouseWorkHoursToReport: number | null;
|
|
65
|
-
HouseWorkType: string | null;
|
|
66
|
-
Price: number;
|
|
67
|
-
PriceExcludingVAT: number;
|
|
68
|
-
Project: string;
|
|
69
|
-
RowId: number;
|
|
70
|
-
StockPointCode: string | null;
|
|
71
|
-
Total: number;
|
|
72
|
-
TotalExcludingVAT: number;
|
|
73
|
-
Unit: string;
|
|
74
|
-
VAT: number;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export interface Label {
|
|
78
|
-
Id: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface Invoice extends InvoiceBase {
|
|
82
|
-
'@urlTaxReductionList': string;
|
|
83
|
-
AccountingMethod: string;
|
|
84
|
-
Address1: string;
|
|
85
|
-
Address2: string;
|
|
86
|
-
AdministrationFee: number;
|
|
87
|
-
AdministrationFeeVAT: number;
|
|
88
|
-
BasisTaxReduction: number;
|
|
89
|
-
City: string;
|
|
90
|
-
Comments: string;
|
|
91
|
-
ContractReference: string;
|
|
92
|
-
ContributionPercent: number;
|
|
93
|
-
ContributionValue: string;
|
|
94
|
-
Country: string;
|
|
95
|
-
Credit: string;
|
|
96
|
-
CreditInvoiceReference: string;
|
|
97
|
-
DeliveryAddress1: string;
|
|
98
|
-
DeliveryAddress2: string;
|
|
99
|
-
DeliveryCity: string;
|
|
100
|
-
DeliveryCountry: string;
|
|
101
|
-
DeliveryDate: string | null;
|
|
102
|
-
DeliveryName: string;
|
|
103
|
-
DeliveryZipCode: string;
|
|
104
|
-
EDIInformation: EDIInformation;
|
|
105
|
-
EUQuarterlyReport: boolean;
|
|
106
|
-
EmailInformation: EmailInformation;
|
|
107
|
-
Freight: number;
|
|
108
|
-
FreightVAT: number;
|
|
109
|
-
Gross: number;
|
|
110
|
-
HouseWork: boolean;
|
|
111
|
-
InvoicePeriodEnd: string;
|
|
112
|
-
InvoicePeriodStart: string;
|
|
113
|
-
InvoiceReference: string;
|
|
114
|
-
InvoiceRows: InvoiceRow[];
|
|
115
|
-
Labels: Label[];
|
|
116
|
-
Language: string;
|
|
117
|
-
LastRemindDate: string | null;
|
|
118
|
-
Net: number;
|
|
119
|
-
NotCompleted: boolean;
|
|
120
|
-
OfferReference: string;
|
|
121
|
-
OrderReference: string;
|
|
122
|
-
OrganisationNumber: string;
|
|
123
|
-
OurReference: string;
|
|
124
|
-
OutboundDate: string;
|
|
125
|
-
PaymentWay: string;
|
|
126
|
-
Phone1: string;
|
|
127
|
-
Phone2: string;
|
|
128
|
-
PriceList: string;
|
|
129
|
-
PrintTemplate: string;
|
|
130
|
-
Remarks: string;
|
|
131
|
-
Reminders: number;
|
|
132
|
-
RoundOff: number;
|
|
133
|
-
TaxReduction: string | null;
|
|
134
|
-
TaxReductionType: string;
|
|
135
|
-
TermsOfDelivery: string;
|
|
136
|
-
TimeBasisReference: string | null;
|
|
137
|
-
TotalToPay: number;
|
|
138
|
-
TotalVAT: number;
|
|
139
|
-
VATIncluded: boolean;
|
|
140
|
-
WarehouseReady: boolean;
|
|
141
|
-
YourOrderNumber: string;
|
|
142
|
-
YourReference: string;
|
|
143
|
-
ZipCode: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export interface CreateInvoiceResponse {
|
|
147
|
-
Invoice: Invoice;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface GetInvoiceResponse extends ResponseModel {
|
|
151
|
-
Invoice: InvoiceBase;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface GetAllInvoicesResponse extends ResponseModel {
|
|
155
|
-
Invoices: InvoiceBase[];
|
|
156
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import { apiRequest } from '../../../transport';
|
|
3
|
-
import { CreateInvoiceResponse } from '../model';
|
|
4
|
-
import { invoiceParameters } from '../invoiceParameters';
|
|
5
|
-
|
|
6
|
-
export const description = {
|
|
7
|
-
name: 'Create',
|
|
8
|
-
value: 'create',
|
|
9
|
-
description: 'Create an invoice',
|
|
10
|
-
action: 'Create a document',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const properties: INodeProperties[] = [
|
|
14
|
-
{
|
|
15
|
-
displayName: 'Customer Number',
|
|
16
|
-
name: 'customerNumber',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true,
|
|
19
|
-
default: '',
|
|
20
|
-
displayOptions: {
|
|
21
|
-
show: {
|
|
22
|
-
resource: ['invoice'],
|
|
23
|
-
operation: ['create'],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
displayName: 'Add Parameters',
|
|
29
|
-
name: 'createParameters',
|
|
30
|
-
type: 'collection',
|
|
31
|
-
placeholder: 'Add Parameter',
|
|
32
|
-
default: {},
|
|
33
|
-
displayOptions: {
|
|
34
|
-
show: {
|
|
35
|
-
resource: ['invoice'],
|
|
36
|
-
operation: ['create'],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
options: invoiceParameters,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
export async function execute(
|
|
44
|
-
this: IExecuteFunctions,
|
|
45
|
-
i: number
|
|
46
|
-
): Promise<CreateInvoiceResponse> {
|
|
47
|
-
const customerNumber = this.getNodeParameter('customerNumber', i, {});
|
|
48
|
-
const createParameters = this.getNodeParameter('createParameters', i, {});
|
|
49
|
-
|
|
50
|
-
const body: IDataObject = {
|
|
51
|
-
Invoice: {
|
|
52
|
-
CustomerNumber: customerNumber,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
if (createParameters) {
|
|
57
|
-
for (const [key, value] of Object.entries(createParameters)) {
|
|
58
|
-
if (value !== '' && value !== undefined && value !== null) {
|
|
59
|
-
(body['Invoice'] as IDataObject)[key] = value;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const endpoint = 'invoices';
|
|
65
|
-
|
|
66
|
-
return await apiRequest<CreateInvoiceResponse>(this, {
|
|
67
|
-
method: 'POST',
|
|
68
|
-
endpoint: endpoint,
|
|
69
|
-
body: body,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import { apiRequest } from '../../../transport';
|
|
3
|
-
import { GetInvoiceResponse } from '../model';
|
|
4
|
-
|
|
5
|
-
export const description = {
|
|
6
|
-
name: 'Get',
|
|
7
|
-
value: 'get',
|
|
8
|
-
description: 'Retrieve the invoice',
|
|
9
|
-
action: 'Get single document',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const properties: INodeProperties[] = [
|
|
13
|
-
{
|
|
14
|
-
displayName: 'Document Number',
|
|
15
|
-
name: 'documentNumber',
|
|
16
|
-
type: 'string',
|
|
17
|
-
required: true,
|
|
18
|
-
default: '',
|
|
19
|
-
displayOptions: {
|
|
20
|
-
show: {
|
|
21
|
-
resource: ['invoice'],
|
|
22
|
-
operation: ['get'],
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
export async function execute(
|
|
29
|
-
this: IExecuteFunctions,
|
|
30
|
-
i: number
|
|
31
|
-
): Promise<GetInvoiceResponse> {
|
|
32
|
-
const documentNumber = this.getNodeParameter(
|
|
33
|
-
'documentNumber',
|
|
34
|
-
i,
|
|
35
|
-
''
|
|
36
|
-
) as string;
|
|
37
|
-
|
|
38
|
-
const endpoint = `invoices/${encodeURIComponent(documentNumber)}`;
|
|
39
|
-
|
|
40
|
-
return await apiRequest<GetInvoiceResponse>(
|
|
41
|
-
this,
|
|
42
|
-
{
|
|
43
|
-
method: 'GET',
|
|
44
|
-
endpoint: endpoint,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: documentNumber,
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import { apiRequest } from '../../../transport';
|
|
3
|
-
import { filterParameters } from '../filterParameters';
|
|
4
|
-
import { GetAllInvoicesResponse } from '../model';
|
|
5
|
-
|
|
6
|
-
export const description = {
|
|
7
|
-
name: 'Get Many',
|
|
8
|
-
value: 'getAll',
|
|
9
|
-
description: 'Retrieve a list of invoices',
|
|
10
|
-
action: 'Get list of documents',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const properties: INodeProperties[] = [
|
|
14
|
-
{
|
|
15
|
-
displayName: 'Filter By',
|
|
16
|
-
name: 'filterParameters',
|
|
17
|
-
type: 'collection',
|
|
18
|
-
placeholder: 'Add Parameter',
|
|
19
|
-
default: {},
|
|
20
|
-
displayOptions: {
|
|
21
|
-
show: {
|
|
22
|
-
resource: ['invoice'],
|
|
23
|
-
operation: ['getAll'],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
options: filterParameters,
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
displayName: 'Sort By',
|
|
30
|
-
name: 'sortParameters',
|
|
31
|
-
type: 'options',
|
|
32
|
-
default: '',
|
|
33
|
-
displayOptions: {
|
|
34
|
-
show: {
|
|
35
|
-
resource: ['invoice'],
|
|
36
|
-
operation: ['getAll'],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
options: [
|
|
40
|
-
{
|
|
41
|
-
name: '',
|
|
42
|
-
value: '',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'Customer Name',
|
|
46
|
-
value: 'customername',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: 'Customer Number',
|
|
50
|
-
value: 'customernumber',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'Document Number',
|
|
54
|
-
value: 'documentnumber',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'Invoice Date',
|
|
58
|
-
value: 'invoicedate',
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: 'OCR',
|
|
62
|
-
value: 'ocr',
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'Total',
|
|
66
|
-
value: 'total',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
export async function execute(
|
|
73
|
-
this: IExecuteFunctions,
|
|
74
|
-
i: number
|
|
75
|
-
): Promise<GetAllInvoicesResponse> {
|
|
76
|
-
const filterParameters = this.getNodeParameter('filterParameters', i, {});
|
|
77
|
-
const sortParameters = this.getNodeParameter('sortParameters', i, '');
|
|
78
|
-
|
|
79
|
-
const qs: IDataObject = {};
|
|
80
|
-
|
|
81
|
-
if (filterParameters) {
|
|
82
|
-
for (const [key, value] of Object.entries(filterParameters)) {
|
|
83
|
-
if (value !== '' && value !== undefined && value !== null) {
|
|
84
|
-
qs[key] = value;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (sortParameters) {
|
|
90
|
-
qs['sortby'] = sortParameters;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const endpoint = 'invoices';
|
|
94
|
-
|
|
95
|
-
return await apiRequest<GetAllInvoicesResponse>(this, {
|
|
96
|
-
method: 'GET',
|
|
97
|
-
endpoint: endpoint,
|
|
98
|
-
qs: qs,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeProperties, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import { apiRequest } from '../../../transport';
|
|
3
|
-
import { CreateInvoiceResponse } from '../model';
|
|
4
|
-
import { invoiceParameters } from '../invoiceParameters';
|
|
5
|
-
|
|
6
|
-
export const description = {
|
|
7
|
-
name: 'Update',
|
|
8
|
-
value: 'update',
|
|
9
|
-
description: 'Update the invoice',
|
|
10
|
-
action: 'Update the document',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export const properties: INodeProperties[] = [
|
|
14
|
-
{
|
|
15
|
-
displayName: 'Document Number',
|
|
16
|
-
name: 'documentNumber',
|
|
17
|
-
type: 'string',
|
|
18
|
-
required: true,
|
|
19
|
-
default: '',
|
|
20
|
-
displayOptions: {
|
|
21
|
-
show: {
|
|
22
|
-
resource: ['invoice'],
|
|
23
|
-
operation: ['update'],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
displayName: 'Add Parameters',
|
|
29
|
-
name: 'createParameters',
|
|
30
|
-
type: 'collection',
|
|
31
|
-
placeholder: 'Add Parameter',
|
|
32
|
-
default: {},
|
|
33
|
-
displayOptions: {
|
|
34
|
-
show: {
|
|
35
|
-
resource: ['invoice'],
|
|
36
|
-
operation: ['update'],
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
options: invoiceParameters,
|
|
40
|
-
},
|
|
41
|
-
];
|
|
42
|
-
|
|
43
|
-
export async function execute(
|
|
44
|
-
this: IExecuteFunctions,
|
|
45
|
-
i: number
|
|
46
|
-
): Promise<CreateInvoiceResponse> {
|
|
47
|
-
const documentNumber = this.getNodeParameter(
|
|
48
|
-
'documentNumber',
|
|
49
|
-
i,
|
|
50
|
-
{}
|
|
51
|
-
) as string;
|
|
52
|
-
const updateParameters = this.getNodeParameter('invoiceParameters', i, {});
|
|
53
|
-
|
|
54
|
-
const body: IDataObject = {
|
|
55
|
-
Invoice: {},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
if (updateParameters) {
|
|
59
|
-
for (const [key, value] of Object.entries(updateParameters)) {
|
|
60
|
-
if (value !== '' && value !== undefined && value !== null) {
|
|
61
|
-
(body['Invoice'] as IDataObject)[key] = value;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const endpoint = `invoices/${encodeURIComponent(documentNumber)}`;
|
|
67
|
-
|
|
68
|
-
return await apiRequest<CreateInvoiceResponse>(
|
|
69
|
-
this,
|
|
70
|
-
{
|
|
71
|
-
method: 'PUT',
|
|
72
|
-
endpoint: endpoint,
|
|
73
|
-
body: body,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
id: documentNumber,
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|