jdalrymple / gitbeaker

🦊🧪 A comprehensive and typed Gitlab SDK for Node.js, Browsers, Deno and CLI
Other
1.55k stars 295 forks source link

Access Levels #3500

Closed ankurparihar closed 9 months ago

ankurparihar commented 9 months ago

Description

Hi

I would like to use minAccessLevel option in my calls. Gitlab has access levels defined as number (Please refer here) Do we have any way to pass this as a predefined variable instead of numeric value?

Current

const groups = await client.Groups.all({minAccessLevel: 40});

Proposal

const { AccessLevels } = require('@gitbeaker/rest');
const groups = await client.Groups.all({minAccessLevel: AccessLevels.MAINTAINER});

Checklist

jdalrymple commented 9 months ago

Yup, I think i would just need to export the enum!

ankurparihar commented 9 months ago

Thank you! Let me know if I can help.

jdalrymple commented 9 months ago

:rocket: Issue was released in 39.28.0 :rocket:

ankurparihar commented 9 months ago

Thank you @jdalrymple