@kivacore/ui-cli 0.26.4 → 0.27.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/dist/index.d.ts CHANGED
@@ -1,80 +1,9 @@
1
- import { TokenManager } from '@kivacore/api-client';
2
-
3
- declare class CliTokenManager implements TokenManager {
4
- private keychain;
5
- private fileStorage;
6
- private keychainAvailable;
7
- constructor();
8
- private isKeychainAvailable;
9
- getToken(): Promise<string | null>;
10
- setToken(token: string): Promise<void>;
11
- clearToken(): Promise<void>;
12
- getRefreshToken(): Promise<string | null>;
13
- setRefreshToken(token: string): Promise<void>;
14
- clearRefreshToken(): Promise<void>;
15
- getUserEmail(): Promise<string | null>;
16
- setUserEmail(email: string): Promise<void>;
17
- getGithubToken(): Promise<string | null>;
18
- setGithubToken(token: string): Promise<void>;
19
- clearAll(): Promise<void>;
20
- isLoggedIn(): Promise<boolean>;
21
- }
22
- declare function getTokenManager(): CliTokenManager;
23
-
24
- interface AuthCredentials {
25
- email: string;
26
- password: string;
27
- }
28
- interface AuthTokens {
29
- accessToken: string;
30
- refreshToken?: string;
31
- expiresIn?: number;
32
- expiresAt?: number;
33
- tokenType?: string;
34
- }
35
- interface UserInfo {
36
- id: string;
37
- email: string;
38
- firstname?: string;
39
- lastname?: string;
40
- photo?: string;
41
- }
42
- interface OAuthConfig {
43
- authorizationUrl: string;
44
- tokenUrl: string;
45
- clientId: string;
46
- redirectUri: string;
47
- scopes: string[];
48
- }
49
- interface LoginResult {
50
- tokens: AuthTokens;
51
- user?: UserInfo;
52
- }
53
-
54
- declare function loginWithCredentials(credentials: AuthCredentials): Promise<LoginResult>;
55
- declare function getUserInfo(accessToken: string): Promise<UserInfo>;
56
- declare function refreshAccessToken(refreshToken: string): Promise<AuthTokens>;
57
-
58
- interface OAuthLoginOptions {
59
- onOpeningBrowser?: () => void;
60
- onWaitingForAuth?: (url: string) => void;
61
- }
62
- declare function loginWithOAuth(options?: OAuthLoginOptions): Promise<LoginResult>;
63
-
64
- /**
65
- * CLI configuration constants.
66
- *
67
- * - CLI_KIVA_* variables are injected at build time via tsup define.
68
- * - KIVA_*REGISTRY_URL variables are read at runtime (optional overrides).
69
- */
70
- declare const KIVA_API_URL: string;
1
+ declare const REGISTRY_BASE_URL: string;
71
2
  declare const CLI_NAME = "kiva-ui";
72
3
  declare const CLI_VERSION: string;
73
4
 
74
5
  type HelpTheme = 'default' | 'monochrome' | 'warm' | 'cool' | 'neon';
75
6
  interface CliConfig {
76
- apiUrl?: string;
77
- lastLoginEmail?: string;
78
7
  helpTheme: HelpTheme;
79
8
  }
80
9
  declare class ConfigManager {
@@ -86,5 +15,5 @@ declare class ConfigManager {
86
15
  }
87
16
  declare const configManager: ConfigManager;
88
17
 
89
- export { CLI_NAME, CLI_VERSION, CliTokenManager, KIVA_API_URL, configManager, getTokenManager, getUserInfo, loginWithCredentials, loginWithOAuth, refreshAccessToken };
90
- export type { AuthCredentials, AuthTokens, CliConfig, LoginResult, OAuthConfig, UserInfo };
18
+ export { CLI_NAME, CLI_VERSION, REGISTRY_BASE_URL, configManager };
19
+ export type { CliConfig };