@vention/vention-cli 0.33.3 → 0.34.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/vention-cli",
3
- "version": "0.33.3",
3
+ "version": "0.34.1",
4
4
  "description": "CLI tool for Vention applications",
5
5
  "type": "module",
6
6
  "engines": {
package/src/config.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ export interface FeatureFlagCache {
2
+ fetchedAt: number;
3
+ values: Record<string, boolean>;
4
+ }
1
5
  export interface SessionData {
2
6
  environment: "local" | "demo" | "prod";
3
7
  ventionSession?: string;
@@ -8,6 +12,8 @@ export interface SessionData {
8
12
  refreshToken?: string;
9
13
  expiresAt?: number;
10
14
  };
15
+ email?: string;
16
+ featureFlags?: FeatureFlagCache;
11
17
  }
12
18
  export declare const getConfigPath: () => string;
13
19
  export declare const saveSession: (data: SessionData) => Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { SessionData } from "./config";
2
+ export interface FeatureFlag {
3
+ key: string;
4
+ override?: string;
5
+ defaultValue: boolean;
6
+ }
7
+ export declare const DIGITAL_TWIN_V3: FeatureFlag;
8
+ export declare const refreshFeatureFlags: () => Promise<void>;
9
+ export declare const isFeatureEnabled: (session: SessionData, flag: FeatureFlag) => boolean;
package/src/sso-auth.d.ts CHANGED
@@ -3,6 +3,7 @@ export interface OAuthTokens {
3
3
  accessToken: string;
4
4
  refreshToken?: string;
5
5
  expiresInSeconds?: number;
6
+ email?: string;
6
7
  }
7
8
  interface SsoConfig {
8
9
  clientId: string;
@@ -14,6 +15,7 @@ export declare const exchangeAuthorizationCodeForTokens: (config: SsoConfig, cod
14
15
  accessToken: string;
15
16
  refreshToken: string | undefined;
16
17
  expiresInSeconds: number | undefined;
18
+ email: string | undefined;
17
19
  }>;
18
20
  export declare const refreshAccessToken: (config: SsoConfig, refreshToken: string) => Promise<{
19
21
  accessToken: string;
@@ -21,10 +23,6 @@ export declare const refreshAccessToken: (config: SsoConfig, refreshToken: strin
21
23
  expiresInSeconds: number | undefined;
22
24
  }>;
23
25
  export declare const revokeToken: (config: SsoConfig, token: string, tokenType?: "access_token" | "refresh_token") => Promise<void>;
24
- export declare const loginWithSso: (environment: SessionData["environment"]) => Promise<{
25
- accessToken: string;
26
- refreshToken: string | undefined;
27
- expiresInSeconds: number | undefined;
28
- }>;
26
+ export declare const loginWithSso: (environment: SessionData["environment"]) => Promise<OAuthTokens>;
29
27
  export declare const getSsoEnvironmentConfig: (environment: SessionData["environment"]) => SsoConfig;
30
28
  export {};