@dxtmisha/functional 1.11.13 → 1.12.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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.12.1] - 2026-05-21
6
+
7
+ ### Fixed
8
+ - **`GeoFlagRef`**: Methods `get()`, `getFlag()`, `getList()`, and `getNational()` now accept `RefOrNormal<...>` reactive arguments instead of plain values. Parameters are unwrapped internally via `getRef()`, enabling reactive bindings to be passed directly without manual `.value` access.
9
+
10
+ ## [1.12.0] - 2026-05-19
11
+
12
+ ### Added
13
+ - **`UseApiRequestSetup` interface**: Introduced a new exported interface that centralises all configuration for `useApiRequest` into a single typed options object (`path`, `method`, `action`, `transformation`, `validateRequestContract`, `validateResponseContract`, `errorContract`).
14
+ - **`validateRequestContract`**: Added to both `UseApiRequestSetup` and `ApiManagementRequest` — a validation function that verifies the outgoing request payload matches the expected structure before the request is sent.
15
+ - **`validateResponseContract`**: Added to both `UseApiRequestSetup` and `ApiManagementRequest` — a validation function (recommended for use with `@effect/schema`) that verifies the API response matches the expected structure and returns an `ApiDataValidation` result.
16
+ - **`isApiSuccess` import**: Integrated `isApiSuccess` from `@dxtmisha/functional-basic` into `useApiRequest` for internal contract-validation branching.
17
+
18
+ ### Changed / Improved
19
+ - **`useApiRequest` (Breaking)**: Refactored to accept a single `UseApiRequestSetup<T>` options object instead of multiple positional parameters. All call sites must be updated.
20
+ - **`useApiGet`, `useApiPost`, `useApiPut`, `useApiDelete`**: Updated to accept their own dedicated setup objects aligned with the new `UseApiRequestSetup` signature, forwarding `validateRequestContract` and `validateResponseContract` down the chain.
21
+ - **`useApiManagementRef`**: Refactored to forward the new `validateRequestContract` and `validateResponseContract` properties when constructing request setup objects.
22
+ - **`ApiManagementRequest` type**: Extended with a `Request` generic parameter and the two new contract-validation fields.
23
+ - **Tests**: Updated all unit test suites (`useApiRequest`, `useApiGet`, `useApiPost`, `useApiPut`, `useApiDelete`) to follow the new single-object signature and correctly mock `getStatus`.
24
+ - **Documentation**: Updated multilingual MDX docs (EN / RU / VI) for `useApiRequest`, `useApiGet`, `useApiPost`, `useApiPut`, `useApiDelete`, and `useApiManagementRef` to reflect the refactored API.
25
+
5
26
  ## [1.11.13] - 2026-05-18
6
27
 
7
28
  ### Added
@@ -1,5 +1,5 @@
1
- This library is a low-level framework for Vue 3 component architecture and reactive state management, extending the @dxtmisha/functional-basic suite with Vue-specific reactive bindings. Its core purpose is to provide a standardized "Constructor" pattern for building UI components and a comprehensive set of composables for API orchestration, localization, and data list management.
1
+ This library is a technical SDK for Vue 3 that facilitates the construction of design systems and complex application states through reactive abstractions. Its primary function is to provide a standardized architecture for API orchestration, design component construction, and reactive utility management. It extends low-level logic from @dxtmisha/functional-basic into the Vue reactivity ecosystem.
2
2
 
3
- The library is indispensable for implementing class-based component logic via DesignConstructorAbstract to decouple business logic from templates. An AI should study its API when handling: 1) Complex API management requiring integrated CRUD operations, SSR pre-fetching, response contract validation, and skeleton state handling (useApiManagementRef); 2) Advanced reactive list manipulation including hierarchical data, multi-selection, and search highlighting (ListDataRef, useSearchRef); 3) Internationalization and localization of dates, numbers, and currencies using reactive Intl wrappers (GeoIntlRef, DatetimeRef); 4) SEO meta tag management with automatic DOM synchronization and SSR support (useMeta); or 5) Managed singletons and shared state across component sub-trees (executeUse, executeUseProvide).
3
+ Study this library when implementing robust API integration layers that require built-in SSR support, response contract validation, and automated mutation handling (POST/PUT/DELETE). It is indispensable for developing design systems that need base classes for tracking property changes and rendering dynamic component trees. Use its API for reactive localization (i18n), geographic data handling, SEO meta tag synchronization, and implementing singleton service patterns via provide/inject or global scopes.
4
4
 
5
- It integrates directly with the Vue 3 Reactivity API, Vue Router, and the @dxtmisha/functional-basic core. It provides infrastructure for design systems to manage component modifications, style/class injection, and reactive persistence via cookies, local storage, and broadcast channels.
5
+ The library integrates deeply with the Vue 3 composition API and vue-router. It operates as a Vue plugin, managing global services for icons, translations, and error handling. It bridges the gap between pure functional utilities and reactive UI requirements, specifically targeting environments where SSR consistency and strict data validation are priorities.