UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

34 lines 2.02 kB
import type { IContextField, IContextFieldDto } from './context-field-store-type.js'; import type { IUnleashStores } from '../../types/stores.js'; import type { IUnleashConfig } from '../../types/option.js'; import type { ContextFieldStrategiesSchema } from '../../openapi/spec/context-field-strategies-schema.js'; import type { IAuditUser } from '../../types/index.js'; import type { IPrivateProjectChecker } from '../private-project/privateProjectCheckerType.js'; import type EventService from '../events/event-service.js'; import type { LegalValueSchema } from '../../openapi/index.js'; declare class ContextService { private eventService; private contextFieldStore; private featureStrategiesStore; private privateProjectChecker; constructor({ contextFieldStore, featureStrategiesStore, }: Pick<IUnleashStores, 'contextFieldStore' | 'featureStrategiesStore'>, _config: Pick<IUnleashConfig, 'getLogger' | 'flagResolver'>, eventService: EventService, privateProjectChecker: IPrivateProjectChecker); getAll(): Promise<IContextField[]>; getContextField(name: string): Promise<IContextField>; getStrategiesByContextField(name: string, userId: number): Promise<ContextFieldStrategiesSchema>; private mapStrategies; createContextField(value: IContextFieldDto, auditUser: IAuditUser): Promise<IContextField>; updateContextField(updatedContextField: IContextFieldDto, auditUser: IAuditUser): Promise<void>; updateLegalValue(contextFieldLegalValue: { name: string; legalValue: LegalValueSchema; }, auditUser: IAuditUser): Promise<void>; deleteLegalValue(contextFieldLegalValue: { name: string; legalValue: string; }, auditUser: IAuditUser): Promise<void>; deleteContextField(name: string, auditUser: IAuditUser): Promise<void>; validateUniqueName({ name, }: Pick<IContextFieldDto, 'name'>): Promise<void>; validateName(name: string): Promise<void>; } export default ContextService; //# sourceMappingURL=context-service.d.ts.map