Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade manifest version to v1.17 #11383

Draft
wants to merge 10 commits into
base: dev
Choose a base branch
from
2 changes: 1 addition & 1 deletion docs/api/teamsfx-api.ibot.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IBot
| [commandLists?](./teamsfx-api.ibot.commandlists.md) | [ICommandList](./teamsfx-api.icommandlist.md)<!-- -->\[\] | <i>(Optional)</i> The list of commands that the bot supplies, including their usage, description, and the scope for which the commands are valid. A separate command list should be used for each scope. |
| [isNotificationOnly?](./teamsfx-api.ibot.isnotificationonly.md) | boolean | <i>(Optional)</i> A value indicating whether or not the bot is a one-way notification only bot, as opposed to a conversational bot. |
| [needsChannelSelector?](./teamsfx-api.ibot.needschannelselector.md) | boolean | <i>(Optional)</i> This value describes whether or not the bot utilizes a user hint to add the bot to a specific channel. |
| [scopes](./teamsfx-api.ibot.scopes.md) | ("team" \| "personal" \| "groupchat")\[\] | Specifies whether the bot offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. |
| [scopes](./teamsfx-api.ibot.scopes.md) | ("team" \| "personal" \| "groupChat")\[\] | Specifies whether the bot offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. |
| [supportsCalling?](./teamsfx-api.ibot.supportscalling.md) | boolean | <i>(Optional)</i> A value indicating whether the bot supports audio calling. |
| [supportsFiles?](./teamsfx-api.ibot.supportsfiles.md) | boolean | <i>(Optional)</i> A value indicating whether the bot supports uploading/downloading of files. |
| [supportsVideo?](./teamsfx-api.ibot.supportsvideo.md) | boolean | <i>(Optional)</i> A value indicating whether the bot supports video calling. |
Expand Down
2 changes: 1 addition & 1 deletion docs/api/teamsfx-api.ibot.scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Specifies whether the bot offers an experience in the context of a channel in a
<b>Signature:</b>

```typescript
scopes: ("team" | "personal" | "groupchat")[];
scopes: ("team" | "personal" | "groupChat")[];
```
2 changes: 1 addition & 1 deletion docs/api/teamsfx-api.icommandlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface ICommandList
| Property | Type | Description |
| --- | --- | --- |
| [commands](./teamsfx-api.icommandlist.commands.md) | [ICommand](./teamsfx-api.icommand.md)<!-- -->\[\] | |
| [scopes](./teamsfx-api.icommandlist.scopes.md) | ("team" \| "personal" \| "groupchat")\[\] | |
| [scopes](./teamsfx-api.icommandlist.scopes.md) | ("team" \| "personal" \| "groupChat")\[\] | |

