1 | import { BaseRequestOptions, BaseService, PaginatedRequestOptions, Sudo } from '../infrastructure';
|
2 | import { EventOptions } from './Events';
|
3 | import { GroupSchema } from './Groups';
|
4 | import { UploadMetadata } from './ProjectImportExport';
|
5 | import { UserSchema } from './Users';
|
6 | export interface NamespaceInfoSchema {
|
7 | id: number;
|
8 | name: string;
|
9 | path: string;
|
10 | kind: string;
|
11 | full_path: string;
|
12 | parent_id?: number;
|
13 | avatar_url: string;
|
14 | web_url: string;
|
15 | }
|
16 | export interface ProjectSchema {
|
17 | id: number;
|
18 | description: string;
|
19 | name: string;
|
20 | name_with_namespace: string;
|
21 | path: string;
|
22 | path_with_namespace: string;
|
23 | created_at: Date;
|
24 | default_branch: string;
|
25 | tag_list: string[];
|
26 | ssh_url_to_repo: string;
|
27 | http_url_to_repo: string;
|
28 | web_url: string;
|
29 | readme_url: string;
|
30 | avatar_url: string;
|
31 | star_count: number;
|
32 | forks_count: number;
|
33 | last_activity_at: Date;
|
34 | empty_repo: boolean;
|
35 | archived: boolean;
|
36 | visibility: string;
|
37 | resolve_outdated_diff_discussions: boolean;
|
38 | container_registry_enabled: boolean;
|
39 | issues_enabled: boolean;
|
40 | merge_requests_enabled: boolean;
|
41 | wiki_enabled: boolean;
|
42 | jobs_enabled: boolean;
|
43 | snippets_enabled: boolean;
|
44 | issues_access_level: string;
|
45 | repository_access_level: string;
|
46 | merge_requests_access_level: string;
|
47 | wiki_access_level: string;
|
48 | builds_access_level: string;
|
49 | snippets_access_level: string;
|
50 | shared_runners_enabled: boolean;
|
51 | lfs_enabled: boolean;
|
52 | creator_id: number;
|
53 | import_status: string;
|
54 | open_issues_count: number;
|
55 | ci_default_git_depth: number;
|
56 | build_timeout: number;
|
57 | public_jobs: boolean;
|
58 | auto_cancel_pending_pipelines?: string;
|
59 | build_coverage_regex?: string;
|
60 | ci_config_path?: string;
|
61 | shared_with_groups: GroupSchema[];
|
62 | only_allow_merge_if_pipeline_succeeds: boolean;
|
63 | request_access_enabled: boolean;
|
64 | only_allow_merge_if_all_discussions_are_resolved: boolean;
|
65 | remove_source_branch_after_merge: boolean;
|
66 | printing_merge_request_link_enabled: boolean;
|
67 | merge_method: string;
|
68 | auto_devops_enabled: boolean;
|
69 | auto_devops_deploy_strategy: string;
|
70 | namespace: NamespaceInfoSchema;
|
71 | owner: UserSchema;
|
72 | }
|
73 | export declare class Projects extends BaseService {
|
74 | all(options?: PaginatedRequestOptions): Promise<ProjectSchema[]>;
|
75 | archive(projectId: string | number, options?: Sudo): Promise<object>;
|
76 | create({ userId, ...options }: {
|
77 | userId?: number;
|
78 | } & BaseRequestOptions): Promise<object>;
|
79 | edit(projectId: string | number, options?: BaseRequestOptions): Promise<object>;
|
80 | events(projectId: string | number, options?: BaseRequestOptions & EventOptions): Promise<import("../infrastructure").GetResponse>;
|
81 | fork(projectId: string | number, { forkedFromId, ...options }?: {
|
82 | forkedFromId?: number;
|
83 | } & BaseRequestOptions): Promise<object>;
|
84 | forks(projectId: string | number, options?: BaseRequestOptions): Promise<import("../infrastructure").GetResponse>;
|
85 | languages(projectId: string | number, options?: Sudo): Promise<import("../infrastructure").GetResponse>;
|
86 | mirrorPull(projectId: string | number, options?: Sudo): Promise<object>;
|
87 | remove(projectId: string | number, options?: Sudo): Promise<object>;
|
88 | removeFork(projectId: string | number, options?: Sudo): Promise<object>;
|
89 | search(projectName: string): Promise<import("../infrastructure").GetResponse>;
|
90 | share(projectId: string | number, groupId: string | number, groupAccess: number, options?: BaseRequestOptions): Promise<object>;
|
91 | show(projectId: string | number, options?: BaseRequestOptions): Promise<ProjectSchema>;
|
92 | star(projectId: string | number, options?: Sudo): Promise<object>;
|
93 | statuses(projectId: string | number, sha: string, state: string, options?: BaseRequestOptions): Promise<object>;
|
94 | transfer(projectId: string | number, namespaceId: string | number): Promise<object>;
|
95 | unarchive(projectId: string | number, options?: Sudo): Promise<object>;
|
96 | unshare(projectId: string | number, groupId: string | number, options?: Sudo): Promise<object>;
|
97 | unstar(projectId: string | number, options?: Sudo): Promise<object>;
|
98 | upload(projectId: any, content: any, { metadata, sudo }?: {
|
99 | metadata?: UploadMetadata;
|
100 | } & Sudo): Promise<object>;
|
101 | }
|