UNPKG

cnpmcore

Version:

Private NPM Registry for Enterprise

28 lines (27 loc) 1.15 kB
import { AbstractService } from '../../common/AbstractService.ts'; import { Scope } from '../entity/Scope.ts'; import type { PageOptions, PageResult } from '../util/EntityUtil.ts'; export interface CreateScopeCmd extends Pick<Scope, 'name' | 'registryId'> { operatorId?: string; } export interface UpdateRegistryCmd extends Pick<Scope, 'name' | 'scopeId' | 'registryId'> { operatorId?: string; } export interface RemoveScopeCmd { scopeId: string; operatorId?: string; } export interface RemoveScopeByRegistryIdCmd { registryId: string; operatorId?: string; } export declare class ScopeManagerService extends AbstractService { private readonly scopeRepository; findByName(name: string): Promise<Scope | null>; countByRegistryId(registryId: string): Promise<number>; createScope(createCmd: CreateScopeCmd): Promise<Scope>; listScopes(page: PageOptions): Promise<PageResult<Scope>>; listScopesByRegistryId(registryId: string, page: PageOptions): Promise<PageResult<Scope>>; removeByRegistryId(removeCmd: RemoveScopeByRegistryIdCmd): Promise<void>; remove(removeCmd: RemoveScopeCmd): Promise<void>; }