UNPKG

@pnp/cli-microsoft365

Version:

Manage Microsoft 365 and SharePoint Framework projects on any platform

34 lines 1.18 kB
import { z } from 'zod'; import { globalOptionsZod } from '../../../../Command.js'; import { odata } from '../../../../utils/odata.js'; import GraphCommand from '../../../base/GraphCommand.js'; import commands from '../../commands.js'; export const options = z.strictObject({ ...globalOptionsZod.shape, rosterId: z.string() }); class PlannerRosterMemberListCommand extends GraphCommand { get name() { return commands.ROSTER_MEMBER_LIST; } get description() { return 'Lists members of the specified Microsoft Planner Roster'; } get schema() { return options; } async commandAction(logger, args) { if (this.verbose) { await logger.logToStderr('Retrieving members of the specified Microsoft Planner Roster'); } try { const response = await odata.getAllItems(`${this.resource}/beta/planner/rosters/${args.options.rosterId}/members`); await logger.log(response); } catch (err) { this.handleRejectedODataJsonPromise(err); } } } export default new PlannerRosterMemberListCommand(); //# sourceMappingURL=roster-member-list.js.map