UNPKG

@finos/legend-server-depot

Version:
101 lines 5.56 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type Entity, type StoredFileGeneration, EntitiesWithOrigin } from '@finos/legend-storage'; import { type PlainObject, AbstractServerClient } from '@finos/legend-shared'; import type { DepotScope } from './models/DepotScope.js'; import { type ProjectDependencyCoordinates, ProjectVersionEntities } from './models/ProjectVersionEntities.js'; import type { StoredEntity, StoredSummaryEntity } from './models/StoredEntity.js'; import type { RawProjectDependencyReport } from './models/RawProjectDependencyReport.js'; import type { ProjectVersionPlatformDependency } from './models/ProjectVersionPlatformDependency.js'; import type { VersionedProjectData } from './models/VersionedProjectData.js'; import type { StoreProjectData } from './models/StoreProjectData.js'; export interface DepotServerClientConfig { serverUrl: string; } export declare class DepotServerClient extends AbstractServerClient { constructor(config: DepotServerClientConfig); private _projects; private _projectConfigurations; private _project; getProjects: () => Promise<PlainObject<StoreProjectData>[]>; getProject: (groupId: string, artifactId: string) => Promise<PlainObject<StoreProjectData>>; private _versions; private _version; getAllVersions: (groupId: string, artifactId: string) => Promise<string[]>; getVersionEntities: (groupId: string, artifactId: string, version: string, classifier?: string) => Promise<PlainObject<Entity>[]>; getEntities(project: StoreProjectData, versionId: string, classifier?: string): Promise<PlainObject<Entity>[]>; getVersionEntity: (groupId: string, artifactId: string, version: string, entityPath: string) => Promise<PlainObject<Entity>>; getEntity(project: StoreProjectData, versionId: string, entityPath: string): Promise<PlainObject<Entity>>; DEPRECATED_getEntitiesByClassifierPath: (classifierPath: string, options?: { search?: string | undefined; scope?: DepotScope | undefined; limit?: number | undefined; }) => Promise<PlainObject<StoredEntity>[]>; getEntitiesByClassifier: (classifierPath: string, options?: { scope?: DepotScope | undefined; }) => Promise<PlainObject<StoredEntity>[]>; getEntitiesSummaryByClassifier: (classifierPath: string, options?: { scope?: DepotScope | undefined; summary?: boolean | undefined; latest?: boolean | undefined; }) => Promise<PlainObject<StoredSummaryEntity>[]>; getAllDependantProjects: (groupId: string, artifactId: string) => Promise<PlainObject<ProjectVersionPlatformDependency>[]>; getDependantProjects: (groupId: string, artifactId: string, version: string) => Promise<PlainObject<ProjectVersionPlatformDependency>[]>; getIndexedDependantProjects(groupId: string, artifactId: string, version?: string): Promise<PlainObject<ProjectVersionPlatformDependency>[] | undefined>; getDependencyEntities: (groupId: string, artifactId: string, version: string, /** * Flag indicating if transitive dependencies should be returned. */ transitive: boolean, /** * Flag indicating whether to return the root of the dependency tree. */ includeOrigin: boolean, classifier?: string) => Promise<PlainObject<ProjectVersionEntities>[]>; getIndexedDependencyEntities(project: StoreProjectData, versionId: string, classifier?: string): Promise<Map<string, EntitiesWithOrigin>>; collectDependencyEntities: ( /** * List of (direct) dependencies. */ dependencies: PlainObject<ProjectDependencyCoordinates>[], /** * Flag indicating if transitive dependencies should be returned. */ transitive: boolean, /** * Flag indicating whether to return the root of the dependency tree. */ includeOrigin: boolean) => Promise<PlainObject<ProjectVersionEntities>[]>; analyzeDependencyTree: ( /** * List of (direct) dependencies. */ dependencies: PlainObject<ProjectDependencyCoordinates>[]) => Promise<PlainObject<RawProjectDependencyReport>>; private _generationContent; private _generations; private _generationContentByGAV; private _generationsByGAV; getGenerationContentByPath: (project: StoreProjectData, versionId: string, filePath: string) => Promise<string>; getGenerationFilesByType: (project: StoreProjectData, versionId: string, type: string) => Promise<PlainObject<StoredFileGeneration>[]>; private _versionedStoreProjectData; getVersions: (groupId: string, artifactId: string, /** * Flag indicating whether to return the snapshot versions or not */ snapshots: boolean) => Promise<string[]>; getLatestVersion: (groupId: string, artifactId: string) => Promise<PlainObject<VersionedProjectData>>; getVersionedProjectData: (groupId: string, artifactId: string, versionId: string) => Promise<PlainObject<VersionedProjectData>>; } //# sourceMappingURL=DepotServerClient.d.ts.map