ab-ecosystem-sso 0.1.10 → 0.1.11

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 CHANGED
@@ -282,9 +282,9 @@ const subscription = await getUserSubscription("your-project-id", token, "https
282
282
  | `getUserProfile` | `GET /me` | `MappedProfile` — flat fields (name, `email`/`username`, address, phone, `mainWallet`/`coinWallet`). |
283
283
  | `getUserWallet` | `GET /me` | `UserWallets` — just `{ mainWallet, coinWallet }` balances. |
284
284
  | `getUserCreditWallet` | `GET /credit-wallets` | `CreditWallet[]` — each `{ id, label, balance, balanceFormatted, creditUnit, fundSource, rechargeable }`. |
285
- | `getUserSubscription` | `GET /subscription` | `MappedSubscription` — `planId` (empty if none), `status`, `renewsAt`, `subscribedIds`, `packageCounts`. |
285
+ | `getUserSubscription` | `GET /subscription` | The **raw** subscription object from the API (unmapped). |
286
286
 
287
- > `getUserProfile` and `getUserWallet` both read `/me`; `getUserWallet` just narrows the same response to the wallet balances. All four throw `AccountApiError` on a non-2xx response.
287
+ > `getUserProfile` and `getUserWallet` both read `/me`; `getUserWallet` just narrows the same response to the wallet balances. `getUserSubscription` returns the API response as-is (the unwrapped `data`), unlike the others which map to a friendly shape. All four throw `AccountApiError` on a non-2xx response.
288
288
 
289
289
  ---
290
290
 
@@ -348,7 +348,7 @@ Beyond the components, these functions are exported for building custom UIs:
348
348
  | `getUserProfile(projectId, token, apiBaseUrl?)` | `GET /me` → `MappedProfile` |
349
349
  | `getUserWallet(projectId, token, apiBaseUrl?)` | `GET /me` → `UserWallets` |
350
350
  | `getUserCreditWallet(projectId, token, apiBaseUrl?)` | `GET /credit-wallets` → `CreditWallet[]` |
351
- | `getUserSubscription(projectId, token, apiBaseUrl?)` | `GET /subscription` → `MappedSubscription` |
351
+ | `getUserSubscription(projectId, token, apiBaseUrl?)` | `GET /subscription` → raw subscription object |
352
352
  | `logout(options)` | `POST /auth/logout` + callbacks |
353
353
  | `logoutApi(projectId, token, apiBaseUrl?)` | `POST /auth/logout` |
354
354