n8n-nodes-synca 1.0.37 → 1.0.39
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/dist/credentials/SyncaApi.credentials.d.ts +10 -10
- package/dist/credentials/SyncaApi.credentials.js +62 -62
- package/dist/index.js +1 -1
- package/dist/nodes/Cashcow/SyncaCashcow.node.d.ts +10 -10
- package/dist/nodes/Cashcow/SyncaCashcow.node.js +188 -187
- package/dist/nodes/Cashcow/SyncaCashcow.node.js.map +1 -1
- package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.d.ts +17 -17
- package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.js +36 -36
- package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.d.ts +117 -117
- package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js +249 -249
- package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js.map +1 -1
- package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.d.ts +189 -189
- package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js +448 -448
- package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js.map +1 -1
- package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.d.ts +46 -46
- package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js +165 -165
- package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js.map +1 -1
- package/dist/nodes/Konimbo/SyncaKonimbo.node.d.ts +10 -10
- package/dist/nodes/Konimbo/SyncaKonimbo.node.js +867 -866
- package/dist/nodes/Konimbo/SyncaKonimbo.node.js.map +1 -1
- package/dist/nodes/Priority/SyncaPriority.node.d.ts +18 -18
- package/dist/nodes/Priority/SyncaPriority.node.js +325 -323
- package/dist/nodes/Priority/SyncaPriority.node.js.map +1 -1
- package/dist/nodes/Priority/constants/methods.d.ts +15 -15
- package/dist/nodes/Priority/constants/methods.js +219 -219
- package/dist/nodes/Priority/constants/methods.js.map +1 -1
- package/dist/nodes/Priority/constants/priority-agents.constant.d.ts +39 -39
- package/dist/nodes/Priority/constants/priority-agents.constant.js +113 -113
- package/dist/nodes/Priority/constants/priority-agents.constant.js.map +1 -1
- package/dist/nodes/Priority/constants/priority-generic.constant.d.ts +158 -158
- package/dist/nodes/Priority/constants/priority-generic.constant.js +243 -243
- package/dist/nodes/Priority/constants/priority-procedure.constant.d.ts +129 -129
- package/dist/nodes/Priority/constants/priority-procedure.constant.js +177 -177
- package/dist/nodes/Priority/constants/priority-procedure.constant.js.map +1 -1
- package/dist/nodes/Priority/constants/priority-products.constant.d.ts +115 -115
- package/dist/nodes/Priority/constants/priority-products.constant.js +239 -213
- package/dist/nodes/Priority/constants/priority-products.constant.js.map +1 -1
- package/dist/nodes/Priority/constants/priority-purchase-orders.constant.d.ts +158 -158
- package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js +217 -217
- package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js.map +1 -1
- package/dist/nodes/Priority/constants/priority-sales.constant.d.ts +158 -158
- package/dist/nodes/Priority/constants/priority-sales.constant.js +382 -382
- package/dist/nodes/Priority/constants/priority-sales.constant.js.map +1 -1
- package/dist/nodes/PriorityAPI/SyncaPriorityAPI.node.d.ts +10 -10
- package/dist/nodes/PriorityAPI/SyncaPriorityAPI.node.js +408 -407
- package/dist/nodes/PriorityAPI/SyncaPriorityAPI.node.js.map +1 -1
- package/dist/nodes/RunERP/SyncaRunERP.node.d.ts +10 -10
- package/dist/nodes/RunERP/SyncaRunERP.node.js +189 -188
- package/dist/nodes/RunERP/SyncaRunERP.node.js.map +1 -1
- package/dist/nodes/RunERP/constants/run-erp-cancel-shipment.constant.d.ts +5 -5
- package/dist/nodes/RunERP/constants/run-erp-cancel-shipment.constant.js +30 -30
- package/dist/nodes/RunERP/constants/run-erp-create-shipment.constant.d.ts +5 -5
- package/dist/nodes/RunERP/constants/run-erp-create-shipment.constant.js +449 -449
- package/dist/nodes/RunERP/constants/run-erp-create-shipment.constant.js.map +1 -1
- package/dist/nodes/RunERP/constants/run-erp-get-pickup-points.constant.d.ts +5 -5
- package/dist/nodes/RunERP/constants/run-erp-get-pickup-points.constant.js +88 -88
- package/dist/nodes/RunERP/constants/run-erp-get-pickup-points.constant.js.map +1 -1
- package/dist/nodes/RunERP/constants/run-erp-get-tracking.constant.d.ts +5 -5
- package/dist/nodes/RunERP/constants/run-erp-get-tracking.constant.js +79 -79
- package/dist/nodes/RunERP/constants/run-erp-get-tracking.constant.js.map +1 -1
- package/dist/nodes/RunERP/constants/run-erp-print-label.constant.d.ts +5 -5
- package/dist/nodes/RunERP/constants/run-erp-print-label.constant.js +47 -47
- package/dist/nodes/RunERP/constants/run-erp-print-label.constant.js.map +1 -1
- package/dist/nodes/Superpharm/SyncaSuperpharm.node.d.ts +10 -10
- package/dist/nodes/Superpharm/SyncaSuperpharm.node.js +1128 -1127
- package/dist/nodes/Superpharm/SyncaSuperpharm.node.js.map +1 -1
- package/dist/nodes/Wolt/SyncaWolt.node.d.ts +10 -10
- package/dist/nodes/Wolt/SyncaWolt.node.js +956 -955
- package/dist/nodes/Wolt/SyncaWolt.node.js.map +1 -1
- package/dist/nodes/Wolt/SyncaWoltTrigger.node.d.ts +17 -17
- package/dist/nodes/Wolt/SyncaWoltTrigger.node.js +171 -170
- package/dist/nodes/Wolt/SyncaWoltTrigger.node.js.map +1 -1
- package/dist/nodes/shared/SyncaService.d.ts +21 -21
- package/dist/nodes/shared/SyncaService.js +92 -96
- package/dist/nodes/shared/SyncaService.js.map +1 -1
- package/dist/package.json +75 -75
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
-
export declare class SyncaApi implements ICredentialType {
|
|
3
|
-
name: string;
|
|
4
|
-
displayName: string;
|
|
5
|
-
icon: Icon;
|
|
6
|
-
documentationUrl: string;
|
|
7
|
-
properties: INodeProperties[];
|
|
8
|
-
authenticate: IAuthenticateGeneric;
|
|
9
|
-
test: ICredentialTestRequest;
|
|
10
|
-
}
|
|
1
|
+
import { IAuthenticateGeneric, Icon, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class SyncaApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
documentationUrl: string;
|
|
7
|
+
properties: INodeProperties[];
|
|
8
|
+
authenticate: IAuthenticateGeneric;
|
|
9
|
+
test: ICredentialTestRequest;
|
|
10
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SyncaApi = void 0;
|
|
4
|
-
class SyncaApi {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.name = 'customSyncaApiCredentials';
|
|
7
|
-
this.displayName = 'Synca API Credentials';
|
|
8
|
-
this.icon = { dark: 'file:icon.svg', light: 'file:icon.svg' };
|
|
9
|
-
this.documentationUrl = 'https://n8n.synca.co.il/docs';
|
|
10
|
-
this.properties = [
|
|
11
|
-
{
|
|
12
|
-
displayName: 'API Token',
|
|
13
|
-
name: 'apiToken',
|
|
14
|
-
type: 'string',
|
|
15
|
-
typeOptions: {
|
|
16
|
-
password: true,
|
|
17
|
-
},
|
|
18
|
-
default: '',
|
|
19
|
-
required: true,
|
|
20
|
-
description: 'The API token for authentication',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
displayName: 'Secret Key',
|
|
24
|
-
name: 'secretKey',
|
|
25
|
-
type: 'string',
|
|
26
|
-
typeOptions: {
|
|
27
|
-
password: true,
|
|
28
|
-
},
|
|
29
|
-
default: '',
|
|
30
|
-
required: true,
|
|
31
|
-
description: 'The Secret Key for authentication',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
displayName: 'Base URL',
|
|
35
|
-
name: 'baseUrl',
|
|
36
|
-
type: 'string',
|
|
37
|
-
default: 'https://n8n-api.synca.co.il',
|
|
38
|
-
description: 'Base URL of your Synca instance',
|
|
39
|
-
},
|
|
40
|
-
];
|
|
41
|
-
this.authenticate = {
|
|
42
|
-
type: 'generic',
|
|
43
|
-
properties: {
|
|
44
|
-
headers: {
|
|
45
|
-
'X-API-Token': '={{$credentials.apiToken}}',
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
this.test = {
|
|
50
|
-
request: {
|
|
51
|
-
skipSslCertificateValidation: true,
|
|
52
|
-
headers: {
|
|
53
|
-
'X-API-Token': '={{$credentials.apiToken}}',
|
|
54
|
-
},
|
|
55
|
-
baseURL: '={{$credentials.baseUrl}}',
|
|
56
|
-
url: '/v1/invoke/health-check',
|
|
57
|
-
method: 'GET',
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.SyncaApi = SyncaApi;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncaApi = void 0;
|
|
4
|
+
class SyncaApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'customSyncaApiCredentials';
|
|
7
|
+
this.displayName = 'Synca API Credentials';
|
|
8
|
+
this.icon = { dark: 'file:icon.svg', light: 'file:icon.svg' };
|
|
9
|
+
this.documentationUrl = 'https://n8n.synca.co.il/docs';
|
|
10
|
+
this.properties = [
|
|
11
|
+
{
|
|
12
|
+
displayName: 'API Token',
|
|
13
|
+
name: 'apiToken',
|
|
14
|
+
type: 'string',
|
|
15
|
+
typeOptions: {
|
|
16
|
+
password: true,
|
|
17
|
+
},
|
|
18
|
+
default: '',
|
|
19
|
+
required: true,
|
|
20
|
+
description: 'The API token for authentication',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Secret Key',
|
|
24
|
+
name: 'secretKey',
|
|
25
|
+
type: 'string',
|
|
26
|
+
typeOptions: {
|
|
27
|
+
password: true,
|
|
28
|
+
},
|
|
29
|
+
default: '',
|
|
30
|
+
required: true,
|
|
31
|
+
description: 'The Secret Key for authentication',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Base URL',
|
|
35
|
+
name: 'baseUrl',
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: 'https://n8n-api.synca.co.il',
|
|
38
|
+
description: 'Base URL of your Synca instance',
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
this.authenticate = {
|
|
42
|
+
type: 'generic',
|
|
43
|
+
properties: {
|
|
44
|
+
headers: {
|
|
45
|
+
'X-API-Token': '={{$credentials.apiToken}}',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
this.test = {
|
|
50
|
+
request: {
|
|
51
|
+
skipSslCertificateValidation: true,
|
|
52
|
+
headers: {
|
|
53
|
+
'X-API-Token': '={{$credentials.apiToken}}',
|
|
54
|
+
},
|
|
55
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
56
|
+
url: '/v1/invoke/health-check',
|
|
57
|
+
method: 'GET',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.SyncaApi = SyncaApi;
|
|
63
63
|
//# sourceMappingURL=SyncaApi.credentials.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
-
export declare class SyncaCashcow implements INodeType {
|
|
3
|
-
description: INodeTypeDescription;
|
|
4
|
-
methods: {
|
|
5
|
-
loadOptions: {
|
|
6
|
-
getCredentials(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
-
}
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare class SyncaCashcow implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getCredentials(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
10
|
+
}
|
|
@@ -1,188 +1,189 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SyncaCashcow = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{ name: '
|
|
40
|
-
{ name: '
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
{ name: '
|
|
60
|
-
{ name: '
|
|
61
|
-
{ name: '
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{ name: '
|
|
73
|
-
{ name: '
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
...
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SyncaCashcow = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const cashcow_create_order_constant_1 = require("./constants/cashcow-create-order.constant");
|
|
6
|
+
const cashcow_create_or_update_product_constant_1 = require("./constants/cashcow-create-or-update-product.constant");
|
|
7
|
+
const cashcow_check_order_tracking_constant_1 = require("./constants/cashcow-check-order-tracking.constant");
|
|
8
|
+
const cashcow_get_store_mailbox_constant_1 = require("./constants/cashcow-get-store-mailbox.constant");
|
|
9
|
+
const SyncaService_1 = require("../shared/SyncaService");
|
|
10
|
+
class SyncaCashcow {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.description = {
|
|
13
|
+
usableAsTool: true,
|
|
14
|
+
displayName: 'Synca Cashcow',
|
|
15
|
+
name: 'customSyncaCashcow',
|
|
16
|
+
icon: { light: 'file:icon.svg', dark: 'file:icon.svg' },
|
|
17
|
+
group: ['transform'],
|
|
18
|
+
documentationUrl: 'https://n8n.synca.co.il/docs',
|
|
19
|
+
version: 1,
|
|
20
|
+
description: 'Invoke Cashcow actions via the Synca backend',
|
|
21
|
+
defaults: { name: 'Synca Cashcow' },
|
|
22
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
23
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
24
|
+
credentials: [{ name: 'customSyncaApiCredentials', required: true }],
|
|
25
|
+
properties: [
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Credentials',
|
|
28
|
+
name: 'credentials',
|
|
29
|
+
type: 'options',
|
|
30
|
+
typeOptions: { loadOptionsMethod: 'getCredentials' },
|
|
31
|
+
default: '',
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Resource',
|
|
36
|
+
name: 'resource',
|
|
37
|
+
type: 'options',
|
|
38
|
+
options: [
|
|
39
|
+
{ name: 'Account', value: 'account' },
|
|
40
|
+
{ name: 'Store', value: 'store' },
|
|
41
|
+
{ name: 'Product', value: 'product' },
|
|
42
|
+
],
|
|
43
|
+
default: 'account',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
displayName: 'Operation',
|
|
47
|
+
name: 'operation',
|
|
48
|
+
type: 'options',
|
|
49
|
+
displayOptions: { show: { resource: ['account'] } },
|
|
50
|
+
options: [{ name: 'Get Info', value: 'get_account_info' }],
|
|
51
|
+
default: 'get_account_info',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Operation',
|
|
55
|
+
name: 'operation',
|
|
56
|
+
type: 'options',
|
|
57
|
+
displayOptions: { show: { resource: ['store'] } },
|
|
58
|
+
options: [
|
|
59
|
+
{ name: 'List Orders', value: 'list_orders' },
|
|
60
|
+
{ name: 'Create Order', value: 'create_order' },
|
|
61
|
+
{ name: 'Check Order Tracking', value: 'check_order_tracking' },
|
|
62
|
+
{ name: 'Get Store Mailbox', value: 'get_store_mailbox' },
|
|
63
|
+
],
|
|
64
|
+
default: 'list_orders',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Operation',
|
|
68
|
+
name: 'operation',
|
|
69
|
+
type: 'options',
|
|
70
|
+
displayOptions: { show: { resource: ['product'] } },
|
|
71
|
+
options: [
|
|
72
|
+
{ name: 'Create / Update', value: 'create_or_update_product' },
|
|
73
|
+
{ name: 'Exists?', value: 'product_exists' },
|
|
74
|
+
{ name: 'Get Quantity', value: 'get_product_qty' },
|
|
75
|
+
],
|
|
76
|
+
default: 'create_or_update_product',
|
|
77
|
+
},
|
|
78
|
+
...cashcow_create_order_constant_1.CashcowCreateOrder.declare,
|
|
79
|
+
{
|
|
80
|
+
displayName: 'Order Status IDs',
|
|
81
|
+
name: 'order_status',
|
|
82
|
+
type: 'string',
|
|
83
|
+
default: '',
|
|
84
|
+
description: 'Comma-separated status IDs (see Cashcow docs)',
|
|
85
|
+
displayOptions: { show: { resource: ['store'], operation: ['list_orders'] } },
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
displayName: 'Order ID',
|
|
89
|
+
name: 'OrderID',
|
|
90
|
+
type: 'string',
|
|
91
|
+
default: '',
|
|
92
|
+
displayOptions: { show: { resource: ['store'], operation: ['list_orders'] } },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Days From Now',
|
|
96
|
+
name: 'DaysFromNow',
|
|
97
|
+
type: 'number',
|
|
98
|
+
default: 30,
|
|
99
|
+
typeOptions: {
|
|
100
|
+
minValue: 0,
|
|
101
|
+
maxValue: 60,
|
|
102
|
+
},
|
|
103
|
+
description: 'Number of days from now to search for orders, max 60 days',
|
|
104
|
+
displayOptions: { show: { resource: ['store'], operation: ['list_orders'] } },
|
|
105
|
+
},
|
|
106
|
+
...cashcow_create_or_update_product_constant_1.CashcowCreateOrUpdateProduct.decalre,
|
|
107
|
+
{
|
|
108
|
+
displayName: 'SKU',
|
|
109
|
+
name: 'sku',
|
|
110
|
+
type: 'string',
|
|
111
|
+
default: '',
|
|
112
|
+
displayOptions: { show: { resource: ['product'], operation: ['product_exists'] } },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Product IDs',
|
|
116
|
+
name: 'product_ids',
|
|
117
|
+
type: 'string',
|
|
118
|
+
default: '',
|
|
119
|
+
description: 'Comma-separated list',
|
|
120
|
+
displayOptions: { show: { resource: ['product'], operation: ['get_product_qty'] } },
|
|
121
|
+
},
|
|
122
|
+
...cashcow_check_order_tracking_constant_1.CashcowCheckOrderTracking.declare,
|
|
123
|
+
...cashcow_get_store_mailbox_constant_1.CashcowGetStoreMailbox.declare,
|
|
124
|
+
],
|
|
125
|
+
};
|
|
126
|
+
this.methods = {
|
|
127
|
+
loadOptions: {
|
|
128
|
+
async getCredentials() {
|
|
129
|
+
const service = new SyncaService_1.SyncaService(this);
|
|
130
|
+
return await service.getProviderCredentials();
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
async execute() {
|
|
136
|
+
const items = this.getInputData();
|
|
137
|
+
const out = [];
|
|
138
|
+
const service = new SyncaService_1.SyncaService(this);
|
|
139
|
+
for (let i = 0; i < items.length; i++) {
|
|
140
|
+
try {
|
|
141
|
+
const credentialId = this.getNodeParameter('credentials', i);
|
|
142
|
+
const operation = this.getNodeParameter('operation', i);
|
|
143
|
+
let params = {};
|
|
144
|
+
if (operation === 'create_or_update_product') {
|
|
145
|
+
params = cashcow_create_or_update_product_constant_1.CashcowCreateOrUpdateProduct.process(params, i, this.getNodeParameter);
|
|
146
|
+
}
|
|
147
|
+
else if (operation === 'create_order') {
|
|
148
|
+
params = cashcow_create_order_constant_1.CashcowCreateOrder.process(params, i, this.getNodeParameter);
|
|
149
|
+
}
|
|
150
|
+
else if (operation === 'check_order_tracking') {
|
|
151
|
+
params = cashcow_check_order_tracking_constant_1.CashcowCheckOrderTracking.process(params, i, this.getNodeParameter);
|
|
152
|
+
}
|
|
153
|
+
else if (operation === 'get_store_mailbox') {
|
|
154
|
+
params = cashcow_get_store_mailbox_constant_1.CashcowGetStoreMailbox.process(params, i, this.getNodeParameter);
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
for (const p of [
|
|
158
|
+
'store_id', 'cart', 'is_confirm_payment', 'order_status',
|
|
159
|
+
'product', 'sku', 'product_ids',
|
|
160
|
+
'order_id', 'email_address',
|
|
161
|
+
'page', 'page_size', 'message_type', 'date_from', 'date_to',
|
|
162
|
+
'read_status', 'customer_id', 'search_query', 'order_by',
|
|
163
|
+
'DaysFromNow', 'OrderID'
|
|
164
|
+
]) {
|
|
165
|
+
try {
|
|
166
|
+
const val = this.getNodeParameter(p, i, undefined);
|
|
167
|
+
if (val !== undefined && val !== '')
|
|
168
|
+
params[p] = val;
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const response = await service.invoke(credentialId, operation, params);
|
|
175
|
+
out.push({ json: response, pairedItem: { item: i } });
|
|
176
|
+
}
|
|
177
|
+
catch (err) {
|
|
178
|
+
if (this.continueOnFail()) {
|
|
179
|
+
out.push({ json: { error: err.message }, pairedItem: { item: i } });
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
throw err;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return [out];
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.SyncaCashcow = SyncaCashcow;
|
|
188
189
|
//# sourceMappingURL=SyncaCashcow.node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncaCashcow.node.js","sourceRoot":"","sources":["../../../nodes/Cashcow/SyncaCashcow.node.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"SyncaCashcow.node.js","sourceRoot":"","sources":["../../../nodes/Cashcow/SyncaCashcow.node.ts"],"names":[],"mappings":";;;AAAA,+CASsB;AACtB,6FAA+E;AAC/E,qHAAqG;AACrG,6GAA8F;AAC9F,uGAAwF;AAExF,yDAAsD;AAEtD,MAAa,YAAY;IAAzB;QACE,gBAAW,GAAyB;YAClC,YAAY,EAAE,IAA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AS;gBACX,CAAC;gBACD,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF;AApOD,oCAoOC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export declare const CashcowCheckOrderTracking: {
|
|
2
|
-
declare: {
|
|
3
|
-
displayName: string;
|
|
4
|
-
name: string;
|
|
5
|
-
type: string;
|
|
6
|
-
required: boolean;
|
|
7
|
-
default: string;
|
|
8
|
-
description: string;
|
|
9
|
-
displayOptions: {
|
|
10
|
-
show: {
|
|
11
|
-
resource: string[];
|
|
12
|
-
operation: string[];
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}[];
|
|
16
|
-
process: (params: any, i: number, getNodeParameter: (parameterName: string, itemIndex: number, fallbackValue?: any) => string | number | boolean | object) => any;
|
|
17
|
-
};
|
|
1
|
+
export declare const CashcowCheckOrderTracking: {
|
|
2
|
+
declare: {
|
|
3
|
+
displayName: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
required: boolean;
|
|
7
|
+
default: string;
|
|
8
|
+
description: string;
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
resource: string[];
|
|
12
|
+
operation: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}[];
|
|
16
|
+
process: (params: any, i: number, getNodeParameter: (parameterName: string, itemIndex: number, fallbackValue?: any) => string | number | boolean | object) => any;
|
|
17
|
+
};
|