azure-devops-extension-api 4.245.1 → 4.247.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SECURITY.md +41 -0
- package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/Reporting.d.ts +48 -0
- package/bin/AdvancedSecurity.Reporting/Reporting.js +32 -0
- package/bin/AdvancedSecurity.Reporting/Reporting.min.js +1 -0
- package/{Alert → bin/Alert}/Alert.d.ts +8 -8
- package/{Alert → bin/Alert}/AlertClient.d.ts +1 -1
- package/{Alert → bin/Alert}/AlertClient.js +1 -1
- package/{Contributions → bin/Contributions}/ContributionsClient.js +2 -2
- package/{Contributions → bin/Contributions}/ContributionsClient.min.js +1 -1
- package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.js +7 -7
- package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.min.js +1 -1
- package/{FormInput → bin/FormInput}/FormInput.d.ts +8 -0
- package/bin/LICENSE +21 -0
- package/bin/README.md +2 -0
- package/{TaskAgent → bin/TaskAgent}/TaskAgent.d.ts +12 -0
- package/{Test → bin/Test}/Test.d.ts +31 -7
- package/{TestPlan → bin/TestPlan}/TestPlan.d.ts +6 -2
- package/{TestPlan → bin/TestPlan}/TestPlanClient.d.ts +19 -0
- package/{TestPlan → bin/TestPlan}/TestPlanClient.js +84 -0
- package/{TestPlan → bin/TestPlan}/TestPlanClient.min.js +1 -1
- package/{TestResults → bin/TestResults}/TestResultsClient.d.ts +8 -0
- package/{TestResults → bin/TestResults}/TestResultsClient.js +23 -0
- package/{TestResults → bin/TestResults}/TestResultsClient.min.js +1 -1
- package/bin/package.json +37 -0
- package/buildpackage.js +80 -0
- package/package.json +1 -1
- package/src/Accounts/Accounts.ts +134 -0
- package/src/Accounts/AccountsClient.ts +83 -0
- package/src/Accounts/index.ts +2 -0
- package/src/AdvancedSecurity.Reporting/Reporting.ts +180 -0
- package/src/AdvancedSecurity.Reporting/ReportingClient.ts +47 -0
- package/src/Alert/Alert.ts +1037 -0
- package/src/Alert/AlertClient.ts +330 -0
- package/src/Boards/Boards.ts +684 -0
- package/src/Boards/BoardsClient.ts +593 -0
- package/src/Boards/index.ts +2 -0
- package/src/Build/Build.ts +3416 -0
- package/src/Build/BuildClient.ts +2740 -0
- package/src/Build/BuildServices.ts +39 -0
- package/src/Build/index.ts +3 -0
- package/src/Comments/Comments.ts +330 -0
- package/src/Comments/index.ts +1 -0
- package/src/Common/Client.ts +37 -0
- package/src/Common/CommonServices.ts +853 -0
- package/src/Common/Context.d.ts +46 -0
- package/src/Common/Fetch.ts +239 -0
- package/src/Common/RestClientBase.ts +186 -0
- package/src/Common/System.ts +36 -0
- package/src/Common/SystemData.ts +135 -0
- package/src/Common/Util/Serialization.ts +59 -0
- package/src/Common/Util/Url.ts +773 -0
- package/src/Common/index.ts +3 -0
- package/src/Contributions/Contributions.ts +708 -0
- package/src/Contributions/ContributionsClient.ts +109 -0
- package/src/Contributions/index.ts +2 -0
- package/src/Core/Core.ts +579 -0
- package/src/Core/CoreClient.ts +765 -0
- package/src/Core/index.ts +2 -0
- package/src/Dashboard/Dashboard.ts +419 -0
- package/src/Dashboard/DashboardClient.ts +370 -0
- package/src/Dashboard/WidgetConfigHelpers.ts +43 -0
- package/src/Dashboard/WidgetContracts.ts +226 -0
- package/src/Dashboard/WidgetHelpers.ts +145 -0
- package/src/Dashboard/index.ts +5 -0
- package/src/DistributedTaskCommon/DistributedTaskCommon.ts +108 -0
- package/src/DistributedTaskCommon/index.ts +1 -0
- package/src/ExtensionManagement/ExtensionManagement.ts +1205 -0
- package/src/ExtensionManagement/ExtensionManagementClient.ts +646 -0
- package/src/ExtensionManagement/index.ts +2 -0
- package/src/Favorite/Favorite.ts +136 -0
- package/src/Favorite/FavoriteClient.ts +301 -0
- package/src/FeatureAvailability/FeatureAvailability.ts +20 -0
- package/src/FeatureAvailability/FeatureAvailabilityClient.ts +153 -0
- package/src/FeatureAvailability/index.ts +2 -0
- package/src/FeatureManagement/FeatureManagement.ts +166 -0
- package/src/FeatureManagement/FeatureManagementClient.ts +246 -0
- package/src/FeatureManagement/index.ts +2 -0
- package/src/FileContainer/FileContainer.ts +205 -0
- package/src/FileContainer/FileContainerClient.ts +154 -0
- package/src/FileContainer/index.ts +2 -0
- package/src/FormInput/FormInput.ts +288 -0
- package/src/FormInput/index.ts +1 -0
- package/src/Gallery/Gallery.ts +1977 -0
- package/src/Gallery/GalleryClient.ts +2251 -0
- package/src/Gallery/index.ts +2 -0
- package/src/Git/CodeEditorTypes.ts +335 -0
- package/src/Git/Git.ts +4058 -0
- package/src/Git/GitClient.ts +4750 -0
- package/src/Git/GitServices.ts +18 -0
- package/src/Git/index.ts +4 -0
- package/src/Graph/Graph.ts +572 -0
- package/src/Graph/GraphClient.ts +846 -0
- package/src/Graph/index.ts +2 -0
- package/src/Identities/Identities.ts +261 -0
- package/src/Identities/IdentityProvider.ts +90 -0
- package/src/Identities/IdentityService.ts +89 -0
- package/src/Identities/index.ts +3 -0
- package/src/Locations/Locations.ts +165 -0
- package/src/Locations/LocationsClient.ts +220 -0
- package/src/Locations/index.ts +2 -0
- package/src/Management/Management.ts +172 -0
- package/src/Management/ManagementClient.ts +348 -0
- package/src/Notification/Notification.ts +1460 -0
- package/src/Notification/NotificationClient.ts +477 -0
- package/src/Notification/index.ts +2 -0
- package/src/Operations/Operations.ts +86 -0
- package/src/Operations/OperationsClient.ts +42 -0
- package/src/Operations/index.ts +2 -0
- package/src/Pipelines/Pipelines.ts +354 -0
- package/src/Pipelines/PipelinesClient.ts +306 -0
- package/src/Policy/Policy.ts +173 -0
- package/src/Policy/PolicyClient.ts +315 -0
- package/src/Policy/index.ts +2 -0
- package/src/Profile/Profile.ts +187 -0
- package/src/Profile/ProfileClient.ts +328 -0
- package/src/Profile/index.ts +2 -0
- package/src/ProjectAnalysis/ProjectAnalysis.ts +74 -0
- package/src/ProjectAnalysis/ProjectAnalysisClient.ts +124 -0
- package/src/ProjectAnalysis/index.ts +2 -0
- package/src/Release/Release.ts +4237 -0
- package/src/Release/ReleaseClient.ts +2450 -0
- package/src/Release/index.ts +2 -0
- package/src/ResourceUsage/ResourceUsage.ts +19 -0
- package/src/ResourceUsage/ResourceUsageClient.ts +48 -0
- package/src/ServiceEndpoint/ServiceEndpoint.ts +930 -0
- package/src/ServiceEndpoint/ServiceEndpointClient.ts +617 -0
- package/src/ServiceEndpoint/index.ts +2 -0
- package/src/ServiceHooks/ServiceHooks.ts +759 -0
- package/src/ServiceHooks/ServiceHooksClient.ts +499 -0
- package/src/ServiceHooks/index.ts +2 -0
- package/src/TaskAgent/TaskAgent.ts +3896 -0
- package/src/TaskAgent/TaskAgentClient.ts +3918 -0
- package/src/TaskAgent/index.ts +2 -0
- package/src/Test/Test.ts +5853 -0
- package/src/Test/TestClient.ts +2201 -0
- package/src/Test/index.ts +2 -0
- package/src/TestPlan/TestPlan.ts +1384 -0
- package/src/TestPlan/TestPlanClient.ts +1367 -0
- package/src/TestPlan/index.ts +2 -0
- package/{AdvancedSecurity.Reporting/Reporting.js → src/TestResults/TestResults.ts} +7 -5
- package/src/TestResults/TestResultsClient.ts +3450 -0
- package/src/TestResults/index.ts +2 -0
- package/src/Tfvc/Tfvc.ts +770 -0
- package/src/Tfvc/TfvcClient.ts +757 -0
- package/src/Tfvc/index.ts +2 -0
- package/src/WebApi/WebApi.ts +452 -0
- package/src/WebApi/index.ts +1 -0
- package/src/Wiki/Wiki.ts +352 -0
- package/src/Wiki/WikiClient.ts +712 -0
- package/src/Wiki/index.ts +2 -0
- package/src/Work/Work.ts +1367 -0
- package/src/Work/WorkClient.ts +1489 -0
- package/src/Work/index.ts +2 -0
- package/src/WorkItemTracking/WorkItemTracking.ts +2215 -0
- package/src/WorkItemTracking/WorkItemTrackingClient.ts +2032 -0
- package/src/WorkItemTracking/WorkItemTrackingServices.ts +329 -0
- package/src/WorkItemTracking/index.ts +3 -0
- package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +1295 -0
- package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +1455 -0
- package/src/WorkItemTrackingProcess/index.ts +2 -0
- package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +606 -0
- package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +1175 -0
- package/src/WorkItemTrackingProcessDefinitions/index.ts +2 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +21 -0
- package/AdvancedSecurity.Reporting/Reporting.min.js +0 -1
- /package/{Accounts → bin/Accounts}/Accounts.d.ts +0 -0
- /package/{Accounts → bin/Accounts}/Accounts.js +0 -0
- /package/{Accounts → bin/Accounts}/Accounts.min.js +0 -0
- /package/{Accounts → bin/Accounts}/AccountsClient.d.ts +0 -0
- /package/{Accounts → bin/Accounts}/AccountsClient.js +0 -0
- /package/{Accounts → bin/Accounts}/AccountsClient.min.js +0 -0
- /package/{Accounts → bin/Accounts}/index.d.ts +0 -0
- /package/{Accounts → bin/Accounts}/index.js +0 -0
- /package/{Accounts → bin/Accounts}/index.min.js +0 -0
- /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
- /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
- /package/{AdvancedSecurity.Reporting → bin/AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
- /package/{Alert → bin/Alert}/Alert.js +0 -0
- /package/{Alert → bin/Alert}/Alert.min.js +0 -0
- /package/{Alert → bin/Alert}/AlertClient.min.js +0 -0
- /package/{Boards → bin/Boards}/Boards.d.ts +0 -0
- /package/{Boards → bin/Boards}/Boards.js +0 -0
- /package/{Boards → bin/Boards}/Boards.min.js +0 -0
- /package/{Boards → bin/Boards}/BoardsClient.d.ts +0 -0
- /package/{Boards → bin/Boards}/BoardsClient.js +0 -0
- /package/{Boards → bin/Boards}/BoardsClient.min.js +0 -0
- /package/{Boards → bin/Boards}/index.d.ts +0 -0
- /package/{Boards → bin/Boards}/index.js +0 -0
- /package/{Boards → bin/Boards}/index.min.js +0 -0
- /package/{Build → bin/Build}/Build.d.ts +0 -0
- /package/{Build → bin/Build}/Build.js +0 -0
- /package/{Build → bin/Build}/Build.min.js +0 -0
- /package/{Build → bin/Build}/BuildClient.d.ts +0 -0
- /package/{Build → bin/Build}/BuildClient.js +0 -0
- /package/{Build → bin/Build}/BuildClient.min.js +0 -0
- /package/{Build → bin/Build}/BuildServices.d.ts +0 -0
- /package/{Build → bin/Build}/BuildServices.js +0 -0
- /package/{Build → bin/Build}/BuildServices.min.js +0 -0
- /package/{Build → bin/Build}/index.d.ts +0 -0
- /package/{Build → bin/Build}/index.js +0 -0
- /package/{Build → bin/Build}/index.min.js +0 -0
- /package/{Comments → bin/Comments}/Comments.d.ts +0 -0
- /package/{Comments → bin/Comments}/Comments.js +0 -0
- /package/{Comments → bin/Comments}/Comments.min.js +0 -0
- /package/{Comments → bin/Comments}/index.d.ts +0 -0
- /package/{Comments → bin/Comments}/index.js +0 -0
- /package/{Comments → bin/Comments}/index.min.js +0 -0
- /package/{Common → bin/Common}/Client.d.ts +0 -0
- /package/{Common → bin/Common}/Client.js +0 -0
- /package/{Common → bin/Common}/Client.min.js +0 -0
- /package/{Common → bin/Common}/CommonServices.d.ts +0 -0
- /package/{Common → bin/Common}/CommonServices.js +0 -0
- /package/{Common → bin/Common}/CommonServices.min.js +0 -0
- /package/{Common → bin/Common}/Context.d.ts +0 -0
- /package/{Common → bin/Common}/Fetch.d.ts +0 -0
- /package/{Common → bin/Common}/Fetch.js +0 -0
- /package/{Common → bin/Common}/Fetch.min.js +0 -0
- /package/{Common → bin/Common}/RestClientBase.d.ts +0 -0
- /package/{Common → bin/Common}/RestClientBase.js +0 -0
- /package/{Common → bin/Common}/RestClientBase.min.js +0 -0
- /package/{Common → bin/Common}/System.d.ts +0 -0
- /package/{Common → bin/Common}/System.js +0 -0
- /package/{Common → bin/Common}/System.min.js +0 -0
- /package/{Common → bin/Common}/SystemData.d.ts +0 -0
- /package/{Common → bin/Common}/SystemData.js +0 -0
- /package/{Common → bin/Common}/SystemData.min.js +0 -0
- /package/{Common → bin/Common}/Util/Serialization.d.ts +0 -0
- /package/{Common → bin/Common}/Util/Serialization.js +0 -0
- /package/{Common → bin/Common}/Util/Serialization.min.js +0 -0
- /package/{Common → bin/Common}/Util/Url.d.ts +0 -0
- /package/{Common → bin/Common}/Util/Url.js +0 -0
- /package/{Common → bin/Common}/Util/Url.min.js +0 -0
- /package/{Common → bin/Common}/index.d.ts +0 -0
- /package/{Common → bin/Common}/index.js +0 -0
- /package/{Common → bin/Common}/index.min.js +0 -0
- /package/{Contributions → bin/Contributions}/Contributions.d.ts +0 -0
- /package/{Contributions → bin/Contributions}/Contributions.js +0 -0
- /package/{Contributions → bin/Contributions}/Contributions.min.js +0 -0
- /package/{Contributions → bin/Contributions}/ContributionsClient.d.ts +0 -0
- /package/{Contributions → bin/Contributions}/index.d.ts +0 -0
- /package/{Contributions → bin/Contributions}/index.js +0 -0
- /package/{Contributions → bin/Contributions}/index.min.js +0 -0
- /package/{Core → bin/Core}/Core.d.ts +0 -0
- /package/{Core → bin/Core}/Core.js +0 -0
- /package/{Core → bin/Core}/Core.min.js +0 -0
- /package/{Core → bin/Core}/CoreClient.d.ts +0 -0
- /package/{Core → bin/Core}/CoreClient.js +0 -0
- /package/{Core → bin/Core}/CoreClient.min.js +0 -0
- /package/{Core → bin/Core}/index.d.ts +0 -0
- /package/{Core → bin/Core}/index.js +0 -0
- /package/{Core → bin/Core}/index.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/Dashboard.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/Dashboard.js +0 -0
- /package/{Dashboard → bin/Dashboard}/Dashboard.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/DashboardClient.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/DashboardClient.js +0 -0
- /package/{Dashboard → bin/Dashboard}/DashboardClient.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetConfigHelpers.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetContracts.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetContracts.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetContracts.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetHelpers.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetHelpers.js +0 -0
- /package/{Dashboard → bin/Dashboard}/WidgetHelpers.min.js +0 -0
- /package/{Dashboard → bin/Dashboard}/index.d.ts +0 -0
- /package/{Dashboard → bin/Dashboard}/index.js +0 -0
- /package/{Dashboard → bin/Dashboard}/index.min.js +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.d.ts +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.js +0 -0
- /package/{DistributedTaskCommon → bin/DistributedTaskCommon}/index.min.js +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.d.ts +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.js +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagement.min.js +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/index.d.ts +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/index.js +0 -0
- /package/{ExtensionManagement → bin/ExtensionManagement}/index.min.js +0 -0
- /package/{Favorite → bin/Favorite}/Favorite.d.ts +0 -0
- /package/{Favorite → bin/Favorite}/Favorite.js +0 -0
- /package/{Favorite → bin/Favorite}/Favorite.min.js +0 -0
- /package/{Favorite → bin/Favorite}/FavoriteClient.d.ts +0 -0
- /package/{Favorite → bin/Favorite}/FavoriteClient.js +0 -0
- /package/{Favorite → bin/Favorite}/FavoriteClient.min.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.d.ts +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailability.min.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/index.d.ts +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/index.js +0 -0
- /package/{FeatureAvailability → bin/FeatureAvailability}/index.min.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.d.ts +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagement.min.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.d.ts +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/FeatureManagementClient.min.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/index.d.ts +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/index.js +0 -0
- /package/{FeatureManagement → bin/FeatureManagement}/index.min.js +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainer.d.ts +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainer.js +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainer.min.js +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainerClient.d.ts +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainerClient.js +0 -0
- /package/{FileContainer → bin/FileContainer}/FileContainerClient.min.js +0 -0
- /package/{FileContainer → bin/FileContainer}/index.d.ts +0 -0
- /package/{FileContainer → bin/FileContainer}/index.js +0 -0
- /package/{FileContainer → bin/FileContainer}/index.min.js +0 -0
- /package/{FormInput → bin/FormInput}/FormInput.js +0 -0
- /package/{FormInput → bin/FormInput}/FormInput.min.js +0 -0
- /package/{FormInput → bin/FormInput}/index.d.ts +0 -0
- /package/{FormInput → bin/FormInput}/index.js +0 -0
- /package/{FormInput → bin/FormInput}/index.min.js +0 -0
- /package/{Gallery → bin/Gallery}/Gallery.d.ts +0 -0
- /package/{Gallery → bin/Gallery}/Gallery.js +0 -0
- /package/{Gallery → bin/Gallery}/Gallery.min.js +0 -0
- /package/{Gallery → bin/Gallery}/GalleryClient.d.ts +0 -0
- /package/{Gallery → bin/Gallery}/GalleryClient.js +0 -0
- /package/{Gallery → bin/Gallery}/GalleryClient.min.js +0 -0
- /package/{Gallery → bin/Gallery}/index.d.ts +0 -0
- /package/{Gallery → bin/Gallery}/index.js +0 -0
- /package/{Gallery → bin/Gallery}/index.min.js +0 -0
- /package/{Git → bin/Git}/CodeEditorTypes.d.ts +0 -0
- /package/{Git → bin/Git}/CodeEditorTypes.js +0 -0
- /package/{Git → bin/Git}/CodeEditorTypes.min.js +0 -0
- /package/{Git → bin/Git}/Git.d.ts +0 -0
- /package/{Git → bin/Git}/Git.js +0 -0
- /package/{Git → bin/Git}/Git.min.js +0 -0
- /package/{Git → bin/Git}/GitClient.d.ts +0 -0
- /package/{Git → bin/Git}/GitClient.js +0 -0
- /package/{Git → bin/Git}/GitClient.min.js +0 -0
- /package/{Git → bin/Git}/GitServices.d.ts +0 -0
- /package/{Git → bin/Git}/GitServices.js +0 -0
- /package/{Git → bin/Git}/GitServices.min.js +0 -0
- /package/{Git → bin/Git}/index.d.ts +0 -0
- /package/{Git → bin/Git}/index.js +0 -0
- /package/{Git → bin/Git}/index.min.js +0 -0
- /package/{Graph → bin/Graph}/Graph.d.ts +0 -0
- /package/{Graph → bin/Graph}/Graph.js +0 -0
- /package/{Graph → bin/Graph}/Graph.min.js +0 -0
- /package/{Graph → bin/Graph}/GraphClient.d.ts +0 -0
- /package/{Graph → bin/Graph}/GraphClient.js +0 -0
- /package/{Graph → bin/Graph}/GraphClient.min.js +0 -0
- /package/{Graph → bin/Graph}/index.d.ts +0 -0
- /package/{Graph → bin/Graph}/index.js +0 -0
- /package/{Graph → bin/Graph}/index.min.js +0 -0
- /package/{Identities → bin/Identities}/Identities.d.ts +0 -0
- /package/{Identities → bin/Identities}/Identities.js +0 -0
- /package/{Identities → bin/Identities}/Identities.min.js +0 -0
- /package/{Identities → bin/Identities}/IdentityProvider.d.ts +0 -0
- /package/{Identities → bin/Identities}/IdentityProvider.js +0 -0
- /package/{Identities → bin/Identities}/IdentityProvider.min.js +0 -0
- /package/{Identities → bin/Identities}/IdentityService.d.ts +0 -0
- /package/{Identities → bin/Identities}/IdentityService.js +0 -0
- /package/{Identities → bin/Identities}/IdentityService.min.js +0 -0
- /package/{Identities → bin/Identities}/index.d.ts +0 -0
- /package/{Identities → bin/Identities}/index.js +0 -0
- /package/{Identities → bin/Identities}/index.min.js +0 -0
- /package/{Locations → bin/Locations}/Locations.d.ts +0 -0
- /package/{Locations → bin/Locations}/Locations.js +0 -0
- /package/{Locations → bin/Locations}/Locations.min.js +0 -0
- /package/{Locations → bin/Locations}/LocationsClient.d.ts +0 -0
- /package/{Locations → bin/Locations}/LocationsClient.js +0 -0
- /package/{Locations → bin/Locations}/LocationsClient.min.js +0 -0
- /package/{Locations → bin/Locations}/index.d.ts +0 -0
- /package/{Locations → bin/Locations}/index.js +0 -0
- /package/{Locations → bin/Locations}/index.min.js +0 -0
- /package/{Management → bin/Management}/Management.d.ts +0 -0
- /package/{Management → bin/Management}/Management.js +0 -0
- /package/{Management → bin/Management}/Management.min.js +0 -0
- /package/{Management → bin/Management}/ManagementClient.d.ts +0 -0
- /package/{Management → bin/Management}/ManagementClient.js +0 -0
- /package/{Management → bin/Management}/ManagementClient.min.js +0 -0
- /package/{Notification → bin/Notification}/Notification.d.ts +0 -0
- /package/{Notification → bin/Notification}/Notification.js +0 -0
- /package/{Notification → bin/Notification}/Notification.min.js +0 -0
- /package/{Notification → bin/Notification}/NotificationClient.d.ts +0 -0
- /package/{Notification → bin/Notification}/NotificationClient.js +0 -0
- /package/{Notification → bin/Notification}/NotificationClient.min.js +0 -0
- /package/{Notification → bin/Notification}/index.d.ts +0 -0
- /package/{Notification → bin/Notification}/index.js +0 -0
- /package/{Notification → bin/Notification}/index.min.js +0 -0
- /package/{Operations → bin/Operations}/Operations.d.ts +0 -0
- /package/{Operations → bin/Operations}/Operations.js +0 -0
- /package/{Operations → bin/Operations}/Operations.min.js +0 -0
- /package/{Operations → bin/Operations}/OperationsClient.d.ts +0 -0
- /package/{Operations → bin/Operations}/OperationsClient.js +0 -0
- /package/{Operations → bin/Operations}/OperationsClient.min.js +0 -0
- /package/{Operations → bin/Operations}/index.d.ts +0 -0
- /package/{Operations → bin/Operations}/index.js +0 -0
- /package/{Operations → bin/Operations}/index.min.js +0 -0
- /package/{Pipelines → bin/Pipelines}/Pipelines.d.ts +0 -0
- /package/{Pipelines → bin/Pipelines}/Pipelines.js +0 -0
- /package/{Pipelines → bin/Pipelines}/Pipelines.min.js +0 -0
- /package/{Pipelines → bin/Pipelines}/PipelinesClient.d.ts +0 -0
- /package/{Pipelines → bin/Pipelines}/PipelinesClient.js +0 -0
- /package/{Pipelines → bin/Pipelines}/PipelinesClient.min.js +0 -0
- /package/{Policy → bin/Policy}/Policy.d.ts +0 -0
- /package/{Policy → bin/Policy}/Policy.js +0 -0
- /package/{Policy → bin/Policy}/Policy.min.js +0 -0
- /package/{Policy → bin/Policy}/PolicyClient.d.ts +0 -0
- /package/{Policy → bin/Policy}/PolicyClient.js +0 -0
- /package/{Policy → bin/Policy}/PolicyClient.min.js +0 -0
- /package/{Policy → bin/Policy}/index.d.ts +0 -0
- /package/{Policy → bin/Policy}/index.js +0 -0
- /package/{Policy → bin/Policy}/index.min.js +0 -0
- /package/{Profile → bin/Profile}/Profile.d.ts +0 -0
- /package/{Profile → bin/Profile}/Profile.js +0 -0
- /package/{Profile → bin/Profile}/Profile.min.js +0 -0
- /package/{Profile → bin/Profile}/ProfileClient.d.ts +0 -0
- /package/{Profile → bin/Profile}/ProfileClient.js +0 -0
- /package/{Profile → bin/Profile}/ProfileClient.min.js +0 -0
- /package/{Profile → bin/Profile}/index.d.ts +0 -0
- /package/{Profile → bin/Profile}/index.js +0 -0
- /package/{Profile → bin/Profile}/index.min.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.d.ts +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.js +0 -0
- /package/{ProjectAnalysis → bin/ProjectAnalysis}/index.min.js +0 -0
- /package/{Release → bin/Release}/Release.d.ts +0 -0
- /package/{Release → bin/Release}/Release.js +0 -0
- /package/{Release → bin/Release}/Release.min.js +0 -0
- /package/{Release → bin/Release}/ReleaseClient.d.ts +0 -0
- /package/{Release → bin/Release}/ReleaseClient.js +0 -0
- /package/{Release → bin/Release}/ReleaseClient.min.js +0 -0
- /package/{Release → bin/Release}/index.d.ts +0 -0
- /package/{Release → bin/Release}/index.js +0 -0
- /package/{Release → bin/Release}/index.min.js +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.d.ts +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.js +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsage.min.js +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.d.ts +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.js +0 -0
- /package/{ResourceUsage → bin/ResourceUsage}/ResourceUsageClient.min.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.d.ts +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.d.ts +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/ServiceEndpointClient.min.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.d.ts +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.js +0 -0
- /package/{ServiceEndpoint → bin/ServiceEndpoint}/index.min.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.d.ts +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooks.min.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.d.ts +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/ServiceHooksClient.min.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/index.d.ts +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/index.js +0 -0
- /package/{ServiceHooks → bin/ServiceHooks}/index.min.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/TaskAgent.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/TaskAgent.min.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.d.ts +0 -0
- /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/TaskAgentClient.min.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/index.d.ts +0 -0
- /package/{TaskAgent → bin/TaskAgent}/index.js +0 -0
- /package/{TaskAgent → bin/TaskAgent}/index.min.js +0 -0
- /package/{Test → bin/Test}/Test.js +0 -0
- /package/{Test → bin/Test}/Test.min.js +0 -0
- /package/{Test → bin/Test}/TestClient.d.ts +0 -0
- /package/{Test → bin/Test}/TestClient.js +0 -0
- /package/{Test → bin/Test}/TestClient.min.js +0 -0
- /package/{Test → bin/Test}/index.d.ts +0 -0
- /package/{Test → bin/Test}/index.js +0 -0
- /package/{Test → bin/Test}/index.min.js +0 -0
- /package/{TestPlan → bin/TestPlan}/TestPlan.js +0 -0
- /package/{TestPlan → bin/TestPlan}/TestPlan.min.js +0 -0
- /package/{TestPlan → bin/TestPlan}/index.d.ts +0 -0
- /package/{TestPlan → bin/TestPlan}/index.js +0 -0
- /package/{TestPlan → bin/TestPlan}/index.min.js +0 -0
- /package/{TestResults → bin/TestResults}/TestResults.d.ts +0 -0
- /package/{TestResults → bin/TestResults}/TestResults.js +0 -0
- /package/{TestResults → bin/TestResults}/TestResults.min.js +0 -0
- /package/{TestResults → bin/TestResults}/index.d.ts +0 -0
- /package/{TestResults → bin/TestResults}/index.js +0 -0
- /package/{TestResults → bin/TestResults}/index.min.js +0 -0
- /package/{Tfvc → bin/Tfvc}/Tfvc.d.ts +0 -0
- /package/{Tfvc → bin/Tfvc}/Tfvc.js +0 -0
- /package/{Tfvc → bin/Tfvc}/Tfvc.min.js +0 -0
- /package/{Tfvc → bin/Tfvc}/TfvcClient.d.ts +0 -0
- /package/{Tfvc → bin/Tfvc}/TfvcClient.js +0 -0
- /package/{Tfvc → bin/Tfvc}/TfvcClient.min.js +0 -0
- /package/{Tfvc → bin/Tfvc}/index.d.ts +0 -0
- /package/{Tfvc → bin/Tfvc}/index.js +0 -0
- /package/{Tfvc → bin/Tfvc}/index.min.js +0 -0
- /package/{WebApi → bin/WebApi}/WebApi.d.ts +0 -0
- /package/{WebApi → bin/WebApi}/WebApi.js +0 -0
- /package/{WebApi → bin/WebApi}/WebApi.min.js +0 -0
- /package/{WebApi → bin/WebApi}/index.d.ts +0 -0
- /package/{WebApi → bin/WebApi}/index.js +0 -0
- /package/{WebApi → bin/WebApi}/index.min.js +0 -0
- /package/{Wiki → bin/Wiki}/Wiki.d.ts +0 -0
- /package/{Wiki → bin/Wiki}/Wiki.js +0 -0
- /package/{Wiki → bin/Wiki}/Wiki.min.js +0 -0
- /package/{Wiki → bin/Wiki}/WikiClient.d.ts +0 -0
- /package/{Wiki → bin/Wiki}/WikiClient.js +0 -0
- /package/{Wiki → bin/Wiki}/WikiClient.min.js +0 -0
- /package/{Wiki → bin/Wiki}/index.d.ts +0 -0
- /package/{Wiki → bin/Wiki}/index.js +0 -0
- /package/{Wiki → bin/Wiki}/index.min.js +0 -0
- /package/{Work → bin/Work}/Work.d.ts +0 -0
- /package/{Work → bin/Work}/Work.js +0 -0
- /package/{Work → bin/Work}/Work.min.js +0 -0
- /package/{Work → bin/Work}/WorkClient.d.ts +0 -0
- /package/{Work → bin/Work}/WorkClient.js +0 -0
- /package/{Work → bin/Work}/WorkClient.min.js +0 -0
- /package/{Work → bin/Work}/index.d.ts +0 -0
- /package/{Work → bin/Work}/index.js +0 -0
- /package/{Work → bin/Work}/index.min.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.d.ts +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTracking.min.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/index.d.ts +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/index.js +0 -0
- /package/{WorkItemTracking → bin/WorkItemTracking}/index.min.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.d.ts +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.js +0 -0
- /package/{WorkItemTrackingProcess → bin/WorkItemTrackingProcess}/index.min.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.js +0 -0
- /package/{WorkItemTrackingProcessDefinitions → bin/WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
- /package/{index.d.ts → bin/index.d.ts} +0 -0
- /package/{index.js → bin/index.js} +0 -0
- /package/{index.min.js → bin/index.min.js} +0 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ---------------------------------------------------------
|
|
3
|
+
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* ---------------------------------------------------------
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { IVssRestClientOptions } from "../Common/Context";
|
|
8
|
+
import { RestClientBase } from "../Common/RestClientBase";
|
|
9
|
+
|
|
10
|
+
import * as TfsCore from "../Core/Core";
|
|
11
|
+
import * as Dashboard from "../Dashboard/Dashboard";
|
|
12
|
+
|
|
13
|
+
export class DashboardRestClient extends RestClientBase {
|
|
14
|
+
constructor(options: IVssRestClientOptions) {
|
|
15
|
+
super(options);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public static readonly RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Create the supplied dashboard.
|
|
22
|
+
*
|
|
23
|
+
* @param dashboard - The initial state of the dashboard
|
|
24
|
+
* @param teamContext - The team context for the operation
|
|
25
|
+
*/
|
|
26
|
+
public async createDashboard(
|
|
27
|
+
dashboard: Dashboard.Dashboard,
|
|
28
|
+
teamContext: TfsCore.TeamContext
|
|
29
|
+
): Promise<Dashboard.Dashboard> {
|
|
30
|
+
|
|
31
|
+
const project = teamContext.projectId || teamContext.project;
|
|
32
|
+
const team = teamContext.teamId || teamContext.team;
|
|
33
|
+
|
|
34
|
+
return this.beginRequest<Dashboard.Dashboard>({
|
|
35
|
+
apiVersion: "7.2-preview.3",
|
|
36
|
+
method: "POST",
|
|
37
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
38
|
+
routeValues: {
|
|
39
|
+
project: project,
|
|
40
|
+
team: team
|
|
41
|
+
},
|
|
42
|
+
body: dashboard
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard.
|
|
48
|
+
*
|
|
49
|
+
* @param teamContext - The team context for the operation
|
|
50
|
+
* @param dashboardId - ID of the dashboard to delete.
|
|
51
|
+
*/
|
|
52
|
+
public async deleteDashboard(
|
|
53
|
+
teamContext: TfsCore.TeamContext,
|
|
54
|
+
dashboardId: string
|
|
55
|
+
): Promise<void> {
|
|
56
|
+
|
|
57
|
+
const project = teamContext.projectId || teamContext.project;
|
|
58
|
+
const team = teamContext.teamId || teamContext.team;
|
|
59
|
+
|
|
60
|
+
return this.beginRequest<void>({
|
|
61
|
+
apiVersion: "7.2-preview.3",
|
|
62
|
+
method: "DELETE",
|
|
63
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
64
|
+
routeValues: {
|
|
65
|
+
project: project,
|
|
66
|
+
team: team,
|
|
67
|
+
dashboardId: dashboardId
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get a dashboard by its ID.
|
|
74
|
+
*
|
|
75
|
+
* @param teamContext - The team context for the operation
|
|
76
|
+
* @param dashboardId -
|
|
77
|
+
*/
|
|
78
|
+
public async getDashboard(
|
|
79
|
+
teamContext: TfsCore.TeamContext,
|
|
80
|
+
dashboardId: string
|
|
81
|
+
): Promise<Dashboard.Dashboard> {
|
|
82
|
+
|
|
83
|
+
const project = teamContext.projectId || teamContext.project;
|
|
84
|
+
const team = teamContext.teamId || teamContext.team;
|
|
85
|
+
|
|
86
|
+
return this.beginRequest<Dashboard.Dashboard>({
|
|
87
|
+
apiVersion: "7.2-preview.3",
|
|
88
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
89
|
+
routeValues: {
|
|
90
|
+
project: project,
|
|
91
|
+
team: team,
|
|
92
|
+
dashboardId: dashboardId
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Get a list of dashboards under a project.
|
|
99
|
+
*
|
|
100
|
+
* @param teamContext - The team context for the operation
|
|
101
|
+
*/
|
|
102
|
+
public async getDashboardsByProject(
|
|
103
|
+
teamContext: TfsCore.TeamContext
|
|
104
|
+
): Promise<Dashboard.Dashboard[]> {
|
|
105
|
+
|
|
106
|
+
const project = teamContext.projectId || teamContext.project;
|
|
107
|
+
const team = teamContext.teamId || teamContext.team;
|
|
108
|
+
|
|
109
|
+
return this.beginRequest<Dashboard.Dashboard[]>({
|
|
110
|
+
apiVersion: "7.2-preview.3",
|
|
111
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
112
|
+
routeValues: {
|
|
113
|
+
project: project,
|
|
114
|
+
team: team
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied.
|
|
121
|
+
*
|
|
122
|
+
* @param dashboard - The Configuration of the dashboard to replace.
|
|
123
|
+
* @param teamContext - The team context for the operation
|
|
124
|
+
* @param dashboardId - ID of the dashboard to replace.
|
|
125
|
+
*/
|
|
126
|
+
public async replaceDashboard(
|
|
127
|
+
dashboard: Dashboard.Dashboard,
|
|
128
|
+
teamContext: TfsCore.TeamContext,
|
|
129
|
+
dashboardId: string
|
|
130
|
+
): Promise<Dashboard.Dashboard> {
|
|
131
|
+
|
|
132
|
+
const project = teamContext.projectId || teamContext.project;
|
|
133
|
+
const team = teamContext.teamId || teamContext.team;
|
|
134
|
+
|
|
135
|
+
return this.beginRequest<Dashboard.Dashboard>({
|
|
136
|
+
apiVersion: "7.2-preview.3",
|
|
137
|
+
method: "PUT",
|
|
138
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
139
|
+
routeValues: {
|
|
140
|
+
project: project,
|
|
141
|
+
team: team,
|
|
142
|
+
dashboardId: dashboardId
|
|
143
|
+
},
|
|
144
|
+
body: dashboard
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content.
|
|
150
|
+
*
|
|
151
|
+
* @param group -
|
|
152
|
+
* @param teamContext - The team context for the operation
|
|
153
|
+
*/
|
|
154
|
+
public async replaceDashboards(
|
|
155
|
+
group: Dashboard.DashboardGroup,
|
|
156
|
+
teamContext: TfsCore.TeamContext
|
|
157
|
+
): Promise<Dashboard.DashboardGroup> {
|
|
158
|
+
|
|
159
|
+
const project = teamContext.projectId || teamContext.project;
|
|
160
|
+
const team = teamContext.teamId || teamContext.team;
|
|
161
|
+
|
|
162
|
+
return this.beginRequest<Dashboard.DashboardGroup>({
|
|
163
|
+
apiVersion: "7.2-preview.3",
|
|
164
|
+
method: "PUT",
|
|
165
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/Dashboards/{dashboardId}",
|
|
166
|
+
routeValues: {
|
|
167
|
+
project: project,
|
|
168
|
+
team: team
|
|
169
|
+
},
|
|
170
|
+
body: group
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Create a widget on the specified dashboard.
|
|
176
|
+
*
|
|
177
|
+
* @param widget - State of the widget to add
|
|
178
|
+
* @param teamContext - The team context for the operation
|
|
179
|
+
* @param dashboardId - ID of dashboard the widget will be added to.
|
|
180
|
+
*/
|
|
181
|
+
public async createWidget(
|
|
182
|
+
widget: Dashboard.Widget,
|
|
183
|
+
teamContext: TfsCore.TeamContext,
|
|
184
|
+
dashboardId: string
|
|
185
|
+
): Promise<Dashboard.Widget> {
|
|
186
|
+
|
|
187
|
+
const project = teamContext.projectId || teamContext.project;
|
|
188
|
+
const team = teamContext.teamId || teamContext.team;
|
|
189
|
+
|
|
190
|
+
return this.beginRequest<Dashboard.Widget>({
|
|
191
|
+
apiVersion: "7.2-preview.2",
|
|
192
|
+
method: "POST",
|
|
193
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
|
|
194
|
+
routeValues: {
|
|
195
|
+
project: project,
|
|
196
|
+
team: team,
|
|
197
|
+
dashboardId: dashboardId
|
|
198
|
+
},
|
|
199
|
+
body: widget
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Delete the specified widget.
|
|
205
|
+
*
|
|
206
|
+
* @param teamContext - The team context for the operation
|
|
207
|
+
* @param dashboardId - ID of the dashboard containing the widget.
|
|
208
|
+
* @param widgetId - ID of the widget to update.
|
|
209
|
+
*/
|
|
210
|
+
public async deleteWidget(
|
|
211
|
+
teamContext: TfsCore.TeamContext,
|
|
212
|
+
dashboardId: string,
|
|
213
|
+
widgetId: string
|
|
214
|
+
): Promise<Dashboard.Dashboard> {
|
|
215
|
+
|
|
216
|
+
const project = teamContext.projectId || teamContext.project;
|
|
217
|
+
const team = teamContext.teamId || teamContext.team;
|
|
218
|
+
|
|
219
|
+
return this.beginRequest<Dashboard.Dashboard>({
|
|
220
|
+
apiVersion: "7.2-preview.2",
|
|
221
|
+
method: "DELETE",
|
|
222
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
|
|
223
|
+
routeValues: {
|
|
224
|
+
project: project,
|
|
225
|
+
team: team,
|
|
226
|
+
dashboardId: dashboardId,
|
|
227
|
+
widgetId: widgetId
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Get the current state of the specified widget.
|
|
234
|
+
*
|
|
235
|
+
* @param teamContext - The team context for the operation
|
|
236
|
+
* @param dashboardId - ID of the dashboard containing the widget.
|
|
237
|
+
* @param widgetId - ID of the widget to read.
|
|
238
|
+
*/
|
|
239
|
+
public async getWidget(
|
|
240
|
+
teamContext: TfsCore.TeamContext,
|
|
241
|
+
dashboardId: string,
|
|
242
|
+
widgetId: string
|
|
243
|
+
): Promise<Dashboard.Widget> {
|
|
244
|
+
|
|
245
|
+
const project = teamContext.projectId || teamContext.project;
|
|
246
|
+
const team = teamContext.teamId || teamContext.team;
|
|
247
|
+
|
|
248
|
+
return this.beginRequest<Dashboard.Widget>({
|
|
249
|
+
apiVersion: "7.2-preview.2",
|
|
250
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
|
|
251
|
+
routeValues: {
|
|
252
|
+
project: project,
|
|
253
|
+
team: team,
|
|
254
|
+
dashboardId: dashboardId,
|
|
255
|
+
widgetId: widgetId
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Override the state of the specified widget.
|
|
262
|
+
*
|
|
263
|
+
* @param widget - State to be written for the widget.
|
|
264
|
+
* @param teamContext - The team context for the operation
|
|
265
|
+
* @param dashboardId - ID of the dashboard containing the widget.
|
|
266
|
+
* @param widgetId - ID of the widget to update.
|
|
267
|
+
*/
|
|
268
|
+
public async replaceWidget(
|
|
269
|
+
widget: Dashboard.Widget,
|
|
270
|
+
teamContext: TfsCore.TeamContext,
|
|
271
|
+
dashboardId: string,
|
|
272
|
+
widgetId: string
|
|
273
|
+
): Promise<Dashboard.Widget> {
|
|
274
|
+
|
|
275
|
+
const project = teamContext.projectId || teamContext.project;
|
|
276
|
+
const team = teamContext.teamId || teamContext.team;
|
|
277
|
+
|
|
278
|
+
return this.beginRequest<Dashboard.Widget>({
|
|
279
|
+
apiVersion: "7.2-preview.2",
|
|
280
|
+
method: "PUT",
|
|
281
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
|
|
282
|
+
routeValues: {
|
|
283
|
+
project: project,
|
|
284
|
+
team: team,
|
|
285
|
+
dashboardId: dashboardId,
|
|
286
|
+
widgetId: widgetId
|
|
287
|
+
},
|
|
288
|
+
body: widget
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Perform a partial update of the specified widget.
|
|
294
|
+
*
|
|
295
|
+
* @param widget - Description of the widget changes to apply. All non-null fields will be replaced.
|
|
296
|
+
* @param teamContext - The team context for the operation
|
|
297
|
+
* @param dashboardId - ID of the dashboard containing the widget.
|
|
298
|
+
* @param widgetId - ID of the widget to update.
|
|
299
|
+
*/
|
|
300
|
+
public async updateWidget(
|
|
301
|
+
widget: Dashboard.Widget,
|
|
302
|
+
teamContext: TfsCore.TeamContext,
|
|
303
|
+
dashboardId: string,
|
|
304
|
+
widgetId: string
|
|
305
|
+
): Promise<Dashboard.Widget> {
|
|
306
|
+
|
|
307
|
+
const project = teamContext.projectId || teamContext.project;
|
|
308
|
+
const team = teamContext.teamId || teamContext.team;
|
|
309
|
+
|
|
310
|
+
return this.beginRequest<Dashboard.Widget>({
|
|
311
|
+
apiVersion: "7.2-preview.2",
|
|
312
|
+
method: "PATCH",
|
|
313
|
+
routeTemplate: "{project}/{team}/_apis/Dashboard/dashboards/{dashboardId}/Widgets/{widgetId}",
|
|
314
|
+
routeValues: {
|
|
315
|
+
project: project,
|
|
316
|
+
team: team,
|
|
317
|
+
dashboardId: dashboardId,
|
|
318
|
+
widgetId: widgetId
|
|
319
|
+
},
|
|
320
|
+
body: widget
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Get the widget metadata satisfying the specified contribution ID.
|
|
326
|
+
*
|
|
327
|
+
* @param contributionId - The ID of Contribution for the Widget
|
|
328
|
+
* @param project - Project ID or project name
|
|
329
|
+
*/
|
|
330
|
+
public async getWidgetMetadata(
|
|
331
|
+
contributionId: string,
|
|
332
|
+
project?: string
|
|
333
|
+
): Promise<Dashboard.WidgetMetadataResponse> {
|
|
334
|
+
|
|
335
|
+
return this.beginRequest<Dashboard.WidgetMetadataResponse>({
|
|
336
|
+
apiVersion: "7.2-preview.1",
|
|
337
|
+
routeTemplate: "{project}/_apis/Dashboard/WidgetTypes/{contributionId}",
|
|
338
|
+
routeValues: {
|
|
339
|
+
project: project,
|
|
340
|
+
contributionId: contributionId
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false.
|
|
347
|
+
*
|
|
348
|
+
* @param scope -
|
|
349
|
+
* @param project - Project ID or project name
|
|
350
|
+
*/
|
|
351
|
+
public async getWidgetTypes(
|
|
352
|
+
scope: Dashboard.WidgetScope,
|
|
353
|
+
project?: string
|
|
354
|
+
): Promise<Dashboard.WidgetTypesResponse> {
|
|
355
|
+
|
|
356
|
+
const queryValues: any = {
|
|
357
|
+
'$scope': scope
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
return this.beginRequest<Dashboard.WidgetTypesResponse>({
|
|
361
|
+
apiVersion: "7.2-preview.1",
|
|
362
|
+
routeTemplate: "{project}/_apis/Dashboard/WidgetTypes/{contributionId}",
|
|
363
|
+
routeValues: {
|
|
364
|
+
project: project
|
|
365
|
+
},
|
|
366
|
+
queryParams: queryValues
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* From /Tfs/WebPlatform/Client/TFS/Dashboards/WidgetConfigHelpers.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { EventArgs } from "./WidgetContracts";
|
|
6
|
+
|
|
7
|
+
export class ConfigurationEvent {
|
|
8
|
+
/**
|
|
9
|
+
* Configuration has changed. When this event is notified, the preview is updated and Save button is enabled.
|
|
10
|
+
*
|
|
11
|
+
* The payload expected when notifying this event: { data: customSettings }
|
|
12
|
+
*
|
|
13
|
+
* {customSettings} is the serialized custom config settings pertaining to the widget.
|
|
14
|
+
*/
|
|
15
|
+
public static ConfigurationChange: string = "ms.vss-dashboards-web.configurationChange";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Configuration tries to execute API calls and fails. When this event is notified, the config does not render a view and we pass an error message to the configuration host.
|
|
19
|
+
*
|
|
20
|
+
* The payload expected when notifying this event: { data: string }
|
|
21
|
+
*
|
|
22
|
+
* {string} is the error message that is displayed at the top of the configuration.
|
|
23
|
+
*/
|
|
24
|
+
public static ConfigurationError: string = "ms.vss-dashboards-web.configurationError";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Widget configuration general settings changed. When this event is notified, the widget name or widget size is updated.
|
|
28
|
+
*
|
|
29
|
+
* The payload expected when notifying this event: { data: { IGeneralSettings } }
|
|
30
|
+
*
|
|
31
|
+
* {generalSettings} is the serialized object containing WidgetName and WidgetSize
|
|
32
|
+
*/
|
|
33
|
+
public static GeneralSettingsChanged: string = "ms.vss-dashboards-web.generalSettingsChanged";
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param payload the event arguments we pass when we want to notify the configuration.
|
|
37
|
+
*/
|
|
38
|
+
public static Args<T>(payload: T): EventArgs<T> {
|
|
39
|
+
return {
|
|
40
|
+
data: payload
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* From /Tfs/WebPlatform/Client/TFS/Dashboards/WidgetContracts.ts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { LightboxOptions, SemanticVersion, WidgetSize } from "./Dashboard";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* settings of the widget that encapsulate their serialized data and version support.
|
|
9
|
+
*/
|
|
10
|
+
export interface CustomSettings {
|
|
11
|
+
/**
|
|
12
|
+
* the settings data serialized as a string.
|
|
13
|
+
*/
|
|
14
|
+
data: string;
|
|
15
|
+
/**
|
|
16
|
+
* (Optional) version for the settings represented as a semantic version object.
|
|
17
|
+
* If none is available, the version defaults to {major:1, minor:0, patch:0} or "1.0.0"
|
|
18
|
+
*/
|
|
19
|
+
version?: SemanticVersion;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A description of widget state, satisfying requirements for rendering a widget (Does not contain grid centric information, or contribution metadata).
|
|
24
|
+
*/
|
|
25
|
+
export interface WidgetSettings {
|
|
26
|
+
/**
|
|
27
|
+
* size of the widget (in case of configuration, this maps to the size sub section in the general section of the configuration panel)
|
|
28
|
+
*/
|
|
29
|
+
size: WidgetSize;
|
|
30
|
+
/**
|
|
31
|
+
* name of the widget (in case of configuration, this maps to the name sub section in the general section of the configuration panel)
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* settings of the widget
|
|
36
|
+
*/
|
|
37
|
+
customSettings: CustomSettings;
|
|
38
|
+
/**
|
|
39
|
+
* Lightbox options
|
|
40
|
+
*/
|
|
41
|
+
lightboxOptions?: LightboxOptions;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Used to differentiate between widget status helpers
|
|
46
|
+
*/
|
|
47
|
+
export enum WidgetStatusType {
|
|
48
|
+
/**
|
|
49
|
+
* The widget loaded successfully
|
|
50
|
+
*/
|
|
51
|
+
Success = 0,
|
|
52
|
+
/**
|
|
53
|
+
* The widget failed to load
|
|
54
|
+
*/
|
|
55
|
+
Failure = 1,
|
|
56
|
+
/**
|
|
57
|
+
* The widget needs to be configured
|
|
58
|
+
*/
|
|
59
|
+
Unconfigured = 2
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The object encapsulating the result for an IWidget/IConfigurableWidget method call. This object is created using the WidgetStatusHelper library.
|
|
64
|
+
*/
|
|
65
|
+
export interface WidgetStatus {
|
|
66
|
+
/**
|
|
67
|
+
* the rendered state of the widget serialized to a string.
|
|
68
|
+
*/
|
|
69
|
+
state?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Used to determine which widget status helper was called
|
|
72
|
+
*/
|
|
73
|
+
statusType?: WidgetStatusType;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* All widgets implement this interface
|
|
78
|
+
*/
|
|
79
|
+
export interface IWidget {
|
|
80
|
+
/** widgets use the settings provided along with the any cached data they may have to paint an interactive state. No network calls should be made by the widget.
|
|
81
|
+
* @param {WidgetSettings} settings of the widget as available when the widget render is called by the host.
|
|
82
|
+
* @returns object wrapped in a promise that encapsulates the success of this operation.
|
|
83
|
+
* when this calls are completed and the experience is done loading.
|
|
84
|
+
*/
|
|
85
|
+
preload: (widgetSettings: WidgetSettings) => Promise<WidgetStatus>;
|
|
86
|
+
/**
|
|
87
|
+
* Widgets use the settings provided as well as server side calls to complete their rendering experience.
|
|
88
|
+
* In the future, widgets are expected to provide a loading experience while the calls are being waited to be completed.
|
|
89
|
+
* Until then, the widget host will provide the loading experience
|
|
90
|
+
* @param {WidgetSettings} settings of the widget as available when the widget render is called by the host.
|
|
91
|
+
* @returns object wrapped in a promise that encapsulates the success of this operation.
|
|
92
|
+
* when this calls are completed and the experience is done loading.
|
|
93
|
+
*/
|
|
94
|
+
load: (widgetSettings: WidgetSettings) => Promise<WidgetStatus>;
|
|
95
|
+
/**
|
|
96
|
+
* Widgets manage any operations that are not necessary for initial load but are required for the full widget experience.
|
|
97
|
+
*/
|
|
98
|
+
onDashboardLoaded?: () => void;
|
|
99
|
+
/**
|
|
100
|
+
* The framework calls this method to determine if the widget should be disabled for users with stakeholder license
|
|
101
|
+
* @param {WidgetSettings} settings of the widget as available when the widget render is called by the host.
|
|
102
|
+
* @returns A boolean wrapped in a promise that determines if the widget should be disabled for users with stakeholder license
|
|
103
|
+
*/
|
|
104
|
+
disableWidgetForStakeholders?: (widgetSettings: WidgetSettings) => Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* Run widget in lightboxed mode
|
|
107
|
+
* @param {WidgetSettings} settings of the widget as available when the widget render is called by the host.
|
|
108
|
+
* @param {LightboxSize} size of the lightbox
|
|
109
|
+
* @returns object wrapped in a promise that encapsulates the success of this operation.
|
|
110
|
+
* when this calls are completed and the experience is done loading.
|
|
111
|
+
*/
|
|
112
|
+
lightbox?: (widgetSettings: WidgetSettings, lightboxSize: Size) => Promise<WidgetStatus>;
|
|
113
|
+
/**
|
|
114
|
+
* Listen to message from host
|
|
115
|
+
* @param {string} type of event
|
|
116
|
+
* @param {eventArgs} arguments associated with the event.
|
|
117
|
+
*/
|
|
118
|
+
listen?: <T>(event: string, eventArgs: EventArgs<T>) => void;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Configurable widgets implement this interface
|
|
123
|
+
*/
|
|
124
|
+
export interface IConfigurableWidget extends IWidget {
|
|
125
|
+
/**
|
|
126
|
+
* When the configuration view is changed, the widget is expected to update its view.
|
|
127
|
+
* @param {WidgetSettings} the latest widget settings as available from the configuration view for the widget.
|
|
128
|
+
* @returns object wrapped in a promise that encapsulates the success of this operation.
|
|
129
|
+
*/
|
|
130
|
+
reload: (newWidgetSettings: WidgetSettings) => Promise<WidgetStatus>;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Widget authors implement this interface for their configuration.
|
|
135
|
+
*/
|
|
136
|
+
export interface IWidgetConfiguration {
|
|
137
|
+
/**
|
|
138
|
+
* Called by the host to setup the widget configuration, which uses the settings shared with the widget to complete its rendering experience.
|
|
139
|
+
* @param {WidgetSettings} settings of the widget as shared with the configuration.
|
|
140
|
+
* @param {IWidgetConfigurationContext} widgetConfigurationContext provided by the host of the widget configuration to allow for communication.
|
|
141
|
+
* @returns object wrapped in a promise that encapsulates the success of this operation.
|
|
142
|
+
* If load fails, returns error message via WidgetStatusHelper.Failure(errorMessage).
|
|
143
|
+
*/
|
|
144
|
+
load: (widgetSettings: WidgetSettings, widgetConfigurationContext: IWidgetConfigurationContext) => Promise<WidgetStatus>;
|
|
145
|
+
/**
|
|
146
|
+
* Called by the host when the user clicks on the Save button.
|
|
147
|
+
* Widget author is expected to run validations if needed.
|
|
148
|
+
* If ready to save, then use WidgetHelpers.WidgetConfigurationSave.Valid() to return the serialized custom settings of the widget from the configuraton.
|
|
149
|
+
* If custom settings are not valid and so not ready to save, then use WidgetHelpers.WidgetConfigurationSave.Invalid() to notify the host to stop save.
|
|
150
|
+
* @returns object of type SaveStatus wrapped in a promise.
|
|
151
|
+
*/
|
|
152
|
+
onSave: () => Promise<SaveStatus>;
|
|
153
|
+
/**
|
|
154
|
+
* (Optional) Called by the host when the configuration is ready to be saved (when the user clicks the save button on the configuration panel)
|
|
155
|
+
*/
|
|
156
|
+
onSaveComplete?: () => void;
|
|
157
|
+
/**
|
|
158
|
+
* Listen to message from host
|
|
159
|
+
* @param {string} type of event
|
|
160
|
+
* @param {eventArgs} arguments associated with the event.
|
|
161
|
+
*/
|
|
162
|
+
listen?: <T>(event: string, eventArgs: EventArgs<T>) => void;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The result of a notification being made by a widget configuration.
|
|
167
|
+
*/
|
|
168
|
+
export interface NotifyResult {
|
|
169
|
+
/**
|
|
170
|
+
* Gets a response from the subscriber of the notification, if they provide one as part of the schema for the event.
|
|
171
|
+
* @returns A promise with the data representing the return payload serialized as a string.
|
|
172
|
+
*/
|
|
173
|
+
getResponse(): Promise<string>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Arguments associated with an event being passed by a widget or configurations.
|
|
178
|
+
*/
|
|
179
|
+
export interface EventArgs<T> {
|
|
180
|
+
/**
|
|
181
|
+
* Data relevant to the event.
|
|
182
|
+
*/
|
|
183
|
+
data: T;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Interface for the object passed to the widget configuration to communicate with its host.
|
|
188
|
+
*/
|
|
189
|
+
export interface IWidgetConfigurationContext {
|
|
190
|
+
/**
|
|
191
|
+
* The widget configuration calls this method when it wants to notify any of the WidgetEvents to the host
|
|
192
|
+
* @param {string} type of event
|
|
193
|
+
* @param {eventArgs} arguments associated with the event which comes from the widget configuration.
|
|
194
|
+
* @returns a promise with the result of the notification. If arguments are malformed, the promise will be rejected. If multiple notifications are made for the same event
|
|
195
|
+
* only the promise for the latest notification is resolved and the rest are treated as stale. The subscriber of the notification can send back information in a serialized form.
|
|
196
|
+
*/
|
|
197
|
+
notify: <T>(event: string, eventArgs: EventArgs<T>) => Promise<NotifyResult>;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Interface for the object passed to the host when user clicks on the Save button in the configuration pane
|
|
202
|
+
*/
|
|
203
|
+
export interface SaveStatus {
|
|
204
|
+
/**
|
|
205
|
+
* The custom settings to save
|
|
206
|
+
*/
|
|
207
|
+
customSettings?: CustomSettings;
|
|
208
|
+
/**
|
|
209
|
+
* Indicates validity of the customSettings. If false, then user will be shown a generic error message and settings will not be saved.
|
|
210
|
+
*/
|
|
211
|
+
isValid: boolean;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Size of lightbox to draw widget in
|
|
216
|
+
*/
|
|
217
|
+
export interface Size {
|
|
218
|
+
/**
|
|
219
|
+
* width in pixels
|
|
220
|
+
*/
|
|
221
|
+
width: number;
|
|
222
|
+
/**
|
|
223
|
+
* height in pixels
|
|
224
|
+
*/
|
|
225
|
+
height: number;
|
|
226
|
+
}
|