chore: api report
Signed-off-by: Markus <markus.siebert@deutschebahn.com>
This commit is contained in:
@@ -57,6 +57,20 @@ export class GitLabDiscoveryProcessor implements CatalogProcessor {
|
||||
): Promise<boolean>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type GitLabGroup = {
|
||||
id: number;
|
||||
name: string;
|
||||
full_path: string;
|
||||
description?: string;
|
||||
parent_id?: number;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type GitLabGroupSamlIdentity = {
|
||||
extern_uid: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
// (undocumented)
|
||||
@@ -77,9 +91,75 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
getProviderName(): string;
|
||||
}
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/providers/GitlabOrgDiscoveryEntityProvider.d.ts:23:9 - (ae-forgotten-export) The symbol "UserTransformer" needs to be exported by the entry point index.d.ts
|
||||
// src/providers/GitlabOrgDiscoveryEntityProvider.d.ts:24:9 - (ae-forgotten-export) The symbol "GroupTransformer" needs to be exported by the entry point index.d.ts
|
||||
// src/providers/GitlabOrgDiscoveryEntityProvider.d.ts:25:9 - (ae-forgotten-export) The symbol "GroupNameTransformer" needs to be exported by the entry point index.d.ts
|
||||
// @public
|
||||
export type GitlabProviderConfig = {
|
||||
host: string;
|
||||
group: string;
|
||||
id: string;
|
||||
branch?: string;
|
||||
fallbackBranch: string;
|
||||
catalogFile: string;
|
||||
projectPattern: RegExp;
|
||||
userPattern: RegExp;
|
||||
groupPattern: RegExp;
|
||||
orgEnabled?: boolean;
|
||||
schedule?: TaskScheduleDefinition;
|
||||
skipForkedRepos?: boolean;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type GitLabUser = {
|
||||
id: number;
|
||||
username: string;
|
||||
email?: string;
|
||||
name: string;
|
||||
state: string;
|
||||
web_url: string;
|
||||
avatar_url: string;
|
||||
groups?: GitLabGroup[];
|
||||
group_saml_identity?: GitLabGroupSamlIdentity;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type GroupNameTransformer = (
|
||||
options: GroupNameTransformerOptions,
|
||||
) => string;
|
||||
|
||||
// @public
|
||||
export interface GroupNameTransformerOptions {
|
||||
// (undocumented)
|
||||
group: GitLabGroup;
|
||||
// (undocumented)
|
||||
providerConfig: GitlabProviderConfig;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type GroupTransformer = (
|
||||
options: GroupTransformerOptions,
|
||||
) => GroupEntity[];
|
||||
|
||||
// @public
|
||||
export interface GroupTransformerOptions {
|
||||
// (undocumented)
|
||||
groupNameTransformer: GroupNameTransformer;
|
||||
// (undocumented)
|
||||
groups: GitLabGroup[];
|
||||
// (undocumented)
|
||||
providerConfig: GitlabProviderConfig;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UserTransformer = (options: UserTransformerOptions) => UserEntity;
|
||||
|
||||
// @public
|
||||
export interface UserTransformerOptions {
|
||||
// (undocumented)
|
||||
groupNameTransformer: GroupNameTransformer;
|
||||
// (undocumented)
|
||||
integrationConfig: GitLabIntegrationConfig;
|
||||
// (undocumented)
|
||||
providerConfig: GitlabProviderConfig;
|
||||
// (undocumented)
|
||||
user: GitLabUser;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -25,3 +25,15 @@ export {
|
||||
GitlabDiscoveryEntityProvider,
|
||||
GitlabOrgDiscoveryEntityProvider,
|
||||
} from './providers';
|
||||
export type {
|
||||
GitLabUser,
|
||||
GitLabGroup,
|
||||
GitlabProviderConfig,
|
||||
GitLabGroupSamlIdentity,
|
||||
GroupNameTransformer,
|
||||
GroupNameTransformerOptions,
|
||||
GroupTransformer,
|
||||
GroupTransformerOptions,
|
||||
UserTransformer,
|
||||
UserTransformerOptions,
|
||||
} from './lib';
|
||||
|
||||
@@ -16,8 +16,17 @@
|
||||
|
||||
export { GitLabClient, paginated } from './client';
|
||||
export type {
|
||||
GitLabUser,
|
||||
GitLabGroup,
|
||||
GitLabGroupSamlIdentity,
|
||||
GitLabProject,
|
||||
GitlabProviderConfig,
|
||||
GitlabGroupDescription,
|
||||
GroupNameTransformer,
|
||||
GroupNameTransformerOptions,
|
||||
GroupTransformer,
|
||||
GroupTransformerOptions,
|
||||
UserTransformer,
|
||||
UserTransformerOptions,
|
||||
} from './types';
|
||||
export { readGitlabConfigs } from '../providers/config';
|
||||
|
||||
@@ -42,6 +42,11 @@ export type GitLabProject = {
|
||||
forked_from_project?: GitlabProjectForkedFrom;
|
||||
};
|
||||
|
||||
/**
|
||||
* Representation of a GitLab user in the GitLab API
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type GitLabUser = {
|
||||
id: number;
|
||||
username: string;
|
||||
@@ -54,10 +59,18 @@ export type GitLabUser = {
|
||||
group_saml_identity?: GitLabGroupSamlIdentity;
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export type GitLabGroupSamlIdentity = {
|
||||
extern_uid: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Representation of a GitLab group in the GitLab API
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type GitLabGroup = {
|
||||
id: number;
|
||||
name: string;
|
||||
@@ -115,14 +128,25 @@ export type GitLabDescendantGroupsResponse = {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* The configuration parameters for the GitlabProvider
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type GitlabProviderConfig = {
|
||||
/**
|
||||
* Identifies one of the hosts set up in the integrations
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Group and subgroup (if needed) to look for repositories. If not present the whole instance will be scanned.
|
||||
* If present this if present, the discovered groups won't contain this prefix
|
||||
* Required for gitlab.com when `orgEnabled: true`.
|
||||
* Optional for self managed. Must not end with slash.
|
||||
* Accepts only groups under the provided path (which will be stripped)
|
||||
*/
|
||||
group: string;
|
||||
/**
|
||||
* ???
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The name of the branch to be used, to discover catalog files.
|
||||
@@ -134,12 +158,31 @@ export type GitlabProviderConfig = {
|
||||
* Defaults to: `master`
|
||||
*/
|
||||
fallbackBranch: string;
|
||||
/**
|
||||
* Defaults to `catalog-info.yaml`
|
||||
*/
|
||||
catalogFile: string;
|
||||
/**
|
||||
* Filters found projects based on provided patter.
|
||||
* Defaults to `[\s\S]*`, which means to not filter anything
|
||||
*/
|
||||
projectPattern: RegExp;
|
||||
/**
|
||||
* Filters found users based on provided patter.
|
||||
* Defaults to `[\s\S]*`, which means to not filter anything
|
||||
*/
|
||||
userPattern: RegExp;
|
||||
/**
|
||||
* Filters found groups based on provided patter.
|
||||
* Defaults to `[\s\S]*`, which means to not filter anything
|
||||
*/
|
||||
groupPattern: RegExp;
|
||||
|
||||
orgEnabled?: boolean;
|
||||
schedule?: TaskScheduleDefinition;
|
||||
/**
|
||||
* If the project is a fork, skip repository
|
||||
*/
|
||||
skipForkedRepos?: boolean;
|
||||
};
|
||||
|
||||
@@ -152,6 +195,11 @@ export type GroupNameTransformer = (
|
||||
options: GroupNameTransformerOptions,
|
||||
) => string;
|
||||
|
||||
/**
|
||||
* The GroupTransformerOptions
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface GroupNameTransformerOptions {
|
||||
group: GitLabGroup;
|
||||
providerConfig: GitlabProviderConfig;
|
||||
@@ -162,6 +210,11 @@ export interface GroupNameTransformerOptions {
|
||||
* @public
|
||||
*/
|
||||
export type UserTransformer = (options: UserTransformerOptions) => UserEntity;
|
||||
/**
|
||||
* The UserTransformerOptions
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface UserTransformerOptions {
|
||||
user: GitLabUser;
|
||||
integrationConfig: GitLabIntegrationConfig;
|
||||
@@ -177,6 +230,11 @@ export interface UserTransformerOptions {
|
||||
export type GroupTransformer = (
|
||||
options: GroupTransformerOptions,
|
||||
) => GroupEntity[];
|
||||
/**
|
||||
* The GroupTransformer options
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export interface GroupTransformerOptions {
|
||||
groups: GitLabGroup[];
|
||||
providerConfig: GitlabProviderConfig;
|
||||
|
||||
Reference in New Issue
Block a user