Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/devices-hardware-dev-center-manager
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2021.929.1
Choose a base ref
...
head repository: microsoft/devices-hardware-dev-center-manager
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Mar 14, 2022

  1. add HttpRequestException catch logic

    Ben Carpenter committed Mar 14, 2022
    Copy the full SHA
    98bbaf7 View commit details
  2. Merge pull request #18 from microsoft/hotfix/bc-add-HttpRequestExcept…

    …ion-catch
    
    Add HttpRequestException catch logic
    Ben Carpenter authored Mar 14, 2022
    Copy the full SHA
    90a492c View commit details

Commits on Feb 3, 2023

  1. Copy the full SHA
    727af79 View commit details
  2. Merge pull request #21 from microsoft/feature/bc-update-packages

    Update dependency packages
    Ben-Carpenter authored Feb 3, 2023
    Copy the full SHA
    92fe7fc View commit details

Commits on Feb 7, 2023

  1. Update azure-pipelines.yaml

    # Why
    ESRP task failing without `2.1.x` sdk
    
    # What Changed
    1. Added task to use `2.1.x` sdk
    1. Replaced `ConnectedServiceName` with variable
    Ben-Carpenter authored Feb 7, 2023
    Copy the full SHA
    5acf70d View commit details

Commits on Feb 8, 2023

  1. Create dotnet-pr-build-validation.yml

    Adding action workflow to validate builds.
    Ben-Carpenter authored Feb 8, 2023
    Copy the full SHA
    6f8ea83 View commit details
  2. Merge pull request #22 from microsoft/hotfix/bc-update-azure-pipeline…

    …-yaml
    
    Update azure-pipelines.yaml
    Ben-Carpenter authored Feb 8, 2023
    Copy the full SHA
    5940cc6 View commit details
  3. Update dotnet-pr-build-validation.yml

    add working-directory path
    Ben-Carpenter authored Feb 8, 2023
    Copy the full SHA
    4e6326b View commit details
  4. Update dotnet-pr-build-validation.yml

    updated name of workflow
    Ben-Carpenter authored Feb 8, 2023
    Copy the full SHA
    09e4c4f View commit details
  5. Merge pull request #23 from microsoft/feature/bc-add-build-validation…

    …-action
    
    Create dotnet-pr-build-validation.yml
    Ben-Carpenter authored Feb 8, 2023
    Copy the full SHA
    bd2b0bf View commit details

Commits on Feb 10, 2023

  1. Copy the full SHA
    bd54a3e View commit details

Commits on Feb 11, 2023

  1. Merge pull request #24 from microsoft/hotfix/bc-update-package-versio…

    …n-number-for-release
    
    Update package version number for release
    Ben-Carpenter authored Feb 11, 2023
    Copy the full SHA
    1f4ce09 View commit details

Commits on Feb 19, 2023

  1. Copy the full SHA
    804f4c4 View commit details
  2. Copy the full SHA
    c57d523 View commit details
  3. update readme

    Ben-Carpenter committed Feb 19, 2023
    Copy the full SHA
    ac4c8e5 View commit details

Commits on Feb 21, 2023

  1. Merge pull request #25 from microsoft/hotfix/bc-update-shippinglabel-…

    …dump-targeting
    
    Update shipping label dump - targeting
    Ben-Carpenter authored Feb 21, 2023
    Copy the full SHA
    b3607b9 View commit details

Commits on Feb 25, 2024

  1. update abstractions

    Ben-Carpenter committed Feb 25, 2024
    Copy the full SHA
    ca17fb4 View commit details
  2. update enums

    Ben-Carpenter committed Feb 25, 2024
    Copy the full SHA
    20c1911 View commit details
  3. update models

    Ben-Carpenter committed Feb 25, 2024
    Copy the full SHA
    c5f9e39 View commit details

Commits on Feb 26, 2024

  1. Copy the full SHA
    8743199 View commit details
  2. update DevCenterHandler

    Ben-Carpenter committed Feb 26, 2024
    Copy the full SHA
    84f1cf6 View commit details
  3. update DevCenterOptions

    Ben-Carpenter committed Feb 26, 2024
    Copy the full SHA
    cc3b457 View commit details
  4. Copy the full SHA
    29125f4 View commit details
  5. Copy the full SHA
    4faa55a View commit details

