@topolo/sdk 0.8.1 → 0.8.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.
package/dist/index.cjs CHANGED
@@ -2641,6 +2641,7 @@ var TopoloClient = class _TopoloClient {
2641
2641
  const kind = payload.credentialType === "api_key" ? "api_key" : "access_token";
2642
2642
  return {
2643
2643
  kind,
2644
+ authorizationMode: normalizeCredentialAuthorizationMode(payload.authorizationMode, kind),
2644
2645
  user: {
2645
2646
  id: user.id,
2646
2647
  email: user.email,
@@ -2903,6 +2904,11 @@ function objectToQuery(value) {
2903
2904
  }
2904
2905
  return Object.keys(query).length > 0 ? query : void 0;
2905
2906
  }
2907
+ function normalizeCredentialAuthorizationMode(value, kind) {
2908
+ if (kind === "api_key") return "api_key";
2909
+ if (value === "context_rbac" || value === "oauth_scopes" || value === "session_rbac") return value;
2910
+ return "unknown";
2911
+ }
2906
2912
  function describeError(body, fallback) {
2907
2913
  if (body && typeof body === "object") {
2908
2914
  const maybe = body;
package/dist/index.d.cts CHANGED
@@ -285,6 +285,7 @@ declare class TopoloClient {
285
285
  }
286
286
  interface CredentialIntrospection {
287
287
  kind: 'api_key' | 'access_token';
288
+ authorizationMode: 'context_rbac' | 'oauth_scopes' | 'session_rbac' | 'api_key' | 'unknown';
288
289
  user: {
289
290
  id: string;
290
291
  email: string;
package/dist/index.d.ts CHANGED
@@ -285,6 +285,7 @@ declare class TopoloClient {
285
285
  }
286
286
  interface CredentialIntrospection {
287
287
  kind: 'api_key' | 'access_token';
288
+ authorizationMode: 'context_rbac' | 'oauth_scopes' | 'session_rbac' | 'api_key' | 'unknown';
288
289
  user: {
289
290
  id: string;
290
291
  email: string;
package/dist/index.js CHANGED
@@ -2583,6 +2583,7 @@ var TopoloClient = class _TopoloClient {
2583
2583
  const kind = payload.credentialType === "api_key" ? "api_key" : "access_token";
2584
2584
  return {
2585
2585
  kind,
2586
+ authorizationMode: normalizeCredentialAuthorizationMode(payload.authorizationMode, kind),
2586
2587
  user: {
2587
2588
  id: user.id,
2588
2589
  email: user.email,
@@ -2845,6 +2846,11 @@ function objectToQuery(value) {
2845
2846
  }
2846
2847
  return Object.keys(query).length > 0 ? query : void 0;
2847
2848
  }
2849
+ function normalizeCredentialAuthorizationMode(value, kind) {
2850
+ if (kind === "api_key") return "api_key";
2851
+ if (value === "context_rbac" || value === "oauth_scopes" || value === "session_rbac") return value;
2852
+ return "unknown";
2853
+ }
2848
2854
  function describeError(body, fallback) {
2849
2855
  if (body && typeof body === "object") {
2850
2856
  const maybe = body;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/sdk",
3
- "version": "0.8.1",
4
- "topoloPublishedVersion": "0.8.0",
3
+ "version": "0.8.2",
4
+ "topoloPublishedVersion": "0.8.2",
5
5
  "description": "Typed client SDK for the Topolo platform. Used by TopoloCli, TopoloMCP, and third-party agents.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",