vantuz 3.4.2 → 3.5.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/LICENSE +45 -45
- package/admin-keygen.js +51 -0
- 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/nodes/warehouse.js +238 -238
- package/onboard.js +1 -1
- 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/private.pem +28 -0
- 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
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vantuz/plugin",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"description": "Vantuz AI E-Commerce Plugin for Vantuz Gateway",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.js"
|
|
9
|
-
},
|
|
10
|
-
"openclaw": {
|
|
11
|
-
"id": "vantuz",
|
|
12
|
-
"name": "Vantuz AI",
|
|
13
|
-
"description": "E-ticaret yönetim araçları: repricer, vision, sentiment, crossborder",
|
|
14
|
-
"version": "2.0.0"
|
|
15
|
-
},
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"axios": "^1.6.0",
|
|
18
|
-
"sequelize": "^6.37.7",
|
|
19
|
-
"better-sqlite3": "^9.0.0"
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@vantuz/plugin",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Vantuz AI E-Commerce Plugin for Vantuz Gateway",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js"
|
|
9
|
+
},
|
|
10
|
+
"openclaw": {
|
|
11
|
+
"id": "vantuz",
|
|
12
|
+
"name": "Vantuz AI",
|
|
13
|
+
"description": "E-ticaret yönetim araçları: repricer, vision, sentiment, crossborder",
|
|
14
|
+
"version": "2.0.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"axios": "^1.6.0",
|
|
18
|
+
"sequelize": "^6.37.7",
|
|
19
|
+
"better-sqlite3": "^9.0.0"
|
|
20
|
+
}
|
|
21
21
|
}
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🐙 VANTUZ PLATFORM ŞABLONU
|
|
3
|
-
* Yeni bir pazaryeri eklemek için bu dosyayı kopyalayın ve düzenleyin.
|
|
4
|
-
* Dosya adı: {platform-adi}.js (örn: n11.js, amazon.js)
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import axios from 'axios';
|
|
8
|
-
|
|
9
|
-
// Gerekirse AI provider log fonksiyonunu import edin
|
|
10
|
-
// import { log } from '../../../core/ai-provider.js';
|
|
11
|
-
|
|
12
|
-
export class NewPlatformAPI {
|
|
13
|
-
/**
|
|
14
|
-
* @param {Object} config - Config from env variables
|
|
15
|
-
*/
|
|
16
|
-
constructor(config) {
|
|
17
|
-
// Config validasyonu
|
|
18
|
-
if (!config.apiKey || !config.apiSecret) {
|
|
19
|
-
throw new Error('Eksik API anahtarları');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
this.config = config;
|
|
23
|
-
this.client = axios.create({
|
|
24
|
-
baseURL: 'https://api.example.com',
|
|
25
|
-
timeout: 30000
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Authentication Headers
|
|
31
|
-
*/
|
|
32
|
-
_headers() {
|
|
33
|
-
return {
|
|
34
|
-
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
35
|
-
'Content-Type': 'application/json',
|
|
36
|
-
'User-Agent': 'Vantuz-Gateway/3.0'
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// ════════════════════════════════════════════════════════════════
|
|
41
|
-
// ZORUNLU METODLAR (Interface Implementation)
|
|
42
|
-
// ════════════════════════════════════════════════════════════════
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Bağlantı kontrolü
|
|
46
|
-
* @returns {Promise<boolean>}
|
|
47
|
-
*/
|
|
48
|
-
async testConnection() {
|
|
49
|
-
try {
|
|
50
|
-
// Basit bir GET isteği ile test edin
|
|
51
|
-
// await this.client.get('/ping', { headers: this._headers() });
|
|
52
|
-
return true;
|
|
53
|
-
} catch (e) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Bağlantı durumu (Config var mı?)
|
|
60
|
-
*/
|
|
61
|
-
isConnected() {
|
|
62
|
-
return !!this.config.apiKey;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Ürünleri getir
|
|
67
|
-
* @param {Object} params - { page, size, barcode, ... }
|
|
68
|
-
* @returns {Promise<{success: boolean, data: any}>}
|
|
69
|
-
*/
|
|
70
|
-
async getProducts(params = {}) {
|
|
71
|
-
return { success: true, data: [] };
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Siparişleri getir
|
|
76
|
-
* @param {Object} params - { startDate, endDate, status, ... }
|
|
77
|
-
*/
|
|
78
|
-
async getOrders(params = {}) {
|
|
79
|
-
return { success: true, data: [] };
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Stok güncelle
|
|
84
|
-
* @param {string} barcode
|
|
85
|
-
* @param {number} quantity
|
|
86
|
-
*/
|
|
87
|
-
async updateStock(barcode, quantity) {
|
|
88
|
-
return { success: true, message: 'Not implemented' };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Fiyat güncelle
|
|
93
|
-
* @param {string} barcode
|
|
94
|
-
* @param {number} price
|
|
95
|
-
*/
|
|
96
|
-
async updatePrice(barcode, price) {
|
|
97
|
-
return { success: true, message: 'Not implemented' };
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Singleton Instance Yönetimi
|
|
102
|
-
let instance = null;
|
|
103
|
-
|
|
104
|
-
export const newPlatformApi = {
|
|
105
|
-
init(config) {
|
|
106
|
-
instance = new NewPlatformAPI(config);
|
|
107
|
-
return instance;
|
|
108
|
-
},
|
|
109
|
-
getInstance() { return instance; },
|
|
110
|
-
isConnected() { return instance?.isConnected() || false; },
|
|
111
|
-
|
|
112
|
-
// Proxy Metodlar
|
|
113
|
-
async getProducts(p) { return instance?.getProducts(p); },
|
|
114
|
-
async getOrders(p) { return instance?.getOrders(p); },
|
|
115
|
-
async updateStock(b, q) { return instance?.updateStock(b, q); },
|
|
116
|
-
async updatePrice(b, p) { return instance?.updatePrice(b, p); },
|
|
117
|
-
async testConnection() { return instance?.testConnection(); }
|
|
118
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* 🐙 VANTUZ PLATFORM ŞABLONU
|
|
3
|
+
* Yeni bir pazaryeri eklemek için bu dosyayı kopyalayın ve düzenleyin.
|
|
4
|
+
* Dosya adı: {platform-adi}.js (örn: n11.js, amazon.js)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import axios from 'axios';
|
|
8
|
+
|
|
9
|
+
// Gerekirse AI provider log fonksiyonunu import edin
|
|
10
|
+
// import { log } from '../../../core/ai-provider.js';
|
|
11
|
+
|
|
12
|
+
export class NewPlatformAPI {
|
|
13
|
+
/**
|
|
14
|
+
* @param {Object} config - Config from env variables
|
|
15
|
+
*/
|
|
16
|
+
constructor(config) {
|
|
17
|
+
// Config validasyonu
|
|
18
|
+
if (!config.apiKey || !config.apiSecret) {
|
|
19
|
+
throw new Error('Eksik API anahtarları');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
this.config = config;
|
|
23
|
+
this.client = axios.create({
|
|
24
|
+
baseURL: 'https://api.example.com',
|
|
25
|
+
timeout: 30000
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Authentication Headers
|
|
31
|
+
*/
|
|
32
|
+
_headers() {
|
|
33
|
+
return {
|
|
34
|
+
'Authorization': `Bearer ${this.config.apiKey}`,
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
|
+
'User-Agent': 'Vantuz-Gateway/3.0'
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ════════════════════════════════════════════════════════════════
|
|
41
|
+
// ZORUNLU METODLAR (Interface Implementation)
|
|
42
|
+
// ════════════════════════════════════════════════════════════════
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Bağlantı kontrolü
|
|
46
|
+
* @returns {Promise<boolean>}
|
|
47
|
+
*/
|
|
48
|
+
async testConnection() {
|
|
49
|
+
try {
|
|
50
|
+
// Basit bir GET isteği ile test edin
|
|
51
|
+
// await this.client.get('/ping', { headers: this._headers() });
|
|
52
|
+
return true;
|
|
53
|
+
} catch (e) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Bağlantı durumu (Config var mı?)
|
|
60
|
+
*/
|
|
61
|
+
isConnected() {
|
|
62
|
+
return !!this.config.apiKey;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Ürünleri getir
|
|
67
|
+
* @param {Object} params - { page, size, barcode, ... }
|
|
68
|
+
* @returns {Promise<{success: boolean, data: any}>}
|
|
69
|
+
*/
|
|
70
|
+
async getProducts(params = {}) {
|
|
71
|
+
return { success: true, data: [] };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Siparişleri getir
|
|
76
|
+
* @param {Object} params - { startDate, endDate, status, ... }
|
|
77
|
+
*/
|
|
78
|
+
async getOrders(params = {}) {
|
|
79
|
+
return { success: true, data: [] };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Stok güncelle
|
|
84
|
+
* @param {string} barcode
|
|
85
|
+
* @param {number} quantity
|
|
86
|
+
*/
|
|
87
|
+
async updateStock(barcode, quantity) {
|
|
88
|
+
return { success: true, message: 'Not implemented' };
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Fiyat güncelle
|
|
93
|
+
* @param {string} barcode
|
|
94
|
+
* @param {number} price
|
|
95
|
+
*/
|
|
96
|
+
async updatePrice(barcode, price) {
|
|
97
|
+
return { success: true, message: 'Not implemented' };
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Singleton Instance Yönetimi
|
|
102
|
+
let instance = null;
|
|
103
|
+
|
|
104
|
+
export const newPlatformApi = {
|
|
105
|
+
init(config) {
|
|
106
|
+
instance = new NewPlatformAPI(config);
|
|
107
|
+
return instance;
|
|
108
|
+
},
|
|
109
|
+
getInstance() { return instance; },
|
|
110
|
+
isConnected() { return instance?.isConnected() || false; },
|
|
111
|
+
|
|
112
|
+
// Proxy Metodlar
|
|
113
|
+
async getProducts(p) { return instance?.getProducts(p); },
|
|
114
|
+
async getOrders(p) { return instance?.getOrders(p); },
|
|
115
|
+
async updateStock(b, q) { return instance?.updateStock(b, q); },
|
|
116
|
+
async updatePrice(b, p) { return instance?.updatePrice(b, p); },
|
|
117
|
+
async testConnection() { return instance?.testConnection(); }
|
|
118
|
+
};
|