2 changes: 1 addition & 1 deletion docs/api/teamsfx-api.icommandlist.scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
scopes: ("team" | "personal" | "groupchat")[];
scopes: ("team" | "personal" | "groupChat")[];
```
2 changes: 1 addition & 1 deletion docs/api/teamsfx-api.iconfigurabletab.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IConfigurableTab
| [configurationUrl](./teamsfx-api.iconfigurabletab.configurationurl.md) | string | The url to use when configuring the tab. |
| [context?](./teamsfx-api.iconfigurabletab.context.md) | ("channelTab" \| "privateChatTab" \| "meetingChatTab" \| "meetingDetailsTab" \| "meetingSidePanel" \| "meetingStage")\[\] | <i>(Optional)</i> The set of contextItem scopes that a tab belong to |
| [objectId?](./teamsfx-api.iconfigurabletab.objectid.md) | string | <i>(Optional)</i> |
| [scopes](./teamsfx-api.iconfigurabletab.scopes.md) | ("team" \| "groupchat")\[\] | Specifies whether the tab offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. Currently, configurable tabs are only supported in the teams and groupchats scopes. |
| [scopes](./teamsfx-api.iconfigurabletab.scopes.md) | ("team" \| "groupChat")\[\] | Specifies whether the tab offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. Currently, configurable tabs are only supported in the teams and groupChats scopes. |
| [sharePointPreviewImage?](./teamsfx-api.iconfigurabletab.sharepointpreviewimage.md) | string | <i>(Optional)</i> A relative file path to a tab preview image for use in SharePoint. Size 1024x768. |
| [supportedSharePointHosts?](./teamsfx-api.iconfigurabletab.supportedsharepointhosts.md) | ("sharePointFullPage" \| "sharePointWebPart")\[\] | <i>(Optional)</i> Defines how your tab will be made available in SharePoint. |

4 changes: 2 additions & 2 deletions docs/api/teamsfx-api.iconfigurabletab.scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## IConfigurableTab.scopes property

Specifies whether the tab offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. Currently, configurable tabs are only supported in the teams and groupchats scopes.
Specifies whether the tab offers an experience in the context of a channel in a team, in a 1:1 or group chat, or in an experience scoped to an individual user alone. These options are non-exclusive. Currently, configurable tabs are only supported in the teams and groupChats scopes.

<b>Signature:</b>

```typescript
scopes: ("team" | "groupchat")[];
scopes: ("team" | "groupChat")[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async function updateManifest(
const manifest = JSON.parse(appPackage.manifest.toString("utf8")) as TeamsAppManifest;
manifest.id = "${{TEAMS_APP_ID}}";

// upgrade todo: remove this decapitalize
// Adding a feature with groupChat scope in TDP won't pass validation for extendToM365 action.
if (!!manifest.configurableTabs && manifest.configurableTabs.length > 0) {
if (manifest.configurableTabs[0].scopes) {
Expand Down
18 changes: 9 additions & 9 deletions packages/fx-core/src/component/driver/teamsApp/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const CONFIGURABLE_TABS_TPL_V3: IConfigurableTab[] = [
{
configurationUrl: `{{{state.${TAB_STATE_KEY}.endpoint}}}{{{state.${TAB_STATE_KEY}.indexPath}}}/config`,
canUpdateConfiguration: true,
scopes: ["team", "groupchat"],
scopes: ["team", "groupChat"],
},
];

Expand All @@ -41,12 +41,12 @@ const BOT_ID_PLACEHOLDER = `{{state.${BOT_STATE_KEY}.botId}}`;
export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [
{
title: "helloWorld",
Expand All @@ -61,7 +61,7 @@ export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [
export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
},
Expand All @@ -70,12 +70,12 @@ export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [
export const BOTS_TPL_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [
{
title: "welcome",
Expand Down Expand Up @@ -288,12 +288,12 @@ export const DEFAULT_DESCRIPTION = {
export const BOTS_TPL_EXISTING_APP: IBot[] = [
{
botId: "{{config.manifest.botId}}",
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [],
},
],
Expand All @@ -319,7 +319,7 @@ export const CONFIGURABLE_TABS_TPL_EXISTING_APP: IConfigurableTab[] = [
{
configurationUrl: "{{config.manifest.tabConfigurationUrl}}",
canUpdateConfiguration: true,
scopes: ["team", "groupchat"],
scopes: ["team", "groupChat"],
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const includeGroupChatScope = (scopes: string[]): boolean => {
export enum CommandScope {
Team = "team",
Personal = "personal",
GroupChat = "groupchat",
GroupChat = "groupChat",
}

export enum MeetingsContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ describe("App Studio API Test", () => {
displayName: "fakeApp",
developerName: "Teams",
version: "0.0.1",
manifestVersion: "1.16",
manifestVersion: "1.17",
},
},
};
Expand Down Expand Up @@ -1275,7 +1275,7 @@ describe("App Studio API Test", () => {
appId: "fakeAppId",
status: AsyncAppValidationStatus.Completed,
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
createdAt: Date(),
updatedAt: Date(),
validationResults: {
Expand Down
42 changes: 21 additions & 21 deletions packages/fx-core/tests/component/driver/teamsApp/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ describe("teamsApp/validateAppPackage", async () => {
{
id: "632652a7-0cf8-43c7-a65d-6a19e5822467",
title: "Manifest Version is valid",
code: "The app is using manifest version '1.16'",
code: "The app is using manifest version '1.17'",
} as any as IAppValidationNote,
],
addInDetails: {
Expand Down Expand Up @@ -632,7 +632,7 @@ describe("teamsApp/validateAppPackage", async () => {
{
id: "632652a7-0cf8-43c7-a65d-6a19e5822467",
title: "Manifest Version is valid",
code: "The app is using manifest version '1.16'",
code: "The app is using manifest version '1.17'",
} as any as IAppValidationNote,
],
addInDetails: {
Expand Down Expand Up @@ -841,7 +841,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -850,7 +850,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -871,7 +871,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -960,7 +960,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -969,7 +969,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.InProgress,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1005,7 +1005,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1014,7 +1014,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Created,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1054,7 +1054,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1063,7 +1063,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.InProgress,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1104,7 +1104,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -1153,7 +1153,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1162,7 +1162,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1179,7 +1179,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -1264,7 +1264,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1273,7 +1273,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1290,7 +1290,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
failures: [],
warnings: [],
Expand Down Expand Up @@ -1332,7 +1332,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1341,7 +1341,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1358,7 +1358,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
failures: [],
warnings: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ describe("SPFxGenerator", function () {
if (directory.includes("teams")) {
return {
$schema:
"https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
manifestVersion: "1.16",
"https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json",
manifestVersion: "1.17",
id: "fakedId",
name: {
short: "thisisaverylongappnametotestifitwillbetruncated",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("utils", () => {
objectId: "objId",
configurationUrl: "https://url",
canUpdateConfiguration: false,
scopes: ["groupchat"],
scopes: ["groupChat"],
context: [MeetingsContext.ChannelTab],
sharePointPreviewImage: "img",
supportedSharePointHosts: [],
Expand Down Expand Up @@ -61,7 +61,7 @@ describe("utils", () => {
objectId: "objId",
configurationUrl: "https://url",
canUpdateConfiguration: false,
scopes: ["groupchat", CommandScope.Team],
scopes: ["groupChat", CommandScope.Team],
context: [MeetingsContext.SidePanel],
sharePointPreviewImage: "img",
supportedSharePointHosts: [],
Expand Down