import { GeneratorTeamsAppOptions } from "../GeneratorTeamsAppOptions" ; import { IManifestUpdater } from "./IManifestUpdater" ; export abstract class BaseManifestGenerator { protected tabUpdater : IManifestUpdater ; protected botUpdater : IManifestUpdater ; protected messageExtensionUpdater : IManifestUpdater ; protected connectorUpdater : IManifestUpdater ; protected localizationUpdater : IManifestUpdater ; public generateManifest ( options ) { const manifest = { "$schema" : "https://developer.microsoft.com/en-us/json-schemas/teams/v1.8/MicrosoftTeams.schema.json" , "manifestVersion" : "1.8" , "id" : "{{APPLICATION_ID}}" , "version" : "{{VERSION}}" , "packageName" : "{{PACKAGE_NAME}}" , "developer" : { "name" : options . developer , "websiteUrl" : "https://{{PUBLIC_HOSTNAME}}" , "privacyUrl" : "https://{{PUBLIC_HOSTNAME}}/privacy.html" , "termsOfUseUrl" : "https://{{PUBLIC_HOSTNAME}}/tou.html" } , "name" : { "short" : options . title , "full" : options . title } , "description" : { "short" : "TODO: add short description here" , "full" : "TODO: add full description here" } , "icons" : { "outline" : "icon-outline.png" , "color" : "icon-color.png" } , "accentColor" : "#D85028" , "configurableTabs" : [ ] , "staticTabs" : [ ] , "bots" : [ ] , "connectors" : [ ] , "composeExtensions" : [ ] , "permissions" : [ "identity" , "messageTeamMembers" ] , "validDomains" : [ "{{PUBLIC_HOSTNAME}}" ] } ; if ( options . mpnId && options . mpnId . length > 0 ) { manifest . developer . mpnId = options . mpnId ; } manifest . showLoadingIndicator = options . showLoadingIndicator ; manifest . isFullScreen = options . isFullScreen ; return manifest ; } public updateTabManifest ( manifest , options ) { this . tabUpdater . updateManifest ( manifest , options ) ; } public updateBotManifest ( manifest , options ) { this . botUpdater . updateManifest ( manifest , options ) ; } public updateMessageExtensionManifest ( manifest , options ) { this . messageExtensionUpdater . updateManifest ( manifest , options ) ; } public updateConnectorManifest ( manifest , options ) { this . connectorUpdater . updateManifest ( manifest , options ) ; } public updateLocalizationManifest ( manifest , options ) { if ( this . localizationUpdater ) { this . localizationUpdater . updateManifest ( manifest , options ) ; } } public abstract supportsUpdateManifest ( from ) ; public abstract updateManifest ( manifest , log ? ) ; }