fnapi-js 2.0.0-beta.0 → 2.0.1-beta.0

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/docs.md CHANGED
@@ -4099,14 +4099,15 @@ const auths = await epic.deviceAuths.list(accessToken, accountId);
4099
4099
  for (const a of auths) console.log(a.deviceId, a.lastAccess?.dateTime);
4100
4100
  ```
4101
4101
 
4102
- ::: warning Needs READ permission
4103
- `list` and `get` require the `account:public:account:deviceAuths` **READ** action. A token minted from the **deviceAuth grant** (the one you log in with via `loginWithDeviceAuth`) carries `CREATE`+`DELETE` but not `READ`, so these two calls throw `EpicPermissionError` on it. Switch to a client that holds `READ` first:
4102
+ ::: tip READ permission is handled for you
4103
+ `list` and `get` require the `account:public:account:deviceAuths` **READ** action. A token minted from the **deviceAuth grant** (the one you log in with via `loginWithDeviceAuth`) carries `CREATE`+`DELETE` but not `READ`. When you call these through a session, it detects the `EpicPermissionError` and transparently mints a READ-capable token (exchange-code `fortnitePC`) for the retry, so this just works:
4104
4104
 
4105
4105
  ```ts
4106
4106
  const session = await epic.loginWithDeviceAuth(creds);
4107
- const pc = await session.switchClient('fortnitePC'); // or 'launcherApp'
4108
- const auths = await pc.listDeviceAuths();
4107
+ const auths = await session.listDeviceAuths();
4109
4108
  ```
4109
+
4110
+ Calling `DeviceAuthManager.list` / `.get` directly with a raw token still needs one that holds `READ` — switch clients yourself (`session.switchClient('fortnitePC')`) if you go around the session.
4110
4111
  :::
4111
4112
 
4112
4113
  ## deviceAuths.get
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fnapi-js",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.1-beta.0",
4
4
  "description": "Zero-dependency TypeScript wrapper for the public Fortnite APIs with a full Epic Games account-service, realtime (XMPP/EOS), party, MCP and item-shop/gifting layer",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",