@kulkan/kulterra-api-client 1.2.1 → 1.2.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +14 -11
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
 
20
20
  ### Security
21
21
 
22
- ## [1.2.0] - 2026-04-04
22
+ ## [1.2.1] - 2026-04-04
23
23
 
24
24
  ### Added
25
25
 
package/README.md CHANGED
@@ -22,23 +22,26 @@ npm install @kulkan/kulterra-api-client @kulkan/kulterra-contracts
22
22
  | `createApiClient(options)` | Factory returning `healthCheck` + **`auth`** namespace |
23
23
  | `ApiClient` / `CreateApiClientOptions` | Typed client and `{ http: HttpClient }` options |
24
24
  | `HttpClient` | **`get`** and **`post`** (minimal surface compatible with Axios) |
25
- | `HttpGet` / `HttpPost` | Method signatures |
25
+ | `HttpGet` / `HttpPost` / `HttpPatch` | Method signatures |
26
26
  | Named auth helpers | `postRegister`, `postLogin`, `getGoogleOAuthStart`, `postGoogleOAuthCallback`, `postRefresh`, `postLogout`, `getMe` (see `src/endpoints/auth.ts`) |
27
+ | Named user helpers | `patchUpdateUserRoleByAdmin` (see `src/endpoints/user.ts`) |
27
28
 
28
29
  ### Endpoints implemented
29
30
 
30
- | HTTP | Path | Client |
31
- | ------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------ |
32
- | `GET` | `/api/v1/health-check` | `client.healthCheck()` |
33
- | `POST` | `/api/v1/auth/register` | `client.auth.register(body)` or `postRegister(http, body)` |
34
- | `POST` | `/api/v1/auth/login` | `client.auth.login(body)` or `postLogin(http, body)` |
35
- | `GET` | `/api/v1/auth/oauth/google/start?redirectUri=...` | `client.auth.getGoogleOAuthStart(redirectUri)` or `getGoogleOAuthStart(http, redirectUri)` |
36
- | `POST` | `/api/v1/auth/oauth/google/callback` | `client.auth.postGoogleOAuthCallback(body)` or `postGoogleOAuthCallback(http, body)` |
37
- | `POST` | `/api/v1/auth/refresh` | `client.auth.refresh(body)` or `postRefresh(http, body)` |
38
- | `POST` | `/api/v1/auth/logout` | `client.auth.logout(body)` or `postLogout(http, body)` |
39
- | `GET` | `/api/v1/auth/me` | `client.auth.me(accessToken)` or `getMe(http, accessToken)` |
31
+ | HTTP | Path | Client |
32
+ | ------- | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
33
+ | `GET` | `/api/v1/health-check` | `client.healthCheck()` |
34
+ | `POST` | `/api/v1/auth/register` | `client.auth.register(body)` or `postRegister(http, body)` |
35
+ | `POST` | `/api/v1/auth/login` | `client.auth.login(body)` or `postLogin(http, body)` |
36
+ | `GET` | `/api/v1/auth/oauth/google/start?redirectUri=...` | `client.auth.getGoogleOAuthStart(redirectUri)` or `getGoogleOAuthStart(http, redirectUri)` |
37
+ | `POST` | `/api/v1/auth/oauth/google/callback` | `client.auth.postGoogleOAuthCallback(body)` or `postGoogleOAuthCallback(http, body)` |
38
+ | `POST` | `/api/v1/auth/refresh` | `client.auth.refresh(body)` or `postRefresh(http, body)` |
39
+ | `POST` | `/api/v1/auth/logout` | `client.auth.logout(body)` or `postLogout(http, body)` |
40
+ | `GET` | `/api/v1/auth/me` | `client.auth.me(accessToken)` or `getMe(http, accessToken)` |
41
+ | `PATCH` | `/api/v1/users/:id/role` | `client.user.updateRoleUserByAdmin(http, {id}, body)` or `patchUpdateRoleUserByAdmin(http, { id }, body)` |
40
42
 
41
43
  Responses follow **`IApiResponse<T>`** from contracts (`success`, `data`, etc.). Auth session payloads are **`AuthSessionResponse`** (`TokenPair` + `user`). **`logout`** returns **204** with no JSON body.
44
+ User session payloads are **`UserSessionResponse`_(not implemented yet)_. **`updateRoleUserByAdmin`** returns **204\*\* with no JSON body.
42
45
 
43
46
  ### Usage example (Axios)
44
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kulkan/kulterra-api-client",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Client used to interact with KulTerra project API",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",