@alauda-fe/common
Version:
Alauda frontend team common codes.
21 lines (20 loc) • 1.25 kB
TypeScript
import { FeatureGate, FeatureGateEnterpriseSupport } from '../core/public-api';
import * as i0 from "@angular/core";
export declare const LICENSE_FEATURE_GATE = "{{API_GATEWAY}}/fg/v1/featuregates/license";
export declare const ENTERPRISE_SUPPORT_FEATURE_GATE = "{{API_GATEWAY}}/fg/v1/featuregates/enterprise-support";
export declare function getResourceNum(resource?: Record<string, number>): number;
export declare function formatProductName(productName: string): string;
export declare class LicenseApiService {
private readonly http;
private readonly licenseExempt$;
isLicenseExempt(): import("rxjs").Observable<boolean>;
getLicense(product: string): import("rxjs").Observable<FeatureGate>;
getEnterpriseSupport(product?: string): import("rxjs").Observable<FeatureGateEnterpriseSupport>;
getLicenseResourceLimit(check: 'resource' | 'node' | 'version', resource: number): import("rxjs").Observable<boolean>;
/**
* @deprecated 已经没有使用场景,未考虑 licenseExempt 情况
*/
getLicenseAllowVersion(version: string): import("rxjs").Observable<FeatureGate>;
static ɵfac: i0.ɵɵFactoryDeclaration<LicenseApiService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<LicenseApiService>;
}