diff --git a/packages/core/src/resources/Users.ts b/packages/core/src/resources/Users.ts index 4ee7e7142..9edd8b3e1 100644 --- a/packages/core/src/resources/Users.ts +++ b/packages/core/src/resources/Users.ts @@ -25,23 +25,23 @@ export interface UserSchema extends Record { } export interface ExpandedUserSchema extends UserSchema { - is_admin?: boolean; - bio?: string; + is_admin: boolean | null; + bio: string | null; bot: boolean; - location?: string; + location: string | null; public_email: string; skype: string; linkedin: string; twitter: string; website_url: string; - organization?: string; - job_title?: string; - prnouns?: string; - work_information?: string; - followers?: number; - following?: number; - local_time?: string; - is_followed?: boolean; + organization: string | null; + job_title: string | null; + prnouns: string | null; + work_information: string | null; + followers: number | null; + following: number | null; + local_time: string | null; + is_followed: boolean | null; last_sign_in_at: string; confirmed_at: string; last_activity_on: string; @@ -49,23 +49,23 @@ export interface ExpandedUserSchema extends UserSchema { theme_id: number; color_scheme_id: number; projects_limit: number; - current_sign_in_at?: string; - note?: string; - identities?: { provider: string; extern_uid: string; saml_provider_id?: number }[]; + current_sign_in_at: string | null; + note: string | null; + identities: { provider: string; extern_uid: string; saml_provider_id: number }[] | null; can_create_group: boolean; can_create_project: boolean; two_factor_enabled: boolean; external: boolean; - private_profile?: string; + private_profile: string | null; current_sign_in_ip: string; last_sign_in_ip: string; - namespace_id?: number; - created_by?: string; - shared_runners_minutes_limit?: number; - extra_shared_runners_minutes_limit?: number; - is_auditor?: boolean; - using_license_seat?: boolean; - provisioned_by_group_id?: number; + namespace_id: number | null; + created_by: string | null; + shared_runners_minutes_limit: number | null; + extra_shared_runners_minutes_limit: number | null; + is_auditor: boolean | null; + using_license_seat: boolean | null; + provisioned_by_group_id: number | null; } export interface UserActivitySchema extends Record { @@ -114,7 +114,7 @@ export interface UserMembershipSchema extends Record { export interface UserRunnerSchema extends Record { id: number; token: string; - token_expires_at?: string; + token_expires_at: string | null; } export type AllUsersOptions = { @@ -226,7 +226,7 @@ export class Users extends BaseResource { ShowExpanded & { withCustomAttributes: true }, ): Promise< GitlabAPIResponse< - ((UserSchema | ExpandedUserSchema) & { custom_attributes: CustomAttributeSchema[] })[], + (ExpandedUserSchema & { custom_attributes: CustomAttributeSchema[] })[], C, E, P @@ -235,12 +235,12 @@ export class Users extends BaseResource { all( options?: AllUsersOptions & PaginationRequestOptions

& Sudo & ShowExpanded, - ): Promise>; + ): Promise>; all( options?: AllUsersOptions & PaginationRequestOptions

& Sudo & ShowExpanded, - ): Promise> { - return RequestHelper.get<(UserSchema | ExpandedUserSchema)[]>()(this, 'users', options); + ): Promise> { + return RequestHelper.get()(this, 'users', options); } allActivities(