@vention/vention-cli 0.9.0 → 0.10.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.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "CLI tool for Vention applications",
5
5
  "type": "module",
6
6
  "repository": {
package/src/config.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  export interface SessionData {
2
2
  environment: "local" | "demo" | "prod";
3
- ventionSession: string;
3
+ ventionSession?: string;
4
4
  stytchSessionJwt?: string;
5
5
  ventionIdpSession?: string;
6
+ oauth?: {
7
+ accessToken: string;
8
+ refreshToken?: string;
9
+ expiresAt?: number;
10
+ };
6
11
  }
7
12
  export declare const getConfigPath: () => string;
8
13
  export declare const saveSession: (data: SessionData) => Promise<void>;
@@ -0,0 +1,30 @@
1
+ import { SessionData } from "./config";
2
+ export interface OAuthTokens {
3
+ accessToken: string;
4
+ refreshToken?: string;
5
+ expiresInSeconds?: number;
6
+ }
7
+ interface SsoConfig {
8
+ clientId: string;
9
+ authorizeUrl: string;
10
+ tokenUrl: string;
11
+ revokeUrl?: string;
12
+ }
13
+ export declare const exchangeAuthorizationCodeForTokens: (config: SsoConfig, code: string, codeVerifier: string, redirectUri: string) => Promise<{
14
+ accessToken: string;
15
+ refreshToken: string | undefined;
16
+ expiresInSeconds: number | undefined;
17
+ }>;
18
+ export declare const refreshAccessToken: (config: SsoConfig, refreshToken: string) => Promise<{
19
+ accessToken: string;
20
+ refreshToken: string;
21
+ expiresInSeconds: number | undefined;
22
+ }>;
23
+ 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
+ }>;
29
+ export declare const getSsoEnvironmentConfig: (environment: SessionData["environment"]) => SsoConfig;
30
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface ConnectedAppSsoConfig {
2
+ clientId: string;
3
+ authorizeUrl: string;
4
+ tokenUrl: string;
5
+ revokeUrl: string;
6
+ }
7
+ export declare const CONNECTED_APP_SSO_CONFIG: Record<"demo" | "prod", ConnectedAppSsoConfig>;