@rstreamlabs/tunnels 1.0.6 → 1.0.8

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
@@ -45,6 +45,10 @@ const turn = await client.turn.createCredentials();
45
45
  `clientSecret`. This is the intended backend flow when you want the server to
46
46
  mint short-lived tokens for downstream clients.
47
47
 
48
+ Managed `projectEndpoint` clients mint engine tokens restricted to the resolved
49
+ project. Explicit `engine` clients using application credentials must provide
50
+ `projectId` or `workspaceId` so locally signed engine tokens are not global.
51
+
48
52
  ```ts
49
53
  import { RstreamTunnelsClient } from "@rstreamlabs/tunnels";
50
54
 
@@ -56,13 +60,14 @@ const client = new RstreamTunnelsClient({
56
60
  projectEndpoint: "project-endpoint",
57
61
  });
58
62
 
59
- const { token } = await client.auth.createAuthToken({ expires_in: 60 });
63
+ const tunnels = await client.tunnels.list();
60
64
  ```
61
65
 
62
66
  ## Fine-Grained Tokens
63
67
 
64
- Use `scopes` for a global grant, or `tunnelsGrants` when the token must be restricted
65
- to specific workspaces or projects.
68
+ Prefer `tunnelsGrants` with explicit `projects` or `workspaces`. Scope-only
69
+ requests require a `projectId` or `workspaceId` option and are converted to
70
+ targeted grants.
66
71
 
67
72
  ```ts
68
73
  import { RstreamTunnelsClient } from "@rstreamlabs/tunnels";