Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
@@ -0,0 +1,30 @@
export interface ManifestCommonProperties {
/**
* Capabilities, e.g. "staticTab" | "configurableTab" | "MessageExtension" | "WebApplicationInfo" | "plugin" | "copilotGpt"
*/
capabilities: string[];
/**
* Teams app id
*/
id: string;
/**
* Teams app version, e.g.1.0.0
*/
version: string;
/**
* manifest version, e.g. 1.16
*/
manifestVersion: string;
/**
* Whether it's an API ME
*/
isApiME: boolean;
/**
* Whether it's SPFx Teams app
*/
isSPFx: boolean;
/**
* Whether it's an API ME with AAD auth
*/
isApiMeAAD: boolean;
}
@@ -0,0 +1,5 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ManifestCommonProperties.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ManifestCommonProperties.js","sourceRoot":"","sources":["../src/ManifestCommonProperties.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
+1
View File
@@ -0,0 +1 @@
export declare const SharePointAppId = "00000003-0000-0ff1-ce00-000000000000";
+7
View File
@@ -0,0 +1,7 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SharePointAppId = void 0;
exports.SharePointAppId = "00000003-0000-0ff1-ce00-000000000000";
//# sourceMappingURL=constants.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,eAAe,GAAG,sCAAsC,CAAC"}
@@ -0,0 +1,54 @@
import { ConversationStarter } from "./pluginManifest";
export interface DeclarativeCopilotManifestSchema {
id?: string;
name: string;
description: string;
instructions?: string;
capabilities?: ({
name: "WebSearch";
[k: string]: unknown;
} | {
name: "GraphicArt";
[k: string]: unknown;
} | {
name: "CodeInterpreter";
[k: string]: unknown;
} | {
name: "SharePoint";
files?: File[];
sites?: Site[];
[k: string]: unknown;
} | {
name: "OneDrive";
files: File[];
[k: string]: unknown;
} | {
name: "GraphConnectors";
connections: Connection[];
[k: string]: unknown;
})[];
conversation_starters?: ConversationStarter[];
actions?: ActionObject[];
[k: string]: unknown;
}
export interface File {
site_id?: string;
web_id?: string;
list_id?: string;
unique_id?: string;
file_name?: string;
}
export interface Site {
path: string;
site_name: string;
[k: string]: unknown;
}
export interface Connection {
connection_id: string;
[k: string]: unknown;
}
export interface ActionObject {
id: string;
file: string;
[k: string]: unknown;
}
@@ -0,0 +1,5 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=declarativeCopilotManifest.js.map
@@ -0,0 +1 @@
{"version":3,"file":"declarativeCopilotManifest.js","sourceRoot":"","sources":["../src/declarativeCopilotManifest.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC"}
+865
View File
@@ -0,0 +1,865 @@
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type ExtensionRuntimesActions = ExtensionRuntimesActionsItem[];
export type ExtensionRuntimesArray = {
requirements?: RequirementsExtensionElement;
/**
* A unique identifier for this runtime within the app. Maximum length is 64 characters.
*/
id: string;
/**
* Supports running functions and launching pages.
*/
type?: "general";
code: {
/**
* URL of the .html page to be loaded in browser-based runtimes.
*/
page: string;
/**
* URL of the .js script file to be loaded in UI-less runtimes.
*/
script?: string;
};
/**
* Runtimes with a short lifetime do not preserve state across executions. Runtimes with a long lifetime do.
*/
lifetime?: "short" | "long";
actions?: ExtensionRuntimesActions;
}[];
export type ExtensionContexts = ("mailRead" | "mailCompose" | "meetingDetailsOrganizer" | "meetingDetailsAttendee")[];
export type ExtensionRibbonsArray = {
requirements?: RequirementsExtensionElement;
contexts?: ExtensionContexts;
tabs: ExtensionRibbonsArrayTabsItem[];
}[];
export type ExtensionAutoRunEventsArray = {
requirements?: RequirementsExtensionElement;
events: {
type: string;
/**
* The ID of an action defined in runtimes. Maximum length is 64 characters.
*/
actionId: string;
options?: {
sendMode: "promptUser" | "softBlock" | "block";
};
}[];
}[];
export type ExtensionAlternateVersionsArray = {
requirements?: RequirementsExtensionElement;
prefer?: {
comAddin?: {
/**
* Program ID of the alternate com extension. Maximum length is 64 characters.
*/
progId: string;
};
[k: string]: unknown;
};
hide?: {
storeOfficeAddin?: {
/**
* Solution ID of an in-market add-in to hide. Maximum length is 64 characters.
*/
officeAddinId: string;
/**
* Asset ID of the in-market add-in to hide. Maximum length is 64 characters.
*/
assetId: string;
};
customOfficeAddin?: {
/**
* Solution ID of the in-market add-in to hide. Maximum length is 64 characters.
*/
officeAddinId: string;
};
[k: string]: unknown;
};
}[];
/**
* The set of extensions for this app. Currently only one extensions per app is supported.
*/
export type ElementExtensions = {
requirements?: RequirementsExtensionElement;
runtimes?: ExtensionRuntimesArray;
ribbons?: ExtensionRibbonsArray;
autoRunEvents?: ExtensionAutoRunEventsArray;
alternates?: ExtensionAlternateVersionsArray;
/**
* The url for your extension, used to validate Exchange user identity tokens.
*/
audienceClaimUrl?: string;
}[];
export interface DevPreviewSchema {
$schema?: string;
/**
* The version of the schema this manifest is using.
*/
manifestVersion: "devPreview" | "m365DevPreview";
/**
* The version of the app. Changes to your manifest should cause a version change. This version string must follow the semver standard (http://semver.org).
*/
version: string;
/**
* A unique identifier for this app. This id must be a GUID.
*/
id: string;
/**
* A unique identifier for this app in reverse domain notation. E.g: com.example.myapp
*/
packageName?: string;
localizationInfo?: {
/**
* The language tag of the strings in this top level manifest file.
*/
defaultLanguageTag: string;
additionalLanguages?: {
/**
* The language tag of the strings in the provided file.
*/
languageTag: string;
/**
* A relative file path to a the .json file containing the translated strings.
*/
file: string;
}[];
};
developer: {
/**
* The display name for the developer.
*/
name: string;
/**
* The Microsoft Partner Network ID that identifies the partner organization building the app. This field is not required, and should only be used if you are already part of the Microsoft Partner Network. More info at https://aka.ms/partner
*/
mpnId?: string;
/**
* The url to the page that provides support information for the app.
*/
websiteUrl: string;
/**
* The url to the page that provides privacy information for the app.
*/
privacyUrl: string;
/**
* The url to the page that provides the terms of use for the app.
*/
termsOfUseUrl: string;
};
name: {
/**
* A short display name for the app.
*/
short: string;
/**
* The full name of the app, used if the full app name exceeds 30 characters.
*/
full: string;
};
description: {
/**
* A short description of the app used when space is limited. Maximum length is 80 characters.
*/
short: string;
/**
* The full description of the app. Maximum length is 4000 characters.
*/
full: string;
};
icons: {
/**
* A relative file path to a transparent PNG outline icon. The border color needs to be white. Size 32x32.
*/
outline: string;
/**
* A relative file path to a full color PNG icon. Size 192x192.
*/
color: string;
};
/**
* A color to use in conjunction with the icon. The value must be a valid HTML color code starting with '#', for example `#4464ee`.
*/
accentColor: string;
/**
* These are tabs users can optionally add to their channels and 1:1 or group chats and require extra configuration before they are added. Configurable tabs are not supported in the personal scope. Currently only one configurable tab per app is supported.
*/
configurableTabs?: {
/**
* The url to use when configuring the tab.
*/
configurationUrl: string;
/**
* A value indicating whether an instance of the tab's configuration can be updated by the user after creation.
*/
canUpdateConfiguration?: boolean;
/**
* 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: ("team" | "groupChat")[];
/**
* The set of meetingSurfaceItem scopes that a tab belong to
*/
meetingSurfaces?: ("sidePanel" | "stage")[];
/**
* The set of contextItem scopes that a tab belong to
*/
context?: ("personalTab" | "channelTab" | "privateChatTab" | "meetingChatTab" | "meetingDetailsTab" | "meetingSidePanel" | "meetingStage" | "callingSidePanel")[];
/**
* The set of supportedPlatform scopes that a tab belong to
*/
supportedPlatform?: ("desktop" | "mobile" | "teamsMeetingDevices")[];
/**
* A relative file path to a tab preview image for use in SharePoint. Size 1024x768.
*/
sharePointPreviewImage?: string;
/**
* Defines how your tab will be made available in SharePoint.
*/
supportedSharePointHosts?: ("sharePointFullPage" | "sharePointWebPart")[];
}[];
/**
* A set of tabs that may be 'pinned' by default, without the user adding them manually. Static tabs declared in personal scope are always pinned to the app's personal experience. Static tabs do not currently support the 'teams' scope.
*/
staticTabs?: {
/**
* A unique identifier for the entity which the tab displays.
*/
entityId: string;
/**
* The display name of the tab.
*/
name?: string;
/**
* The url which points to the entity UI to be displayed in the Teams canvas.
*/
contentUrl?: string;
/**
* The Microsoft App ID specified for the bot in the Bot Framework portal (https://dev.botframework.com/bots)
*/
contentBotId?: string;
/**
* The url to point at if a user opts to view in a browser.
*/
websiteUrl?: string;
/**
* The url to direct a user's search queries.
*/
searchUrl?: string;
/**
* Specifies whether the tab offers an experience in the context of a channel in a team, or an experience scoped to an individual user alone or a group chat. These options are non-exclusive. Currently static tabs are only supported in the 'personal' scope.
*/
scopes: ("team" | "personal" | "groupChat")[];
/**
* The set of contextItem scopes that a tab belong to
*/
context?: ("personalTab" | "channelTab" | "privateChatTab" | "meetingChatTab" | "meetingDetailsTab" | "meetingSidePanel" | "meetingStage" | "teamLevelApp")[];
/**
* The set of supportedPlatform scopes that a tab belong to
*/
supportedPlatform?: ("desktop" | "mobile" | "teamsMeetingDevices")[];
}[];
/**
* The set of bots for this app. Currently only one bot per app is supported.
*/
bots?: {
/**
* The Microsoft App ID specified for the bot in the Bot Framework portal (https://dev.botframework.com/bots)
*/
botId: string;
configuration?: {
team?: {
parameters?: {
/**
* Name of the parameter.
*/
name: string;
/**
* Type of the parameter
*/
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
/**
* Title of the parameter.
*/
title: string;
/**
* Description of the parameter.
*/
description?: string;
/**
* Initial value for the parameter
*/
value?: string;
/**
* The choice options for the parameter
*/
choices?: {
/**
* Title of the choice
*/
title: string;
/**
* Value of the choice
*/
value: string;
}[];
}[];
taskInfo?: {
/**
* Task module title
*/
title?: string;
/**
* Task module width - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
width?: string;
/**
* Task module height - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
height?: string;
/**
* Task module URL
*/
url?: string;
};
};
};
/**
* This value describes whether or not the bot utilizes a user hint to add the bot to a specific channel.
*/
needsChannelSelector?: boolean;
/**
* A value indicating whether or not the bot is a one-way notification only bot, as opposed to a conversational bot.
*/
isNotificationOnly?: boolean;
/**
* A value indicating whether the team's Office group needs to be security enabled.
*/
requiresSecurityEnabledGroup?: boolean;
/**
* A value indicating whether the bot supports uploading/downloading of files.
*/
supportsFiles?: boolean;
/**
* A value indicating whether the bot supports audio calling.
*/
supportsCalling?: boolean;
/**
* A value indicating whether the bot supports video calling.
*/
supportsVideo?: boolean;
/**
* 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: ("team" | "personal" | "groupChat")[];
/**
* 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.
*/
commandLists?: {
/**
* Specifies the scopes for which the command list is valid
*/
scopes: ("team" | "personal" | "groupChat")[];
commands: {
/**
* The bot command name
*/
title: string;
/**
* A simple text description or an example of the command syntax and its arguments.
*/
description: string;
}[];
}[];
}[];
/**
* The set of Office365 connectors for this app. Currently only one connector per app is supported.
*/
connectors?: {
/**
* A unique identifier for the connector which matches its ID in the Connectors Developer Portal.
*/
connectorId: string;
/**
* The url to use for configuring the connector using the inline configuration experience.
*/
configurationUrl?: string;
/**
* Specifies whether the connector offers an experience in the context of a channel in a team, or an experience scoped to an individual user alone. Currently, only the team scope is supported.
*/
scopes: "team"[];
}[];
/**
* Subscription offer associated with this app.
*/
subscriptionOffer?: {
/**
* A unique identifier for the Commercial Marketplace Software as a Service Offer.
*/
offerId: string;
};
/**
* The set of compose extensions for this app. Currently only one compose extension per app is supported.
*/
composeExtensions?: {
/**
* The Microsoft App ID specified for the bot powering the compose extension in the Bot Framework portal (https://dev.botframework.com/bots)
*/
botId: string;
/**
* A value indicating whether the configuration of a compose extension can be updated by the user.
*/
canUpdateConfiguration?: boolean;
commands: {
/**
* Id of the command.
*/
id: string;
/**
* Type of the command
*/
type?: "query" | "action";
/**
* Context where the command would apply
*/
context?: ("compose" | "commandBox" | "message")[];
/**
* Title of the command.
*/
title: string;
/**
* Description of the command.
*/
description?: string;
/**
* A boolean value that indicates if the command should be run once initially with no parameter.
*/
initialRun?: boolean;
/**
* A boolean value that indicates if it should fetch task module dynamically
*/
fetchTask?: boolean;
parameters?: {
/**
* Name of the parameter.
*/
name: string;
/**
* Type of the parameter
*/
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
/**
* Title of the parameter.
*/
title: string;
/**
* Description of the parameter.
*/
description?: string;
/**
* Initial value for the parameter
*/
value?: string;
/**
* The choice options for the parameter
*/
choices?: {
/**
* Title of the choice
*/
title: string;
/**
* Value of the choice
*/
value: string;
}[];
}[];
taskInfo?: {
/**
* Initial dialog title
*/
title?: string;
/**
* Dialog width - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
width?: string;
/**
* Dialog height - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
height?: string;
/**
* Initial webview URL
*/
url?: string;
};
}[];
/**
* A list of handlers that allow apps to be invoked when certain conditions are met
*/
messageHandlers?: {
/**
* Type of the message handler
*/
type: "link";
value: {
/**
* A list of domains that the link message handler can register for, and when they are matched the app will be invoked
*/
domains?: string[];
/**
* A boolean value that indicates whether the app's link message handler supports anonymous invoke flow. [Deprecated]. This property has been superceded by 'supportsAnonymizedPayloads'.
*/
supportsAnonymousAccess?: boolean;
/**
* A boolean value that indicates whether the app's link message handler supports anonymous invoke flow.
*/
supportsAnonymizedPayloads?: boolean;
[k: string]: unknown;
};
}[];
}[];
scopeConstraints?: {
/**
* A list of team thread ids to which your app is restricted to
*/
teams?: {
/**
* Team's thread Id
*/
id: string;
}[];
/**
* A list of chat thread ids to which your app is restricted to
*/
groupChats?: {
/**
* Chat's thread Id
*/
id: string;
}[];
};
/**
* Specifies the permissions the app requests from users.
*/
permissions?: ("identity" | "messageTeamMembers")[];
/**
* Specify the native features on a user's device that your app may request access to.
*/
devicePermissions?: ("geolocation" | "media" | "notifications" | "midi" | "openExternal")[];
/**
* A list of valid domains from which the tabs expect to load any content. Domain listings can include wildcards, for example `*.example.com`. If your tab configuration or content UI needs to navigate to any other domain besides the one use for tab configuration, that domain must be specified here.
*/
validDomains?: string[];
/**
* Specify your AAD App ID and Graph information to help users seamlessly sign into your AAD app.
*/
webApplicationInfo?: {
/**
* AAD application id of the app. This id must be a GUID.
*/
id: string;
/**
* Resource url of app for acquiring auth token for SSO.
*/
resource?: string;
};
/**
* Specify the app's Graph connector configuration. If this is present then webApplicationInfo.id must also be specified.
*/
graphConnector?: {
/**
* The url where Graph-connector notifications for the application should be sent.
*/
notificationUrl: string;
};
/**
* A value indicating whether or not show loading indicator when app/tab is loading
*/
showLoadingIndicator?: boolean;
/**
* A value indicating whether a personal app is rendered without a tab header-bar
*/
isFullScreen?: boolean;
activities?: {
/**
* Specify the types of activites that your app can post to a users activity feed
*/
activityTypes?: {
type: string;
description: string;
templateText: string;
}[];
};
/**
* The set of supported channel type that an app belongs to
*/
supportedChannelTypes?: ("sharedChannels" | "privateChannels")[];
/**
* A list of tenant configured properties for an app
*/
configurableProperties?: ("name" | "shortDescription" | "longDescription" | "smallImageUrl" | "largeImageUrl" | "accentColor" | "developerUrl" | "privacyUrl" | "termsOfUseUrl")[];
/**
* A value indicating whether an app is blocked by default until admin allows it
*/
defaultBlockUntilAdminAction?: boolean;
/**
* The url to the page that provides additional app information for the admins
*/
publisherDocsUrl?: string;
/**
* The install scope defined for this app by default. This will be the option displayed on the button when a user tries to add the app
*/
defaultInstallScope?: "personal" | "team" | "groupChat" | "meetings";
/**
* When a group install scope is selected, this will define the default capability when the user installs the app
*/
defaultGroupCapability?: {
/**
* When the install scope selected is Team, this field specifies the default capability available
*/
team?: "tab" | "bot" | "connector";
/**
* When the install scope selected is GroupChat, this field specifies the default capability available
*/
groupchat?: "tab" | "bot" | "connector";
/**
* When the install scope selected is Meetings, this field specifies the default capability available
*/
meetings?: "tab" | "bot" | "connector";
};
/**
* Specify meeting extension definition.
*/
meetingExtensionDefinition?: {
/**
* Meeting supported scenes.
*/
scenes?: {
/**
* A unique identifier for this scene. This id must be a GUID.
*/
id: string;
/**
* Scene name.
*/
name: string;
/**
* A relative file path to a scene metadata json file.
*/
file: string;
/**
* A relative file path to a scene PNG preview icon.
*/
preview: string;
/**
* Maximum audiences supported in scene.
*/
maxAudience: number;
/**
* Number of seats reserved for organizers or presenters.
*/
seatsReservedForOrganizersOrPresenters: number;
}[];
/**
* Meeting supported video filters.
*/
videoFilters?: {
/**
* A unique identifier for this video filter. This id must be a GUID.
*/
id: string;
/**
* Video filter's name.
*/
name: string;
/**
* A relative file path to a video filter's thumbnail.
*/
thumbnail: string;
}[];
/**
* A URL for configuring the video filters.
*/
videoFiltersConfigurationUrl?: string;
/**
* A boolean value indicating whether this app can stream the meeting's audio video content to an RTMP endpoint.
*/
supportsStreaming?: boolean;
/**
* A boolean value indicating whether this app supports access by anonymous guest users.
*/
supportsAnonymousGuestUsers?: boolean;
};
/**
* Specify and consolidates authorization related information for the App.
*/
authorization?: {
/**
* List of permissions that the app needs to function.
*/
permissions?: {
/**
* Permissions that guard data access on a resource instance level.
*/
resourceSpecific?: {
/**
* The name of the resource-specific permission.
*/
name: string;
/**
* The type of the resource-specific permission.
*/
type: "Application" | "Delegated";
}[];
};
};
extensions?: ElementExtensions;
}
export interface RequirementsExtensionElement {
capabilities?: {
name: string;
minVersion?: string;
maxVersion?: string;
}[];
scopes?: ("mail" | "document" | "workbook" | "presentation")[];
formFactors?: ("desktop" | "mobile")[];
}
export interface ExtensionRuntimesActionsItem {
/**
* Identifier for this action. Maximum length is 64 characters. This value is passed to the code file.
*/
id: string;
/**
* executeFunction: Run a script function without waiting for it to finish. openPate: Open a page in a view.
*/
type: "executeFunction" | "openPage";
/**
* Display name of the action. Maximum length is 64 characters.
*/
displayName?: string;
/**
* Specifies that a task pane supports pinning, which keeps the task pane open when the user changes the selection.
*/
pinnable?: boolean;
/**
* View where the page should be opened. Maximum length is 64 characters.
*/
view?: string;
}
export interface ExtensionRibbonsArrayTabsItem {
/**
* A unique identifier for this tab within the app. Maximum length is 64 characters.
*/
id?: string;
/**
* Displayed text for the tab. Maximum length is 64 characters.
*/
label?: string;
position?: {
/**
* The id of the built-in tab. Maximum length is 64 characters.
*/
builtInTabId: string;
/**
* Define alignment of this custom tab relative to the specified built-in tab.
*/
align: "after" | "before";
};
/**
* Id of the existing office Tab. Maximum length is 64 characters.
*/
builtInTabId?: string;
groups?: ExtensionRibbonsCustomTabGroupsItem[];
}
export interface ExtensionRibbonsCustomTabGroupsItem {
/**
* A unique identifier for this group within the app. Maximum length is 64 characters.
*/
id?: string;
/**
* Displayed text for the group. Maximum length is 64 characters.
*/
label?: string;
icons?: ExtensionCommonIcon[];
controls?: ExtensionCommonCustomGroupControlsItem[];
/**
* Id of a built-in Group. Maximum length is 64 characters.
*/
builtInGroupId?: string;
}
export interface ExtensionCommonIcon {
/**
* Size in pixels of the icon. Three image sizes are required (16, 32, and 80 pixels)
*/
size: 16 | 20 | 24 | 32 | 40 | 48 | 64 | 80;
/**
* Url to the icon.
*/
url?: string;
/**
* Relative path to the file that contains the icon. This property is currently not supported as a relative path.
*/
file?: string;
}
export interface ExtensionCommonCustomGroupControlsItem {
/**
* A unique identifier for this control within the app. Maximum length is 64 characters.
*/
id: string;
type: "button" | "menu";
/**
* Id of the existing office control. Maximum length is 64 characters.
*/
builtInControlId?: string;
/**
* Displayed text for the control. Maximum length is 64 characters.
*/
label: string;
icons: ExtensionCommonIcon[];
supertip: ExtensionCommonSuperToolTip;
/**
* The ID of an execution-type action that handles this key combination. Maximum length is 64 characters.
*/
actionId?: string;
overriddenByRibbonApi?: boolean & string;
/**
* Whether the control is initially enabled.
*/
enabled?: boolean;
items?: ExtensionCommonCustomControlMenuItem[];
}
export interface ExtensionCommonSuperToolTip {
/**
* Title text of the super tip. Maximum length is 64 characters.
*/
title: string;
/**
* Description of the super tip. Maximum length is 128 characters.
*/
description: string;
}
export interface ExtensionCommonCustomControlMenuItem {
/**
* A unique identifier for this control within the app. Maximum length is 64 characters.
*/
id: string;
type: "menuItem";
/**
* Displayed text for the control. Maximum length is 64 characters.
*/
label: string;
icons?: ExtensionCommonIcon[];
supertip: ExtensionCommonSuperToolTip;
/**
* The ID of an action defined in runtimes. Maximum length is 64 characters.
*/
actionId: string;
/**
* Whether the control is initially enabled.
*/
enabled?: boolean;
overriddenByRibbonApi?: boolean & string;
}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=devPreviewManifest.js.map
@@ -0,0 +1 @@
{"version":3,"file":"devPreviewManifest.js","sourceRoot":"","sources":["../src/devPreviewManifest.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB;;;;GAIG"}
+67
View File
@@ -0,0 +1,67 @@
import { TeamsAppManifest } from "./manifest";
import { JSONSchemaType } from "ajv";
import { DevPreviewSchema } from "./devPreviewManifest";
import { ManifestCommonProperties } from "./ManifestCommonProperties";
import { DeclarativeCopilotManifestSchema } from "./declarativeCopilotManifest";
import { PluginManifestSchema } from "./pluginManifest";
export * from "./manifest";
export * as devPreview from "./devPreviewManifest";
export * from "./pluginManifest";
export * from "./declarativeCopilotManifest";
export type TeamsAppManifestJSONSchema = JSONSchemaType<TeamsAppManifest>;
export type DevPreviewManifestJSONSchema = JSONSchemaType<DevPreviewSchema>;
export type Manifest = TeamsAppManifest | DevPreviewSchema;
export type ManifestProperties = ManifestCommonProperties;
export declare class ManifestUtil {
/**
* Loads the manifest from the given path without validating its schema.
*
* @param path - The path to the manifest file.
* @throws Will propagate any error thrown by the fs-extra#readJson.
*
* @returns The Manifest Object.
*/
static loadFromPath<T extends Manifest = TeamsAppManifest>(path: string): Promise<T>;
/**
* Writes the manifest object to the given path.
*
* @param path - Where to write
* @param manifest - Manifest object to be saved
* @throws Will propagate any error thrown by the fs-extra#writeJson.
*
*/
static writeToPath<T extends Manifest = TeamsAppManifest>(path: string, manifest: T): Promise<void>;
/**
* Validate manifest against json schema.
*
* @param manifest - Manifest object to be validated
* @param schema - teams-app-manifest schema
* @returns An empty array if it passes validation, or an array of error string otherwise.
*/
static validateManifestAgainstSchema<T extends Manifest | DeclarativeCopilotManifestSchema | PluginManifestSchema = TeamsAppManifest>(manifest: T, schema: JSONSchemaType<T>): Promise<string[]>;
static fetchSchema<T extends Manifest | DeclarativeCopilotManifestSchema | PluginManifestSchema = TeamsAppManifest>(manifest: T): Promise<JSONSchemaType<T>>;
/**
* Validate manifest against {@link TeamsAppManifest#$schema}.
*
* @param manifest - Manifest object to be validated
* @throws Will throw if {@link TeamsAppManifest#$schema} is undefined, not valid
* or there is any network failure when getting the schema.
*
* @returns An empty array if schema validation passes, or an array of error string otherwise.
*/
static validateManifest<T extends Manifest | DeclarativeCopilotManifestSchema | PluginManifestSchema = TeamsAppManifest>(manifest: T): Promise<string[]>;
/**
* Parse the manifest and get properties
* @param manifest
*/
static parseCommonProperties<T extends Manifest = TeamsAppManifest>(manifest: T): ManifestCommonProperties;
/**
* Parse the manifest and get telemetry propreties e.g. appId, capabilities etc.
* @param manifest
* @returns Telemetry properties
*/
static parseCommonTelemetryProperties(manifest: TeamsAppManifest): {
[p: string]: string;
};
static useCopilotExtensionsInSchema(manifest: TeamsAppManifest): Promise<boolean>;
}
+234
View File
@@ -0,0 +1,234 @@
"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ManifestUtil = exports.devPreview = void 0;
const fs_extra_1 = __importDefault(require("fs-extra"));
const ajv_draft_04_1 = __importDefault(require("ajv-draft-04"));
const ajv_formats_1 = __importDefault(require("ajv-formats"));
const _2020_1 = __importDefault(require("ajv/dist/2020"));
const constants_1 = require("./constants");
const node_fetch_1 = __importDefault(require("node-fetch"));
__exportStar(require("./manifest"), exports);
exports.devPreview = __importStar(require("./devPreviewManifest"));
__exportStar(require("./pluginManifest"), exports);
__exportStar(require("./declarativeCopilotManifest"), exports);
class ManifestUtil {
/**
* Loads the manifest from the given path without validating its schema.
*
* @param path - The path to the manifest file.
* @throws Will propagate any error thrown by the fs-extra#readJson.
*
* @returns The Manifest Object.
*/
static async loadFromPath(path) {
return fs_extra_1.default.readJson(path);
}
/**
* Writes the manifest object to the given path.
*
* @param path - Where to write
* @param manifest - Manifest object to be saved
* @throws Will propagate any error thrown by the fs-extra#writeJson.
*
*/
static async writeToPath(path, manifest) {
return fs_extra_1.default.writeJson(path, manifest, { spaces: 4 });
}
/**
* Validate manifest against json schema.
*
* @param manifest - Manifest object to be validated
* @param schema - teams-app-manifest schema
* @returns An empty array if it passes validation, or an array of error string otherwise.
*/
static validateManifestAgainstSchema(manifest, schema) {
var _a, _b;
let validate;
if ((_a = schema.$schema) === null || _a === void 0 ? void 0 : _a.includes("2020-12")) {
const ajv = new _2020_1.default({
//formats: { uri: true, email: true },
allErrors: true,
strictTypes: false,
});
(0, ajv_formats_1.default)(ajv, ["uri", "email", "regex"]);
validate = ajv.compile(schema);
}
else {
const ajv = new ajv_draft_04_1.default({
allErrors: true,
strictTypes: false,
});
(0, ajv_formats_1.default)(ajv, ["uri", "email", "regex"]);
validate = ajv.compile(schema);
}
const valid = validate(manifest);
if (!valid && validate.errors) {
return Promise.resolve((_b = validate.errors) === null || _b === void 0 ? void 0 : _b.map((error) => `${error.instancePath} ${error.message || ""}. Details: ${error.params ? JSON.stringify(error.params) : ""}`));
}
else {
return Promise.resolve([]);
}
}
static async fetchSchema(manifest) {
const schemaUrl = manifest.$schema;
if (!schemaUrl) {
throw new Error("Manifest does not have a $schema property or schema url is not provided.");
}
let result;
try {
const res = await (0, node_fetch_1.default)(schemaUrl);
result = (await res.json());
}
catch (e) {
if (e instanceof Error) {
throw new Error(`Failed to get manifest at url ${schemaUrl} due to: ${e.message}`);
}
else {
throw new Error(`Failed to get manifest at url ${schemaUrl} due to: unknown error`);
}
}
return result;
}
/**
* Validate manifest against {@link TeamsAppManifest#$schema}.
*
* @param manifest - Manifest object to be validated
* @throws Will throw if {@link TeamsAppManifest#$schema} is undefined, not valid
* or there is any network failure when getting the schema.
*
* @returns An empty array if schema validation passes, or an array of error string otherwise.
*/
static async validateManifest(manifest) {
const schema = await this.fetchSchema(manifest);
return ManifestUtil.validateManifestAgainstSchema(manifest, schema);
}
/**
* Parse the manifest and get properties
* @param manifest
*/
static parseCommonProperties(manifest) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
const capabilities = [];
if (manifest.staticTabs && manifest.staticTabs.length > 0) {
capabilities.push("staticTab");
}
if (manifest.configurableTabs && manifest.configurableTabs.length > 0) {
capabilities.push("configurableTab");
}
if (manifest.bots && manifest.bots.length > 0) {
capabilities.push("Bot");
}
if (manifest.composeExtensions && manifest.composeExtensions.length > 0) {
capabilities.push("MessageExtension");
}
const properties = {
id: manifest.id,
version: manifest.version,
capabilities: capabilities,
manifestVersion: manifest.manifestVersion,
isApiME: false,
isSPFx: false,
isApiMeAAD: false,
};
// If it's copilot plugin app
if (manifest.composeExtensions &&
manifest.composeExtensions.length > 0 &&
manifest.composeExtensions[0].composeExtensionType == "apiBased") {
properties.isApiME = true;
}
// If it's SPFx app
if (manifest.webApplicationInfo &&
manifest.webApplicationInfo.id &&
manifest.webApplicationInfo.id == constants_1.SharePointAppId) {
properties.isSPFx = true;
}
// If it's API ME with AAD auth
if (manifest.composeExtensions &&
manifest.composeExtensions.length > 0 &&
manifest.composeExtensions[0].composeExtensionType == "apiBased" &&
((_a = manifest.composeExtensions[0].authorization) === null || _a === void 0 ? void 0 : _a.authType) ==
"microsoftEntra") {
properties.isApiMeAAD = true;
}
if ((_b = manifest.copilotExtensions) === null || _b === void 0 ? void 0 : _b.plugins) {
const apiPlugins = (_c = manifest.copilotExtensions) === null || _c === void 0 ? void 0 : _c.plugins;
if (apiPlugins && apiPlugins.length > 0 && apiPlugins[0].file)
capabilities.push("plugin");
}
if ((_d = manifest.copilotExtensions) === null || _d === void 0 ? void 0 : _d.declarativeCopilots) {
const copilotGpts = (_e = manifest.copilotExtensions) === null || _e === void 0 ? void 0 : _e.declarativeCopilots;
if (copilotGpts && copilotGpts.length > 0)
capabilities.push("copilotGpt");
}
if ((_f = manifest.copilotAgents) === null || _f === void 0 ? void 0 : _f.plugins) {
const apiPlugins = (_g = manifest.copilotAgents) === null || _g === void 0 ? void 0 : _g.plugins;
if (apiPlugins &&
apiPlugins.length > 0 &&
apiPlugins[0].file &&
!capabilities.includes("plugin"))
capabilities.push("plugin");
}
if ((_h = manifest.copilotAgents) === null || _h === void 0 ? void 0 : _h.declarativeAgents) {
const copilotGpts = (_j = manifest.copilotAgents) === null || _j === void 0 ? void 0 : _j.declarativeAgents;
if (copilotGpts && copilotGpts.length > 0 && !capabilities.includes("copilotGpt"))
capabilities.push("copilotGpt");
}
return properties;
}
/**
* Parse the manifest and get telemetry propreties e.g. appId, capabilities etc.
* @param manifest
* @returns Telemetry properties
*/
static parseCommonTelemetryProperties(manifest) {
const properties = ManifestUtil.parseCommonProperties(manifest);
const telemetryProperties = {};
const propertiesMap = new Map(Object.entries(properties));
propertiesMap.forEach((value, key) => {
if (Array.isArray(value)) {
telemetryProperties[key] = value.join(";");
}
else {
telemetryProperties[key] = value;
}
});
return telemetryProperties;
}
static async useCopilotExtensionsInSchema(manifest) {
const schema = await this.fetchSchema(manifest);
return !!schema.properties.copilotExtensions;
}
}
exports.ManifestUtil = ManifestUtil;
//# sourceMappingURL=index.js.map
File diff suppressed because one or more lines are too long
+521
View File
@@ -0,0 +1,521 @@
export interface IDeveloper {
/**
* The display name for the developer.
*/
name: string;
/**
* The Microsoft Partner Network ID that identifies the partner organization building the app. This field is not required, and should only be used if you are already part of the Microsoft Partner Network. More info at https://aka.ms/partner
*/
mpnId?: string;
/**
* The url to the page that provides support information for the app.
*/
websiteUrl: string;
/**
* The url to the page that provides privacy information for the app.
*/
privacyUrl: string;
/**
* The url to the page that provides the terms of use for the app.
*/
termsOfUseUrl: string;
}
export interface IName {
short: string;
/**
* The full name of the app, used if the full app name exceeds 30 characters.
*/
full?: string;
}
export interface IIcons {
color: string;
outline: string;
}
export interface IConfigurableTab {
objectId?: string;
/**
* The url to use when configuring the tab.
*/
configurationUrl: string;
/**
* A value indicating whether an instance of the tab's configuration can be updated by the user after creation.
*/
canUpdateConfiguration?: boolean;
/**
* 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: ("team" | "groupchat" | "groupChat")[];
/**
* The set of contextItem scopes that a tab belong to
*/
context?: ("personalTab" | "channelTab" | "privateChatTab" | "meetingChatTab" | "meetingDetailsTab" | "meetingSidePanel" | "meetingStage" | "callingSidePanel")[];
/**
* The set of meetingSurfaceItem scopes that a tab belong to
*/
meetingSurfaces?: ("sidePanel" | "stage")[];
/**
* A relative file path to a tab preview image for use in SharePoint. Size 1024x768.
*/
sharePointPreviewImage?: string;
/**
* Defines how your tab will be made available in SharePoint.
*/
supportedSharePointHosts?: ("sharePointFullPage" | "sharePointWebPart")[];
}
export interface IStaticTab {
objectId?: string;
/**
* A unique identifier for the entity which the tab displays.
*/
entityId: string;
/**
* The display name of the tab.
*/
name?: string;
/**
* The url which points to the entity UI to be displayed in the Teams canvas.
*/
contentUrl?: string;
/**
* The url to point at if a user opts to view in a browser.
*/
websiteUrl?: string;
/**
* The url to direct a user's search queries.
*/
searchUrl?: string;
/**
* Specifies whether the tab offers an experience in the context of a channel in a team, or an experience scoped to an individual user alone. These options are non-exclusive. Currently static tabs are only supported in the 'personal' scope.
*/
scopes: ("team" | "personal")[];
/**
* The set of contextItem scopes that a tab belong to
*/
context?: ("personalTab" | "channelTab")[];
}
export interface ICommand {
title: string;
description: string;
}
export interface ICommandList {
scopes: BotOrMeScopes;
commands: ICommand[];
}
export interface IBot {
/**
* The Microsoft App ID specified for the bot in the Bot Framework portal (https://dev.botframework.com/bots)
*/
botId: string;
/**
* This value describes whether or not the bot utilizes a user hint to add the bot to a specific channel.
*/
needsChannelSelector?: boolean;
/**
* A value indicating whether or not the bot is a one-way notification only bot, as opposed to a conversational bot.
*/
isNotificationOnly?: boolean;
/**
* A value indicating whether the bot supports uploading/downloading of files.
*/
supportsFiles?: boolean;
/**
* A value indicating whether the bot supports audio calling.
*/
supportsCalling?: boolean;
/**
* A value indicating whether the bot supports video calling.
*/
supportsVideo?: boolean;
/**
* 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: BotOrMeScopes;
/**
* 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.
*/
commandLists?: ICommandList[];
}
export interface IConnector {
/**
* A unique identifier for the connector which matches its ID in the Connectors Developer Portal.
*/
connectorId: string;
/**
* The url to use for configuring the connector using the inline configuration experience.
*/
configurationUrl?: string;
/**
* Specifies whether the connector offers an experience in the context of a channel in a team, or an experience scoped to an individual user alone. Currently, only the team scope is supported.
*/
scopes: "team"[];
}
export interface IWebApplicationInfo {
/**
* AAD application id of the app. This id must be a GUID.
*/
id: string;
/**
* Resource url of app for acquiring auth token for SSO.
*/
resource?: string;
applicationPermissions?: string[];
}
export type BotOrMeScopes = ("team" | "personal" | "groupchat" | "groupChat")[];
export interface IComposeExtension {
objectId?: string;
/**
* The Microsoft App ID specified for the bot powering the compose extension in the Bot Framework portal (https://dev.botframework.com/bots)
* It's not required for apiBased type
*/
botId?: string;
/**
* A value indicating whether the configuration of a compose extension can be updated by the user.
*/
canUpdateConfiguration?: boolean;
scopes?: BotOrMeScopes;
commands: IMessagingExtensionCommand[];
/**
* A list of handlers that allow apps to be invoked when certain conditions are met
*/
messageHandlers?: IComposeExtensionMessageHandler[];
/**
* To support SME, denotes what powers the compose extension
*/
composeExtensionType?: "apiBased" | "botBased";
/**
* To support SME, it's the relative path to api spec file in the manifest
*/
apiSpecificationFile?: string;
/**
* Authorization information.
*/
authorization?: IAuthorization;
}
export interface IComposeExtensionMessageHandler {
/**
* Type of the message handler
*/
type: "link";
value: {
/**
* A list of domains that the link message handler can register for, and when they are matched the app will be invoked
*/
domains?: string[];
[k: string]: unknown;
};
}
export interface IMessagingExtensionCommand {
/**
* Id of the command.
*/
id: string;
/**
* Type of the command
*/
type?: "query" | "action";
/**
* Context where the command would apply
*/
context?: ("compose" | "commandBox" | "message")[];
/**
* Title of the command.
*/
title: string;
/**
* Description of the command.
*/
description?: string;
/**
* A boolean value that indicates if the command should be run once initially with no parameter.
*/
initialRun?: boolean;
/**
* A boolean value that indicates if it should fetch task module dynamically
*/
fetchTask?: boolean;
parameters?: IParameter[];
taskInfo?: ITaskInfo;
/**
* To support SME
*/
apiResponseRenderingTemplateFile?: string;
}
export interface IAuthorization {
/**
* The type of authorization to use.
*/
authType?: "none" | "apiSecretServiceAuth" | "microsoftEntra";
/**
* Capturing details needed to do microsoftEntra auth flow. It will be only present when auth type is microsoftEntra.
*/
microsoftEntraConfiguration?: IMicrosoftEntraConfiguration;
}
export interface IMicrosoftEntraConfiguration {
/**
* Boolean indicating whether single sign on is configured for the app.
*/
supportsSingleSignOn?: boolean;
}
export interface IParameter {
/**
* Name of the parameter.
*/
name: string;
/**
* Type of the parameter
*/
inputType?: "text" | "textarea" | "number" | "date" | "time" | "toggle" | "choiceset";
/**
* Indicates whether this parameter is required or not. By default, it is not.
*/
isRequired?: boolean;
/**
* Title of the parameter.
*/
title: string;
/**
* Description of the parameter.
*/
description?: string;
/**
* Initial value for the parameter
*/
value?: string;
/**
* The choice options for the parameter
*/
choices?: {
/**
* Title of the choice
*/
title: string;
/**
* Value of the choice
*/
value: string;
}[];
}
export interface ITaskInfo {
/**
* Initial dialog title
*/
title?: string;
/**
* Dialog width - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
width?: string;
/**
* Dialog height - either a number in pixels or default layout such as 'large', 'medium', or 'small'
*/
height?: string;
/**
* Initial webview URL
*/
url?: string;
}
export interface IActivityType {
type: string;
description: string;
templateText: string;
}
export interface ILocalizationInfo {
/**
* The language tag of the strings in this top level manifest file.
*/
defaultLanguageTag: string;
defaultLanguageFile?: string;
additionalLanguages?: {
languageTag: string;
/**
* A relative file path to a the .json file containing the translated strings.
*/
file: string;
}[];
}
export interface IAppPermission {
name: string;
type: "Application" | "Delegated";
}
export interface ITogetherModeScene {
id: string;
name: string;
file: string;
preview: string;
maxAudience: number;
seatsReservedForOrganizersOrPresenters: number;
}
export interface IPlugin {
file: string;
id: string;
}
export interface IDeclarativeCopilot {
file: string;
id: string;
}
export type AppManifest = Record<string, any>;
/**
* manifest definition according to : https://developer.microsoft.com/en-us/json-schemas/teams/v1.13/MicrosoftTeams.schema.json
*/
export declare class TeamsAppManifest implements AppManifest {
$schema?: string;
/**
* The version of the schema this manifest is using.
*/
manifestVersion: string;
/**
* The version of the app. Changes to your manifest should cause a version change. This version string must follow the semver standard (http://semver.org).
*/
version: string;
/**
* A unique identifier for this app. This id must be a GUID.
*/
id: string;
/**
* A unique identifier for this app in reverse domain notation. E.g: com.example.myapp
*/
packageName?: string;
localizationInfo?: ILocalizationInfo;
developer: IDeveloper;
name: IName;
description: IName;
icons: IIcons;
/**
* A color to use in conjunction with the icon. The value must be a valid HTML color code starting with '#', for example `#4464ee`.
*/
accentColor: string;
/**
* These are tabs users can optionally add to their channels and 1:1 or group chats and require extra configuration before they are added. Configurable tabs are not supported in the personal scope. Currently only one configurable tab per app is supported.
*/
configurableTabs?: IConfigurableTab[];
/**
* A set of tabs that may be 'pinned' by default, without the user adding them manually. Static tabs declared in personal scope are always pinned to the app's personal experience. Static tabs do not currently support the 'teams' scope.
*/
staticTabs?: IStaticTab[];
/**
* The set of bots for this app. Currently only one bot per app is supported.
*/
bots?: IBot[];
/**
* The set of Office365 connectors for this app. Currently only one connector per app is supported.
*/
connectors?: IConnector[];
/**
* Subscription offer associated with this app.
*/
subscriptionOffer?: {
/**
* A unique identifier for the Commercial Marketplace Software as a Service Offer.
*/
offerId: string;
};
/**
* Specify the app's Graph connector configuration. If this is present then webApplicationInfo.id must also be specified.
*/
graphConnector?: {
notificationUrl: string;
};
/**
* The set of compose extensions for this app. Currently only one compose extension per app is supported.
*/
composeExtensions?: IComposeExtension[];
/**
* Specifies the permissions the app requests from users.
*/
permissions?: ("identity" | "messageTeamMembers")[];
/**
* Specify the native features on a user's device that your app may request access to.
*/
devicePermissions?: ("geolocation" | "media" | "notifications" | "midi" | "openExternal")[];
/**
* A list of valid domains from which the tabs expect to load any content. Domain listings can include wildcards, for example `*.example.com`. If your tab configuration or content UI needs to navigate to any other domain besides the one use for tab configuration, that domain must be specified here.
*/
validDomains?: string[];
/**
* Specify your AAD App ID and Graph information to help users seamlessly sign into your AAD app.
*/
webApplicationInfo?: IWebApplicationInfo;
/**
* A value indicating whether or not show loading indicator when app/tab is loading
*/
showLoadingIndicator?: boolean;
/**
* A value indicating whether a personal app is rendered without a tab header-bar
*/
isFullScreen?: boolean;
activities?: {
/**
* Specify the types of activites that your app can post to a users activity feed
*/
activityTypes?: IActivityType[];
};
/**
* A list of tenant configured properties for an app
*/
configurableProperties?: ("name" | "shortDescription" | "longDescription" | "smallImageUrl" | "largeImageUrl" | "accentColor" | "developerUrl" | "privacyUrl" | "termsOfUseUrl")[];
/**
* A value indicating whether an app is blocked by default until admin allows it
*/
defaultBlockUntilAdminAction?: boolean;
/**
* The install scope defined for this app by default. This will be the option displayed on the button when a user tries to add the app
*/
defaultInstallScope?: "personal" | "team" | "groupchat" | "groupChat" | "meetings";
/**
* When a group install scope is selected, this will define the default capability when the user installs the app
*/
defaultGroupCapability?: {
team: "tab" | "bot" | "connector";
groupchat: "tab" | "bot" | "connector";
meetings: "tab" | "bot" | "connector";
};
/**
* Specify meeting extension definition
*/
meetingExtensionDefinition?: {
/**
* Meeting supported scenes.
*/
scenes?: ITogetherModeScene[];
/**
* Meeting supported A/V filters.
*/
filters?: {
id: string;
name: string;
thumbnail: string;
}[];
videoAppContentUrl?: string;
};
/**
* The url to the page that provides additional app information for the admins
*/
publisherDocsUrl?: string;
/**
* Specify and consolidates authorization related information for the App.
*/
authorization?: {
permissions?: {
resourceSpecific?: IAppPermission[];
};
};
copilotExtensions?: {
/**
* Pointer to plugins.
*/
plugins?: IPlugin[];
/**
* Pointer to declarative Copilot.
*/
declarativeCopilots?: IDeclarativeCopilot[];
};
copilotAgents?: {
/**
* Pointer to plugins.
*/
plugins?: IPlugin[];
/**
* Pointer to declarative Copilot.
*/
declarativeAgents?: IDeclarativeCopilot[];
};
}
+59
View File
@@ -0,0 +1,59 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TeamsAppManifest = void 0;
/**
* manifest definition according to : https://developer.microsoft.com/en-us/json-schemas/teams/v1.13/MicrosoftTeams.schema.json
*/
class TeamsAppManifest {
constructor() {
this.$schema = "https://developer.microsoft.com/en-us/json-schemas/teams/v1.15/MicrosoftTeams.schema.json";
/**
* The version of the schema this manifest is using.
*/
this.manifestVersion = "1.15";
/**
* The version of the app. Changes to your manifest should cause a version change. This version string must follow the semver standard (http://semver.org).
*/
this.version = "1.0.0";
/**
* A unique identifier for this app. This id must be a GUID.
*/
this.id = "{{AppId}}";
/**
* A unique identifier for this app in reverse domain notation. E.g: com.example.myapp
*/
this.packageName = "com.microsoft.teams.extension";
this.developer = {
name: "Teams App, Inc.",
mpnId: "",
websiteUrl: "https://localhost:3000",
privacyUrl: "https://localhost:3000/privacy",
termsOfUseUrl: "https://localhost:3000/termsofuse",
};
this.name = {
short: "{{AppName}}",
full: "This field is not used",
};
this.description = {
short: "Short description for {{AppName}}.",
full: "Full description of {{AppName}}.",
};
this.icons = { outline: "outline.png", color: "color.png" };
/**
* A color to use in conjunction with the icon. The value must be a valid HTML color code starting with '#', for example `#4464ee`.
*/
this.accentColor = "#FFFFFF";
/**
* Specifies the permissions the app requests from users.
*/
this.permissions = ["identity", "messageTeamMembers"];
/**
* A list of valid domains from which the tabs expect to load any content. Domain listings can include wildcards, for example `*.example.com`. If your tab configuration or content UI needs to navigate to any other domain besides the one use for tab configuration, that domain must be specified here.
*/
this.validDomains = ["localhost:3000"];
}
}
exports.TeamsAppManifest = TeamsAppManifest;
//# sourceMappingURL=manifest.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAgZb;;GAEG;AACH,MAAa,gBAAgB;IAA7B;QACE,YAAO,GACL,2FAA2F,CAAC;QAC9F;;WAEG;QACH,oBAAe,GAAG,MAAM,CAAC;QACzB;;WAEG;QACH,YAAO,GAAG,OAAO,CAAC;QAClB;;WAEG;QACH,OAAE,GAAG,WAAW,CAAC;QACjB;;WAEG;QACH,gBAAW,GAAY,+BAA+B,CAAC;QAIvD,cAAS,GAAe;YACtB,IAAI,EAAE,iBAAiB;YACvB,KAAK,EAAE,EAAE;YACT,UAAU,EAAE,wBAAwB;YACpC,UAAU,EAAE,gCAAgC;YAC5C,aAAa,EAAE,mCAAmC;SACnD,CAAC;QAEF,SAAI,GAAU;YACZ,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,wBAAwB;SAC/B,CAAC;QAEF,gBAAW,GAAU;YACnB,KAAK,EAAE,oCAAoC;YAC3C,IAAI,EAAE,kCAAkC;SACzC,CAAC;QAEF,UAAK,GAAW,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;QAC/D;;WAEG;QACH,gBAAW,GAAG,SAAS,CAAC;QAoCxB;;WAEG;QACH,gBAAW,GAA2C,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;QAKzF;;WAEG;QACH,iBAAY,GAAc,CAAC,gBAAgB,CAAC,CAAC;IAsG/C,CAAC;CAAA;AAjMD,4CAiMC"}
+143
View File
@@ -0,0 +1,143 @@
export type Instruction = string | string[];
export type Example = string | string[];
export interface PluginManifestSchema {
schema_version: string;
name_for_human: string;
namespace?: string;
description_for_model?: string;
description_for_human: string;
logo_url?: string;
contact_email?: string;
legal_info_url?: string;
privacy_policy_url?: string;
functions?: FunctionObject[];
runtimes?: (RuntimeObjectLocalplugin | RuntimeObjectOpenapi)[];
capabilities?: {
conversation_starters?: ConversationStarter[];
[k: string]: unknown;
};
[k: string]: unknown;
}
export interface FunctionObject {
name: string;
description?: string;
parameters?: FunctionParameters;
returns?: FunctionReturnType | FunctionRichResponseReturnType;
states?: {
reasoning?: FunctionStateConfig;
responding?: FunctionStateConfig;
[k: string]: unknown;
};
capabilities?: {
confirmation?: ConfirmationObject;
response_semantics?: ResponseSemanticsObject;
[k: string]: unknown;
};
[k: string]: unknown;
}
export interface FunctionParameters {
type?: "object";
properties: {
[k: string]: FunctionParameter;
};
required?: string[];
[k: string]: unknown;
}
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[A-Za-z0-9_]+$".
*/
export interface FunctionParameter {
type: "string" | "array" | "boolean" | "integer" | "number";
items?: {
[k: string]: unknown;
};
enum?: string[];
description?: string;
default?: string | boolean | number | number | unknown[];
[k: string]: unknown;
}
export interface FunctionReturnType {
type: "string";
description?: string;
[k: string]: unknown;
}
export interface FunctionRichResponseReturnType {
$ref: "https://copilot.microsoft.com/schemas/rich-response-v1.0.json";
[k: string]: unknown;
}
export interface FunctionStateConfig {
description?: string;
instructions?: Instruction;
examples?: Example;
[k: string]: unknown;
}
export interface ConfirmationObject {
type?: "None" | "AdaptiveCard";
title?: string;
body?: string;
[k: string]: unknown;
}
export interface ResponseSemanticsObject {
data_path: string;
properties?: {
title?: string;
subtitle?: string;
url?: string;
information_protection_label?: string;
template_selector?: string;
[k: string]: unknown;
};
static_template?: {
[k: string]: unknown;
};
[k: string]: unknown;
}
export interface RuntimeObjectLocalplugin {
type: "LocalPlugin";
run_for_functions?: string[];
spec: LocalPluginRuntime;
[k: string]: unknown;
}
export interface LocalPluginRuntime {
local_endpoint: string;
[k: string]: unknown;
}
export interface RuntimeObjectOpenapi {
type: "OpenApi";
auth?: AuthObject;
run_for_functions?: string[];
spec: OpenApiRuntime;
[k: string]: unknown;
}
export interface AuthObject {
type: "None" | "OAuthPluginVault" | "ApiKeyPluginVault";
reference_id?: string;
[k: string]: unknown;
}
export interface OpenApiRuntime {
url: string;
[k: string]: unknown;
}
export interface LocalizationObject {
/**
* This interface was referenced by `LocalizationObject`'s JSON-Schema definition
* via the `patternProperty` "^(?i)[a-z]{2,3}(-[a-z]{2})?(?-i)$".
*/
[k: string]: {
/**
* This interface was referenced by `undefined`'s JSON-Schema definition
* via the `patternProperty` "^[A-Za-z_][A-Za-z0-9_]*$".
*/
[k: string]: {
message: string;
description: string;
[k: string]: unknown;
};
};
}
export interface ConversationStarter {
text: string;
title?: string;
[k: string]: unknown;
}
+3
View File
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=pluginManifest.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"pluginManifest.js","sourceRoot":"","sources":["../src/pluginManifest.ts"],"names":[],"mappings":""}
File diff suppressed because one or more lines are too long