@limetech/n8n-nodes-lime 2.6.0 → 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.
Files changed (133) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/credentials/index.ts +0 -1
  3. package/dist/credentials/index.d.ts +0 -1
  4. package/dist/credentials/index.js +0 -1
  5. package/dist/credentials/index.js.map +1 -1
  6. package/dist/nodes/index.d.ts +0 -1
  7. package/dist/nodes/index.js +0 -1
  8. package/dist/nodes/index.js.map +1 -1
  9. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
  10. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
  11. package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
  12. package/dist/package.json +0 -8
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/nodes/index.ts +0 -1
  15. package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
  16. package/nodes/lime-forms/assets/lime-crm.svg +1 -0
  17. package/package.json +1 -9
  18. package/credentials/FortnoxApi.credentials.ts +0 -61
  19. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  20. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  21. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  22. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  23. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  24. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  25. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  26. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  27. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  28. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  29. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  30. package/dist/nodes/fortnox/commons.d.ts +0 -25
  31. package/dist/nodes/fortnox/commons.js +0 -44
  32. package/dist/nodes/fortnox/commons.js.map +0 -1
  33. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  34. package/dist/nodes/fortnox/index.d.ts +0 -6
  35. package/dist/nodes/fortnox/index.js +0 -23
  36. package/dist/nodes/fortnox/index.js.map +0 -1
  37. package/dist/nodes/fortnox/model.d.ts +0 -20
  38. package/dist/nodes/fortnox/model.js +0 -3
  39. package/dist/nodes/fortnox/model.js.map +0 -1
  40. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  41. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  42. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  43. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -7
  44. package/dist/nodes/fortnox/resources/customers/index.js +0 -85
  45. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  46. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  47. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  48. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  49. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -10
  50. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
  51. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  52. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -9
  53. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
  54. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  55. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -10
  56. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
  57. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  58. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -10
  59. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  60. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  61. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +0 -5
  62. package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
  63. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
  64. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
  65. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
  66. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  67. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  68. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  69. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  70. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  71. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  72. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  73. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -7
  74. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  75. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  76. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  77. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  78. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  79. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -147
  80. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  81. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  82. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -10
  83. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  84. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  85. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -10
  86. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
  87. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  88. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -10
  89. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  90. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  91. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +0 -4
  92. package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
  93. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
  94. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
  95. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
  96. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  97. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  98. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  99. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  100. package/dist/nodes/fortnox/transport/index.d.ts +0 -3
  101. package/dist/nodes/fortnox/transport/index.js +0 -76
  102. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  103. package/dist/nodes/lime-forms/lime-forms.svg +0 -6
  104. package/nodes/fortnox/Fortnox.node.json +0 -18
  105. package/nodes/fortnox/Fortnox.node.ts +0 -102
  106. package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  107. package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
  108. package/nodes/fortnox/commons.ts +0 -94
  109. package/nodes/fortnox/fortnoxLogo.svg +0 -15
  110. package/nodes/fortnox/index.ts +0 -6
  111. package/nodes/fortnox/model.ts +0 -25
  112. package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
  113. package/nodes/fortnox/resources/customers/index.ts +0 -53
  114. package/nodes/fortnox/resources/customers/model.ts +0 -107
  115. package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
  116. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
  117. package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
  118. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
  119. package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
  120. package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
  121. package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
  122. package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
  123. package/nodes/fortnox/resources/invoice/index.ts +0 -49
  124. package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
  125. package/nodes/fortnox/resources/invoice/model.ts +0 -156
  126. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
  127. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
  128. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
  129. package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
  130. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
  131. package/nodes/fortnox/transport/errorCodes.ts +0 -62
  132. package/nodes/fortnox/transport/index.ts +0 -106
  133. package/nodes/lime-forms/lime-forms.svg +0 -6
