-
-
Notifications
You must be signed in to change notification settings - Fork 297
/
ProjectRepositoryStorageMoves.ts
42 lines (37 loc) · 1.68 KB
/
ProjectRepositoryStorageMoves.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceRepositoryStorageMoves } from '../templates';
import type { RepositoryStorageMoveSchema } from '../templates/ResourceRepositoryStorageMoves';
import type {
BaseRequestOptions,
GitlabAPIResponse,
PaginationRequestOptions,
PaginationTypes,
ShowExpanded,
Sudo,
} from '../infrastructure';
import type { SimpleProjectSchema } from './Projects';
export interface ProjectRepositoryStorageMoveSchema extends RepositoryStorageMoveSchema {
project: SimpleProjectSchema;
}
export interface ProjectRepositoryStorageMoves<C extends boolean = false>
extends ResourceRepositoryStorageMoves<C> {
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
options?: { projectId?: string | number } & PaginationRequestOptions<P> & BaseRequestOptions<E>,
): Promise<GitlabAPIResponse<ProjectRepositoryStorageMoveSchema[], C, E, P>>;
show<E extends boolean = false, P extends PaginationTypes = 'offset'>(
repositoryStorageId: number,
options?: { projectId?: string | number } & Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<ProjectRepositoryStorageMoveSchema, C, E, P>>;
schedule<E extends boolean = false, P extends PaginationTypes = 'offset'>(
sourceStorageName: string,
options?: { projectId?: string | number; destinationStorageName } & Sudo & ShowExpanded<E>,
): Promise<GitlabAPIResponse<ProjectRepositoryStorageMoveSchema, C, E, P>>;
}
export class ProjectRepositoryStorageMoves<
C extends boolean = false,
> extends ResourceRepositoryStorageMoves<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('projects', options);
}
}