gitbeaker/packages/core/src/resources/GroupCustomAttributes.ts
Justin Dalrymple 6a3292b033
Expose typing to consumer and remove export complexity (#1818)
- Exports all types
- Clean up type duplicates
- Remove Project,User and Group Bundles
- Fix typing on the Gitlab Export
- Clean up README.md
2021-07-05 15:34:19 -04:00

35 lines
1.1 KiB
TypeScript

import { BaseResourceOptions } from '@gitbeaker/requester-utils';
import { ResourceCustomAttributes } from '../templates';
import { CustomAttributeSchema } from '../templates/types';
import { PaginatedRequestOptions, Sudo, CamelizedRecord } from '../infrastructure';
export interface GroupCustomAttributes<C extends boolean = false>
extends ResourceCustomAttributes<C> {
all(
groupId: string | number,
options?: PaginatedRequestOptions,
): Promise<CamelizedRecord<C, CustomAttributeSchema>[]>;
set(
groupId: string | number,
customAttributeId: number,
value: string,
options?: Sudo,
): Promise<CamelizedRecord<C, CustomAttributeSchema>>;
remove(groupId: string | number, customAttributeId: number, options?: Sudo): Promise<void>;
show(
groupId: string | number,
customAttributeId: number,
options?: Sudo,
): Promise<CamelizedRecord<C, CustomAttributeSchema>>;
}
export class GroupCustomAttributes<C extends boolean = false> extends ResourceCustomAttributes<C> {
constructor(options: BaseResourceOptions<C>) {
/* istanbul ignore next */
super('groups', options);
}
}