Skip to content

[Gitlab.Groups] options should be optional for share and unshare operations #3829

@loganmzz

Description

@loganmzz

Description

  • Node.js version: 24.13.0
  • Gitbeaker version: 43.8.0
  • Gitbeaker release (cli, rest, core, requester-utils): rest
  • OS & version: WSL / Ubuntu 22

For most REST API methods, the options argument is optional. But it's not the case for share and unshare operations on Groups.

Steps to reproduce

const client = new Gitlab(...);
client.Groups.share(group.id, groupToShare.id, AccessLevel.GUEST);
client.Groups.unshare(group.id, groupToShare.id);

Expected behaviour

No compilation error.

Actual behaviour

Expected 4 arguments, but got 3.
index.d.ts(751, 117): An argument for 'options' was not provided.

(method) Groups<false>.share<false>(groupId: string | number, sharedGroupId: string | number, groupAccess: number, options: {
    expiresAt?: string;
} & Sudo & ShowExpanded<false>): Promise<...>
Expected 3 arguments, but got 2.
index.d.ts(759, 98): An argument for 'options' was not provided.

(method) Groups<false>.unshare<false>(groupId: string | number, sharedGroupId: string | number, options: Sudo & ShowExpanded<false>): Promise<void>

Possible fixes

Make options argument optional like for all other methods.

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugChanges fix a minor bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions