@pnp/cli-microsoft365
Version:
Manage Microsoft 365 and SharePoint Framework projects on any platform
38 lines • 1.23 kB
JavaScript
import { z } from 'zod';
import { globalOptionsZod } from '../../../../Command.js';
import request from '../../../../request.js';
import GraphCommand from '../../../base/GraphCommand.js';
import commands from '../../commands.js';
export const options = z.strictObject({
...globalOptionsZod.shape,
id: z.uuid().alias('i')
});
class EntraGroupSettingGetCommand extends GraphCommand {
get name() {
return commands.GROUPSETTING_GET;
}
get description() {
return 'Gets information about the particular group setting';
}
get schema() {
return options;
}
async commandAction(logger, args) {
try {
const requestOptions = {
url: `${this.resource}/v1.0/groupSettings/${args.options.id}`,
headers: {
accept: 'application/json;odata.metadata=none'
},
responseType: 'json'
};
const res = await request.get(requestOptions);
await logger.log(res);
}
catch (err) {
this.handleRejectedODataJsonPromise(err);
}
}
}
export default new EntraGroupSettingGetCommand();
//# sourceMappingURL=groupsetting-get.js.map