Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,80 @@ All notable changes to the Bulutklinik C++ SDK are documented here. The format i
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.1]

Documentation and contract corrections found by auditing the SDKs against the
API source before release. No wire change.

### Fixed

- `doctors.search` no longer lets `searchParams` default to an empty map. The
server rule is `required|array` and PHP's `required` rejects an empty array, so
`{}` was a guaranteed `422` rather than an unfiltered search.
- Corrected the `measures.health_information` note. The defect it described — the API
nulling `identity` before the patient lookup — was fixed API-side on
2026-07-21. What actually remains is looser and worth knowing: the lookup is
`identity OR phoneNumber` against the global user table and takes the first
row, so a phone number alone can resolve a person whose TCKN differs from the
one you sent.

## [1.0.0]

The SDK becomes **partner-only**. Everything that required a patient login is
gone; the company-scoped `/outher` surface that shipped under `client.partner()`
in 0.6.0 is now the client root. See `DESIGN.md` §12 for the full migration.

### Changed — BREAKING

- **`client.partner().<group>()` → `client.<group>()`.** The six partner groups
(`doctors`, `slots`, `appointments`, `measures`, `laboratory`, `diets`) moved to
the root. Their paths, bodies and behaviour are unchanged — this is a rename.
Resource classes lost the `Partner` prefix (`PartnerDoctorsResource` →
`DoctorsResource`); `PartnerNamespace` is gone.
- **`TokenStore` now holds one partner token**: `token()` / `set_token()` /
`clear()` replace `access_token()` / `refresh_token()` / `set_tokens()`.
`InMemoryTokenStore` takes the token as its single constructor argument.
- **`ClientOptions::partner_token` is now the client's credential** and is
required for every call. Setting both `partner_token` and `token_store` throws
`std::invalid_argument` from the constructor rather than silently picking one.
- **No silent refresh.** A `401` / `resultType 4` throws `AuthenticationError`
with no retry — a partner token is issued out of band and cannot be renewed
from here. Install a newly issued token in the token store instead.
- **A missing token fails before dispatch** with `AuthenticationError`, rather
than sending an anonymous request that returns an opaque `401`.
- **`Auth` is now `{ Public, Partner }`**; `Auth::Bearer` is gone, and
`RequestOptions::auth` defaults to `Auth::Partner`.
- `MeasuresResource::partner_health_information` →
`MeasuresResource::health_information`, now `[[deprecated]]`.
- `DoctorsResource::search` takes `(search_params, current_page, order_params)`
instead of a `SearchInput` — the `/outher` search has no `other_params` or
`per_page_limit`, and `order_params` excludes `point`.

### Added

- **`ApiVersion` (`V3` / `V4`) and `ClientOptions::api_version`.** Every path is
version-agnostic, so targeting v4 is configuration, not a code change. Default
stays `V3`.

### Fixed

- The test suite now compiles. The 0.6.0 partner tests parsed
`HttpRequest::body` (a `std::optional<std::string>`) directly, which never
built; they use `.value()` now. 0.6.0 shipped without a compile check.

### Removed

- `client.auth()` (all 11 methods), `client.payments()` (5), `client.skin()`,
`client.meals()`, `client.addresses()` (4) — no company-scoped equivalent exists.
- The patient-persona `doctors` / `slots` / `appointments` / `measures` /
`laboratory` / `diets` that lived at the root in 0.6.0.
- `ClientOptions::client_id` / `::client_secret`.
- The `LoginResult`, `CardInfo`, `RegisterInput`, `VerifyRegistrationInput`,
`ConfirmRegistrationEmailInput`, `VerifyRegistrationSocialInput`,
`RegisterSocialInput`, `ForgotPasswordInput`, `ResetPasswordInput`,
`AddressInput`, `AddressUpdateInput`, `SearchInput`, `PaymentInput`,
`MealInput` and `LabOrderInput` types.

## [0.6.0]

### Added
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(bulutklinik_sdk VERSION 0.6.0 LANGUAGES CXX)
project(bulutklinik_sdk VERSION 1.0.1 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand All @@ -21,7 +21,7 @@ option(BULUTKLINIK_BUILD_TESTS "Build the test suite" ON)
if(BULUTKLINIK_BUILD_TESTS)
enable_testing()
find_package(Catch2 3 CONFIG REQUIRED)
add_executable(bulutklinik_tests tests/test_transport.cpp tests/test_ai.cpp tests/test_lab_diets.cpp)
add_executable(bulutklinik_tests tests/test_transport.cpp tests/test_resources.cpp)
target_link_libraries(bulutklinik_tests PRIVATE
bulutklinik_sdk Catch2::Catch2WithMain nlohmann_json::nlohmann_json)
add_test(NAME bulutklinik_tests COMMAND bulutklinik_tests)
Expand Down
Loading
Loading