From 8b5093e959f4e42561f4638a9e60c65728387f98 Mon Sep 17 00:00:00 2001 From: Smita Nachan Date: Sun, 20 Oct 2024 06:48:47 +0000 Subject: [PATCH] remove defaultProperties --- src/m365/entra/commands/user/user-guest-add.spec.ts | 6 +----- src/m365/entra/commands/user/user-guest-add.ts | 4 ---- src/m365/flow/commands/environment/environment-get.spec.ts | 6 +----- src/m365/flow/commands/environment/environment-get.ts | 4 ---- src/m365/flow/commands/flow-get.spec.ts | 6 +----- src/m365/flow/commands/flow-get.ts | 4 ---- src/m365/flow/commands/run/run-get.spec.ts | 6 +----- src/m365/flow/commands/run/run-get.ts | 4 ---- src/m365/pa/commands/app/app-get.spec.ts | 6 +----- src/m365/pa/commands/app/app-get.ts | 4 ---- src/m365/pa/commands/environment/environment-get.spec.ts | 6 +----- src/m365/pa/commands/environment/environment-get.ts | 4 ---- src/m365/planner/commands/bucket/bucket-add.spec.ts | 4 ---- src/m365/planner/commands/bucket/bucket-add.ts | 4 ---- src/m365/planner/commands/plan/plan-add.spec.ts | 4 ---- src/m365/planner/commands/plan/plan-add.ts | 4 ---- src/m365/planner/commands/plan/plan-get.spec.ts | 4 ---- src/m365/planner/commands/plan/plan-get.ts | 4 ---- src/m365/planner/commands/plan/plan-set.spec.ts | 4 ---- src/m365/planner/commands/plan/plan-set.ts | 4 ---- .../planner/commands/task/task-checklistitem-add.spec.ts | 4 ---- src/m365/planner/commands/task/task-checklistitem-add.ts | 4 ---- src/m365/pp/commands/aibuildermodel/aibuildermodel-get.ts | 4 ---- src/m365/pp/commands/card/card-get.spec.ts | 4 ---- src/m365/pp/commands/card/card-get.ts | 4 ---- src/m365/pp/commands/chatbot/chatbot-get.spec.ts | 4 ---- src/m365/pp/commands/chatbot/chatbot-get.ts | 4 ---- src/m365/pp/commands/dataverse/dataverse-table-get.spec.ts | 4 ---- src/m365/pp/commands/dataverse/dataverse-table-get.ts | 4 ---- src/m365/pp/commands/environment/environment-get.spec.ts | 4 ---- src/m365/pp/commands/environment/environment-get.ts | 4 ---- src/m365/pp/commands/solution/solution-get.spec.ts | 4 ---- src/m365/pp/commands/solution/solution-get.ts | 4 ---- .../pp/commands/solution/solution-publisher-get.spec.ts | 4 ---- src/m365/pp/commands/solution/solution-publisher-get.ts | 4 ---- src/m365/spo/commands/group/group-member-add.spec.ts | 4 ---- src/m365/spo/commands/group/group-member-add.ts | 4 ---- src/m365/spo/commands/page/page-copy.spec.ts | 4 ---- src/m365/spo/commands/page/page-copy.ts | 4 ---- src/m365/spo/commands/page/page-get.spec.ts | 4 ---- src/m365/spo/commands/page/page-get.ts | 4 ---- .../serviceannouncement-health-get.spec.ts | 4 ---- .../serviceannouncement/serviceannouncement-health-get.ts | 4 ---- src/m365/todo/commands/list/list-get.spec.ts | 4 ---- src/m365/todo/commands/list/list-get.ts | 4 ---- src/m365/todo/commands/task/task-get.spec.ts | 4 ---- src/m365/todo/commands/task/task-get.ts | 4 ---- src/m365/viva/commands/engage/engage-message-add.spec.ts | 4 ---- src/m365/viva/commands/engage/engage-message-add.ts | 4 ---- src/m365/viva/commands/engage/engage-message-get.spec.ts | 4 ---- src/m365/viva/commands/engage/engage-message-get.ts | 4 ---- 51 files changed, 6 insertions(+), 210 deletions(-) diff --git a/src/m365/entra/commands/user/user-guest-add.spec.ts b/src/m365/entra/commands/user/user-guest-add.spec.ts index edee1366026..4122bd900f7 100644 --- a/src/m365/entra/commands/user/user-guest-add.spec.ts +++ b/src/m365/entra/commands/user/user-guest-add.spec.ts @@ -85,10 +85,6 @@ describe(commands.USER_GUEST_ADD, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'inviteRedeemUrl', 'invitedUserDisplayName', 'invitedUserEmailAddress', 'invitedUserType', 'resetRedemption', 'sendInvitationMessage', 'status']); - }); - it('correctly logs the API response', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { if (opts.url === 'https://graph.microsoft.com/v1.0/invitations') { @@ -197,4 +193,4 @@ describe(commands.USER_GUEST_ADD, () => { } }), new CommandError(errorMessage)); }); -}); +}); \ No newline at end of file diff --git a/src/m365/entra/commands/user/user-guest-add.ts b/src/m365/entra/commands/user/user-guest-add.ts index 9f41a752c47..3226e65f622 100644 --- a/src/m365/entra/commands/user/user-guest-add.ts +++ b/src/m365/entra/commands/user/user-guest-add.ts @@ -73,10 +73,6 @@ class EntraUserGuestAddCommand extends GraphCommand { ); } - public defaultProperties(): string[] | undefined { - return ['id', 'inviteRedeemUrl', 'invitedUserDisplayName', 'invitedUserEmailAddress', 'invitedUserType', 'resetRedemption', 'sendInvitationMessage', 'status']; - } - public async commandAction(logger: Logger, args: CommandArgs): Promise { try { const requestOptions: CliRequestOptions = { diff --git a/src/m365/flow/commands/environment/environment-get.spec.ts b/src/m365/flow/commands/environment/environment-get.spec.ts index cfd4a1a8a5f..152af0d8c06 100644 --- a/src/m365/flow/commands/environment/environment-get.spec.ts +++ b/src/m365/flow/commands/environment/environment-get.spec.ts @@ -120,10 +120,6 @@ describe(commands.ENVIRONMENT_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault']); - }); - it('retrieves information about the specified environment (debug)', async () => { sinon.stub(request, 'get').callsFake(async opts => { if ((opts.url === `https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/Default-d87a7535-dd31-4437-bfe1-95340acd55c5?api-version=2016-11-01`)) { @@ -203,4 +199,4 @@ describe(commands.ENVIRONMENT_GET, () => { await assert.rejects(command.action(logger, { options: { name: 'Default-d87a7535-dd31-4437-bfe1-95340acd55c5' } } as any), new CommandError('An error has occurred')); }); -}); +}); \ No newline at end of file diff --git a/src/m365/flow/commands/environment/environment-get.ts b/src/m365/flow/commands/environment/environment-get.ts index 47f323044fc..daab1e30f72 100644 --- a/src/m365/flow/commands/environment/environment-get.ts +++ b/src/m365/flow/commands/environment/environment-get.ts @@ -23,10 +23,6 @@ class FlowEnvironmentGetCommand extends PowerAutomateCommand { return 'Gets information about the specified Microsoft Flow environment'; } - public defaultProperties(): string[] | undefined { - return ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault']; - } - constructor() { super(); diff --git a/src/m365/flow/commands/flow-get.spec.ts b/src/m365/flow/commands/flow-get.spec.ts index 1b4f05fcb06..9b28e888942 100644 --- a/src/m365/flow/commands/flow-get.spec.ts +++ b/src/m365/flow/commands/flow-get.spec.ts @@ -62,10 +62,6 @@ describe(commands.GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'displayName', 'description', 'triggers', 'actions']); - }); - it('retrieves information about the specified flow (debug)', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { if (opts.url === `https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/Default-d87a7535-dd31-4437-bfe1-95340acd55c5/flows/3989cb59-ce1a-4a5c-bb78-257c5c39381d?api-version=2016-11-01${expandUrl}`) { @@ -229,4 +225,4 @@ describe(commands.GET, () => { await assert.rejects(command.action(logger, { options: { environmentName: 'Default-d87a7535-dd31-4437-bfe1-95340acd55c5', name: '3989cb59-ce1a-4a5c-bb78-257c5c39381d' } } as any), new CommandError('An error has occurred')); }); -}); +}); \ No newline at end of file diff --git a/src/m365/flow/commands/flow-get.ts b/src/m365/flow/commands/flow-get.ts index 1fcf11ef78f..60dd0dada81 100644 --- a/src/m365/flow/commands/flow-get.ts +++ b/src/m365/flow/commands/flow-get.ts @@ -49,10 +49,6 @@ class FlowGetCommand extends PowerAutomateCommand { return 'Gets information about the specified Microsoft Flow'; } - public defaultProperties(): string[] | undefined { - return ['name', 'displayName', 'description', 'triggers', 'actions']; - } - constructor() { super(); diff --git a/src/m365/flow/commands/run/run-get.spec.ts b/src/m365/flow/commands/run/run-get.spec.ts index 72ed11e639a..90f5a318dff 100644 --- a/src/m365/flow/commands/run/run-get.spec.ts +++ b/src/m365/flow/commands/run/run-get.spec.ts @@ -431,8 +431,4 @@ describe(commands.RUN_GET, () => { const actual = await command.validate({ options: { environmentName: environmentName, flowName: flowName, name: runName } }, commandInfo); assert.strictEqual(actual, true); }); - - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'startTime', 'endTime', 'status', 'triggerName']); - }); -}); +}); \ No newline at end of file diff --git a/src/m365/flow/commands/run/run-get.ts b/src/m365/flow/commands/run/run-get.ts index f7354705fb5..ee3760d816d 100644 --- a/src/m365/flow/commands/run/run-get.ts +++ b/src/m365/flow/commands/run/run-get.ts @@ -80,10 +80,6 @@ class FlowRunGetCommand extends PowerAutomateCommand { return 'Gets information about a specific run of the specified Microsoft Flow'; } - public defaultProperties(): string[] | undefined { - return ['name', 'startTime', 'endTime', 'status', 'triggerName']; - } - constructor() { super(); diff --git a/src/m365/pa/commands/app/app-get.spec.ts b/src/m365/pa/commands/app/app-get.spec.ts index 506f72f20f9..6e461765e1d 100644 --- a/src/m365/pa/commands/app/app-get.spec.ts +++ b/src/m365/pa/commands/app/app-get.spec.ts @@ -542,10 +542,6 @@ describe(commands.APP_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'displayName', 'description', 'appVersion', 'owner']); - }); - it('fails validation if name or displayName not specified', async () => { sinon.stub(cli, 'getSettingWithDefaultValue').callsFake((settingName, defaultValue) => { if (settingName === settingsNames.prompt) { @@ -768,4 +764,4 @@ describe(commands.APP_GET, () => { const actual = await command.validate({ options: { name: "5369f386-e380-46cb-82a4-4e18f9e4f3a7", asAdmin: true, environmentName: 'Default-d87a7535-dd31-4437-bfe1-95340acd55c6' } }, commandInfo); assert.strictEqual(actual, true); }); -}); +}); \ No newline at end of file diff --git a/src/m365/pa/commands/app/app-get.ts b/src/m365/pa/commands/app/app-get.ts index 5228827446d..b364faaac11 100644 --- a/src/m365/pa/commands/app/app-get.ts +++ b/src/m365/pa/commands/app/app-get.ts @@ -29,10 +29,6 @@ class PaAppGetCommand extends PowerAppsCommand { return 'Gets information about the specified Microsoft Power App'; } - public defaultProperties(): string[] | undefined { - return ['name', 'displayName', 'description', 'appVersion', 'owner']; - } - constructor() { super(); diff --git a/src/m365/pa/commands/environment/environment-get.spec.ts b/src/m365/pa/commands/environment/environment-get.spec.ts index 8a2388ba09d..b0416bbac7a 100644 --- a/src/m365/pa/commands/environment/environment-get.spec.ts +++ b/src/m365/pa/commands/environment/environment-get.spec.ts @@ -61,10 +61,6 @@ describe(commands.ENVIRONMENT_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault']); - }); - it('retrieves information about the default environment', async () => { const env: any = { "name": "Default-d87a7535-dd31-4437-bfe1-95340acd55c5", "location": "europe", "type": "Microsoft.PowerApps/environments", "id": "/providers/Microsoft.PowerApps/environments/Default-d87a7535-dd31-4437-bfe1-95340acd55c5", "properties": { "displayName": "Contoso (default)", "createdTime": "2018-03-22T20:20:46.08653Z", "createdBy": { "id": "SYSTEM", "displayName": "SYSTEM", "type": "NotSpecified" }, "provisioningState": "Succeeded", "creationType": "DefaultTenant", "environmentSku": "Default", "environmentType": "Production", "isDefault": true, "azureRegionHint": "westeurope", "runtimeEndpoints": { "microsoft.BusinessAppPlatform": "https://europe.api.bap.microsoft.com", "microsoft.CommonDataModel": "https://europe.api.cds.microsoft.com", "microsoft.PowerApps": "https://europe.api.powerapps.com", "microsoft.Flow": "https://europe.api.flow.microsoft.com" } } }; @@ -130,4 +126,4 @@ describe(commands.ENVIRONMENT_GET, () => { await assert.rejects(command.action(logger, { options: { name: 'Default-d87a7535-dd31-4437-bfe1-95340acd55c5' } } as any), new CommandError('An error has occurred')); }); -}); +}); \ No newline at end of file diff --git a/src/m365/pa/commands/environment/environment-get.ts b/src/m365/pa/commands/environment/environment-get.ts index 01e130e0625..e9d42dc73dc 100644 --- a/src/m365/pa/commands/environment/environment-get.ts +++ b/src/m365/pa/commands/environment/environment-get.ts @@ -22,10 +22,6 @@ class PaEnvironmentGetCommand extends PowerAppsCommand { return 'Gets information about the specified Microsoft Power Apps environment'; } - public defaultProperties(): string[] | undefined { - return ['name', 'id', 'location', 'displayName', 'provisioningState', 'environmentSku', 'azureRegionHint', 'isDefault']; - } - constructor() { super(); diff --git a/src/m365/planner/commands/bucket/bucket-add.spec.ts b/src/m365/planner/commands/bucket/bucket-add.spec.ts index 8f63639f685..96d6d6d69b1 100644 --- a/src/m365/planner/commands/bucket/bucket-add.spec.ts +++ b/src/m365/planner/commands/bucket/bucket-add.spec.ts @@ -136,10 +136,6 @@ describe(commands.BUCKET_ADD, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'name', 'planId', 'orderHint']); - }); - it('passes validation when valid name and planId specified', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/planner/commands/bucket/bucket-add.ts b/src/m365/planner/commands/bucket/bucket-add.ts index a7b53c0a706..e22dd5e46a1 100644 --- a/src/m365/planner/commands/bucket/bucket-add.ts +++ b/src/m365/planner/commands/bucket/bucket-add.ts @@ -30,10 +30,6 @@ class PlannerBucketAddCommand extends GraphCommand { return 'Adds a new Microsoft Planner bucket'; } - public defaultProperties(): string[] | undefined { - return ['id', 'name', 'planId', 'orderHint']; - } - constructor() { super(); diff --git a/src/m365/planner/commands/plan/plan-add.spec.ts b/src/m365/planner/commands/plan/plan-add.spec.ts index 1d3c6364659..e961f3aa8a5 100644 --- a/src/m365/planner/commands/plan/plan-add.spec.ts +++ b/src/m365/planner/commands/plan/plan-add.spec.ts @@ -140,10 +140,6 @@ describe(commands.PLAN_ADD, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'title', 'createdDateTime', 'owner']); - }); - it('fails validation if the ownerGroupId is not a valid guid.', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/planner/commands/plan/plan-add.ts b/src/m365/planner/commands/plan/plan-add.ts index 7c64abd5fab..6271911d393 100644 --- a/src/m365/planner/commands/plan/plan-add.ts +++ b/src/m365/planner/commands/plan/plan-add.ts @@ -31,10 +31,6 @@ class PlannerPlanAddCommand extends GraphCommand { return 'Adds a new Microsoft Planner plan'; } - public defaultProperties(): string[] | undefined { - return ['id', 'title', 'createdDateTime', 'owner']; - } - constructor() { super(); diff --git a/src/m365/planner/commands/plan/plan-get.spec.ts b/src/m365/planner/commands/plan/plan-get.spec.ts index 4ba5c0cfe81..bc6b95ee290 100644 --- a/src/m365/planner/commands/plan/plan-get.spec.ts +++ b/src/m365/planner/commands/plan/plan-get.spec.ts @@ -99,10 +99,6 @@ describe(commands.PLAN_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'title', 'createdDateTime', 'owner', '@odata.etag']); - }); - it('fails validation if the ownerGroupId is not a valid guid.', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/planner/commands/plan/plan-get.ts b/src/m365/planner/commands/plan/plan-get.ts index 7020288c461..9e68dde286a 100644 --- a/src/m365/planner/commands/plan/plan-get.ts +++ b/src/m365/planner/commands/plan/plan-get.ts @@ -29,10 +29,6 @@ class PlannerPlanGetCommand extends GraphCommand { return 'Get a Microsoft Planner plan'; } - public defaultProperties(): string[] | undefined { - return ['id', 'title', 'createdDateTime', 'owner', '@odata.etag']; - } - constructor() { super(); diff --git a/src/m365/planner/commands/plan/plan-set.spec.ts b/src/m365/planner/commands/plan/plan-set.spec.ts index 802adb897c5..9034a918cec 100644 --- a/src/m365/planner/commands/plan/plan-set.spec.ts +++ b/src/m365/planner/commands/plan/plan-set.spec.ts @@ -173,10 +173,6 @@ describe(commands.PLAN_SET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'title', 'createdDateTime', 'owner']); - }); - it('fails validation if the ownerGroupId is not a valid guid.', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/planner/commands/plan/plan-set.ts b/src/m365/planner/commands/plan/plan-set.ts index 63f2e3034c6..b06c2649d86 100644 --- a/src/m365/planner/commands/plan/plan-set.ts +++ b/src/m365/planner/commands/plan/plan-set.ts @@ -33,10 +33,6 @@ class PlannerPlanSetCommand extends GraphCommand { return 'Updates a Microsoft Planner plan'; } - public defaultProperties(): string[] | undefined { - return ['id', 'title', 'createdDateTime', 'owner']; - } - constructor() { super(); diff --git a/src/m365/planner/commands/task/task-checklistitem-add.spec.ts b/src/m365/planner/commands/task/task-checklistitem-add.spec.ts index 79b582eab92..f68553a78e5 100644 --- a/src/m365/planner/commands/task/task-checklistitem-add.spec.ts +++ b/src/m365/planner/commands/task/task-checklistitem-add.spec.ts @@ -85,10 +85,6 @@ describe(commands.TASK_CHECKLISTITEM_ADD, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'title', 'isChecked']); - }); - it('correctly adds checklist item', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { if (opts.url === `https://graph.microsoft.com/v1.0/planner/tasks/${formatting.encodeQueryParameter(validTaskId)}/details`) { diff --git a/src/m365/planner/commands/task/task-checklistitem-add.ts b/src/m365/planner/commands/task/task-checklistitem-add.ts index b277227ae81..d3827861914 100644 --- a/src/m365/planner/commands/task/task-checklistitem-add.ts +++ b/src/m365/planner/commands/task/task-checklistitem-add.ts @@ -27,10 +27,6 @@ class PlannerTaskChecklistItemAddCommand extends GraphCommand { return 'Adds a new checklist item to a Planner task.'; } - public defaultProperties(): string[] | undefined { - return ['id', 'title', 'isChecked']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/aibuildermodel/aibuildermodel-get.ts b/src/m365/pp/commands/aibuildermodel/aibuildermodel-get.ts index fff84db2a40..d1b90be2fac 100644 --- a/src/m365/pp/commands/aibuildermodel/aibuildermodel-get.ts +++ b/src/m365/pp/commands/aibuildermodel/aibuildermodel-get.ts @@ -28,10 +28,6 @@ class PpAiBuilderModelGetCommand extends PowerPlatformCommand { return 'Get an AI builder model in the specified Power Platform environment.'; } - public defaultProperties(): string[] | undefined { - return ['msdyn_name', 'msdyn_aimodelid', 'createdon', 'modifiedon']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/card/card-get.spec.ts b/src/m365/pp/commands/card/card-get.spec.ts index 68f80408676..cf14f181fe6 100644 --- a/src/m365/pp/commands/card/card-get.spec.ts +++ b/src/m365/pp/commands/card/card-get.spec.ts @@ -134,10 +134,6 @@ describe(commands.CARD_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon']); - }); - it('fails validation if id is not a valid guid.', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/pp/commands/card/card-get.ts b/src/m365/pp/commands/card/card-get.ts index e2cb2c48d04..4a7ec6c0145 100644 --- a/src/m365/pp/commands/card/card-get.ts +++ b/src/m365/pp/commands/card/card-get.ts @@ -29,10 +29,6 @@ class PpCardGetCommand extends PowerPlatformCommand { return 'Get specific Microsoft Power Platform card in the specified Power Platform environment.'; } - public defaultProperties(): string[] | undefined { - return ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/chatbot/chatbot-get.spec.ts b/src/m365/pp/commands/chatbot/chatbot-get.spec.ts index f464aa0c12b..f4230921f4e 100644 --- a/src/m365/pp/commands/chatbot/chatbot-get.spec.ts +++ b/src/m365/pp/commands/chatbot/chatbot-get.spec.ts @@ -137,10 +137,6 @@ describe(commands.CHATBOT_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'botid', 'publishedon', 'createdon', 'modifiedon']); - }); - it('fails validation if id is not a valid guid.', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/pp/commands/chatbot/chatbot-get.ts b/src/m365/pp/commands/chatbot/chatbot-get.ts index 966aeefe2a1..aa92eb23086 100644 --- a/src/m365/pp/commands/chatbot/chatbot-get.ts +++ b/src/m365/pp/commands/chatbot/chatbot-get.ts @@ -29,10 +29,6 @@ class PpChatbotGetCommand extends PowerPlatformCommand { return 'Get information about the specified chatbot'; } - public defaultProperties(): string[] | undefined { - return ['name', 'botid', 'publishedon', 'createdon', 'modifiedon']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/dataverse/dataverse-table-get.spec.ts b/src/m365/pp/commands/dataverse/dataverse-table-get.spec.ts index abd5aff307e..ad49b4bb4b2 100644 --- a/src/m365/pp/commands/dataverse/dataverse-table-get.spec.ts +++ b/src/m365/pp/commands/dataverse/dataverse-table-get.spec.ts @@ -130,10 +130,6 @@ describe(commands.DATAVERSE_TABLE_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['SchemaName', 'EntitySetName', 'LogicalName', 'IsManaged']); - }); - it('retrieves data for a specific dataverse table', async () => { sinon.stub(powerPlatform, 'getDynamicsInstanceApiUrl').callsFake(async () => envUrl); diff --git a/src/m365/pp/commands/dataverse/dataverse-table-get.ts b/src/m365/pp/commands/dataverse/dataverse-table-get.ts index d52df147b75..cec423264d3 100644 --- a/src/m365/pp/commands/dataverse/dataverse-table-get.ts +++ b/src/m365/pp/commands/dataverse/dataverse-table-get.ts @@ -25,10 +25,6 @@ class PpDataverseTableGetCommand extends PowerPlatformCommand { return 'Gets a dataverse table in a given environment'; } - public defaultProperties(): string[] | undefined { - return ['SchemaName', 'EntitySetName', 'LogicalName', 'IsManaged']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/environment/environment-get.spec.ts b/src/m365/pp/commands/environment/environment-get.spec.ts index ef2d69202bd..6d270f630d2 100644 --- a/src/m365/pp/commands/environment/environment-get.spec.ts +++ b/src/m365/pp/commands/environment/environment-get.spec.ts @@ -76,10 +76,6 @@ describe(commands.ENVIRONMENT_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['name', 'id']); - }); - it('correctly handles API OData error', async () => { const errorMessage = `Resource '' does not exist or one of its queried reference-property objects are not present`; sinon.stub(request, 'get').callsFake(async () => { diff --git a/src/m365/pp/commands/environment/environment-get.ts b/src/m365/pp/commands/environment/environment-get.ts index 7ba22ff4003..db5608abead 100644 --- a/src/m365/pp/commands/environment/environment-get.ts +++ b/src/m365/pp/commands/environment/environment-get.ts @@ -23,10 +23,6 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand { return 'Gets information about the specified Power Platform environment'; } - public defaultProperties(): string[] | undefined { - return ['name', 'id']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/solution/solution-get.spec.ts b/src/m365/pp/commands/solution/solution-get.spec.ts index 78bca4647ad..147585c0f88 100644 --- a/src/m365/pp/commands/solution/solution-get.spec.ts +++ b/src/m365/pp/commands/solution/solution-get.spec.ts @@ -94,10 +94,6 @@ describe(commands.SOLUTION_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['uniquename', 'version', 'publisher']); - }); - it('fails validation when no solution found', async () => { sinon.stub(powerPlatform, 'getDynamicsInstanceApiUrl').callsFake(async () => envUrl); diff --git a/src/m365/pp/commands/solution/solution-get.ts b/src/m365/pp/commands/solution/solution-get.ts index c19f7cc22f1..08387af264c 100644 --- a/src/m365/pp/commands/solution/solution-get.ts +++ b/src/m365/pp/commands/solution/solution-get.ts @@ -28,10 +28,6 @@ class PpSolutionGetCommand extends PowerPlatformCommand { return 'Gets a specific solution in a given environment.'; } - public defaultProperties(): string[] | undefined { - return ['uniquename', 'version', 'publisher']; - } - constructor() { super(); diff --git a/src/m365/pp/commands/solution/solution-publisher-get.spec.ts b/src/m365/pp/commands/solution/solution-publisher-get.spec.ts index 0cfb33a0477..fe2cd50e1ab 100644 --- a/src/m365/pp/commands/solution/solution-publisher-get.spec.ts +++ b/src/m365/pp/commands/solution/solution-publisher-get.spec.ts @@ -85,10 +85,6 @@ describe(commands.SOLUTION_PUBLISHER_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['publisherid', 'uniquename', 'friendlyname']); - }); - it('fails validation when no publisher found', async () => { sinon.stub(powerPlatform, 'getDynamicsInstanceApiUrl').callsFake(async () => envUrl); diff --git a/src/m365/pp/commands/solution/solution-publisher-get.ts b/src/m365/pp/commands/solution/solution-publisher-get.ts index 419f7d33b18..2b2a7168f9a 100644 --- a/src/m365/pp/commands/solution/solution-publisher-get.ts +++ b/src/m365/pp/commands/solution/solution-publisher-get.ts @@ -27,10 +27,6 @@ class PpSolutionPublisherGetCommand extends PowerPlatformCommand { return 'Get information about the specified publisher in a given environment.'; } - public defaultProperties(): string[] | undefined { - return ['publisherid', 'uniquename', 'friendlyname']; - } - constructor() { super(); diff --git a/src/m365/spo/commands/group/group-member-add.spec.ts b/src/m365/spo/commands/group/group-member-add.spec.ts index c264f73d894..5739533ced4 100644 --- a/src/m365/spo/commands/group/group-member-add.spec.ts +++ b/src/m365/spo/commands/group/group-member-add.spec.ts @@ -354,10 +354,6 @@ describe(commands.GROUP_MEMBER_ADD, () => { assert.strictEqual(actual, true); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['Title', 'UserPrincipalName']); - }); - it('correctly logs result when adding users by userNames', async () => { const postStub = sinon.stub(request, 'post').callsFake(async (opts) => { if (opts.url === `${webUrl}/_api/web/SiteGroups/GetById(${spGroupId})/users`) { diff --git a/src/m365/spo/commands/group/group-member-add.ts b/src/m365/spo/commands/group/group-member-add.ts index fabe2e128ab..4cb92b2ff58 100644 --- a/src/m365/spo/commands/group/group-member-add.ts +++ b/src/m365/spo/commands/group/group-member-add.ts @@ -32,10 +32,6 @@ class SpoGroupMemberAddCommand extends SpoCommand { return 'Add members to a SharePoint Group'; } - public defaultProperties(): string[] | undefined { - return ['Title', 'UserPrincipalName']; - } - constructor() { super(); diff --git a/src/m365/spo/commands/page/page-copy.spec.ts b/src/m365/spo/commands/page/page-copy.spec.ts index 281292bda4a..d2dd0672bd4 100644 --- a/src/m365/spo/commands/page/page-copy.spec.ts +++ b/src/m365/spo/commands/page/page-copy.spec.ts @@ -68,10 +68,6 @@ describe(commands.PAGE_COPY, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['Id', 'PageLayoutType', 'Title', 'Url']); - }); - it('create a page copy', async () => { sinon.stub(request, 'post').callsFake(async (opts) => { if ((opts.url as string).indexOf(`/_api/SP.MoveCopyUtil.CopyFileByPath()`) > -1) { diff --git a/src/m365/spo/commands/page/page-copy.ts b/src/m365/spo/commands/page/page-copy.ts index fc8f7030711..447d2544fb8 100644 --- a/src/m365/spo/commands/page/page-copy.ts +++ b/src/m365/spo/commands/page/page-copy.ts @@ -27,10 +27,6 @@ class SpoPageCopyCommand extends SpoCommand { return 'Creates a copy of a modern page or template'; } - public defaultProperties(): string[] | undefined { - return ['Id', 'PageLayoutType', 'Title', 'Url']; - } - constructor() { super(); diff --git a/src/m365/spo/commands/page/page-get.spec.ts b/src/m365/spo/commands/page/page-get.spec.ts index a77cf96fc40..0720aa62cb6 100644 --- a/src/m365/spo/commands/page/page-get.spec.ts +++ b/src/m365/spo/commands/page/page-get.spec.ts @@ -64,10 +64,6 @@ describe(commands.PAGE_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['commentsDisabled', 'numSections', 'numControls', 'title', 'layoutType']); - }); - it('gets information about a modern page including all returned properties', async () => { sinon.stub(request, 'get').callsFake(async (opts) => { if ((opts.url as string).indexOf(`/_api/web/GetFileByServerRelativePath(DecodedUrl='/sites/team-a/SitePages/home.aspx')`) > -1) { diff --git a/src/m365/spo/commands/page/page-get.ts b/src/m365/spo/commands/page/page-get.ts index d14e58da4e5..b03454e374b 100644 --- a/src/m365/spo/commands/page/page-get.ts +++ b/src/m365/spo/commands/page/page-get.ts @@ -26,10 +26,6 @@ class SpoPageGetCommand extends SpoCommand { return 'Gets information about the specific modern page'; } - public defaultProperties(): string[] | undefined { - return ['commentsDisabled', 'numSections', 'numControls', 'title', 'layoutType']; - } - constructor() { super(); diff --git a/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.spec.ts b/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.spec.ts index 2683c8c11f0..1b481ded45f 100644 --- a/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.spec.ts +++ b/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.spec.ts @@ -111,10 +111,6 @@ describe(commands.SERVICEANNOUNCEMENT_HEALTH_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'status', 'service']); - }); - it('passes validation when command called', async () => { const actual = await command.validate({ options: { diff --git a/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.ts b/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.ts index acd6f9b87a9..dfab5d82837 100644 --- a/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.ts +++ b/src/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.ts @@ -23,10 +23,6 @@ class TenantServiceAnnouncementHealthGetCommand extends GraphCommand { return 'This operation provides the health information of a specified service for a tenant'; } - public defaultProperties(): string[] | undefined { - return ['id', 'status', 'service']; - } - constructor() { super(); diff --git a/src/m365/todo/commands/list/list-get.spec.ts b/src/m365/todo/commands/list/list-get.spec.ts index eadcac82045..a5f28b9212c 100644 --- a/src/m365/todo/commands/list/list-get.spec.ts +++ b/src/m365/todo/commands/list/list-get.spec.ts @@ -80,10 +80,6 @@ describe(commands.LIST_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['displayName', 'id']); - }); - it('passes validation if required options specified (id)', async () => { const actual = await command.validate({ options: { id: validId } }, commandInfo); assert.strictEqual(actual, true); diff --git a/src/m365/todo/commands/list/list-get.ts b/src/m365/todo/commands/list/list-get.ts index 7c0529219ea..28dd9f79f7a 100644 --- a/src/m365/todo/commands/list/list-get.ts +++ b/src/m365/todo/commands/list/list-get.ts @@ -24,10 +24,6 @@ class TodoListGetCommand extends DelegatedGraphCommand { return 'Gets a specific list of Microsoft To Do task lists'; } - public defaultProperties(): string[] | undefined { - return ['displayName', 'id']; - } - constructor() { super(); diff --git a/src/m365/todo/commands/task/task-get.spec.ts b/src/m365/todo/commands/task/task-get.spec.ts index 84bb71c9eac..2d3cf4e030f 100644 --- a/src/m365/todo/commands/task/task-get.spec.ts +++ b/src/m365/todo/commands/task/task-get.spec.ts @@ -88,10 +88,6 @@ describe(commands.TASK_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'title', 'status', 'createdDateTime', 'lastModifiedDateTime']); - }); - it('fails validation if both listId and listName options are passed', async () => { sinon.stub(cli, 'getSettingWithDefaultValue').callsFake((settingName, defaultValue) => { if (settingName === settingsNames.prompt) { diff --git a/src/m365/todo/commands/task/task-get.ts b/src/m365/todo/commands/task/task-get.ts index acb81dbc4a2..591b79d558b 100644 --- a/src/m365/todo/commands/task/task-get.ts +++ b/src/m365/todo/commands/task/task-get.ts @@ -25,10 +25,6 @@ class TodoTaskGetCommand extends DelegatedGraphCommand { return 'Get a specific task from a Microsoft To Do task list'; } - public defaultProperties(): string[] | undefined { - return ['id', 'title', 'status', 'createdDateTime', 'lastModifiedDateTime']; - } - constructor() { super(); diff --git a/src/m365/viva/commands/engage/engage-message-add.spec.ts b/src/m365/viva/commands/engage/engage-message-add.spec.ts index 3b8967a3dab..952294f7398 100644 --- a/src/m365/viva/commands/engage/engage-message-add.spec.ts +++ b/src/m365/viva/commands/engage/engage-message-add.spec.ts @@ -66,10 +66,6 @@ describe(commands.ENGAGE_MESSAGE_ADD, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id']); - }); - it('repliedToId must be a number', async () => { const actual = await command.validate({ options: { body: "test", repliedToId: 'nonumber' } }, commandInfo); assert.notStrictEqual(actual, true); diff --git a/src/m365/viva/commands/engage/engage-message-add.ts b/src/m365/viva/commands/engage/engage-message-add.ts index 2727810e73e..719ea1e6de5 100644 --- a/src/m365/viva/commands/engage/engage-message-add.ts +++ b/src/m365/viva/commands/engage/engage-message-add.ts @@ -25,10 +25,6 @@ class VivaEngageMessageAddCommand extends VivaEngageCommand { return 'Posts a Viva Engage network message on behalf of the current user'; } - public defaultProperties(): string[] | undefined { - return ['id']; - } - constructor() { super(); diff --git a/src/m365/viva/commands/engage/engage-message-get.spec.ts b/src/m365/viva/commands/engage/engage-message-get.spec.ts index 25c0b8988ed..0b1e71f9aa3 100644 --- a/src/m365/viva/commands/engage/engage-message-get.spec.ts +++ b/src/m365/viva/commands/engage/engage-message-get.spec.ts @@ -70,10 +70,6 @@ describe(commands.ENGAGE_MESSAGE_GET, () => { assert.notStrictEqual(command.description, null); }); - it('defines correct properties for the default output', () => { - assert.deepStrictEqual(command.defaultProperties(), ['id', 'sender_id', 'replied_to_id', 'thread_id', 'group_id', 'created_at', 'direct_message', 'system_message', 'privacy', 'message_type', 'content_excerpt']); - }); - it('id must be a number', async () => { const actual = await command.validate({ options: { id: 'nonumber' } }, commandInfo); assert.notStrictEqual(actual, true); diff --git a/src/m365/viva/commands/engage/engage-message-get.ts b/src/m365/viva/commands/engage/engage-message-get.ts index 89706c26a78..b76a96b426c 100644 --- a/src/m365/viva/commands/engage/engage-message-get.ts +++ b/src/m365/viva/commands/engage/engage-message-get.ts @@ -21,10 +21,6 @@ class VivaEngageMessageGetCommand extends VivaEngageCommand { return 'Returns a Viva Engage message'; } - public defaultProperties(): string[] | undefined { - return ['id', 'sender_id', 'replied_to_id', 'thread_id', 'group_id', 'created_at', 'direct_message', 'system_message', 'privacy', 'message_type', 'content_excerpt']; - } - constructor() { super();