mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
Adding extensive typing support Unified browser and Node.JS implementations Adding support of Gitlab API 16.0
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
|
|
import { ResourcePushRules } from '../templates';
|
|
import type { CreateAndEditPushRuleOptions, PushRuleSchema } from '../templates/ResourcePushRules';
|
|
import type { GitlabAPIResponse, ShowExpanded, Sudo } from '../infrastructure';
|
|
|
|
export interface GroupPushRules<C extends boolean = false> extends ResourcePushRules<C> {
|
|
create<E extends boolean = false>(
|
|
groupId: string | number,
|
|
options?: CreateAndEditPushRuleOptions & Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<PushRuleSchema, C, E, void>>;
|
|
|
|
edit<E extends boolean = false>(
|
|
groupId: string | number,
|
|
options?: CreateAndEditPushRuleOptions & Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<PushRuleSchema, C, E, void>>;
|
|
|
|
remove<E extends boolean = false>(
|
|
groupId: string | number,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<void, C, E, void>>;
|
|
|
|
show<E extends boolean = false>(
|
|
groupId: string | number,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<PushRuleSchema, C, E, void>>;
|
|
}
|
|
|
|
export class GroupPushRules<C extends boolean = false> extends ResourcePushRules<C> {
|
|
constructor(options: BaseResourceOptions<C>) {
|
|
/* istanbul ignore next */
|
|
super('groups', options);
|
|
}
|
|
}
|