polyv-live-cli
Version:
CLI tool for managing PolyV live streaming services.
54 lines • 2.13 kB
TypeScript
import { AccountConfig, AccountsStore, AccountOperationResult, AccountDisplayInfo, SecurityContext } from '../types/account.types';
import { EncryptedData } from './account-encryption';
interface SecureAccountConfig extends Omit<AccountConfig, 'appSecret'> {
appSecret: EncryptedData | string;
}
interface SecureAccountsStore extends Omit<AccountsStore, 'accounts'> {
accounts: Record<string, SecureAccountConfig>;
metadata: AccountsStore['metadata'] & {
security?: {
encryptionVersion: string;
keySource: 'environment' | 'generated';
lastSecurityCheck?: string;
lastBackup?: string;
};
};
}
export declare class SecureAccountManager {
private configPath;
private encryption;
private permissionManager;
private versionManager;
private recoveryManager;
constructor(configPath?: string, masterKey?: string);
private getDefaultConfigPath;
private ensureSecureConfigDir;
loadAccountsStore(): SecureAccountsStore;
saveAccountsStore(store: SecureAccountsStore): void;
private createEmptySecureStore;
private updateSecurityMetadata;
private migrateConfiguration;
private reencryptAccounts;
addAccount(name: string, appId: string, appSecret: string, userId?: string): AccountOperationResult;
getAccount(name: string): AccountConfig | null;
removeAccount(name: string): AccountOperationResult;
listAccounts(): AccountDisplayInfo[];
accountExists(name: string): boolean;
getSecurityContext(): SecurityContext;
validateSecurity(): {
isSecure: boolean;
issues: string[];
recommendations: string[];
};
getConfigPath(): string;
performSecurityMaintenance(): {
success: boolean;
actionsPerformed: string[];
warnings: string[];
};
private validateAccountConfig;
}
export declare function createSecureAccountManager(configPath?: string, masterKey?: string): SecureAccountManager;
export declare const defaultSecureAccountManager: SecureAccountManager;
export {};
//# sourceMappingURL=secure-account-manager.d.ts.map