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
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
import type { BaseResourceOptions } from '@gitbeaker/requester-utils';
|
|
import { ResourceCustomAttributes } from '../templates';
|
|
import type { CustomAttributeSchema } from '../templates/ResourceCustomAttributes';
|
|
import type {
|
|
GitlabAPIResponse,
|
|
PaginationRequestOptions,
|
|
PaginationTypes,
|
|
ShowExpanded,
|
|
Sudo,
|
|
} from '../infrastructure';
|
|
|
|
export interface GroupCustomAttributes<C extends boolean = false>
|
|
extends ResourceCustomAttributes<C> {
|
|
all<E extends boolean = false, P extends PaginationTypes = 'offset'>(
|
|
groupId: string | number,
|
|
options?: PaginationRequestOptions<P> & Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<CustomAttributeSchema[], C, E, P>>;
|
|
|
|
set<E extends boolean = false>(
|
|
groupId: string | number,
|
|
customAttributeId: string,
|
|
value: string,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<CustomAttributeSchema, C, E, void>>;
|
|
|
|
remove<E extends boolean = false>(
|
|
groupId: string | number,
|
|
customAttributeId: string,
|
|
options?: Sudo,
|
|
): Promise<GitlabAPIResponse<void, C, E, void>>;
|
|
|
|
show<E extends boolean = false>(
|
|
groupId: string | number,
|
|
customAttributeId: string,
|
|
options?: Sudo & ShowExpanded<E>,
|
|
): Promise<GitlabAPIResponse<CustomAttributeSchema, C, E, void>>;
|
|
}
|
|
|
|
export class GroupCustomAttributes<C extends boolean = false> extends ResourceCustomAttributes<C> {
|
|
constructor(options: BaseResourceOptions<C>) {
|
|
/* istanbul ignore next */
|
|
super('groups', options);
|
|
}
|
|
}
|