@@ -1,307 +0,0 @@
1
- import {
2
- IExecuteFunctions,
3
- INodeProperties,
4
- IDataObject,
5
- NodeOperationError,
6
- } from 'n8n-workflow';
7
- import { apiRequest } from '../../../transport';
8
- import { code as currencyCode } from 'currency-codes';
9
- import { CustomerResponse } from '../model';
10
-
11
- export const description = {
12
- name: 'Create Customer',
13
- value: 'create',
14
- description: 'Create a new customer',
15
- action: 'Create a customer',
16
- };
17
-
18
- const createProperties: INodeProperties[] = [
19
- {
20
- displayName: 'Address 1',
21
- name: 'Address1',
22
- type: 'string',
23
- default: '',
24
- description: "Customer's primary address",
25
- },
26
- {
27
- displayName: 'Address 2',
28
- name: 'Address2',
29
- type: 'string',
30
- default: '',
31
- description: "Customer's secondary address",
32
- },
33
- {
34
- displayName: 'City',
35
- name: 'City',
36
- type: 'string',
37
- default: '',
38
- description: "Customer's city",
39
- },
40
- {
41
- displayName: 'Comments',
42
- name: 'Comments',
43
- type: 'string',
44
- default: '',
45
- description: 'Comments about the customer',
46
- },
47
- {
48
- displayName: 'Cost Center',
49
- name: 'CostCenter',
50
- type: 'string',
51
- default: '',
52
- description: "Customer's cost center",
53
- },
54
- {
55
- displayName: 'Country',
56
- name: 'Country',
57
- type: 'string',
58
- default: '',
59
- description: "Customer's country",
60
- },
61
- {
62
- displayName: 'Country Code',
63
- name: 'CountryCode',
64
- type: 'string',
65
- default: '',
66
- description: "Customer's country code",
67
- },
68
- {
69
- displayName: 'Email',
70
- name: 'Email',
71
- type: 'string',
72
- default: '',
73
- description: "Customer's email address",
74
- },
75
- {
76
- displayName: 'External Reference',
77
- name: 'ExternalReference',
78
- type: 'string',
79
- default: '',
80
- description: 'External reference for the customer',
81
- },
82
- {
83
- displayName: 'Fax',
84
- name: 'Fax',
85
- type: 'string',
86
- default: '',
87
- description: "Customer's fax number",
88
- },
89
- {
90
- displayName: 'GLN',
91
- name: 'GLN',
92
- type: 'string',
93
- default: '',
94
- description: 'Global Location Number',
95
- },
96
- {
97
- displayName: 'Organisation Number',
98
- name: 'OrganisationNumber',
99
- type: 'string',
100
- default: '',
101
- description: "Customer's organisation number",
102
- },
103
- {
104
- displayName: 'Phone 1',
105
- name: 'Phone1',
106
- type: 'string',
107
- default: '',
108
- description: "Customer's primary phone number",
109
- },
110
- {
111
- displayName: 'Phone 2',
112
- name: 'Phone2',
113
- type: 'string',
114
- default: '',
115
- description: "Customer's secondary phone number",
116
- },
117
- {
118
- displayName: 'VAT Number',
119
- name: 'VATNumber',
120
- type: 'string',
121
- default: '',
122
- description: "Customer's VAT number",
123
- },
124
- {
125
- displayName: 'Website',
126
- name: 'WWW',
127
- type: 'string',
128
- default: '',
129
- description: "Customer's website URL",
130
- },
131
- {
132
- displayName: 'ZIP Code',
133
- name: 'ZipCode',
134
- type: 'string',
135
- default: '',
136
- description: "Customer's ZIP/postal code",
137
- },
138
- ];
139
-
140
- export const properties: INodeProperties[] = [
141
- {
142
- displayName: 'Name',
143
- name: 'Name',
144
- type: 'string',
145
- required: true,
146
- default: '',
147
- description: 'Customer name',
148
- displayOptions: {
149
- show: {
150
- resource: ['customer'],
151
- operation: ['create'],
152
- },
153
- },
154
- },
155
- {
156
- displayName: 'Active',
157
- name: 'Active',
158
- type: 'boolean',
159
- required: true,
160
- default: true,
161
- description: 'Whether the customer is active',
162
- displayOptions: {
163
- show: {
164
- resource: ['customer'],
165
- operation: ['create'],
166
- },
167
- },
168
- },
169
- {
170
- displayName: 'Currency',
171
- name: 'Currency',
172
- type: 'string',
173
- required: true,
174
- default: 'SEK',
175
- description: 'Currency',
176
- displayOptions: {
177
- show: {
178
- resource: ['customer'],
179
- operation: ['create'],
180
- },
181
- },
182
- },
183
- {
184
- displayName: 'Type',
185
- name: 'Type',
186
- type: 'options',
187
- required: true,
188
- options: [
189
- {
190
- name: 'Private',
191
- value: 'PRIVATE',
192
- },
193
- {
194
- name: 'Company',
195
- value: 'COMPANY',
196
- },
197
- ],
198
- default: 'COMPANY',
199
- description: 'Type of customer',
200
- displayOptions: {
201
- show: {
202
- resource: ['customer'],
203
- operation: ['create'],
204
- },
205
- },
206
- },
207
- {
208
- displayName: 'VAT Type',
209
- name: 'VATType',
210
- type: 'options',
211
- required: true,
212
-
213
- options: [
214
- {
215
- name: 'SE VAT',
216
- value: 'SEVAT',
217
- },
218
- {
219
- name: 'SE Reversed VAT',
220
- value: 'SEREVERSEDVAT',
221
- },
222
- {
223
- name: 'EU Reversed VAT',
224
- value: 'EUREVERSEDVAT',
225
- },
226
- {
227
- name: 'EU VAT',
228
- value: 'EUVAT',
229
- },
230
- {
231
- name: 'Export',
232
- value: 'EXPORT',
233
- },
234
- ],
235
- default: 'SEVAT',
236
- description: 'Type of VAT applied',
237
- displayOptions: {
238
- show: {
239
- resource: ['customer'],
240
- operation: ['create'],
241
- },
242
- },
243
- },
244
- // Additional Fields
245
- {
246
- displayName: 'Additional Fields',
247
- name: 'additionalFields',
248
- type: 'collection',
249
- placeholder: 'Add Field',
250
- default: {},
251
- displayOptions: {
252
- show: {
253
- resource: ['customer'],
254
- operation: ['create'],
255
- },
256
- },
257
- options: [...createProperties],
258
- },
259
- ];
260
-
261
- export async function execute(
262
- this: IExecuteFunctions,
263
- i: number
264
- ): Promise<CustomerResponse> {
265
- const name = this.getNodeParameter('Name', i) as string;
266
- let currency = this.getNodeParameter('Currency', i) as string;
267
- currency = currency.toUpperCase();
268
- const active = this.getNodeParameter('Active', i) as boolean;
269
- const type = this.getNodeParameter('Type', i) as 'COMPANY' | 'PRIVATE';
270
- const vatType = this.getNodeParameter('VATType', i) as
271
- | 'SEVAT'
272
- | 'SEREVERSEDVAT'
273
- | 'EUREVERSEDVAT'
274
- | 'EUVAT'
275
- | 'EXPORT';
276
- const additionalFields = this.getNodeParameter(
277
- 'additionalFields',
278
- i,
279
- {}
280
- ) as IDataObject;
281
-
282
- if (currencyCode(currency) === undefined) {
283
- throw new NodeOperationError(
284
- this.getNode(),
285
- `Invalid currency code: ${currency}. Use ISO 4217 currency code.`
286
- );
287
- }
288
-
289
- const body = {
290
- Customer: {
291
- Name: name,
292
- Currency: currency,
293
- Active: active,
294
- Type: type,
295
- VATType: vatType,
296
- ...additionalFields,
297
- },
298
- };
299
-
300
- const endpoint = `/customers`;
301
-
302
- return await apiRequest<CustomerResponse>(this, {
303
- method: 'POST',
304
- endpoint: endpoint,
305
- body: body,
306
- });
307
- }
@@ -1,49 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { apiRequest } from '../../../transport';
3
-
4
- export const description = {
5
- name: 'Delete Customer',
6
- value: 'delete',
7
- description: 'Delete a single company by customer number',
8
- action: 'Delete a customer',
9
- };
10
-
11
- export const properties: INodeProperties[] = [
12
- {
13
- displayName: 'Customer Number',
14
- name: 'customerNumber',
15
- type: 'string',
16
- required: true,
17
- default: '',
18
- description: 'Unique identifier for customer',
19
- displayOptions: {
20
- show: {
21
- resource: ['customer'],
22
- operation: ['delete'],
23
- },
24
- },
25
- },
26
- ];
27
-
28
- export async function execute(
29
- this: IExecuteFunctions,
30
- i: number
31
- ): Promise<null> {
32
- const customerNumber = this.getNodeParameter(
33
- 'customerNumber',
34
- i,
35
- ''
36
- ) as string;
37
-
38
- const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
39
- return await apiRequest<null>(
40
- this,
41
- {
42
- method: 'DELETE',
43
- endpoint,
44
- },
45
- {
46
- id: customerNumber,
47
- }
48
- );
49
- }
@@ -1,50 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { apiRequest } from '../../../transport';
3
- import { CustomerResponse } from '../model';
4
-
5
- export const description = {
6
- name: 'Get Customer',
7
- value: 'get',
8
- description: 'Get a single company by customer number',
9
- action: 'Get a customer',
10
- };
11
-
12
- export const properties: INodeProperties[] = [
13
- {
14
- displayName: 'Customer Number',
15
- name: 'customerNumber',
16
- type: 'string',
17
- required: true,
18
- default: '',
19
- description: 'Unique identifier for customer',
20
- displayOptions: {
21
- show: {
22
- resource: ['customer'],
23
- operation: ['get'],
24
- },
25
- },
26
- },
27
- ];
28
-
29
- export async function execute(
30
- this: IExecuteFunctions,
31
- i: number
32
- ): Promise<CustomerResponse> {
33
- const customerNumber = this.getNodeParameter(
34
- 'customerNumber',
35
- i,
36
- ''
37
- ) as string;
38
-
39
- const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
40
- return await apiRequest<CustomerResponse>(
41
- this,
42
- {
43
- method: 'GET',
44
- endpoint,
45
- },
46
- {
47
- id: customerNumber,
48
- }
49
- );
50
- }
@@ -1,79 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties, IDataObject } from 'n8n-workflow';
2
- import { apiRequest } from '../../../transport';
3
- import { filterParameters } from '../filterParameters';
4
- import { sortParameters } from '../sortParameters';
5
- import { CustomersResponse } from '../model';
6
-
7
- export const description = {
8
- name: 'Get All Customers',
9
- value: 'getAll',
10
- description: 'Get all customers',
11
- action: 'Get all customers',
12
- };
13
-
14
- export const properties: INodeProperties[] = [
15
- {
16
- displayName: 'Filter by',
17
- name: 'filterParameters',
18
- type: 'collection',
19
- placeholder: 'Add Parameter',
20
- default: {},
21
- displayOptions: {
22
- show: {
23
- resource: ['customer'],
24
- operation: ['getAll'],
25
- },
26
- },
27
- options: filterParameters,
28
- },
29
- {
30
- displayName: 'Sort by',
31
- name: 'sortParameters',
32
- type: 'collection',
33
- placeholder: 'Add Parameter',
34
- default: {},
35
- displayOptions: {
36
- show: {
37
- resource: ['customer'],
38
- operation: ['getAll'],
39
- },
40
- },
41
- options: sortParameters,
42
- },
43
- ];
44
-
45
- export async function execute(
46
- this: IExecuteFunctions,
47
- i: number
48
- ): Promise<CustomersResponse> {
49
- const filterParameters = this.getNodeParameter('filterParameters', i, {});
50
- const sortParameters = this.getNodeParameter(
51
- 'sortParameters',
52
- i,
53
- {}
54
- ) as IDataObject;
55
-
56
- const qs: IDataObject = {};
57
- if (filterParameters) {
58
- for (const [key, value] of Object.entries(filterParameters)) {
59
- if (value !== '' && value !== undefined && value !== null) {
60
- qs[key] = value;
61
- }
62
- }
63
- }
64
-
65
- if (sortParameters && Object.keys(sortParameters).length > 0) {
66
- qs['sortby'] = Object.entries(sortParameters)
67
- .filter(([, value]) => value)
68
- .map(([, value]) => `${value}`)
69
- .join('');
70
- }
71
-
72
- const endpoint = `/customers`;
73
-
74
- return await apiRequest<CustomersResponse>(this, {
75
- method: 'GET',
76
- endpoint: endpoint,
77
- qs: qs,
78
- });
79
- }
@@ -1,5 +0,0 @@
1
- export * as createSingleCustomer from './create.operation';
2
- export * as deleteSingleCustomer from './delete.operation';
3
- export * as getSingleCustomer from './get.operation';
4
- export * as getManyCustomers from './getAll.operation';
5
- export * as updateSingleCustomer from './update.operation';