vantuz 3.4.2 → 3.5.1
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/.env.example +21 -0
- package/.openclaw/completions/openclaw.bash +227 -0
- package/.openclaw/completions/openclaw.fish +1552 -0
- package/.openclaw/completions/openclaw.ps1 +1966 -0
- package/.openclaw/completions/openclaw.zsh +3571 -0
- package/.openclaw/gateway.cmd +10 -0
- package/.openclaw/identity/device.json +7 -0
- package/.openclaw/openclaw.json +40 -0
- package/.windsurf/workflows/vantuz-dev.md +31 -0
- package/DOCS_TR.md +80 -0
- package/LICENSE +45 -45
- package/README.md +52 -21
- package/cli.js +685 -585
- package/config.js +733 -733
- package/core/agent-loop.js +190 -190
- package/core/ai-provider.js +298 -261
- package/core/automation.js +523 -523
- package/core/brand-analyst.js +101 -0
- package/core/channels.js +167 -167
- package/core/dashboard.js +230 -230
- package/core/database.js +135 -37
- package/core/eia-monitor.js +3 -1
- package/core/engine.js +648 -636
- package/core/gateway.js +447 -447
- package/core/learning.js +214 -214
- package/core/license.js +113 -0
- package/core/marketplace-adapter.js +168 -168
- package/core/memory.js +190 -190
- package/core/migrations/001-initial-schema.sql +1 -1
- package/core/queue.js +120 -120
- package/core/self-healer.js +314 -314
- package/core/unified-product.js +214 -214
- package/core/vision-service.js +113 -113
- package/index.js +217 -174
- package/modules/crm/sentiment-crm.js +231 -231
- package/modules/healer/listing-healer.js +201 -201
- package/modules/oracle/predictor.js +214 -214
- package/modules/researcher/agent.js +169 -169
- package/modules/team/agents/base.js +92 -92
- package/modules/team/agents/dev.js +33 -33
- package/modules/team/agents/josh.js +40 -40
- package/modules/team/agents/marketing.js +33 -33
- package/modules/team/agents/milo.js +36 -36
- package/modules/team/index.js +78 -78
- package/modules/team/shared-memory.js +87 -87
- package/modules/war-room/competitor-tracker.js +250 -250
- package/modules/war-room/pricing-engine.js +308 -308
- package/n11docs.md +1680 -0
- package/nodes/warehouse.js +238 -238
- package/onboard.js +1 -1
- package/openclawdocs.md +3 -0
- package/package.json +7 -5
- package/platforms/pttavm.js +14 -14
- package/plugins/vantuz/index.js +528 -528
- package/plugins/vantuz/memory/hippocampus.js +465 -465
- package/plugins/vantuz/package.json +20 -20
- package/plugins/vantuz/platforms/_template.js +118 -118
- package/plugins/vantuz/platforms/amazon.js +236 -236
- package/plugins/vantuz/platforms/ciceksepeti.js +166 -166
- package/plugins/vantuz/platforms/hepsiburada.js +180 -180
- package/plugins/vantuz/platforms/index.js +165 -165
- package/plugins/vantuz/platforms/n11.js +229 -229
- package/plugins/vantuz/platforms/pazarama.js +154 -154
- package/plugins/vantuz/platforms/pttavm.js +127 -127
- package/plugins/vantuz/platforms/trendyol.js +326 -326
- package/plugins/vantuz/services/alerts.js +253 -253
- package/plugins/vantuz/services/license.js +34 -34
- package/plugins/vantuz/services/scheduler.js +232 -232
- package/plugins/vantuz/tools/analytics.js +152 -152
- package/plugins/vantuz/tools/crossborder.js +187 -187
- package/plugins/vantuz/tools/nl-parser.js +211 -211
- package/plugins/vantuz/tools/product.js +110 -110
- package/plugins/vantuz/tools/quick-report.js +175 -175
- package/plugins/vantuz/tools/repricer.js +314 -314
- package/plugins/vantuz/tools/sentiment.js +115 -115
- package/plugins/vantuz/tools/vision.js +257 -257
- package/public.pem +9 -0
- package/server/app.js +260 -260
- package/server/public/index.html +514 -514
- package/start.bat +33 -33
- package/vantuz.sqlite +0 -0
- package/workspace/AGENTS.md +73 -0
- package/workspace/BRAND.md +29 -0
- package/workspace/SOUL.md +72 -0
- package/workspace/team/DECISIONS.md +3 -0
- package/workspace/team/GOALS.md +3 -0
- package/workspace/team/PROJECT_STATUS.md +3 -0
- package/workspace/team/agents/dev/SOUL.md +12 -0
- package/workspace/team/agents/josh/SOUL.md +12 -0
- package/workspace/team/agents/marketing/SOUL.md +12 -0
- package/workspace/team/agents/milo/SOUL.md +12 -0
- package/vantuz-3.3.4.tgz +0 -0
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🏪 Platform API Hub
|
|
3
|
-
* Tüm pazaryeri API'lerini tek noktadan yönet
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { trendyolApi, TrendyolAPI } from './trendyol.js';
|
|
7
|
-
import { hepsiburadaApi, HepsiburadaAPI } from './hepsiburada.js';
|
|
8
|
-
import { n11Api, N11API } from './n11.js';
|
|
9
|
-
import { amazonApi, AmazonAPI } from './amazon.js';
|
|
10
|
-
import { ciceksepetiApi, CiceksepetiAPI } from './ciceksepeti.js';
|
|
11
|
-
import { pttavmApi, PttavmAPI } from './pttavm.js';
|
|
12
|
-
import { pazaramaApi, PazaramaAPI } from './pazarama.js';
|
|
13
|
-
|
|
14
|
-
// Platform aliases
|
|
15
|
-
const PLATFORM_ALIASES = {
|
|
16
|
-
ty: 'trendyol',
|
|
17
|
-
trendyol: 'trendyol',
|
|
18
|
-
hb: 'hepsiburada',
|
|
19
|
-
hepsiburada: 'hepsiburada',
|
|
20
|
-
n11: 'n11',
|
|
21
|
-
amazon: 'amazon',
|
|
22
|
-
amz: 'amazon',
|
|
23
|
-
cs: 'ciceksepeti',
|
|
24
|
-
ciceksepeti: 'ciceksepeti',
|
|
25
|
-
çiçeksepeti: 'ciceksepeti',
|
|
26
|
-
ptt: 'pttavm',
|
|
27
|
-
pttavm: 'pttavm',
|
|
28
|
-
pazarama: 'pazarama',
|
|
29
|
-
pzr: 'pazarama'
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const platforms = {
|
|
33
|
-
trendyol: trendyolApi,
|
|
34
|
-
hepsiburada: hepsiburadaApi,
|
|
35
|
-
n11: n11Api,
|
|
36
|
-
amazon: amazonApi,
|
|
37
|
-
ciceksepeti: ciceksepetiApi,
|
|
38
|
-
pttavm: pttavmApi,
|
|
39
|
-
pazarama: pazaramaApi
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
43
|
-
// PLATFORM HUB
|
|
44
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
45
|
-
|
|
46
|
-
export const platformHub = {
|
|
47
|
-
/**
|
|
48
|
-
* Platform'u alias ile bul
|
|
49
|
-
*/
|
|
50
|
-
resolve(alias) {
|
|
51
|
-
const normalized = alias?.toLowerCase().trim();
|
|
52
|
-
const name = PLATFORM_ALIASES[normalized];
|
|
53
|
-
return name ? platforms[name] : null;
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Tüm platformları başlat
|
|
58
|
-
*/
|
|
59
|
-
async initAll(config) {
|
|
60
|
-
const results = {};
|
|
61
|
-
|
|
62
|
-
if (config.trendyol) {
|
|
63
|
-
results.trendyol = trendyolApi.init(config.trendyol);
|
|
64
|
-
}
|
|
65
|
-
if (config.hepsiburada) {
|
|
66
|
-
results.hepsiburada = hepsiburadaApi.init(config.hepsiburada);
|
|
67
|
-
}
|
|
68
|
-
if (config.n11) {
|
|
69
|
-
results.n11 = n11Api.init(config.n11);
|
|
70
|
-
}
|
|
71
|
-
if (config.amazon) {
|
|
72
|
-
results.amazon = amazonApi.init(config.amazon.eu, 'eu');
|
|
73
|
-
if (config.amazon.us) {
|
|
74
|
-
amazonApi.init(config.amazon.us, 'na');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (config.ciceksepeti) {
|
|
78
|
-
results.ciceksepeti = ciceksepetiApi.init(config.ciceksepeti);
|
|
79
|
-
}
|
|
80
|
-
if (config.pttavm) {
|
|
81
|
-
results.pttavm = pttavmApi.init(config.pttavm);
|
|
82
|
-
}
|
|
83
|
-
if (config.pazarama) {
|
|
84
|
-
results.pazarama = pazaramaApi.init(config.pazarama);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return results;
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Bağlı platformları listele
|
|
92
|
-
*/
|
|
93
|
-
getConnected() {
|
|
94
|
-
const connected = [];
|
|
95
|
-
for (const [name, api] of Object.entries(platforms)) {
|
|
96
|
-
if (api.isConnected()) {
|
|
97
|
-
connected.push(name);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return connected;
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Durum özeti
|
|
105
|
-
*/
|
|
106
|
-
getStatus() {
|
|
107
|
-
const status = {};
|
|
108
|
-
for (const [name, api] of Object.entries(platforms)) {
|
|
109
|
-
status[name] = {
|
|
110
|
-
connected: api.isConnected(),
|
|
111
|
-
icon: this.getIcon(name)
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return status;
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Platform ikonu
|
|
119
|
-
*/
|
|
120
|
-
getIcon(platform) {
|
|
121
|
-
const icons = {
|
|
122
|
-
trendyol: '🟠',
|
|
123
|
-
hepsiburada: '🟣',
|
|
124
|
-
n11: '🔵',
|
|
125
|
-
amazon: '🟡',
|
|
126
|
-
ciceksepeti: '🌸',
|
|
127
|
-
pttavm: '📮',
|
|
128
|
-
pazarama: '🛒'
|
|
129
|
-
};
|
|
130
|
-
return icons[platform] || '📦';
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Çoklu platform fiyat güncelle
|
|
135
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* 🏪 Platform API Hub
|
|
3
|
+
* Tüm pazaryeri API'lerini tek noktadan yönet
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { trendyolApi, TrendyolAPI } from './trendyol.js';
|
|
7
|
+
import { hepsiburadaApi, HepsiburadaAPI } from './hepsiburada.js';
|
|
8
|
+
import { n11Api, N11API } from './n11.js';
|
|
9
|
+
import { amazonApi, AmazonAPI } from './amazon.js';
|
|
10
|
+
import { ciceksepetiApi, CiceksepetiAPI } from './ciceksepeti.js';
|
|
11
|
+
import { pttavmApi, PttavmAPI } from './pttavm.js';
|
|
12
|
+
import { pazaramaApi, PazaramaAPI } from './pazarama.js';
|
|
13
|
+
|
|
14
|
+
// Platform aliases
|
|
15
|
+
const PLATFORM_ALIASES = {
|
|
16
|
+
ty: 'trendyol',
|
|
17
|
+
trendyol: 'trendyol',
|
|
18
|
+
hb: 'hepsiburada',
|
|
19
|
+
hepsiburada: 'hepsiburada',
|
|
20
|
+
n11: 'n11',
|
|
21
|
+
amazon: 'amazon',
|
|
22
|
+
amz: 'amazon',
|
|
23
|
+
cs: 'ciceksepeti',
|
|
24
|
+
ciceksepeti: 'ciceksepeti',
|
|
25
|
+
çiçeksepeti: 'ciceksepeti',
|
|
26
|
+
ptt: 'pttavm',
|
|
27
|
+
pttavm: 'pttavm',
|
|
28
|
+
pazarama: 'pazarama',
|
|
29
|
+
pzr: 'pazarama'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const platforms = {
|
|
33
|
+
trendyol: trendyolApi,
|
|
34
|
+
hepsiburada: hepsiburadaApi,
|
|
35
|
+
n11: n11Api,
|
|
36
|
+
amazon: amazonApi,
|
|
37
|
+
ciceksepeti: ciceksepetiApi,
|
|
38
|
+
pttavm: pttavmApi,
|
|
39
|
+
pazarama: pazaramaApi
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
43
|
+
// PLATFORM HUB
|
|
44
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
45
|
+
|
|
46
|
+
export const platformHub = {
|
|
47
|
+
/**
|
|
48
|
+
* Platform'u alias ile bul
|
|
49
|
+
*/
|
|
50
|
+
resolve(alias) {
|
|
51
|
+
const normalized = alias?.toLowerCase().trim();
|
|
52
|
+
const name = PLATFORM_ALIASES[normalized];
|
|
53
|
+
return name ? platforms[name] : null;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Tüm platformları başlat
|
|
58
|
+
*/
|
|
59
|
+
async initAll(config) {
|
|
60
|
+
const results = {};
|
|
61
|
+
|
|
62
|
+
if (config.trendyol) {
|
|
63
|
+
results.trendyol = trendyolApi.init(config.trendyol);
|
|
64
|
+
}
|
|
65
|
+
if (config.hepsiburada) {
|
|
66
|
+
results.hepsiburada = hepsiburadaApi.init(config.hepsiburada);
|
|
67
|
+
}
|
|
68
|
+
if (config.n11) {
|
|
69
|
+
results.n11 = n11Api.init(config.n11);
|
|
70
|
+
}
|
|
71
|
+
if (config.amazon) {
|
|
72
|
+
results.amazon = amazonApi.init(config.amazon.eu, 'eu');
|
|
73
|
+
if (config.amazon.us) {
|
|
74
|
+
amazonApi.init(config.amazon.us, 'na');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (config.ciceksepeti) {
|
|
78
|
+
results.ciceksepeti = ciceksepetiApi.init(config.ciceksepeti);
|
|
79
|
+
}
|
|
80
|
+
if (config.pttavm) {
|
|
81
|
+
results.pttavm = pttavmApi.init(config.pttavm);
|
|
82
|
+
}
|
|
83
|
+
if (config.pazarama) {
|
|
84
|
+
results.pazarama = pazaramaApi.init(config.pazarama);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return results;
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Bağlı platformları listele
|
|
92
|
+
*/
|
|
93
|
+
getConnected() {
|
|
94
|
+
const connected = [];
|
|
95
|
+
for (const [name, api] of Object.entries(platforms)) {
|
|
96
|
+
if (api.isConnected()) {
|
|
97
|
+
connected.push(name);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return connected;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Durum özeti
|
|
105
|
+
*/
|
|
106
|
+
getStatus() {
|
|
107
|
+
const status = {};
|
|
108
|
+
for (const [name, api] of Object.entries(platforms)) {
|
|
109
|
+
status[name] = {
|
|
110
|
+
connected: api.isConnected(),
|
|
111
|
+
icon: this.getIcon(name)
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return status;
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Platform ikonu
|
|
119
|
+
*/
|
|
120
|
+
getIcon(platform) {
|
|
121
|
+
const icons = {
|
|
122
|
+
trendyol: '🟠',
|
|
123
|
+
hepsiburada: '🟣',
|
|
124
|
+
n11: '🔵',
|
|
125
|
+
amazon: '🟡',
|
|
126
|
+
ciceksepeti: '🌸',
|
|
127
|
+
pttavm: '📮',
|
|
128
|
+
pazarama: '🛒'
|
|
129
|
+
};
|
|
130
|
+
return icons[platform] || '📦';
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Çoklu platform fiyat güncelle
|
|
135
|
+
*/
|
|
136
136
|
async updatePriceMulti(barcode, price, targetPlatforms = 'all') {
|
|
137
137
|
const targets = targetPlatforms === 'all'
|
|
138
138
|
? this.getConnected()
|
|
@@ -154,10 +154,10 @@ export const platformHub = {
|
|
|
154
154
|
await Promise.allSettled(tasks);
|
|
155
155
|
return results;
|
|
156
156
|
},
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Çoklu platform stok güncelle
|
|
160
|
-
*/
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Çoklu platform stok güncelle
|
|
160
|
+
*/
|
|
161
161
|
async updateStockMulti(barcode, quantity, targetPlatforms = 'all') {
|
|
162
162
|
const targets = targetPlatforms === 'all'
|
|
163
163
|
? this.getConnected()
|
|
@@ -179,10 +179,10 @@ export const platformHub = {
|
|
|
179
179
|
await Promise.allSettled(tasks);
|
|
180
180
|
return results;
|
|
181
181
|
},
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Tüm platformlardan sipariş çek
|
|
185
|
-
*/
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Tüm platformlardan sipariş çek
|
|
185
|
+
*/
|
|
186
186
|
async getAllOrders(params = {}) {
|
|
187
187
|
const connected = this.getConnected();
|
|
188
188
|
const allOrders = [];
|
|
@@ -242,25 +242,25 @@ export const platformHub = {
|
|
|
242
242
|
// Tarihe göre sırala
|
|
243
243
|
allOrders.sort((a, b) => new Date(b.createdDate || b.orderDate) - new Date(a.createdDate || a.orderDate));
|
|
244
244
|
return allOrders;
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
// Export individual APIs
|
|
249
|
-
export {
|
|
250
|
-
trendyolApi,
|
|
251
|
-
hepsiburadaApi,
|
|
252
|
-
n11Api,
|
|
253
|
-
amazonApi,
|
|
254
|
-
ciceksepetiApi,
|
|
255
|
-
pttavmApi,
|
|
256
|
-
pazaramaApi,
|
|
257
|
-
TrendyolAPI,
|
|
258
|
-
HepsiburadaAPI,
|
|
259
|
-
N11API,
|
|
260
|
-
AmazonAPI,
|
|
261
|
-
CiceksepetiAPI,
|
|
262
|
-
PttavmAPI,
|
|
263
|
-
PazaramaAPI
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export default platformHub;
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
// Export individual APIs
|
|
249
|
+
export {
|
|
250
|
+
trendyolApi,
|
|
251
|
+
hepsiburadaApi,
|
|
252
|
+
n11Api,
|
|
253
|
+
amazonApi,
|
|
254
|
+
ciceksepetiApi,
|
|
255
|
+
pttavmApi,
|
|
256
|
+
pazaramaApi,
|
|
257
|
+
TrendyolAPI,
|
|
258
|
+
HepsiburadaAPI,
|
|
259
|
+
N11API,
|
|
260
|
+
AmazonAPI,
|
|
261
|
+
CiceksepetiAPI,
|
|
262
|
+
PttavmAPI,
|
|
263
|
+
PazaramaAPI
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
export default platformHub;
|