@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.
- package/CHANGELOG.md +17 -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/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 +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/nodes/index.ts +0 -1
- package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
- package/nodes/lime-forms/assets/lime-crm.svg +1 -0
- 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/dist/nodes/lime-forms/lime-forms.svg +0 -6
- 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-forms/lime-forms.svg +0 -6
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
INodeType,
|
|
3
|
-
INodeTypeDescription,
|
|
4
|
-
ITriggerFunctions,
|
|
5
|
-
ITriggerResponse,
|
|
6
|
-
NodeConnectionTypes,
|
|
7
|
-
NodeOperationError,
|
|
8
|
-
} from 'n8n-workflow';
|
|
9
|
-
import WebSocket from 'ws';
|
|
10
|
-
import { FORTNOX_API_CREDENTIAL_KEY } from './commons';
|
|
11
|
-
|
|
12
|
-
interface Topic {
|
|
13
|
-
topic: string;
|
|
14
|
-
offset?: string | null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface Topics {
|
|
18
|
-
topics: Topic[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export class FortnoxTrigger implements INodeType {
|
|
22
|
-
description: INodeTypeDescription = {
|
|
23
|
-
displayName: 'Fortnox Trigger',
|
|
24
|
-
name: 'fortnoxTrigger',
|
|
25
|
-
icon: 'file:fortnoxLogo.svg',
|
|
26
|
-
group: ['trigger'],
|
|
27
|
-
version: 1,
|
|
28
|
-
description:
|
|
29
|
-
"Triggers workflows in real time by subscribing to Fortnox's WebSocket API for updates " +
|
|
30
|
-
'on selected topics like invoices or customers.',
|
|
31
|
-
defaults: {
|
|
32
|
-
name: 'Fortnox Trigger',
|
|
33
|
-
},
|
|
34
|
-
inputs: [],
|
|
35
|
-
outputs: [NodeConnectionTypes.Main],
|
|
36
|
-
credentials: [
|
|
37
|
-
{
|
|
38
|
-
name: FORTNOX_API_CREDENTIAL_KEY,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
properties: [
|
|
43
|
-
{
|
|
44
|
-
displayName: 'Include Child Tenants',
|
|
45
|
-
name: 'includeChildTenants',
|
|
46
|
-
type: 'boolean',
|
|
47
|
-
required: true,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
displayName: 'Topics',
|
|
52
|
-
name: 'topicCollection',
|
|
53
|
-
required: true,
|
|
54
|
-
type: 'fixedCollection',
|
|
55
|
-
typeOptions: {
|
|
56
|
-
multipleValues: true,
|
|
57
|
-
},
|
|
58
|
-
default: {},
|
|
59
|
-
placeholder: 'Add Topics',
|
|
60
|
-
description: 'Topics to subscribe to',
|
|
61
|
-
options: [
|
|
62
|
-
{
|
|
63
|
-
name: 'topics',
|
|
64
|
-
displayName: 'Topics',
|
|
65
|
-
values: [
|
|
66
|
-
{
|
|
67
|
-
displayName: 'Topic',
|
|
68
|
-
name: 'topic',
|
|
69
|
-
type: 'options',
|
|
70
|
-
required: true,
|
|
71
|
-
default: 'customers',
|
|
72
|
-
options: [
|
|
73
|
-
{
|
|
74
|
-
name: 'Customers',
|
|
75
|
-
value: 'customers',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: 'Invoices',
|
|
79
|
-
value: 'invoices',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: 'Orders',
|
|
83
|
-
value: 'orders',
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
description: 'Topic to subscribe to',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
displayName: 'Offset',
|
|
90
|
-
name: 'offset',
|
|
91
|
-
type: 'string',
|
|
92
|
-
default: '',
|
|
93
|
-
description:
|
|
94
|
-
'Offset to supply in order to get events replayed up to 14 days back',
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
],
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
|
|
104
|
-
const includeChildTenants = this.getNodeParameter(
|
|
105
|
-
'includeChildTenants'
|
|
106
|
-
) as boolean;
|
|
107
|
-
const topicCollection = this.getNodeParameter(
|
|
108
|
-
'topicCollection',
|
|
109
|
-
{}
|
|
110
|
-
) as Topics;
|
|
111
|
-
|
|
112
|
-
const credentials = await this.getCredentials('fortnoxApi');
|
|
113
|
-
|
|
114
|
-
if (!credentials.clientSecret) {
|
|
115
|
-
throw new NodeOperationError(
|
|
116
|
-
this.getNode(),
|
|
117
|
-
"Credential 'Client Secret' must be provided for the node to work properly"
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
const socket = new WebSocket('wss://ws.fortnox.se/topics-v1');
|
|
122
|
-
|
|
123
|
-
const startSocket = async () => {
|
|
124
|
-
const commands = {
|
|
125
|
-
'Add Tenants': 'add-tenants-v1',
|
|
126
|
-
'Add Topics': 'add-topics-v1',
|
|
127
|
-
Subscribe: 'subscribe-v1',
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
socket.on('open', () => {
|
|
131
|
-
socket.send(
|
|
132
|
-
JSON.stringify({
|
|
133
|
-
command: commands['Add Tenants'],
|
|
134
|
-
includeChildTenants: includeChildTenants,
|
|
135
|
-
clientSecret: credentials.clientSecret,
|
|
136
|
-
accessTokens: [`Bearer ${credentials.token}`],
|
|
137
|
-
})
|
|
138
|
-
);
|
|
139
|
-
const data = JSON.stringify({
|
|
140
|
-
command: commands['Add Topics'],
|
|
141
|
-
topics: topicCollection.topics,
|
|
142
|
-
});
|
|
143
|
-
socket.send(data);
|
|
144
|
-
|
|
145
|
-
socket.send(
|
|
146
|
-
JSON.stringify({
|
|
147
|
-
command: commands['Subscribe'],
|
|
148
|
-
})
|
|
149
|
-
);
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
socket.on('message', (data: string) => {
|
|
153
|
-
const message = JSON.parse(data);
|
|
154
|
-
|
|
155
|
-
if (Object.values(commands).includes(message.response)) {
|
|
156
|
-
if (message.result != 'ok') {
|
|
157
|
-
this.emitError(
|
|
158
|
-
new NodeOperationError(
|
|
159
|
-
this.getNode(),
|
|
160
|
-
`Unexpected response from Fortnox: ${JSON.stringify(message)}`
|
|
161
|
-
)
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
} else {
|
|
165
|
-
this.emit([this.helpers.returnJsonArray(message)]);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
socket.on('error', (error: Error) => {
|
|
170
|
-
this.emitError(
|
|
171
|
-
new NodeOperationError(
|
|
172
|
-
this.getNode(),
|
|
173
|
-
'Websocket Error: ' + error.message
|
|
174
|
-
)
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const closeFunction = async () => {
|
|
180
|
-
socket.close();
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
if (this.getMode() === 'manual') {
|
|
184
|
-
async function manualTriggerFunction() {
|
|
185
|
-
await startSocket();
|
|
186
|
-
}
|
|
187
|
-
return {
|
|
188
|
-
closeFunction,
|
|
189
|
-
manualTriggerFunction,
|
|
190
|
-
};
|
|
191
|
-
} else {
|
|
192
|
-
await startSocket();
|
|
193
|
-
return { closeFunction };
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
package/nodes/fortnox/commons.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
INodeProperties,
|
|
3
|
-
INodePropertyOptions,
|
|
4
|
-
INodePropertyTypeOptions,
|
|
5
|
-
} from 'n8n-workflow';
|
|
6
|
-
|
|
7
|
-
export const FORTNOX_API_CREDENTIAL_KEY = 'fortnoxApi';
|
|
8
|
-
|
|
9
|
-
export type ParameterTypes = 'string' | 'boolean' | 'number';
|
|
10
|
-
|
|
11
|
-
export type ParameterDefaultValueTypes = string | boolean | number;
|
|
12
|
-
|
|
13
|
-
export type ParameterDefinition = [
|
|
14
|
-
displayName: string,
|
|
15
|
-
name: string,
|
|
16
|
-
parameterType: ParameterTypes,
|
|
17
|
-
defaultValue: ParameterDefaultValueTypes,
|
|
18
|
-
typeOptions: INodePropertyTypeOptions,
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
export type OptionParameterDefinition = {
|
|
22
|
-
displayName: string;
|
|
23
|
-
name: string;
|
|
24
|
-
parameters: Array<[string, string]>;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export type CollectionParameterDefinition = {
|
|
28
|
-
displayName: string;
|
|
29
|
-
name: string;
|
|
30
|
-
parameters: ParameterDefinition[];
|
|
31
|
-
multipleValues: boolean;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const createParameter = (
|
|
35
|
-
displayName: string,
|
|
36
|
-
name: string,
|
|
37
|
-
parameterType: ParameterTypes,
|
|
38
|
-
defaultValue: ParameterDefaultValueTypes,
|
|
39
|
-
typeOptions: INodePropertyTypeOptions
|
|
40
|
-
): INodeProperties => ({
|
|
41
|
-
displayName: displayName,
|
|
42
|
-
name: name,
|
|
43
|
-
type: parameterType,
|
|
44
|
-
default: defaultValue,
|
|
45
|
-
typeOptions: typeOptions,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export function createOptionParameter(
|
|
49
|
-
option: OptionParameterDefinition
|
|
50
|
-
): INodeProperties {
|
|
51
|
-
const parameters: INodePropertyOptions[] = option.parameters.map(
|
|
52
|
-
([parameterName, parameterValue]) => {
|
|
53
|
-
return {
|
|
54
|
-
name: parameterName,
|
|
55
|
-
value: parameterValue,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
return {
|
|
61
|
-
displayName: option.displayName,
|
|
62
|
-
name: option.name,
|
|
63
|
-
type: 'options',
|
|
64
|
-
noDataExpression: true,
|
|
65
|
-
options: parameters,
|
|
66
|
-
default: parameters[0].value,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function createCollectionParameter(
|
|
71
|
-
collection: CollectionParameterDefinition
|
|
72
|
-
): INodeProperties {
|
|
73
|
-
const parameters: INodeProperties[] = collection.parameters.map(
|
|
74
|
-
([displayName, name, parameterType, defaultValue, typeOptions]) =>
|
|
75
|
-
createParameter(
|
|
76
|
-
displayName,
|
|
77
|
-
name,
|
|
78
|
-
parameterType,
|
|
79
|
-
defaultValue,
|
|
80
|
-
typeOptions
|
|
81
|
-
)
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
return {
|
|
85
|
-
displayName: collection.displayName,
|
|
86
|
-
typeOptions: {
|
|
87
|
-
multipleValues: collection.multipleValues,
|
|
88
|
-
},
|
|
89
|
-
name: collection.name,
|
|
90
|
-
default: {},
|
|
91
|
-
type: 'collection',
|
|
92
|
-
options: parameters,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1550 1550" width="1550" height="1550">
|
|
2
|
-
<title>fortnox-brand-symbol-svg</title>
|
|
3
|
-
<style>
|
|
4
|
-
.s0 { fill: #003824 }
|
|
5
|
-
.s1 { fill: #007533 }
|
|
6
|
-
.s2 { fill: #ffc200 }
|
|
7
|
-
.s3 { fill: #00db33 }
|
|
8
|
-
</style>
|
|
9
|
-
<path class="s0" d="m774.4 302.8h243.3c17.6 0 27.1 9.5 27.1 27.1v129.8c0 17.5-9.4 26.9-27.1 26.9h-243.3c-56.7 0-94.5 37.9-94.5 94.6v177h337.8c17.6 0 27.1 9.5 27.1 27v129.8c0 17.6-9.4 27.1-27.1 27.1h-337.8v252.6c0 17.6-9.5 27.1-27.1 27.1h-135.1c-17.6 0-27.1-9.4-27.1-27.1v-608.1c0-168.9 114.9-283.9 283.8-283.9"/>
|
|
10
|
-
<g>
|
|
11
|
-
<path class="s1" d="m774.8 1549.9c-148.3 0-294.9-42.5-421.6-124.7-157-101.7-271.7-256.7-323.1-436.3-51-177.8-36.9-367.9 39.6-535.2 12.3-26.8 44-38.6 70.8-26.3 26.7 12.2 38.6 43.9 26.2 70.7-65.9 144.2-78 308.2-34.1 461.5 44.3 154.8 143.3 288.5 278.6 376.2 160.5 104.1 358.5 134.3 543.2 82.8 28.4-7.8 57.8 8.8 65.7 37.1 7.8 28.4-8.8 57.8-37.1 65.6-68.5 19.2-138.5 28.5-208.3 28.5z"/>
|
|
12
|
-
<path class="s2" d="m1162.9 1436.8c-17.6 0-34.9-8.8-45-24.8-15.8-24.8-8.5-57.8 16.3-73.6 81.1-51.7 148.9-118.8 201.3-199.7 200.5-309.2 112.1-723.8-197-924.3-10.1-6.6-21.2-13.2-34.7-20.9-25.6-14.5-34.7-47-20.1-72.7 14.5-25.6 47-34.7 72.7-20.1 15.5 8.7 28.3 16.4 40.2 24.1 358.5 232.5 460.9 713.4 228.4 1071.9-60.8 93.8-139.4 171.7-233.5 231.6-8.9 5.7-18.8 8.4-28.6 8.4z"/>
|
|
13
|
-
<path class="s3" d="m234 350.8c-12.5 0-25.2-4.3-35.2-13.2-22.2-19.5-24.3-53.2-4.8-75.3 186.3-211.8 473.6-305.2 749.4-243.7 28.8 6.4 46.9 34.9 40.5 63.7-6.4 28.7-34.9 46.8-63.7 40.4-237.9-53-485.5 27.6-646.3 210-10.5 11.9-25.2 18.1-39.9 18.1z"/>
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|
package/nodes/fortnox/index.ts
DELETED
package/nodes/fortnox/model.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { IDataObject } from 'n8n-workflow';
|
|
2
|
-
|
|
3
|
-
export interface ErrorInformationModel {
|
|
4
|
-
// fields in ErrorInformationModel can start with lowercase or uppercase,
|
|
5
|
-
code?: number;
|
|
6
|
-
Code?: number;
|
|
7
|
-
error?: number;
|
|
8
|
-
Error?: number;
|
|
9
|
-
message?: string;
|
|
10
|
-
Message?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ErrorResponseModel extends IDataObject {
|
|
14
|
-
ErrorInformation: ErrorInformationModel;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface MetaInformationModel {
|
|
18
|
-
'@TotalResources': number;
|
|
19
|
-
'@TotalPages': number;
|
|
20
|
-
'@CurrentPage': number;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface ResponseModel extends IDataObject {
|
|
24
|
-
MetaInformation: MetaInformationModel;
|
|
25
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { INodeProperties } from 'n8n-workflow';
|
|
2
|
-
import {
|
|
3
|
-
createOptionParameter,
|
|
4
|
-
createParameter,
|
|
5
|
-
OptionParameterDefinition,
|
|
6
|
-
ParameterDefinition,
|
|
7
|
-
} from '../../commons';
|
|
8
|
-
|
|
9
|
-
const optionParametersDefinitions: OptionParameterDefinition[] = [
|
|
10
|
-
{
|
|
11
|
-
displayName: 'Activity',
|
|
12
|
-
name: 'filter',
|
|
13
|
-
parameters: [
|
|
14
|
-
['Active', 'active'],
|
|
15
|
-
['Inactive', 'inactive'],
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
const parametersDefinitions: ParameterDefinition[] = [
|
|
21
|
-
['Customer Number', 'customernumber', 'string', '', {}],
|
|
22
|
-
['Name', 'name', 'string', '', {}],
|
|
23
|
-
['ZIP Code', 'zipcode', 'string', '', {}],
|
|
24
|
-
['City', 'city', 'string', '', {}],
|
|
25
|
-
['Email', 'email', 'string', '', {}],
|
|
26
|
-
['Phone', 'phone', 'string', '', {}],
|
|
27
|
-
['Organisation Number', 'organisationnumber', 'string', '', {}],
|
|
28
|
-
['GLN', 'gln', 'string', '', {}],
|
|
29
|
-
['GLN Delivery', 'glndelivery', 'string', '', {}],
|
|
30
|
-
['Last Modified', 'lastmodified', 'string', '', {}],
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
export const filterParameters: INodeProperties[] = [
|
|
34
|
-
...optionParametersDefinitions.map((option) =>
|
|
35
|
-
createOptionParameter(option)
|
|
36
|
-
),
|
|
37
|
-
...parametersDefinitions.map(
|
|
38
|
-
([displayName, name, filterType, defaultValue, typeOptions]) =>
|
|
39
|
-
createParameter(
|
|
40
|
-
displayName,
|
|
41
|
-
name,
|
|
42
|
-
filterType,
|
|
43
|
-
defaultValue,
|
|
44
|
-
typeOptions
|
|
45
|
-
)
|
|
46
|
-
),
|
|
47
|
-
];
|
|
@@ -1,53 +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.getManyCustomers,
|
|
12
|
-
operations.getSingleCustomer,
|
|
13
|
-
operations.createSingleCustomer,
|
|
14
|
-
operations.updateSingleCustomer,
|
|
15
|
-
operations.deleteSingleCustomer,
|
|
16
|
-
]);
|
|
17
|
-
|
|
18
|
-
export const customerProperties: INodeProperties[] = [
|
|
19
|
-
{
|
|
20
|
-
displayName: 'Operation',
|
|
21
|
-
name: 'operation',
|
|
22
|
-
type: 'options' as NodePropertyTypes,
|
|
23
|
-
noDataExpression: true,
|
|
24
|
-
displayOptions: {
|
|
25
|
-
show: {
|
|
26
|
-
resource: ['customer'],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
options: moduleHandler.getDescriptions(),
|
|
30
|
-
default: 'getAll',
|
|
31
|
-
},
|
|
32
|
-
...moduleHandler.getProperties(),
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
export async function customerOperations(
|
|
36
|
-
this: IExecuteFunctions,
|
|
37
|
-
{ operation, i }: { operation: string; i: number }
|
|
38
|
-
) {
|
|
39
|
-
if (operation === 'get') {
|
|
40
|
-
return await operations.getSingleCustomer.execute.call(this, i);
|
|
41
|
-
} else if (operation === 'getAll') {
|
|
42
|
-
return await operations.getManyCustomers.execute.call(this, i);
|
|
43
|
-
} else if (operation === 'create') {
|
|
44
|
-
return await operations.createSingleCustomer.execute.call(this, i);
|
|
45
|
-
} else if (operation === 'update') {
|
|
46
|
-
return await operations.updateSingleCustomer.execute.call(this, i);
|
|
47
|
-
} else if (operation === 'delete') {
|
|
48
|
-
return await operations.deleteSingleCustomer.execute.call(this, i);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
export * from './operations';
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ResponseModel } from '../../model';
|
|
2
|
-
|
|
3
|
-
export interface CustomerBase {
|
|
4
|
-
'@url': string;
|
|
5
|
-
Address1: string | null;
|
|
6
|
-
Address2: string | null;
|
|
7
|
-
City: string | null;
|
|
8
|
-
CustomerNumber: number;
|
|
9
|
-
Email: string | null;
|
|
10
|
-
Name: string;
|
|
11
|
-
OrganisationNumber: string;
|
|
12
|
-
Phone: string | null;
|
|
13
|
-
ZipCode: number | string | null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type DeliveryType = 'PRINT' | 'EMAIL' | 'PRINTSERVICE';
|
|
17
|
-
|
|
18
|
-
export interface DefaultDeliveryTypes {
|
|
19
|
-
Invoice: DeliveryType;
|
|
20
|
-
Order: DeliveryType;
|
|
21
|
-
Offer: DeliveryType;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface DefaultTemplates {
|
|
25
|
-
Order: string | null;
|
|
26
|
-
Offer: string | null;
|
|
27
|
-
Invoice: string | null;
|
|
28
|
-
CashInvoice: string | null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface CustomerDetails {
|
|
32
|
-
Address1: string | null;
|
|
33
|
-
Address2: string | null;
|
|
34
|
-
City: string | null;
|
|
35
|
-
Country: string | null;
|
|
36
|
-
Comments: string | null;
|
|
37
|
-
Currency: string;
|
|
38
|
-
CostCenter: string | null;
|
|
39
|
-
CountryCode: string | null;
|
|
40
|
-
Active: boolean;
|
|
41
|
-
CustomerNumber: string;
|
|
42
|
-
DefaultDeliveryTypes: DefaultDeliveryTypes;
|
|
43
|
-
DefaultTemplates: DefaultTemplates;
|
|
44
|
-
DeliveryAddress1: string | null;
|
|
45
|
-
DeliveryAddress2: string | null;
|
|
46
|
-
DeliveryCity: string | null;
|
|
47
|
-
DeliveryCountry: string | null;
|
|
48
|
-
DeliveryCountryCode: string | null;
|
|
49
|
-
DeliveryFax: string | null;
|
|
50
|
-
DeliveryName: string | null;
|
|
51
|
-
DeliveryPhone1: string | null;
|
|
52
|
-
DeliveryPhone2: string | null;
|
|
53
|
-
DeliveryZipCode: string | null;
|
|
54
|
-
Email: string | null;
|
|
55
|
-
EmailInvoice: string | null;
|
|
56
|
-
EmailInvoiceBCC: string | null;
|
|
57
|
-
EmailInvoiceCC: string | null;
|
|
58
|
-
EmailOffer: string | null;
|
|
59
|
-
EmailOfferBCC: string | null;
|
|
60
|
-
EmailOfferCC: string | null;
|
|
61
|
-
EmailOrder: string | null;
|
|
62
|
-
EmailOrderBCC: string | null;
|
|
63
|
-
EmailOrderCC: string | null;
|
|
64
|
-
ExternalReference: string | null;
|
|
65
|
-
Fax: string | null;
|
|
66
|
-
GLN: string | null;
|
|
67
|
-
GLNDelivery: string | null;
|
|
68
|
-
InvoiceAdministrationFee: number | null;
|
|
69
|
-
InvoiceDiscount: number | null;
|
|
70
|
-
InvoiceFreight: number | null;
|
|
71
|
-
InvoiceRemark: string | null;
|
|
72
|
-
Name: string;
|
|
73
|
-
OrganisationNumber: string;
|
|
74
|
-
OurReference: string | null;
|
|
75
|
-
Phone1: string | null;
|
|
76
|
-
Phone2: string | null;
|
|
77
|
-
PriceList: string | null;
|
|
78
|
-
Project: string | null;
|
|
79
|
-
SalesAccount: string | null;
|
|
80
|
-
ShowPriceVATIncluded: boolean;
|
|
81
|
-
TermsOfDelivery: string | null;
|
|
82
|
-
TermsOfPayment: string | null;
|
|
83
|
-
Type: 'PRIVATE' | 'COMPANY';
|
|
84
|
-
VATNumber: string | null;
|
|
85
|
-
VATType: 'SEVAT' | 'SEREVERSEDVAT' | 'EUREVERSEDVAT' | 'EUVAT' | 'EXPORT';
|
|
86
|
-
VisitingAddress: string | null;
|
|
87
|
-
VisitingCity: string | null;
|
|
88
|
-
VisitingCountry: string | null;
|
|
89
|
-
VisitingCountryCode: string | null;
|
|
90
|
-
VisitingZipCode: string | null;
|
|
91
|
-
WayOfDelivery: string | null;
|
|
92
|
-
WWW: string | null;
|
|
93
|
-
YourReference: string | null;
|
|
94
|
-
ZipCode: string | null;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface Customer extends CustomerDetails {
|
|
98
|
-
'@url': string;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface CustomersResponse extends ResponseModel {
|
|
102
|
-
Customers: CustomerBase[];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export interface CustomerResponse {
|
|
106
|
-
Customer: Customer;
|
|
107
|
-
}
|