daytona-wildberries-typescript-sdk 3.9.2 → 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 +20 -14
- 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,19 +34,22 @@ 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
|
-
- **
|
|
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
|
|
50
53
|
- **v3.9.1** -- `validateRequiredCharacteristics()` helper for required-field pre-flight checks
|
|
51
54
|
- **v3.9.0** -- Mandatory product characteristics support (`isRequiredForCreate`), characteristic input/output types, DRY refactor
|
|
52
55
|
|
|
@@ -169,7 +172,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
169
172
|
|--------|-------|
|
|
170
173
|
| **API Modules** | 13 (100%) |
|
|
171
174
|
| **API Endpoints** | 240+ implemented |
|
|
172
|
-
| **Test Suite** | 2,
|
|
175
|
+
| **Test Suite** | 2,169 tests passing (100%) |
|
|
173
176
|
| **Documentation** | 44 guides, 22 examples |
|
|
174
177
|
| **Bundle Size** | ~91KB gzipped (ESM) |
|
|
175
178
|
|
|
@@ -262,19 +265,22 @@ This is an unofficial SDK. It is not affiliated with, officially maintained by,
|
|
|
262
265
|
- **🔄 Умная Логика Повторов** - Экспоненциальная задержка для временных сбоев с поддержкой таймаута для каждого запроса
|
|
263
266
|
- **🛡️ Богатая Обработка Ошибок** - Типизированная иерархия ошибок с подробными рекомендациями
|
|
264
267
|
- **📦 Tree-Shakeable** - Двойная сборка ESM/CommonJS, импортируйте только то, что нужно (<100KB gzip)
|
|
265
|
-
- **✅ Проверено в Бою** - 2,
|
|
268
|
+
- **✅ Проверено в Бою** - 2,169 тестов для всех модулей
|
|
266
269
|
- **🎯 100% Покрытие API** - Все эндпоинты YAML реализованы, включая Финансовые Отчеты v1 и Эквайринг
|
|
267
270
|
- **📚 Полная Документация** - Справочник API, 44 руководства, примеры на английском и русском
|
|
268
271
|
- **🔧 Без Настройки** - Работает из коробки с разумными значениями по умолчанию
|
|
269
272
|
- **💰 Финансовые Отчеты v1** - Отчеты о продажах и эквайринге с хелпером `parseMoneyAmount()` и union-типами полей для автодополнения
|
|
270
273
|
- **🔔 Утилиты Для Устаревших Методов** - `warnOnce()` и `resetDeprecationWarnings()` для удобной миграции
|
|
271
274
|
|
|
272
|
-
## 🆕 Что Нового в v3.9.
|
|
275
|
+
## 🆕 Что Нового в v3.9.3
|
|
273
276
|
|
|
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()`
|
|
278
284
|
- **v3.9.1** -- хелпер `validateRequiredCharacteristics()` для предварительной проверки обязательных полей
|
|
279
285
|
- **v3.9.0** -- поддержка обязательных характеристик товаров (`isRequiredForCreate`), типы ввода/вывода характеристик, DRY-рефакторинг
|
|
280
286
|
|
|
@@ -397,7 +403,7 @@ const reportFile = await longTimeoutSdk.analytics.getDownloadsFile(downloadId);
|
|
|
397
403
|
|---------|----------|
|
|
398
404
|
| **API модули** | 13 (100%) |
|
|
399
405
|
| **API эндпоинты** | 240+ реализовано |
|
|
400
|
-
| **Тесты** | 2,
|
|
406
|
+
| **Тесты** | 2,169 тестов проходят (100%) |
|
|
401
407
|
| **Документация** | 44 руководства, 22 примера |
|
|
402
408
|
| **Размер бандла** | ~91KB gzipped (ESM) |
|
|
403
409
|
|