daytona-wildberries-typescript-sdk 3.9.1 → 3.9.3
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 +26 -18
- package/dist/cjs/index.cjs +16 -16
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +892 -774
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/products.types.d.ts +9 -0
- package/dist/esm/types/products.types.d.ts.map +1 -1
- package/dist/esm/utils/classifyReturnReason.d.ts +23 -0
- package/dist/esm/utils/classifyReturnReason.d.ts.map +1 -0
- package/dist/esm/utils/enrichReturnsWithType.d.ts +71 -0
- package/dist/esm/utils/enrichReturnsWithType.d.ts.map +1 -0
- package/dist/esm/utils/index.d.ts +4 -0
- package/dist/esm/utils/index.d.ts.map +1 -1
- package/dist/esm/utils/reconcileBuyoutsAndReturns.d.ts +90 -0
- package/dist/esm/utils/reconcileBuyoutsAndReturns.d.ts.map +1 -0
- package/dist/esm/utils/validateMergedCardVariants.d.ts +52 -0
- package/dist/esm/utils/validateMergedCardVariants.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,20 +34,24 @@ Transform 11 OpenAPI specifications into a production-ready SDK with 13 modules,
|
|
|
34
34
|
- **🔄 Smart Retry Logic** - Exponential backoff retry mechanism for transient failures with per-request timeout support
|
|
35
35
|
- **🛡️ Rich Error Handling** - Typed error hierarchy with detailed recovery guidance
|
|
36
36
|
- **📦 Tree-Shakeable** - Dual ESM/CommonJS builds, import only what you need (<100KB gzipped)
|
|
37
|
-
- **✅ Battle-Tested** - 2,
|
|
37
|
+
- **✅ Battle-Tested** - 2,169 tests passing across all modules
|
|
38
38
|
- **🎯 100% API Coverage** - All YAML endpoints implemented including v1 Finance Reports and Acquiring Reports
|
|
39
39
|
- **📚 Comprehensive Documentation** - Complete API reference, 44 guides, tutorials, and working examples in English and Russian
|
|
40
40
|
- **🔧 Zero Configuration** - Works out of the box with sensible defaults, configurable for advanced use
|
|
41
41
|
- **💰 Finance v1 Reports** - Sales Reports and Acquiring Reports with `parseMoneyAmount()` helper and field union types for autocomplete
|
|
42
42
|
- **🔔 Deprecation Utilities** - `warnOnce()` and `resetDeprecationWarnings()` for clean migration workflows
|
|
43
43
|
|
|
44
|
-
## 🆕 What's New in v3.9.
|
|
44
|
+
## 🆕 What's New in v3.9.3
|
|
45
45
|
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- **New
|
|
50
|
-
- **
|
|
46
|
+
- **`classifyReturnReason(reason)`** -- pure helper mapping free-text Russian return reasons to standardized `ReturnReasonCode` enum (`damage`, `defect`, `wrong_size`, `wrong_item`, `customer_refused`, `expired`, `not_as_described`, `other`)
|
|
47
|
+
- **`enrichReturnsWithType(fboReturns, fbsReturns?)`** -- combines FBO returns from `getAnalyticsGoodsReturn()` with optional FBS returns into unified `WbReturn[]` with explicit `orderType: 'fbo' | 'fbs'`, `reasonCode`, `quantity`
|
|
48
|
+
- **`reconcileBuyoutsAndReturns(buyouts, returns, options?)`** -- per-nmId reconciliation with anomaly detection (`return_without_buyout`, `orphan_buyout`)
|
|
49
|
+
- **New types** -- `WbReturn`, `FbsReturnInput`, `BuyoutInput`, `ReconciliationResult`, `ReconciliationAnomaly`, `ReconcileOptions`, `ReturnReasonCode` exported from main SDK
|
|
50
|
+
- **New guide** -- EN+RU [Buyout & Return Reconciliation](https://salacoste.github.io/daytona-wildberries-typescript-sdk/guides/buyout-return-reconciliation) with end-to-end example
|
|
51
|
+
- **2169 tests** passing (+24 new)
|
|
52
|
+
- **v3.9.2** -- `isVariable` field + `validateMergedCardVariants()` helper
|
|
53
|
+
- **v3.9.1** -- `validateRequiredCharacteristics()` helper for required-field pre-flight checks
|
|
54
|
+
- **v3.9.0** -- Mandatory product characteristics support (`isRequiredForCreate`), characteristic input/output types, DRY refactor
|
|
51
55
|
|
|
52
56
|
See [CHANGELOG.md](CHANGELOG.md) for the complete release history.
|
|
53
57
|
|
|
@@ -158,7 +162,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
158
162
|
|
|
159
163
|
## 📊 Project Status & Development
|
|
160
164
|
|
|
161
|
-
**Current Status:** 🟢 Production Ready | **SDK Version:** 3.9.
|
|
165
|
+
**Current Status:** 🟢 Production Ready | **SDK Version:** 3.9.2
|
|
162
166
|
|
|
163
167
|
**📖 [Project Status Summary](PROJECT_STATUS_SUMMARY.md)** — Comprehensive overview of all epics, stories, and implementation status.
|
|
164
168
|
|
|
@@ -168,7 +172,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
168
172
|
|--------|-------|
|
|
169
173
|
| **API Modules** | 13 (100%) |
|
|
170
174
|
| **API Endpoints** | 240+ implemented |
|
|
171
|
-
| **Test Suite** | 2,
|
|
175
|
+
| **Test Suite** | 2,169 tests passing (100%) |
|
|
172
176
|
| **Documentation** | 44 guides, 22 examples |
|
|
173
177
|
| **Bundle Size** | ~91KB gzipped (ESM) |
|
|
174
178
|
|
|
@@ -261,20 +265,24 @@ This is an unofficial SDK. It is not affiliated with, officially maintained by,
|
|
|
261
265
|
- **🔄 Умная Логика Повторов** - Экспоненциальная задержка для временных сбоев с поддержкой таймаута для каждого запроса
|
|
262
266
|
- **🛡️ Богатая Обработка Ошибок** - Типизированная иерархия ошибок с подробными рекомендациями
|
|
263
267
|
- **📦 Tree-Shakeable** - Двойная сборка ESM/CommonJS, импортируйте только то, что нужно (<100KB gzip)
|
|
264
|
-
- **✅ Проверено в Бою** - 2,
|
|
268
|
+
- **✅ Проверено в Бою** - 2,169 тестов для всех модулей
|
|
265
269
|
- **🎯 100% Покрытие API** - Все эндпоинты YAML реализованы, включая Финансовые Отчеты v1 и Эквайринг
|
|
266
270
|
- **📚 Полная Документация** - Справочник API, 44 руководства, примеры на английском и русском
|
|
267
271
|
- **🔧 Без Настройки** - Работает из коробки с разумными значениями по умолчанию
|
|
268
272
|
- **💰 Финансовые Отчеты v1** - Отчеты о продажах и эквайринге с хелпером `parseMoneyAmount()` и union-типами полей для автодополнения
|
|
269
273
|
- **🔔 Утилиты Для Устаревших Методов** - `warnOnce()` и `resetDeprecationWarnings()` для удобной миграции
|
|
270
274
|
|
|
271
|
-
## 🆕 Что Нового в v3.9.
|
|
275
|
+
## 🆕 Что Нового в v3.9.3
|
|
272
276
|
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
-
|
|
277
|
+
- **`classifyReturnReason(reason)`** -- чистый хелпер для перевода свободного текста причин возврата (на русском) в стандартизированный enum `ReturnReasonCode` (`damage`, `defect`, `wrong_size`, `wrong_item`, `customer_refused`, `expired`, `not_as_described`, `other`)
|
|
278
|
+
- **`enrichReturnsWithType(fboReturns, fbsReturns?)`** -- объединяет FBO-возвраты из `getAnalyticsGoodsReturn()` с необязательными FBS-возвратами в единый `WbReturn[]` с явным `orderType: 'fbo' | 'fbs'`, `reasonCode`, `quantity`
|
|
279
|
+
- **`reconcileBuyoutsAndReturns(buyouts, returns, options?)`** -- сверка по nmId с обнаружением аномалий (`return_without_buyout`, `orphan_buyout`)
|
|
280
|
+
- **Новые типы** -- `WbReturn`, `FbsReturnInput`, `BuyoutInput`, `ReconciliationResult`, `ReconciliationAnomaly`, `ReconcileOptions`, `ReturnReasonCode` экспортируются из основного SDK
|
|
281
|
+
- **Новое руководство** -- EN+RU [Сверка Выкупов и Возвратов](https://salacoste.github.io/daytona-wildberries-typescript-sdk/ru/guides/buyout-return-reconciliation) с примером от начала до конца
|
|
282
|
+
- **2169 тестов** проходят (+24 новых)
|
|
283
|
+
- **v3.9.2** -- поле `isVariable` + хелпер `validateMergedCardVariants()`
|
|
284
|
+
- **v3.9.1** -- хелпер `validateRequiredCharacteristics()` для предварительной проверки обязательных полей
|
|
285
|
+
- **v3.9.0** -- поддержка обязательных характеристик товаров (`isRequiredForCreate`), типы ввода/вывода характеристик, DRY-рефакторинг
|
|
278
286
|
|
|
279
287
|
Полная история изменений: [CHANGELOG.md](CHANGELOG.md)
|
|
280
288
|
|
|
@@ -385,7 +393,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
385
393
|
|
|
386
394
|
## 📊 Статус Проекта и Разработка
|
|
387
395
|
|
|
388
|
-
**Текущий Статус:** 🟢 Production Ready | **Версия SDK:** 3.9.
|
|
396
|
+
**Текущий Статус:** 🟢 Production Ready | **Версия SDK:** 3.9.2
|
|
389
397
|
|
|
390
398
|
**📖 [Project Status Summary](PROJECT_STATUS_SUMMARY.md)** — Комплексный обзор всех эпиков, историй и статуса реализации.
|
|
391
399
|
|
|
@@ -395,7 +403,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
395
403
|
|---------|----------|
|
|
396
404
|
| **API модули** | 13 (100%) |
|
|
397
405
|
| **API эндпоинты** | 240+ реализовано |
|
|
398
|
-
| **Тесты** | 2,
|
|
406
|
+
| **Тесты** | 2,169 тестов проходят (100%) |
|
|
399
407
|
| **Документация** | 44 руководства, 22 примера |
|
|
400
408
|
| **Размер бандла** | ~91KB gzipped (ESM) |
|
|
401
409
|
|