Commits on Feb 29, 2024

  1. general code cleanup

    Ben-Carpenter committed Feb 29, 2024
    Copy the full SHA
    6881534 View commit details

Commits on Mar 1, 2024

  1. Merge pull request #26 from microsoft/dev/bc-update-packages-and-lang…

    …uage
    
    Update packages, language version, and BlobStorageHandler
    Ben-Carpenter authored Mar 1, 2024
    Copy the full SHA
    3197ae7 View commit details

Commits on Jun 11, 2024

  1. Bump Azure.Identity in /src/Microsoft.Devices.HardwareDevCenterManager

    Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from 1.10.4 to 1.11.4.
    - [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
    - [Commits](Azure/azure-sdk-for-net@Azure.Identity_1.10.4...Azure.Identity_1.11.4)
    
    ---
    updated-dependencies:
    - dependency-name: Azure.Identity
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jun 11, 2024
    Copy the full SHA
    c41529b View commit details

Commits on Jun 12, 2024

  1. Merge pull request #28 from microsoft/dependabot/nuget/src/Microsoft.…

    …Devices.HardwareDevCenterManager/Azure.Identity-1.11.4
    
    Bump Azure.Identity from 1.10.4 to 1.11.4 in /src/Microsoft.Devices.HardwareDevCenterManager
    Ben-Carpenter authored Jun 12, 2024
    Copy the full SHA
    97b21d2 View commit details

Commits on Jul 9, 2024

  1. Bump System.Text.Json in /src/Microsoft.Devices.HardwareDevCenterManager

    Bumps System.Text.Json from 8.0.2 to 8.0.4.
    
    ---
    updated-dependencies:
    - dependency-name: System.Text.Json
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 9, 2024
    Copy the full SHA
    00b422b View commit details
  2. Merge pull request #29 from microsoft/dependabot/nuget/src/Microsoft.…

    …Devices.HardwareDevCenterManager/System.Text.Json-8.0.4
    
    Bump System.Text.Json from 8.0.2 to 8.0.4 in /src/Microsoft.Devices.HardwareDevCenterManager
    Ben-Carpenter authored Jul 9, 2024
    Copy the full SHA
    6a73f1d View commit details

Commits on Jul 17, 2024

  1. Copy the full SHA
    0eb1e67 View commit details

Commits on Jul 18, 2024

  1. Merge pull request #30 from microsoft/feature/bc-add-managed-identity…

    …-option
    
    Add managed identity option for authorization handler
    Ben-Carpenter authored Jul 18, 2024
    Copy the full SHA
    93fa3d3 View commit details
  2. Copy the full SHA
    b29bdf3 View commit details
  3. Merge pull request #31 from microsoft/hotfix/bc-fix-logging-messages

    update BlobStorageHandler logging errors
    Ben-Carpenter authored Jul 18, 2024
    Copy the full SHA
    bc19b6e View commit details
  4. Copy the full SHA
    0d349c1 View commit details

Commits on Aug 2, 2024

  1. Update blob storage handler (#32)

    * update blob storage handler
    
    * add credential options
    
    * add and update packages
    
    * fix comment placements
    Ben-Carpenter authored Aug 2, 2024
    Copy the full SHA
    a16f24b View commit details

Commits on Oct 1, 2024

  1. Copy the full SHA
    747e051 View commit details
Showing with 1,832 additions and 1,529 deletions.
  1. +33 −0 .github/workflows/dotnet-pr-build-validation.yml
  2. +50 −1 README.md
  3. +46 −21 azure-pipelines.yml
  4. +5 −6 src/Microsoft.Devices.HardwareDevCenterManager/Abstractions/IArtifact.cs
  5. +20 −20 src/Microsoft.Devices.HardwareDevCenterManager/Abstractions/IDevCenterHandler.cs
  6. +472 −474 src/Microsoft.Devices.HardwareDevCenterManager/DevCenterHandler.cs
  7. +11 −11 src/Microsoft.Devices.HardwareDevCenterManager/DevCenterOptions.cs
  8. +17 −17 src/Microsoft.Devices.HardwareDevCenterManager/Enums/Enums.cs
  9. +10 −8 src/Microsoft.Devices.HardwareDevCenterManager/Microsoft.Devices.HardwareDevCenterManager.csproj
  10. +12 −12 src/Microsoft.Devices.HardwareDevCenterManager/Models/AdditionalAttributes.cs
  11. +22 −22 src/Microsoft.Devices.HardwareDevCenterManager/Models/AdditionalInfoForMsApproval.cs
  12. +26 −26 src/Microsoft.Devices.HardwareDevCenterManager/Models/Audience.cs
  13. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/CHID.cs
  14. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/CoEngDriverPublishInfo.cs
  15. +25 −25 src/Microsoft.Devices.HardwareDevCenterManager/Models/DevCenterErrorDetails.cs
  16. +16 −16 src/Microsoft.Devices.HardwareDevCenterManager/Models/DevCenterErrorReturn.cs
  17. +8 −8 src/Microsoft.Devices.HardwareDevCenterManager/Models/DevCenterResponse.cs
  18. +20 −15 src/Microsoft.Devices.HardwareDevCenterManager/Models/DevCenterTrace.cs
  19. +35 −35 src/Microsoft.Devices.HardwareDevCenterManager/Models/Download.cs
  20. +29 −29 src/Microsoft.Devices.HardwareDevCenterManager/Models/DriverMetadata.cs
  21. +27 −27 src/Microsoft.Devices.HardwareDevCenterManager/Models/HardwareId.cs
  22. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/InServicePublishInfo.cs
  23. +17 −18 src/Microsoft.Devices.HardwareDevCenterManager/Models/Link.cs
  24. +16 −16 src/Microsoft.Devices.HardwareDevCenterManager/Models/NewShippingLabel.cs
  25. +150 −147 src/Microsoft.Devices.HardwareDevCenterManager/Models/Product.cs
  26. +22 −22 src/Microsoft.Devices.HardwareDevCenterManager/Models/PublishingSpecifications.cs
  27. +16 −16 src/Microsoft.Devices.HardwareDevCenterManager/Models/RaidController.cs
  28. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/RecipientSpecifications.cs
  29. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/Response.cs
  30. +126 −98 src/Microsoft.Devices.HardwareDevCenterManager/Models/ShippingLabel.cs
  31. +20 −20 src/Microsoft.Devices.HardwareDevCenterManager/Models/StorageController.cs
  32. +102 −102 src/Microsoft.Devices.HardwareDevCenterManager/Models/Submission.cs
  33. +10 −10 src/Microsoft.Devices.HardwareDevCenterManager/Models/Svvp.cs
  34. +16 −16 src/Microsoft.Devices.HardwareDevCenterManager/Models/Targeting.cs
  35. +33 −32 src/Microsoft.Devices.HardwareDevCenterManager/Models/WorkflowStatus.cs
  36. +214 −135 src/Microsoft.Devices.HardwareDevCenterManager/Utility/AuthorizationHandler.cs
  37. +40 −16 src/Microsoft.Devices.HardwareDevCenterManager/Utility/AuthorizationHandlerCredentials.cs
  38. +86 −58 src/Microsoft.Devices.HardwareDevCenterManager/Utility/BlobStorageHandler.cs
  39. +30 −0 src/Microsoft.Devices.HardwareDevCenterManager/Utility/JsonLongToStringConverter.cs
33 changes: 33 additions & 0 deletions .github/workflows/dotnet-pr-build-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET Build Validation

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore
working-directory: './src/Microsoft.Devices.HardwareDevCenterManager/'

- name: Build
run: dotnet build --no-restore
working-directory: './src/Microsoft.Devices.HardwareDevCenterManager/'

- name: Test
run: dotnet test --no-build --verbosity normal
working-directory: './src/Microsoft.Devices.HardwareDevCenterManager/'
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# __Microsoft.Devices.HardwareDevCenterManager__

# Contributing
![Nuget](https://img.shields.io/nuget/v/Microsoft.Devices.HardwareDevCenterManager)
![Nuget](https://img.shields.io/nuget/dt/Microsoft.Devices.HardwareDevCenterManager)
[![Build Validation](https://github.com/microsoft/devices-hardware-dev-center-manager/actions/workflows/dotnet-pr-build-validation.yml/badge.svg)](https://github.com/microsoft/devices-hardware-dev-center-manager/actions/workflows/dotnet-pr-build-validation.yml)

Class library used in invoking HTTP requests to the [Hardware Dev Center dashboard API](https://learn.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api)

---

## __Features__
### Manage Products
```csharp
DevCenterResponse<Product> response = await api.NewProduct(json);
DevCenterResponse<Product> response = await api.GetProducts(ProductId);
```
---

### Manage Submissions
```csharp
DevCenterResponse<Submission> response = await api.NewSubmission(ProductId, json);
DevCenterResponse<bool> response = await api.CommitSubmission(ProductId, SubmissionId);
DevCenterResponse<Submission> response = await api.GetSubmission(ProductId, SubmissionId);
```

---

### Manage Shipping Labels
```csharp
DevCenterResponse<ShippingLabel> response = await api.NewShippingLabel(ProductId, SubmissionId, json);
DevCenterResponse<ShippingLabel> response = await api.GetShippingLabels(ProductId, SubmissionId, ShippingLabelId);
```

---

### Download Packages
```csharp
DevCenterResponse<Submission> response = await api.GetSubmission(ProductId, SubmissionId);
// use download links from submission resource
```

---

### Create Metadata
```csharp
DevCenterResponse<bool> response = await api.CreateMetaData(ProductId, SubmissionId);
```

---

## __Contributing__

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
67 changes: 46 additions & 21 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -13,38 +13,57 @@ steps:
projects: '**/*.csproj'
arguments: '-c $(BuildConfiguration)'

- task: EsrpCodeSigning@1
- task: UseDotNet@2
inputs:
ConnectedServiceName: 'DSX ESRP'
packageType: 'sdk'
version: '6.x'

- task: EsrpCodeSigning@5
inputs:
ConnectedServiceName: '$(ConnectedServiceName)'
AppRegistrationClientId: '$(EsrpAppRegistrationClientId)'
AppRegistrationTenantId: '$(EsrpAppRegistrationTenantId)'
AuthAKVName: '$(EsrpKeyVault)'
AuthCertName: '$(EsrpCertName)'
AuthSignCertName: '$(EsrpSignCertName)'
FolderPath: 'src'
Pattern: '*.dll'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-230856",
"OperationCode" : "SigntoolSign",
"Parameters" : {
"OpusName" : "Microsoft",
"OpusInfo" : "http://www.microsoft.com",
"FileDigest" : "/fd \"SHA256\"",
"PageHash" : "/NPH",
"TimeStamp" : "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
"keyCode": "CP-230856",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-230856",
"OperationCode" : "SigntoolVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd sha256"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "signtool.exe",
"toolVersion": "6.2.9304.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
PendingAnalysisWaitTimeoutMinutes: '5'

- task: DotNetCoreCLI@2
inputs:
@@ -53,9 +72,14 @@ steps:
nobuild: true
versioningScheme: 'byBuildNumber'

- task: EsrpCodeSigning@1
- task: EsrpCodeSigning@5
inputs:
ConnectedServiceName: 'DSX ESRP'
ConnectedServiceName: '$(ConnectedServiceName)'
AppRegistrationClientId: '$(EsrpAppRegistrationClientId)'
AppRegistrationTenantId: '$(EsrpAppRegistrationTenantId)'
AuthAKVName: '$(EsrpKeyVault)'
AuthCertName: '$(EsrpCertName)'
AuthSignCertName: '$(EsrpSignCertName)'
FolderPath: '$(Build.ArtifactStagingDirectory)'
Pattern: '*.nupkg'
signConfigType: 'inlineSignParams'
@@ -79,6 +103,7 @@ steps:
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
PendingAnalysisWaitTimeoutMinutes: '5'

- task: CopyFiles@2
inputs:
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
--*/

namespace Microsoft.Devices.HardwareDevCenterManager.DevCenterApi
namespace Microsoft.Devices.HardwareDevCenterManager.DevCenterApi;

public interface IArtifact
{
public interface IArtifact
{
string Id { get; set; }
}
string Id { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
Licensed under the MIT license. See LICENSE file in the project root for full license information.
--*/

using System;
using System.Net.Http;
using System.Threading.Tasks;

namespace Microsoft.Devices.HardwareDevCenterManager.DevCenterApi
namespace Microsoft.Devices.HardwareDevCenterManager.DevCenterApi;

public interface IDevCenterHandler
{
public interface IDevCenterHandler
{
Task<DevCenterResponse<bool>> CancelShippingLabel(string productId, string submissionId, string shippingLabelId);
Task<DevCenterResponse<bool>> CommitSubmission(string productId, string submissionId);
Task<DevCenterResponse<bool>> CreateMetaData(string productId, string submissionId);
Task<DevCenterResponse<Audience>> GetAudiences();
Task<DevCenterResponse<Submission>> GetPartnerSubmission(string publisherId, string productId, string submissionId);
Task<DevCenterResponse<Product>> GetProducts(string productId = null);
Task<DevCenterResponse<ShippingLabel>> GetShippingLabels(string productId, string submissionId, string shippingLabelId = null);
Task<DevCenterResponse<Submission>> GetSubmission(string productId, string submissionId = null);
Task<DevCenterResponse<Output>> HdcGet<Output>(string uri, bool isMany) where Output : IArtifact;
Task<DevCenterResponse<Output>> HdcPost<Output>(string uri, object input) where Output : IArtifact;
Task<DevCenterErrorDetails> InvokeHdcService(HttpMethod method, string uri, object input, Action<string> processContent);
Task<DevCenterResponse<Output>> InvokeHdcService<Output>(HttpMethod method, string uri, object input, bool isMany) where Output : IArtifact;
Task<DevCenterResponse<Product>> NewProduct(NewProduct input);
Task<DevCenterResponse<ShippingLabel>> NewShippingLabel(string productId, string submissionId, NewShippingLabel shippingLabelInfo);
Task<DevCenterResponse<Submission>> NewSubmission(string productId, NewSubmission submissionInfo);
}
Task<DevCenterResponse<bool>> CancelShippingLabel(string productId, string submissionId, string shippingLabelId);
Task<DevCenterResponse<bool>> CommitSubmission(string productId, string submissionId);
Task<DevCenterResponse<bool>> CreateMetaData(string productId, string submissionId);
Task<DevCenterResponse<Audience>> GetAudiences();
Task<DevCenterResponse<Submission>> GetPartnerSubmission(string publisherId, string productId, string submissionId);
Task<DevCenterResponse<Product>> GetProducts(string productId = null);
Task<DevCenterResponse<ShippingLabel>> GetShippingLabels(string productId, string submissionId, string shippingLabelId = null);
Task<DevCenterResponse<Submission>> GetSubmission(string productId, string submissionId = null);
Task<DevCenterResponse<Output>> HdcGet<Output>(string uri, bool isMany) where Output : IArtifact;
Task<DevCenterResponse<Output>> HdcPost<Output>(string uri, object input) where Output : IArtifact;
Task<DevCenterErrorDetails> InvokeHdcService(HttpMethod method, string uri, object input, Action<string> processContent);
Task<DevCenterResponse<Output>> InvokeHdcService<Output>(HttpMethod method, string uri, object input, bool isMany) where Output : IArtifact;
Task<DevCenterResponse<Product>> NewProduct(NewProduct input);
Task<DevCenterResponse<ShippingLabel>> NewShippingLabel(string productId, string submissionId, NewShippingLabel shippingLabelInfo);
Task<DevCenterResponse<Submission>> NewSubmission(string productId, NewSubmission submissionInfo);
}
Loading