Update visibility typing for Groups and Projects APIs (#3582)

Particularly for the Project and Group Schema, as well as the AllGroupsOptions
This commit is contained in:
Justin Dalrymple 2024-05-06 00:14:11 -04:00 committed by GitHub
parent bf50664f83
commit d48963ca41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -40,7 +40,7 @@ export interface SimpleGroupSchema extends CondensedGroupSchema {
export interface GroupSchema extends SimpleGroupSchema {
path: string;
description: string;
visibility: string;
visibility: 'public' | 'internal' | 'private';
share_with_group_lock: boolean;
require_two_factor_authentication: boolean;
two_factor_grace_period: number;
@ -74,6 +74,7 @@ export type AllGroupsOptions = {
search?: string;
orderBy?: 'name' | 'path' | 'id';
sort?: 'asc' | 'desc';
visibility?: 'public' | 'internal' | 'private';
statistics?: boolean;
withCustomAttributes?: boolean;
owned?: boolean;
@ -82,7 +83,7 @@ export type AllGroupsOptions = {
};
export type AllGroupProjectsOptions = {
visibility?: string;
visibility?: 'public' | 'internal' | 'private';
orderBy?:
| 'id'
| 'name'
@ -121,7 +122,7 @@ export type CreateGroupOptions = {
shareWithGroupLock?: boolean;
subgroupCreationLevel?: string;
twoFactorGracePeriod?: number;
visibility?: 'private' | 'public';
visibility?: 'public' | 'internal' | 'private';
membershipLock?: boolean;
extraSharedRunnersMinutesLimit?: number;
sharedRunnersMinutesLimit?: number;
@ -149,7 +150,7 @@ export type EditGroupOptions = {
shareWithGroupLock?: boolean;
subgroupCreationLevel?: string;
twoFactorGracePeriod?: number;
visibility?: 'private' | 'public';
visibility?: 'public' | 'internal' | 'private';
extraSharedRunnersMinutesLimit?: number;
fileTemplateProjectId?: number;
membershipLock?: boolean;

View File

@ -94,7 +94,7 @@ export interface ProjectSchema extends SimpleProjectSchema {
packages_enabled: boolean;
empty_repo: boolean;
archived: boolean;
visibility: string;
visibility: 'public' | 'internal' | 'private';
owner: Pick<UserSchema, 'id' | 'name' | 'created_at'>;
resolve_outdated_diff_discussions: boolean;
container_expiration_policy: {