azure-devops-extension-api 4.248.0 → 4.250.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/{bin/Alert → Alert}/Alert.d.ts +12 -2
- package/{bin/Alert → Alert}/Alert.js +11 -0
- package/Alert/Alert.min.js +1 -0
- package/{bin/Alert → Alert}/AlertClient.d.ts +2 -1
- package/{bin/Alert → Alert}/AlertClient.js +3 -1
- package/Alert/AlertClient.min.js +1 -0
- package/{bin/Gallery → Gallery}/GalleryClient.d.ts +7 -5
- package/{bin/Gallery → Gallery}/GalleryClient.js +20 -19
- package/Gallery/GalleryClient.min.js +1 -0
- package/{bin/Management → Management}/Management.d.ts +4 -0
- package/{bin/Release → Release}/ReleaseClient.d.ts +4 -2
- package/{bin/Release → Release}/ReleaseClient.js +8 -4
- package/Release/ReleaseClient.min.js +1 -0
- package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.d.ts +4 -0
- package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.d.ts +3 -2
- package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpointClient.js +5 -3
- package/ServiceEndpoint/ServiceEndpointClient.min.js +1 -0
- package/{bin/TestResults → TestResults}/TestResultsClient.d.ts +8 -0
- package/{bin/TestResults → TestResults}/TestResultsClient.js +28 -9
- package/{bin/TestResults → TestResults}/TestResultsClient.min.js +1 -1
- package/package.json +1 -1
- package/SECURITY.md +0 -41
- package/bin/Alert/Alert.min.js +0 -1
- package/bin/Alert/AlertClient.min.js +0 -1
- package/bin/Gallery/GalleryClient.min.js +0 -1
- package/bin/LICENSE +0 -21
- package/bin/README.md +0 -2
- package/bin/Release/ReleaseClient.min.js +0 -1
- package/bin/ServiceEndpoint/ServiceEndpointClient.min.js +0 -1
- package/bin/package.json +0 -37
- package/buildpackage.js +0 -80
- package/src/Accounts/Accounts.ts +0 -134
- package/src/Accounts/AccountsClient.ts +0 -83
- package/src/Accounts/index.ts +0 -2
- package/src/AdvancedSecurity.Reporting/Reporting.ts +0 -180
- package/src/AdvancedSecurity.Reporting/ReportingClient.ts +0 -47
- package/src/Alert/Alert.ts +0 -1037
- package/src/Alert/AlertClient.ts +0 -330
- package/src/Boards/Boards.ts +0 -684
- package/src/Boards/BoardsClient.ts +0 -593
- package/src/Boards/index.ts +0 -2
- package/src/Build/Build.ts +0 -3416
- package/src/Build/BuildClient.ts +0 -2740
- package/src/Build/BuildServices.ts +0 -39
- package/src/Build/index.ts +0 -3
- package/src/Comments/Comments.ts +0 -330
- package/src/Comments/index.ts +0 -1
- package/src/Common/Client.ts +0 -37
- package/src/Common/CommonServices.ts +0 -853
- package/src/Common/Context.d.ts +0 -46
- package/src/Common/Fetch.ts +0 -239
- package/src/Common/RestClientBase.ts +0 -186
- package/src/Common/System.ts +0 -36
- package/src/Common/SystemData.ts +0 -135
- package/src/Common/Util/Serialization.ts +0 -59
- package/src/Common/Util/Url.ts +0 -773
- package/src/Common/index.ts +0 -3
- package/src/Contributions/Contributions.ts +0 -708
- package/src/Contributions/ContributionsClient.ts +0 -109
- package/src/Contributions/index.ts +0 -2
- package/src/Core/Core.ts +0 -579
- package/src/Core/CoreClient.ts +0 -765
- package/src/Core/index.ts +0 -2
- package/src/Dashboard/Dashboard.ts +0 -419
- package/src/Dashboard/DashboardClient.ts +0 -370
- package/src/Dashboard/WidgetConfigHelpers.ts +0 -43
- package/src/Dashboard/WidgetContracts.ts +0 -226
- package/src/Dashboard/WidgetHelpers.ts +0 -145
- package/src/Dashboard/index.ts +0 -5
- package/src/DistributedTaskCommon/DistributedTaskCommon.ts +0 -108
- package/src/DistributedTaskCommon/index.ts +0 -1
- package/src/ExtensionManagement/ExtensionManagement.ts +0 -1205
- package/src/ExtensionManagement/ExtensionManagementClient.ts +0 -646
- package/src/ExtensionManagement/index.ts +0 -2
- package/src/Favorite/Favorite.ts +0 -136
- package/src/Favorite/FavoriteClient.ts +0 -301
- package/src/FeatureAvailability/FeatureAvailability.ts +0 -20
- package/src/FeatureAvailability/FeatureAvailabilityClient.ts +0 -153
- package/src/FeatureAvailability/index.ts +0 -2
- package/src/FeatureManagement/FeatureManagement.ts +0 -166
- package/src/FeatureManagement/FeatureManagementClient.ts +0 -246
- package/src/FeatureManagement/index.ts +0 -2
- package/src/FileContainer/FileContainer.ts +0 -205
- package/src/FileContainer/FileContainerClient.ts +0 -154
- package/src/FileContainer/index.ts +0 -2
- package/src/FormInput/FormInput.ts +0 -288
- package/src/FormInput/index.ts +0 -1
- package/src/Gallery/Gallery.ts +0 -1977
- package/src/Gallery/GalleryClient.ts +0 -2251
- package/src/Gallery/index.ts +0 -2
- package/src/Git/CodeEditorTypes.ts +0 -335
- package/src/Git/Git.ts +0 -4062
- package/src/Git/GitClient.ts +0 -4750
- package/src/Git/GitServices.ts +0 -18
- package/src/Git/index.ts +0 -4
- package/src/Graph/Graph.ts +0 -572
- package/src/Graph/GraphClient.ts +0 -846
- package/src/Graph/index.ts +0 -2
- package/src/Identities/Identities.ts +0 -261
- package/src/Identities/IdentityProvider.ts +0 -90
- package/src/Identities/IdentityService.ts +0 -89
- package/src/Identities/index.ts +0 -3
- package/src/Locations/Locations.ts +0 -165
- package/src/Locations/LocationsClient.ts +0 -220
- package/src/Locations/index.ts +0 -2
- package/src/Management/Management.ts +0 -176
- package/src/Management/ManagementClient.ts +0 -348
- package/src/Notification/Notification.ts +0 -1460
- package/src/Notification/NotificationClient.ts +0 -477
- package/src/Notification/index.ts +0 -2
- package/src/Operations/Operations.ts +0 -86
- package/src/Operations/OperationsClient.ts +0 -42
- package/src/Operations/index.ts +0 -2
- package/src/Pipelines/Pipelines.ts +0 -354
- package/src/Pipelines/PipelinesClient.ts +0 -306
- package/src/Policy/Policy.ts +0 -173
- package/src/Policy/PolicyClient.ts +0 -315
- package/src/Policy/index.ts +0 -2
- package/src/Profile/Profile.ts +0 -187
- package/src/Profile/ProfileClient.ts +0 -328
- package/src/Profile/index.ts +0 -2
- package/src/ProjectAnalysis/ProjectAnalysis.ts +0 -74
- package/src/ProjectAnalysis/ProjectAnalysisClient.ts +0 -124
- package/src/ProjectAnalysis/index.ts +0 -2
- package/src/Release/Release.ts +0 -4237
- package/src/Release/ReleaseClient.ts +0 -2450
- package/src/Release/index.ts +0 -2
- package/src/ResourceUsage/ResourceUsage.ts +0 -19
- package/src/ResourceUsage/ResourceUsageClient.ts +0 -48
- package/src/ServiceEndpoint/ServiceEndpoint.ts +0 -930
- package/src/ServiceEndpoint/ServiceEndpointClient.ts +0 -617
- package/src/ServiceEndpoint/index.ts +0 -2
- package/src/ServiceHooks/ServiceHooks.ts +0 -759
- package/src/ServiceHooks/ServiceHooksClient.ts +0 -499
- package/src/ServiceHooks/index.ts +0 -2
- package/src/TaskAgent/TaskAgent.ts +0 -3896
- package/src/TaskAgent/TaskAgentClient.ts +0 -3918
- package/src/TaskAgent/index.ts +0 -2
- package/src/Test/Test.ts +0 -5853
- package/src/Test/TestClient.ts +0 -2201
- package/src/Test/index.ts +0 -2
- package/src/TestPlan/TestPlan.ts +0 -1384
- package/src/TestPlan/TestPlanClient.ts +0 -1367
- package/src/TestPlan/index.ts +0 -2
- package/src/TestResults/TestResults.ts +0 -11
- package/src/TestResults/TestResultsClient.ts +0 -3506
- package/src/TestResults/index.ts +0 -2
- package/src/Tfvc/Tfvc.ts +0 -770
- package/src/Tfvc/TfvcClient.ts +0 -757
- package/src/Tfvc/index.ts +0 -2
- package/src/WebApi/WebApi.ts +0 -452
- package/src/WebApi/index.ts +0 -1
- package/src/Wiki/Wiki.ts +0 -352
- package/src/Wiki/WikiClient.ts +0 -712
- package/src/Wiki/index.ts +0 -2
- package/src/Work/Work.ts +0 -1367
- package/src/Work/WorkClient.ts +0 -1489
- package/src/Work/index.ts +0 -2
- package/src/WorkItemTracking/WorkItemTracking.ts +0 -2215
- package/src/WorkItemTracking/WorkItemTrackingClient.ts +0 -2032
- package/src/WorkItemTracking/WorkItemTrackingServices.ts +0 -329
- package/src/WorkItemTracking/index.ts +0 -3
- package/src/WorkItemTrackingProcess/WorkItemTrackingProcess.ts +0 -1295
- package/src/WorkItemTrackingProcess/WorkItemTrackingProcessClient.ts +0 -1455
- package/src/WorkItemTrackingProcess/index.ts +0 -2
- package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitions.ts +0 -606
- package/src/WorkItemTrackingProcessDefinitions/WorkItemTrackingProcessDefinitionsClient.ts +0 -1175
- package/src/WorkItemTrackingProcessDefinitions/index.ts +0 -2
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -21
- /package/{bin/Accounts → Accounts}/Accounts.d.ts +0 -0
- /package/{bin/Accounts → Accounts}/Accounts.js +0 -0
- /package/{bin/Accounts → Accounts}/Accounts.min.js +0 -0
- /package/{bin/Accounts → Accounts}/AccountsClient.d.ts +0 -0
- /package/{bin/Accounts → Accounts}/AccountsClient.js +0 -0
- /package/{bin/Accounts → Accounts}/AccountsClient.min.js +0 -0
- /package/{bin/Accounts → Accounts}/index.d.ts +0 -0
- /package/{bin/Accounts → Accounts}/index.js +0 -0
- /package/{bin/Accounts → Accounts}/index.min.js +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.d.ts +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.js +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/Reporting.min.js +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.d.ts +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.js +0 -0
- /package/{bin/AdvancedSecurity.Reporting → AdvancedSecurity.Reporting}/ReportingClient.min.js +0 -0
- /package/{bin/Boards → Boards}/Boards.d.ts +0 -0
- /package/{bin/Boards → Boards}/Boards.js +0 -0
- /package/{bin/Boards → Boards}/Boards.min.js +0 -0
- /package/{bin/Boards → Boards}/BoardsClient.d.ts +0 -0
- /package/{bin/Boards → Boards}/BoardsClient.js +0 -0
- /package/{bin/Boards → Boards}/BoardsClient.min.js +0 -0
- /package/{bin/Boards → Boards}/index.d.ts +0 -0
- /package/{bin/Boards → Boards}/index.js +0 -0
- /package/{bin/Boards → Boards}/index.min.js +0 -0
- /package/{bin/Build → Build}/Build.d.ts +0 -0
- /package/{bin/Build → Build}/Build.js +0 -0
- /package/{bin/Build → Build}/Build.min.js +0 -0
- /package/{bin/Build → Build}/BuildClient.d.ts +0 -0
- /package/{bin/Build → Build}/BuildClient.js +0 -0
- /package/{bin/Build → Build}/BuildClient.min.js +0 -0
- /package/{bin/Build → Build}/BuildServices.d.ts +0 -0
- /package/{bin/Build → Build}/BuildServices.js +0 -0
- /package/{bin/Build → Build}/BuildServices.min.js +0 -0
- /package/{bin/Build → Build}/index.d.ts +0 -0
- /package/{bin/Build → Build}/index.js +0 -0
- /package/{bin/Build → Build}/index.min.js +0 -0
- /package/{bin/Comments → Comments}/Comments.d.ts +0 -0
- /package/{bin/Comments → Comments}/Comments.js +0 -0
- /package/{bin/Comments → Comments}/Comments.min.js +0 -0
- /package/{bin/Comments → Comments}/index.d.ts +0 -0
- /package/{bin/Comments → Comments}/index.js +0 -0
- /package/{bin/Comments → Comments}/index.min.js +0 -0
- /package/{bin/Common → Common}/Client.d.ts +0 -0
- /package/{bin/Common → Common}/Client.js +0 -0
- /package/{bin/Common → Common}/Client.min.js +0 -0
- /package/{bin/Common → Common}/CommonServices.d.ts +0 -0
- /package/{bin/Common → Common}/CommonServices.js +0 -0
- /package/{bin/Common → Common}/CommonServices.min.js +0 -0
- /package/{bin/Common → Common}/Context.d.ts +0 -0
- /package/{bin/Common → Common}/Fetch.d.ts +0 -0
- /package/{bin/Common → Common}/Fetch.js +0 -0
- /package/{bin/Common → Common}/Fetch.min.js +0 -0
- /package/{bin/Common → Common}/RestClientBase.d.ts +0 -0
- /package/{bin/Common → Common}/RestClientBase.js +0 -0
- /package/{bin/Common → Common}/RestClientBase.min.js +0 -0
- /package/{bin/Common → Common}/System.d.ts +0 -0
- /package/{bin/Common → Common}/System.js +0 -0
- /package/{bin/Common → Common}/System.min.js +0 -0
- /package/{bin/Common → Common}/SystemData.d.ts +0 -0
- /package/{bin/Common → Common}/SystemData.js +0 -0
- /package/{bin/Common → Common}/SystemData.min.js +0 -0
- /package/{bin/Common → Common}/Util/Serialization.d.ts +0 -0
- /package/{bin/Common → Common}/Util/Serialization.js +0 -0
- /package/{bin/Common → Common}/Util/Serialization.min.js +0 -0
- /package/{bin/Common → Common}/Util/Url.d.ts +0 -0
- /package/{bin/Common → Common}/Util/Url.js +0 -0
- /package/{bin/Common → Common}/Util/Url.min.js +0 -0
- /package/{bin/Common → Common}/index.d.ts +0 -0
- /package/{bin/Common → Common}/index.js +0 -0
- /package/{bin/Common → Common}/index.min.js +0 -0
- /package/{bin/Contributions → Contributions}/Contributions.d.ts +0 -0
- /package/{bin/Contributions → Contributions}/Contributions.js +0 -0
- /package/{bin/Contributions → Contributions}/Contributions.min.js +0 -0
- /package/{bin/Contributions → Contributions}/ContributionsClient.d.ts +0 -0
- /package/{bin/Contributions → Contributions}/ContributionsClient.js +0 -0
- /package/{bin/Contributions → Contributions}/ContributionsClient.min.js +0 -0
- /package/{bin/Contributions → Contributions}/index.d.ts +0 -0
- /package/{bin/Contributions → Contributions}/index.js +0 -0
- /package/{bin/Contributions → Contributions}/index.min.js +0 -0
- /package/{bin/Core → Core}/Core.d.ts +0 -0
- /package/{bin/Core → Core}/Core.js +0 -0
- /package/{bin/Core → Core}/Core.min.js +0 -0
- /package/{bin/Core → Core}/CoreClient.d.ts +0 -0
- /package/{bin/Core → Core}/CoreClient.js +0 -0
- /package/{bin/Core → Core}/CoreClient.min.js +0 -0
- /package/{bin/Core → Core}/index.d.ts +0 -0
- /package/{bin/Core → Core}/index.js +0 -0
- /package/{bin/Core → Core}/index.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/Dashboard.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/Dashboard.js +0 -0
- /package/{bin/Dashboard → Dashboard}/Dashboard.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/DashboardClient.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/DashboardClient.js +0 -0
- /package/{bin/Dashboard → Dashboard}/DashboardClient.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetConfigHelpers.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetContracts.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetContracts.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetContracts.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetHelpers.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetHelpers.js +0 -0
- /package/{bin/Dashboard → Dashboard}/WidgetHelpers.min.js +0 -0
- /package/{bin/Dashboard → Dashboard}/index.d.ts +0 -0
- /package/{bin/Dashboard → Dashboard}/index.js +0 -0
- /package/{bin/Dashboard → Dashboard}/index.min.js +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.d.ts +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.js +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/DistributedTaskCommon.min.js +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.d.ts +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.js +0 -0
- /package/{bin/DistributedTaskCommon → DistributedTaskCommon}/index.min.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.d.ts +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagement.min.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.d.ts +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/ExtensionManagementClient.min.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/index.d.ts +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/index.js +0 -0
- /package/{bin/ExtensionManagement → ExtensionManagement}/index.min.js +0 -0
- /package/{bin/Favorite → Favorite}/Favorite.d.ts +0 -0
- /package/{bin/Favorite → Favorite}/Favorite.js +0 -0
- /package/{bin/Favorite → Favorite}/Favorite.min.js +0 -0
- /package/{bin/Favorite → Favorite}/FavoriteClient.d.ts +0 -0
- /package/{bin/Favorite → Favorite}/FavoriteClient.js +0 -0
- /package/{bin/Favorite → Favorite}/FavoriteClient.min.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.d.ts +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailability.min.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.d.ts +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/FeatureAvailabilityClient.min.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/index.d.ts +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/index.js +0 -0
- /package/{bin/FeatureAvailability → FeatureAvailability}/index.min.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.d.ts +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagement.min.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.d.ts +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/FeatureManagementClient.min.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/index.d.ts +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/index.js +0 -0
- /package/{bin/FeatureManagement → FeatureManagement}/index.min.js +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainer.d.ts +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainer.js +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainer.min.js +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainerClient.d.ts +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainerClient.js +0 -0
- /package/{bin/FileContainer → FileContainer}/FileContainerClient.min.js +0 -0
- /package/{bin/FileContainer → FileContainer}/index.d.ts +0 -0
- /package/{bin/FileContainer → FileContainer}/index.js +0 -0
- /package/{bin/FileContainer → FileContainer}/index.min.js +0 -0
- /package/{bin/FormInput → FormInput}/FormInput.d.ts +0 -0
- /package/{bin/FormInput → FormInput}/FormInput.js +0 -0
- /package/{bin/FormInput → FormInput}/FormInput.min.js +0 -0
- /package/{bin/FormInput → FormInput}/index.d.ts +0 -0
- /package/{bin/FormInput → FormInput}/index.js +0 -0
- /package/{bin/FormInput → FormInput}/index.min.js +0 -0
- /package/{bin/Gallery → Gallery}/Gallery.d.ts +0 -0
- /package/{bin/Gallery → Gallery}/Gallery.js +0 -0
- /package/{bin/Gallery → Gallery}/Gallery.min.js +0 -0
- /package/{bin/Gallery → Gallery}/index.d.ts +0 -0
- /package/{bin/Gallery → Gallery}/index.js +0 -0
- /package/{bin/Gallery → Gallery}/index.min.js +0 -0
- /package/{bin/Git → Git}/CodeEditorTypes.d.ts +0 -0
- /package/{bin/Git → Git}/CodeEditorTypes.js +0 -0
- /package/{bin/Git → Git}/CodeEditorTypes.min.js +0 -0
- /package/{bin/Git → Git}/Git.d.ts +0 -0
- /package/{bin/Git → Git}/Git.js +0 -0
- /package/{bin/Git → Git}/Git.min.js +0 -0
- /package/{bin/Git → Git}/GitClient.d.ts +0 -0
- /package/{bin/Git → Git}/GitClient.js +0 -0
- /package/{bin/Git → Git}/GitClient.min.js +0 -0
- /package/{bin/Git → Git}/GitServices.d.ts +0 -0
- /package/{bin/Git → Git}/GitServices.js +0 -0
- /package/{bin/Git → Git}/GitServices.min.js +0 -0
- /package/{bin/Git → Git}/index.d.ts +0 -0
- /package/{bin/Git → Git}/index.js +0 -0
- /package/{bin/Git → Git}/index.min.js +0 -0
- /package/{bin/Graph → Graph}/Graph.d.ts +0 -0
- /package/{bin/Graph → Graph}/Graph.js +0 -0
- /package/{bin/Graph → Graph}/Graph.min.js +0 -0
- /package/{bin/Graph → Graph}/GraphClient.d.ts +0 -0
- /package/{bin/Graph → Graph}/GraphClient.js +0 -0
- /package/{bin/Graph → Graph}/GraphClient.min.js +0 -0
- /package/{bin/Graph → Graph}/index.d.ts +0 -0
- /package/{bin/Graph → Graph}/index.js +0 -0
- /package/{bin/Graph → Graph}/index.min.js +0 -0
- /package/{bin/Identities → Identities}/Identities.d.ts +0 -0
- /package/{bin/Identities → Identities}/Identities.js +0 -0
- /package/{bin/Identities → Identities}/Identities.min.js +0 -0
- /package/{bin/Identities → Identities}/IdentityProvider.d.ts +0 -0
- /package/{bin/Identities → Identities}/IdentityProvider.js +0 -0
- /package/{bin/Identities → Identities}/IdentityProvider.min.js +0 -0
- /package/{bin/Identities → Identities}/IdentityService.d.ts +0 -0
- /package/{bin/Identities → Identities}/IdentityService.js +0 -0
- /package/{bin/Identities → Identities}/IdentityService.min.js +0 -0
- /package/{bin/Identities → Identities}/index.d.ts +0 -0
- /package/{bin/Identities → Identities}/index.js +0 -0
- /package/{bin/Identities → Identities}/index.min.js +0 -0
- /package/{bin/Locations → Locations}/Locations.d.ts +0 -0
- /package/{bin/Locations → Locations}/Locations.js +0 -0
- /package/{bin/Locations → Locations}/Locations.min.js +0 -0
- /package/{bin/Locations → Locations}/LocationsClient.d.ts +0 -0
- /package/{bin/Locations → Locations}/LocationsClient.js +0 -0
- /package/{bin/Locations → Locations}/LocationsClient.min.js +0 -0
- /package/{bin/Locations → Locations}/index.d.ts +0 -0
- /package/{bin/Locations → Locations}/index.js +0 -0
- /package/{bin/Locations → Locations}/index.min.js +0 -0
- /package/{bin/Management → Management}/Management.js +0 -0
- /package/{bin/Management → Management}/Management.min.js +0 -0
- /package/{bin/Management → Management}/ManagementClient.d.ts +0 -0
- /package/{bin/Management → Management}/ManagementClient.js +0 -0
- /package/{bin/Management → Management}/ManagementClient.min.js +0 -0
- /package/{bin/Notification → Notification}/Notification.d.ts +0 -0
- /package/{bin/Notification → Notification}/Notification.js +0 -0
- /package/{bin/Notification → Notification}/Notification.min.js +0 -0
- /package/{bin/Notification → Notification}/NotificationClient.d.ts +0 -0
- /package/{bin/Notification → Notification}/NotificationClient.js +0 -0
- /package/{bin/Notification → Notification}/NotificationClient.min.js +0 -0
- /package/{bin/Notification → Notification}/index.d.ts +0 -0
- /package/{bin/Notification → Notification}/index.js +0 -0
- /package/{bin/Notification → Notification}/index.min.js +0 -0
- /package/{bin/Operations → Operations}/Operations.d.ts +0 -0
- /package/{bin/Operations → Operations}/Operations.js +0 -0
- /package/{bin/Operations → Operations}/Operations.min.js +0 -0
- /package/{bin/Operations → Operations}/OperationsClient.d.ts +0 -0
- /package/{bin/Operations → Operations}/OperationsClient.js +0 -0
- /package/{bin/Operations → Operations}/OperationsClient.min.js +0 -0
- /package/{bin/Operations → Operations}/index.d.ts +0 -0
- /package/{bin/Operations → Operations}/index.js +0 -0
- /package/{bin/Operations → Operations}/index.min.js +0 -0
- /package/{bin/Pipelines → Pipelines}/Pipelines.d.ts +0 -0
- /package/{bin/Pipelines → Pipelines}/Pipelines.js +0 -0
- /package/{bin/Pipelines → Pipelines}/Pipelines.min.js +0 -0
- /package/{bin/Pipelines → Pipelines}/PipelinesClient.d.ts +0 -0
- /package/{bin/Pipelines → Pipelines}/PipelinesClient.js +0 -0
- /package/{bin/Pipelines → Pipelines}/PipelinesClient.min.js +0 -0
- /package/{bin/Policy → Policy}/Policy.d.ts +0 -0
- /package/{bin/Policy → Policy}/Policy.js +0 -0
- /package/{bin/Policy → Policy}/Policy.min.js +0 -0
- /package/{bin/Policy → Policy}/PolicyClient.d.ts +0 -0
- /package/{bin/Policy → Policy}/PolicyClient.js +0 -0
- /package/{bin/Policy → Policy}/PolicyClient.min.js +0 -0
- /package/{bin/Policy → Policy}/index.d.ts +0 -0
- /package/{bin/Policy → Policy}/index.js +0 -0
- /package/{bin/Policy → Policy}/index.min.js +0 -0
- /package/{bin/Profile → Profile}/Profile.d.ts +0 -0
- /package/{bin/Profile → Profile}/Profile.js +0 -0
- /package/{bin/Profile → Profile}/Profile.min.js +0 -0
- /package/{bin/Profile → Profile}/ProfileClient.d.ts +0 -0
- /package/{bin/Profile → Profile}/ProfileClient.js +0 -0
- /package/{bin/Profile → Profile}/ProfileClient.min.js +0 -0
- /package/{bin/Profile → Profile}/index.d.ts +0 -0
- /package/{bin/Profile → Profile}/index.js +0 -0
- /package/{bin/Profile → Profile}/index.min.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.d.ts +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysis.min.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.d.ts +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/ProjectAnalysisClient.min.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.d.ts +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.js +0 -0
- /package/{bin/ProjectAnalysis → ProjectAnalysis}/index.min.js +0 -0
- /package/{bin/Release → Release}/Release.d.ts +0 -0
- /package/{bin/Release → Release}/Release.js +0 -0
- /package/{bin/Release → Release}/Release.min.js +0 -0
- /package/{bin/Release → Release}/index.d.ts +0 -0
- /package/{bin/Release → Release}/index.js +0 -0
- /package/{bin/Release → Release}/index.min.js +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.d.ts +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.js +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsage.min.js +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.d.ts +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.js +0 -0
- /package/{bin/ResourceUsage → ResourceUsage}/ResourceUsageClient.min.js +0 -0
- /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.js +0 -0
- /package/{bin/ServiceEndpoint → ServiceEndpoint}/ServiceEndpoint.min.js +0 -0
- /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.d.ts +0 -0
- /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.js +0 -0
- /package/{bin/ServiceEndpoint → ServiceEndpoint}/index.min.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.d.ts +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooks.min.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.d.ts +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/ServiceHooksClient.min.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/index.d.ts +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/index.js +0 -0
- /package/{bin/ServiceHooks → ServiceHooks}/index.min.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgent.d.ts +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgent.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgent.min.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.d.ts +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/TaskAgentClient.min.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/index.d.ts +0 -0
- /package/{bin/TaskAgent → TaskAgent}/index.js +0 -0
- /package/{bin/TaskAgent → TaskAgent}/index.min.js +0 -0
- /package/{bin/Test → Test}/Test.d.ts +0 -0
- /package/{bin/Test → Test}/Test.js +0 -0
- /package/{bin/Test → Test}/Test.min.js +0 -0
- /package/{bin/Test → Test}/TestClient.d.ts +0 -0
- /package/{bin/Test → Test}/TestClient.js +0 -0
- /package/{bin/Test → Test}/TestClient.min.js +0 -0
- /package/{bin/Test → Test}/index.d.ts +0 -0
- /package/{bin/Test → Test}/index.js +0 -0
- /package/{bin/Test → Test}/index.min.js +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlan.d.ts +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlan.js +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlan.min.js +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlanClient.d.ts +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlanClient.js +0 -0
- /package/{bin/TestPlan → TestPlan}/TestPlanClient.min.js +0 -0
- /package/{bin/TestPlan → TestPlan}/index.d.ts +0 -0
- /package/{bin/TestPlan → TestPlan}/index.js +0 -0
- /package/{bin/TestPlan → TestPlan}/index.min.js +0 -0
- /package/{bin/TestResults → TestResults}/TestResults.d.ts +0 -0
- /package/{bin/TestResults → TestResults}/TestResults.js +0 -0
- /package/{bin/TestResults → TestResults}/TestResults.min.js +0 -0
- /package/{bin/TestResults → TestResults}/index.d.ts +0 -0
- /package/{bin/TestResults → TestResults}/index.js +0 -0
- /package/{bin/TestResults → TestResults}/index.min.js +0 -0
- /package/{bin/Tfvc → Tfvc}/Tfvc.d.ts +0 -0
- /package/{bin/Tfvc → Tfvc}/Tfvc.js +0 -0
- /package/{bin/Tfvc → Tfvc}/Tfvc.min.js +0 -0
- /package/{bin/Tfvc → Tfvc}/TfvcClient.d.ts +0 -0
- /package/{bin/Tfvc → Tfvc}/TfvcClient.js +0 -0
- /package/{bin/Tfvc → Tfvc}/TfvcClient.min.js +0 -0
- /package/{bin/Tfvc → Tfvc}/index.d.ts +0 -0
- /package/{bin/Tfvc → Tfvc}/index.js +0 -0
- /package/{bin/Tfvc → Tfvc}/index.min.js +0 -0
- /package/{bin/WebApi → WebApi}/WebApi.d.ts +0 -0
- /package/{bin/WebApi → WebApi}/WebApi.js +0 -0
- /package/{bin/WebApi → WebApi}/WebApi.min.js +0 -0
- /package/{bin/WebApi → WebApi}/index.d.ts +0 -0
- /package/{bin/WebApi → WebApi}/index.js +0 -0
- /package/{bin/WebApi → WebApi}/index.min.js +0 -0
- /package/{bin/Wiki → Wiki}/Wiki.d.ts +0 -0
- /package/{bin/Wiki → Wiki}/Wiki.js +0 -0
- /package/{bin/Wiki → Wiki}/Wiki.min.js +0 -0
- /package/{bin/Wiki → Wiki}/WikiClient.d.ts +0 -0
- /package/{bin/Wiki → Wiki}/WikiClient.js +0 -0
- /package/{bin/Wiki → Wiki}/WikiClient.min.js +0 -0
- /package/{bin/Wiki → Wiki}/index.d.ts +0 -0
- /package/{bin/Wiki → Wiki}/index.js +0 -0
- /package/{bin/Wiki → Wiki}/index.min.js +0 -0
- /package/{bin/Work → Work}/Work.d.ts +0 -0
- /package/{bin/Work → Work}/Work.js +0 -0
- /package/{bin/Work → Work}/Work.min.js +0 -0
- /package/{bin/Work → Work}/WorkClient.d.ts +0 -0
- /package/{bin/Work → Work}/WorkClient.js +0 -0
- /package/{bin/Work → Work}/WorkClient.min.js +0 -0
- /package/{bin/Work → Work}/index.d.ts +0 -0
- /package/{bin/Work → Work}/index.js +0 -0
- /package/{bin/Work → Work}/index.min.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.d.ts +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTracking.min.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.d.ts +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingClient.min.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.d.ts +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/WorkItemTrackingServices.min.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/index.d.ts +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/index.js +0 -0
- /package/{bin/WorkItemTracking → WorkItemTracking}/index.min.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcess.min.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/WorkItemTrackingProcessClient.min.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.js +0 -0
- /package/{bin/WorkItemTrackingProcess → WorkItemTrackingProcess}/index.min.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitions.min.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/WorkItemTrackingProcessDefinitionsClient.min.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.d.ts +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.js +0 -0
- /package/{bin/WorkItemTrackingProcessDefinitions → WorkItemTrackingProcessDefinitions}/index.min.js +0 -0
- /package/{bin/index.d.ts → index.d.ts} +0 -0
- /package/{bin/index.js → index.js} +0 -0
- /package/{bin/index.min.js → index.min.js} +0 -0
package/src/Common/Context.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Interface for a class that can retrieve authorization tokens to be used in fetch requests.
|
|
9
|
-
*/
|
|
10
|
-
export interface IAuthorizationTokenProvider {
|
|
11
|
-
/**
|
|
12
|
-
* Gets the authorization header to use in a fetch request
|
|
13
|
-
*
|
|
14
|
-
* @param forceRefresh - If true, indicates that we should get a new token, if applicable for current provider.
|
|
15
|
-
* @returns the value to use for the Authorization header in a request.
|
|
16
|
-
*/
|
|
17
|
-
getAuthorizationHeader(forceRefresh?: boolean): Promise<string>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Options for a specific instance of a REST client.
|
|
22
|
-
*/
|
|
23
|
-
export interface IVssRestClientOptions {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Auth token manager that can be used to get and attach auth tokens to requests.
|
|
27
|
-
* If not supplied, the default token provider is used if the serviceInstanceType option is supplied
|
|
28
|
-
* and is different from the hosting page's service instance type.
|
|
29
|
-
*/
|
|
30
|
-
authTokenProvider?: IAuthorizationTokenProvider;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The root URL path to use for this client. Can be relative or absolute.
|
|
34
|
-
*/
|
|
35
|
-
rootPath?: string | Promise<string>;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Current session id.
|
|
39
|
-
*/
|
|
40
|
-
sessionId?: string;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Current command for activity logging.
|
|
44
|
-
*/
|
|
45
|
-
command?: string;
|
|
46
|
-
}
|
package/src/Common/Fetch.ts
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Fetch polyfill for IE11
|
|
8
|
-
import "whatwg-fetch";
|
|
9
|
-
|
|
10
|
-
import { IAuthorizationTokenProvider } from "./Context";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* VSS-specific options for VSS requests
|
|
14
|
-
*/
|
|
15
|
-
export interface IVssRequestOptions {
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
* Auth token manager that can be used to get and attach auth tokens to requests
|
|
19
|
-
*/
|
|
20
|
-
authTokenProvider?: IAuthorizationTokenProvider;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Current session id.
|
|
24
|
-
*/
|
|
25
|
-
sessionId?: string;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Current command for activity logging.
|
|
29
|
-
*/
|
|
30
|
-
command?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* An IPreRequestEvent is sent before a fetch request is made.
|
|
35
|
-
*/
|
|
36
|
-
export interface IPreRequestEvent {
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* A unique id that can be used to track this particular request (id is unique among all clients)
|
|
40
|
-
*/
|
|
41
|
-
requestId: number;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Url of the request that is about to be issued
|
|
45
|
-
*/
|
|
46
|
-
requestUrl: string;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Request settings being used
|
|
50
|
-
*/
|
|
51
|
-
options?: RequestInit;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Additional VSS-specific options supplied in the request
|
|
55
|
-
*/
|
|
56
|
-
vssRequestOptions?: IVssRequestOptions;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* An IPostRequestEvent is sent after a fetch request has completed.
|
|
61
|
-
*/
|
|
62
|
-
export interface IPostRequestEvent {
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* A unique id that can be used to track this particular request (id is unique among all clients)
|
|
66
|
-
*/
|
|
67
|
-
requestId: number;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Url of the request that is about to be issued
|
|
71
|
-
*/
|
|
72
|
-
requestUrl: string;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* The Response returned for this request, if the request fails it will be undefined
|
|
76
|
-
*/
|
|
77
|
-
response?: Response;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Additional VSS-specific options supplied in the request
|
|
81
|
-
*/
|
|
82
|
-
vssRequestOptions?: IVssRequestOptions;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* When a fetch request fails, it will throw a VssServerError. Failure is defined
|
|
87
|
-
* as a request that made it to the server, and the server successfully responded
|
|
88
|
-
* with a failure. This will be any status return that is not a status code in
|
|
89
|
-
* the success range (200-299).
|
|
90
|
-
*/
|
|
91
|
-
export interface VssServerError extends Error {
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The status code returned from the server.
|
|
95
|
-
*/
|
|
96
|
-
status: number;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The raw text that was returned from the server. If any is available.
|
|
100
|
-
*/
|
|
101
|
-
responseText: string;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* If the response text was sent and it was in the form of a JSON response
|
|
105
|
-
* the object will be parsed and deserialized object is available here.
|
|
106
|
-
*
|
|
107
|
-
* This commonly has the exception details about the failure from the server.
|
|
108
|
-
* Things like the message, exception type, and stack trace will be available.
|
|
109
|
-
*/
|
|
110
|
-
serverError?: any;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Issue a fetch request. This is a wrapper around the browser fetch method that handles VSS authentication
|
|
115
|
-
* and triggers events that can be listened to by other modules.
|
|
116
|
-
*
|
|
117
|
-
* @param requestUrl Url to send the request to
|
|
118
|
-
* @param options fetch settings/options for the request
|
|
119
|
-
* @param vssRequestOptions VSS specific request options
|
|
120
|
-
*
|
|
121
|
-
* Triggered Events:
|
|
122
|
-
* afterRequest -> IPostRequestEvent is sent after the request has completed.
|
|
123
|
-
* beforeRequest -> IPreRequestEvent is sent before the request is made.
|
|
124
|
-
*/
|
|
125
|
-
export async function issueRequest(requestUrl: string, options?: RequestInit, vssRequestOptions?: IVssRequestOptions): Promise<Response> {
|
|
126
|
-
let response: Response | undefined = undefined;
|
|
127
|
-
|
|
128
|
-
// Add a X-VSS-ReauthenticationAction header to all fetch requests
|
|
129
|
-
if (!options) {
|
|
130
|
-
options = {};
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
let headers: Headers;
|
|
134
|
-
|
|
135
|
-
// If options.headers is set, check if it is a Headers object, and if not, convert it to one.
|
|
136
|
-
if (options.headers) {
|
|
137
|
-
if (options.headers instanceof Headers) {
|
|
138
|
-
headers = options.headers;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
headers = new Headers();
|
|
142
|
-
if (typeof options.headers.hasOwnProperty === "function") {
|
|
143
|
-
for (const key in options.headers) {
|
|
144
|
-
if (options.headers.hasOwnProperty(key)) {
|
|
145
|
-
headers.append(key, (options.headers as { [key: string]: string })[key]);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
headers = new Headers();
|
|
153
|
-
}
|
|
154
|
-
options.headers = headers;
|
|
155
|
-
|
|
156
|
-
headers.append("X-VSS-ReauthenticationAction", "Suppress");
|
|
157
|
-
|
|
158
|
-
// Add a X-TFS-Session header with the current sessionId and command for correlation
|
|
159
|
-
if (vssRequestOptions) {
|
|
160
|
-
const sessionId = vssRequestOptions.sessionId;
|
|
161
|
-
const command = vssRequestOptions.command;
|
|
162
|
-
|
|
163
|
-
if (sessionId) {
|
|
164
|
-
if (command) {
|
|
165
|
-
headers.append("X-TFS-Session", sessionId + "," + command);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
headers.append("X-TFS-Session", sessionId);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Send credentials to the same origin, we will use tokens for differing origins.
|
|
174
|
-
options.credentials = "same-origin";
|
|
175
|
-
|
|
176
|
-
let refreshToken = false;
|
|
177
|
-
|
|
178
|
-
do {
|
|
179
|
-
|
|
180
|
-
// Ensure we have an authorization token available from the auth manager.
|
|
181
|
-
if (vssRequestOptions && vssRequestOptions.authTokenProvider) {
|
|
182
|
-
const authHeader = await vssRequestOptions.authTokenProvider.getAuthorizationHeader(refreshToken);
|
|
183
|
-
if (authHeader) {
|
|
184
|
-
headers.append("Authorization", authHeader);
|
|
185
|
-
refreshToken = true;
|
|
186
|
-
}
|
|
187
|
-
headers.append("X-TFS-FedAuthRedirect", "Suppress");
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Execute the http request defined by the caller.
|
|
191
|
-
try {
|
|
192
|
-
response = await fetch(requestUrl, options);
|
|
193
|
-
}
|
|
194
|
-
catch (ex) {
|
|
195
|
-
console.warn(`Unhandled exception in fetch for ${requestUrl}: ${ex && ex.toString()}`);
|
|
196
|
-
const error = new Error("TF400893: Unable to contact the server. Please check your network connection and try again.");
|
|
197
|
-
error.name = "NetworkException";
|
|
198
|
-
throw error;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// If we recieved a 401 and have a token manager, we will refresh our token and try again.
|
|
202
|
-
if (response.status === 401 && !refreshToken && vssRequestOptions && vssRequestOptions.authTokenProvider) {
|
|
203
|
-
refreshToken = true;
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
} while (false);
|
|
208
|
-
|
|
209
|
-
// Parse error details from requests that returned non 200-299 status codes.
|
|
210
|
-
if (!response.ok) {
|
|
211
|
-
|
|
212
|
-
// Create a VssServerError and throw it as the result of the fetch request.
|
|
213
|
-
const error = new Error() as VssServerError;
|
|
214
|
-
error.name = "TFS.WebApi.Exception";
|
|
215
|
-
error.status = response.status;
|
|
216
|
-
error.responseText = await response.text();
|
|
217
|
-
|
|
218
|
-
// Attempt to parse the response as a json object, for many of the failures
|
|
219
|
-
// the server will serialize details into the body.
|
|
220
|
-
if (error.responseText && error.responseText !== "") {
|
|
221
|
-
try {
|
|
222
|
-
error.serverError = JSON.parse(error.responseText);
|
|
223
|
-
if (error.serverError && error.serverError.message) {
|
|
224
|
-
error.message = error.serverError.message;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
catch (exception) {
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (!error.message) {
|
|
232
|
-
error.message = response.status + ": " + response.statusText;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
throw error;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
return response;
|
|
239
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { IVssRestClientOptions } from "./Context";
|
|
8
|
-
import { issueRequest, IVssRequestOptions } from "./Fetch";
|
|
9
|
-
import { deserializeVssJsonObject } from "./Util/Serialization";
|
|
10
|
-
import { replaceRouteValues, Uri } from "./Util/Url";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Parameters for sending a WebApi request
|
|
14
|
-
*/
|
|
15
|
-
export interface RestClientRequestParams {
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Route template that is used to form the request path. If routeTemplate is NOT specified, then locationId
|
|
19
|
-
* is used to lookup the template via an OPTIONS request.
|
|
20
|
-
*/
|
|
21
|
-
routeTemplate: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The api version string to send in the request (e.g. "1.0" or "2.0-preview.2")
|
|
25
|
-
*/
|
|
26
|
-
apiVersion: string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Dictionary of route template replacement values
|
|
30
|
-
*/
|
|
31
|
-
routeValues?: { [key: string]: any; };
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Data to post. In this case of a GET, this indicates query parameters.
|
|
35
|
-
* For other requests, this is the request body object (which will be serialized
|
|
36
|
-
* into a JSON string unless isRawData is set to true).
|
|
37
|
-
*/
|
|
38
|
-
body?: any;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Query parameters to add to the url. In the case of a GET, query parameters can
|
|
42
|
-
* be supplied via 'data' or 'queryParams'. For other verbs such as POST, the
|
|
43
|
-
* data object specifies the POST body, so queryParams is needed to indicate
|
|
44
|
-
* parameters to add to the query string of the url (not included in the post body).
|
|
45
|
-
*/
|
|
46
|
-
queryParams?: { [key: string]: any; };
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* HTTP verb (GET by default if not specified)
|
|
50
|
-
*/
|
|
51
|
-
method?: string;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The http response (Accept) type. This is "json" (corresponds to application/json Accept header)
|
|
55
|
-
* unless otherwise specified. Other possible values are "html", "text", "zip", or "binary" or their accept
|
|
56
|
-
* header equivalents (e.g. application/zip).
|
|
57
|
-
*/
|
|
58
|
-
httpResponseType?: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Allows the caller to specify custom request headers.
|
|
62
|
-
*/
|
|
63
|
-
customHeaders?: { [headerName: string]: any; };
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* If true, indicates that the raw Response should be returned in the request's resulting promise
|
|
67
|
-
* rather than deserializing the response (the default).
|
|
68
|
-
*/
|
|
69
|
-
returnRawResponse?: boolean;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* If true, this indicates that no processing should be done on the 'data' object
|
|
73
|
-
* before it is sent in the request. *This is rarely needed*. One case is when posting
|
|
74
|
-
* an HTML5 File object.
|
|
75
|
-
*/
|
|
76
|
-
isRawData?: boolean;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Current command for activity logging. This will override the RestClient's base option.
|
|
80
|
-
*/
|
|
81
|
-
command?: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Base class that should be used (derived from) to make requests to VSS REST apis
|
|
86
|
-
*/
|
|
87
|
-
export class RestClientBase {
|
|
88
|
-
|
|
89
|
-
private _options: IVssRestClientOptions;
|
|
90
|
-
private _rootPath: Promise<string>;
|
|
91
|
-
|
|
92
|
-
constructor(options: IVssRestClientOptions) {
|
|
93
|
-
|
|
94
|
-
this._options = options || {};
|
|
95
|
-
|
|
96
|
-
if (typeof this._options.rootPath === "string") {
|
|
97
|
-
this._rootPath = Promise.resolve(this._options.rootPath);
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
this._rootPath = this._options.rootPath || Promise.resolve("/");
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Gets the root path of the Service
|
|
106
|
-
*
|
|
107
|
-
* @returns Promise for the resolving the root path of the service.
|
|
108
|
-
*/
|
|
109
|
-
protected async getRootPath(): Promise<string> {
|
|
110
|
-
return this._rootPath;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Issue a request to a VSS REST endpoint.
|
|
115
|
-
*
|
|
116
|
-
* @param requestParams request options
|
|
117
|
-
* @returns Promise for the response
|
|
118
|
-
*/
|
|
119
|
-
protected async beginRequest<T>(requestParams: RestClientRequestParams): Promise<T> {
|
|
120
|
-
return this._rootPath.then((rootPath: string) => {
|
|
121
|
-
|
|
122
|
-
let requestUrl = rootPath + replaceRouteValues(requestParams.routeTemplate, requestParams.routeValues || {});
|
|
123
|
-
if (requestParams.queryParams) {
|
|
124
|
-
const uri = new Uri(requestUrl);
|
|
125
|
-
uri.addQueryParams(requestParams.queryParams);
|
|
126
|
-
requestUrl = uri.absoluteUri;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
return this._issueRequest<T>(requestUrl, requestParams.apiVersion, requestParams);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Issue a request to a VSS REST endpoint at the specified location
|
|
135
|
-
*
|
|
136
|
-
* @param requestUrl Resolved URL of the request
|
|
137
|
-
* @param apiVersion API version
|
|
138
|
-
* @param requestParams Optional request parameters
|
|
139
|
-
*/
|
|
140
|
-
protected _issueRequest<T>(requestUrl: string, apiVersion: string, requestParams: RestClientRequestParams): Promise<T> {
|
|
141
|
-
|
|
142
|
-
let fetchOptions: RequestInit = {};
|
|
143
|
-
|
|
144
|
-
fetchOptions.method = requestParams.method || "GET";
|
|
145
|
-
fetchOptions.mode = "cors";
|
|
146
|
-
|
|
147
|
-
if (!requestParams.isRawData && requestParams.body && fetchOptions.method.toUpperCase() !== 'GET') {
|
|
148
|
-
fetchOptions.body = JSON.stringify(requestParams.body);
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
fetchOptions.body = requestParams.body;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
let acceptType = requestParams.httpResponseType || "application/json";
|
|
155
|
-
let acceptHeaderValue = `${acceptType};api-version=${apiVersion};excludeUrls=true;enumsAsNumbers=true;msDateFormat=true;noArrayWrap=true`;
|
|
156
|
-
|
|
157
|
-
fetchOptions.headers = Object.assign({
|
|
158
|
-
"Accept": acceptHeaderValue,
|
|
159
|
-
"Content-Type": requestParams.body && "application/json"
|
|
160
|
-
}, requestParams.customHeaders) as any /* lib.dom.d.ts does not have the correct type for Headers */;
|
|
161
|
-
|
|
162
|
-
let vssRequestOptions = {
|
|
163
|
-
authTokenProvider: this._options.authTokenProvider,
|
|
164
|
-
sessionId: this._options.sessionId,
|
|
165
|
-
command: requestParams.command || this._options.command
|
|
166
|
-
} as IVssRequestOptions;
|
|
167
|
-
|
|
168
|
-
let result = issueRequest(requestUrl, fetchOptions, vssRequestOptions);
|
|
169
|
-
return result.then((response: Response) => {
|
|
170
|
-
|
|
171
|
-
if (requestParams.returnRawResponse) {
|
|
172
|
-
return response;
|
|
173
|
-
}
|
|
174
|
-
else if (acceptType.toLowerCase().indexOf("json") >= 0) {
|
|
175
|
-
// MSJSON date formats must be replaced in the raw text before JSON parsing
|
|
176
|
-
return response.text().then(deserializeVssJsonObject);
|
|
177
|
-
}
|
|
178
|
-
else if (acceptType.toLowerCase() === "text/plain") {
|
|
179
|
-
return <any>response.text();
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
return response.arrayBuffer();
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
}
|
package/src/Common/System.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const enum DayOfWeek {
|
|
8
|
-
/**
|
|
9
|
-
* Indicates Sunday.
|
|
10
|
-
*/
|
|
11
|
-
Sunday = 0,
|
|
12
|
-
/**
|
|
13
|
-
* Indicates Monday.
|
|
14
|
-
*/
|
|
15
|
-
Monday = 1,
|
|
16
|
-
/**
|
|
17
|
-
* Indicates Tuesday.
|
|
18
|
-
*/
|
|
19
|
-
Tuesday = 2,
|
|
20
|
-
/**
|
|
21
|
-
* Indicates Wednesday.
|
|
22
|
-
*/
|
|
23
|
-
Wednesday = 3,
|
|
24
|
-
/**
|
|
25
|
-
* Indicates Thursday.
|
|
26
|
-
*/
|
|
27
|
-
Thursday = 4,
|
|
28
|
-
/**
|
|
29
|
-
* Indicates Friday.
|
|
30
|
-
*/
|
|
31
|
-
Friday = 5,
|
|
32
|
-
/**
|
|
33
|
-
* Indicates Saturday.
|
|
34
|
-
*/
|
|
35
|
-
Saturday = 6,
|
|
36
|
-
}
|
package/src/Common/SystemData.ts
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Specifies SQL Server-specific data type of a field, property, for use in a System.Data.SqlClient.SqlParameter.
|
|
9
|
-
*/
|
|
10
|
-
export const enum SqlDbType {
|
|
11
|
-
/**
|
|
12
|
-
* A 64-bit signed integer.
|
|
13
|
-
*/
|
|
14
|
-
BigInt = 0,
|
|
15
|
-
/**
|
|
16
|
-
* Array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes.
|
|
17
|
-
*/
|
|
18
|
-
Binary = 1,
|
|
19
|
-
/**
|
|
20
|
-
* Boolean. An unsigned numeric value that can be 0, 1, or null.
|
|
21
|
-
*/
|
|
22
|
-
Bit = 2,
|
|
23
|
-
/**
|
|
24
|
-
* String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters.
|
|
25
|
-
*/
|
|
26
|
-
Char = 3,
|
|
27
|
-
/**
|
|
28
|
-
* DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds.
|
|
29
|
-
*/
|
|
30
|
-
DateTime = 4,
|
|
31
|
-
/**
|
|
32
|
-
* Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1.
|
|
33
|
-
*/
|
|
34
|
-
Decimal = 5,
|
|
35
|
-
/**
|
|
36
|
-
* Double. A floating point number within the range of -1.79E +308 through 1.79E +308.
|
|
37
|
-
*/
|
|
38
|
-
Float = 6,
|
|
39
|
-
/**
|
|
40
|
-
* Array of type Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes.
|
|
41
|
-
*/
|
|
42
|
-
Image = 7,
|
|
43
|
-
/**
|
|
44
|
-
* Int32. A 32-bit signed integer.
|
|
45
|
-
*/
|
|
46
|
-
Int = 8,
|
|
47
|
-
/**
|
|
48
|
-
* Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit.
|
|
49
|
-
*/
|
|
50
|
-
Money = 9,
|
|
51
|
-
/**
|
|
52
|
-
* String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters.
|
|
53
|
-
*/
|
|
54
|
-
NChar = 10,
|
|
55
|
-
/**
|
|
56
|
-
* String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters.
|
|
57
|
-
*/
|
|
58
|
-
NText = 11,
|
|
59
|
-
/**
|
|
60
|
-
* String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max).
|
|
61
|
-
*/
|
|
62
|
-
NVarChar = 12,
|
|
63
|
-
/**
|
|
64
|
-
* Single. A floating point number within the range of -3.40E +38 through 3.40E +38.
|
|
65
|
-
*/
|
|
66
|
-
Real = 13,
|
|
67
|
-
/**
|
|
68
|
-
* Guid. A globally unique identifier (or GUID).
|
|
69
|
-
*/
|
|
70
|
-
UniqueIdentifier = 14,
|
|
71
|
-
/**
|
|
72
|
-
* DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute.
|
|
73
|
-
*/
|
|
74
|
-
SmallDateTime = 15,
|
|
75
|
-
/**
|
|
76
|
-
* Int16. A 16-bit signed integer.
|
|
77
|
-
*/
|
|
78
|
-
SmallInt = 16,
|
|
79
|
-
/**
|
|
80
|
-
* Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit.
|
|
81
|
-
*/
|
|
82
|
-
SmallMoney = 17,
|
|
83
|
-
/**
|
|
84
|
-
* String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters.
|
|
85
|
-
*/
|
|
86
|
-
Text = 18,
|
|
87
|
-
/**
|
|
88
|
-
* Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes.
|
|
89
|
-
*/
|
|
90
|
-
Timestamp = 19,
|
|
91
|
-
/**
|
|
92
|
-
* Byte. An 8-bit unsigned integer.
|
|
93
|
-
*/
|
|
94
|
-
TinyInt = 20,
|
|
95
|
-
/**
|
|
96
|
-
* Array of type Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes.
|
|
97
|
-
*/
|
|
98
|
-
VarBinary = 21,
|
|
99
|
-
/**
|
|
100
|
-
* String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max).
|
|
101
|
-
*/
|
|
102
|
-
VarChar = 22,
|
|
103
|
-
/**
|
|
104
|
-
* Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared.
|
|
105
|
-
*/
|
|
106
|
-
Variant = 23,
|
|
107
|
-
/**
|
|
108
|
-
* An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method.
|
|
109
|
-
*/
|
|
110
|
-
Xml = 25,
|
|
111
|
-
/**
|
|
112
|
-
* A SQL Server user-defined type (UDT).
|
|
113
|
-
*/
|
|
114
|
-
Udt = 29,
|
|
115
|
-
/**
|
|
116
|
-
* A special data type for specifying structured data contained in table-valued parameters.
|
|
117
|
-
*/
|
|
118
|
-
Structured = 30,
|
|
119
|
-
/**
|
|
120
|
-
* Date data ranging in value from January 1,1 AD through December 31, 9999 AD.
|
|
121
|
-
*/
|
|
122
|
-
Date = 31,
|
|
123
|
-
/**
|
|
124
|
-
* Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value.
|
|
125
|
-
*/
|
|
126
|
-
Time = 32,
|
|
127
|
-
/**
|
|
128
|
-
* Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds.
|
|
129
|
-
*/
|
|
130
|
-
DateTime2 = 33,
|
|
131
|
-
/**
|
|
132
|
-
* Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00.
|
|
133
|
-
*/
|
|
134
|
-
DateTimeOffset = 34
|
|
135
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* ---------------------------------------------------------
|
|
3
|
-
* Copyright(C) Microsoft Corporation. All rights reserved.
|
|
4
|
-
* ---------------------------------------------------------
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const msAjaxDateRegEx = new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"', 'g');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Handle the raw text of a JSON response which may contain MSJSON style dates and
|
|
11
|
-
* deserialize (JSON.parse) the data in a way that restores Date objects rather than
|
|
12
|
-
* strings.
|
|
13
|
-
*
|
|
14
|
-
* MSJSON style dates are in the form:
|
|
15
|
-
*
|
|
16
|
-
* "lastModified": "\/Date(1496158224000)\/"
|
|
17
|
-
*
|
|
18
|
-
* This format unnecessarily (but intentionally) escapes the "/" character. So the parsed
|
|
19
|
-
* JSON will have no trace of the escape character (\).
|
|
20
|
-
*
|
|
21
|
-
* @param text The raw JSON text
|
|
22
|
-
*/
|
|
23
|
-
export function deserializeVssJsonObject<T>(text: string): T | null {
|
|
24
|
-
|
|
25
|
-
function replaceMsJsonDates(object: any, parentObject: any, parentObjectKey: string) {
|
|
26
|
-
|
|
27
|
-
if (parentObject && typeof object.__msjson_date__ === "number") {
|
|
28
|
-
parentObject[parentObjectKey] = new Date(object.__msjson_date__);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
for (let key in object) {
|
|
33
|
-
const value = object[key];
|
|
34
|
-
if (value !== null && typeof value === "object") {
|
|
35
|
-
replaceMsJsonDates(object[key], object, key);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let deserializedData: T | null = null;
|
|
41
|
-
|
|
42
|
-
if (text) {
|
|
43
|
-
|
|
44
|
-
// Replace MSJSON dates with an object that we can easily identify after JSON.parse.
|
|
45
|
-
// This replaces the string value (like "\/Date(1496158224000)\/") with a JSON object that
|
|
46
|
-
// has an "__msjson_date__" key.
|
|
47
|
-
const replacedText = text.replace(msAjaxDateRegEx, "$1{\"__msjson_date__\":$2 }");
|
|
48
|
-
|
|
49
|
-
// Do the actual JSON deserialization
|
|
50
|
-
deserializedData = JSON.parse(replacedText);
|
|
51
|
-
|
|
52
|
-
// Go through the parsed object and create actual Date objects for our replacements made above
|
|
53
|
-
if (replacedText !== text) {
|
|
54
|
-
replaceMsJsonDates(deserializedData, null, "");
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return deserializedData;
|
|
59
|
-
}
|