daytona-wildberries-typescript-sdk 3.1.0 → 3.2.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/README.md CHANGED
@@ -93,7 +93,7 @@ const balance = await sdk.finances.getAccountBalance();
93
93
  console.log('Balance:', balance.for_withdraw, balance.currency);
94
94
 
95
95
  // Get advertising campaigns overview
96
- const campaigns = await sdk.promotion.getPromotionCount();
96
+ const campaigns = await sdk.promotion.getCampaignCount();
97
97
  console.log('Total campaigns:', campaigns.all);
98
98
 
99
99
  // Get advertising balance
@@ -114,6 +114,32 @@ chats.result?.forEach(chat => {
114
114
 
115
115
  **👉 [Complete Quickstart Guide](https://salacoste.github.io/daytona-wildberries-typescript-sdk/getting-started/quickstart)**
116
116
 
117
+ ### Advanced Configuration
118
+
119
+ The SDK accepts much more than just `apiKey`. Customize timeout, retry logic, rate limiting, and logging:
120
+
121
+ ```typescript
122
+ const sdk = new WildberriesSDK({
123
+ apiKey: process.env.WB_API_KEY!,
124
+ timeout: 60000, // Global timeout (default: 30000ms)
125
+ logLevel: 'info', // 'debug' | 'info' | 'warn' | 'error'
126
+ retryConfig: {
127
+ maxRetries: 5,
128
+ retryDelay: 2000,
129
+ exponentialBackoff: true,
130
+ },
131
+ });
132
+
133
+ // For slow operations, create an SDK instance with a longer timeout
134
+ const longTimeoutSdk = new WildberriesSDK({
135
+ apiKey: process.env.WB_API_KEY!,
136
+ timeout: 120000, // 2 min for report downloads
137
+ });
138
+ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
139
+ ```
140
+
141
+ **👉 [Configuration Guide](https://salacoste.github.io/daytona-wildberries-typescript-sdk/guides/configuration)**
142
+
117
143
  ---
118
144
 
119
145
  ## 📊 Project Status & Development
@@ -286,7 +312,7 @@ const balance = await sdk.finances.getAccountBalance();
286
312
  console.log('Баланс:', balance.for_withdraw, balance.currency);
287
313
 
288
314
  // Обзор рекламных кампаний
289
- const campaigns = await sdk.promotion.getPromotionCount();
315
+ const campaigns = await sdk.promotion.getCampaignCount();
290
316
  console.log('Всего кампаний:', campaigns.all);
291
317
 
292
318
  // Баланс рекламного кабинета
@@ -307,6 +333,32 @@ chats.result?.forEach(chat => {
307
333
 
308
334
  **👉 [Полное Руководство по Быстрому Старту](https://salacoste.github.io/daytona-wildberries-typescript-sdk/ru/getting-started/quickstart)**
309
335
 
336
+ ### Расширенная конфигурация
337
+
338
+ SDK принимает не только `apiKey`. Настройте таймаут, логику повторов, лимиты запросов и логирование:
339
+
340
+ ```typescript
341
+ const sdk = new WildberriesSDK({
342
+ apiKey: process.env.WB_API_KEY!,
343
+ timeout: 60000, // Глобальный таймаут (по умолчанию: 30000мс)
344
+ logLevel: 'info', // 'debug' | 'info' | 'warn' | 'error'
345
+ retryConfig: {
346
+ maxRetries: 5,
347
+ retryDelay: 2000,
348
+ exponentialBackoff: true,
349
+ },
350
+ });
351
+
352
+ // Для медленных операций создайте экземпляр SDK с увеличенным таймаутом
353
+ const longTimeoutSdk = new WildberriesSDK({
354
+ apiKey: process.env.WB_API_KEY!,
355
+ timeout: 120000, // 2 мин для скачивания отчетов
356
+ });
357
+ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
358
+ ```
359
+
360
+ **👉 [Руководство по конфигурации](https://salacoste.github.io/daytona-wildberries-typescript-sdk/ru/guides/configuration)**
361
+
310
362
  ---
311
363
 
312
364
  ## 📊 Статус Проекта и Разработка