import type { NormalizedResponseDTO, Organization, ResourcePermissions, Team, TokenPermissions } from '@kyso-io/kyso-model'; import { KysoConfigFile } from '@kyso-io/kyso-model'; import type { KysoCredentials } from '../types/kyso-credentials'; export declare class Helper { static getOrganizationFromSlugSecurely(organizationParameter: string, credentials: KysoCredentials): Promise>; static getChannelFromSlugSecurely(organization: Organization, channelParameter: string, credentials: KysoCredentials, silent?: boolean): Promise>; /** * Receives an array of organizations (name or slugs, or intercalated) * * Checks that every organization exists and extracts its slug name * * Returns an array of checked slug names. If some of these organizations are not valid * or don't exists, throws an exception * * @param list_of_orgs List of orgs (names or slugs) separated by commas * @returns Ensured list of slugified names. */ static getRealOrganizationSlugFromStringArray(list_of_orgs: string, credentials: KysoCredentials): Promise; /** * Receives an array of channels (name or slugs, or intercalated) * * Checks that every channel exists and extracts its slug name * * Returns an array of checked slug names. If some of these channels are not valid * or don't exists, throws an exception * * @param organization Organization in which channels must be subscribed * @param list_of_channels List of channels (names or slugs) separated by commas * @returns Ensured list of slugified names. */ static getRealChannelsSlugFromStringArray(organization: Organization, list_of_channels: string, credentials: KysoCredentials): Promise; static findKysoConfigFile(files: string[], basePath?: string): { kysoConfigFile: KysoConfigFile | null; kysoConfigPath: string | null; valid: boolean; message: string | null; }; static isEmail(email: string): boolean; static isImage(name: string): boolean; static printErrorMessage(ex: any): void; static getAllFiles(dirPath: string, arrayOfFiles: string[]): string[]; static getValidFiles(dirPath: string): { path: string; sha: string; }[]; static slug(url: string): string; static isOrganizationAdmin(resourcePermissions: ResourcePermissions): boolean; static isGlobalAdmin(tokenPermissions: TokenPermissions): boolean; static hasPermission(resourcePermissions: ResourcePermissions, permission: any): boolean; static askUserKysoInstallUrl(defaultKysoInstallUrl?: string): Promise; static parseFileSizeStr(fileSizeStr: string): number; /** * Sanitizes the incoming url parameter looking for auth credentials and * returns the URL without that credentials, if exists, and if not, returns * the same url. * * If any error happens, returns an empty string to avoid credentials leaking * * @param url * @returns */ static sanitizeUrlBasicAuthentication(url: string): string; }