Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Version 2.3.0 - Update SaaS and other Help docs #5

Merged
merged 13 commits into from
Mar 9, 2024
Merged

Module Version 2.3.0 - Update SaaS and other Help docs #5

merged 13 commits into from
Mar 9, 2024

Conversation

cksapp
Copy link
Contributor

@cksapp cksapp commented Mar 7, 2024

Module Version 2.3.0 - Update SaaS and other Help docs

Mostly just lots of small changes centered around the SaaS API endpoints, and other miscellaneous help documentation

  • Changed $saasCustomerId parameter from <string> to <int> type, as documented in Datto's Swagger file.
  • Updated $daysUntil parameter range to accept '0' value as this is also accepted by the endpoint
  • Update URL link to project repo and removed reference to deprecated dev branch in GitHub templates, and contributing docs
  • Corrected endpoint references of 'bulkSeatAssignment' to 'bulkSeatChange'
  • Miscellaneous formatting and changes in help docs

Contributes: #4

Type of change

  • General code cleanup (non-breaking change which improves readability)

Checklist

  • I have reviewed the Contributing guide
  • I am pulling to the main branch
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes

How Has This Been Tested?

PS \GitHub\Datto-PowerShellWrapper\tests> .\DattoAPI.Tests.ps1 -version 2.3.0 -buildTarget notBuilt

Starting discovery in 1 files.
Discovery found 23 tests in 46ms.
Running tests.
[+] \GitHub\Datto-PowerShellWrapper\tests\DattoAPI.Tests.ps1 623ms (428ms|152ms)
Tests completed in 626ms
Tests Passed: 23, Failed: 0, Skipped: 0 NotRun: 0
PS \GitHub\Datto-PowerShellWrapper\tests> .\HelpComment.Tests.ps1 -version 2.3.0 -buildTarget notBuilt

Starting discovery in 1 files.
Discovery found 320 tests in 1.22s.
Running tests.
[+] \GitHub\Datto-PowerShellWrapper\tests\HelpComment.Tests.ps1 2.99s (616ms|1.16s)
Tests completed in 3s
Tests Passed: 316, Failed: 0, Skipped: 4 NotRun: 0
PS \GitHub\Datto-PowerShellWrapper\tests> .\PSScriptAnalyzer.tests.ps1 -version 2.3.0 -buildTarget notBuilt

Starting discovery in 1 files.
Discovery found 2108 tests in 1.33s.
Running tests.
[-] Testing the [ notBuilt ] version of [ DattoAPI ] with [ PSScriptAnalyzer.tests.ps1 ].[ DattoAPI ] module PSScriptAnalyzer tests.[ DattoAPI.psd1 ].Should pass rule [ PSUseToExportFieldsInManifest ] 300ms (295ms|6ms)
 at ($invoke_Results | Measure-Object).Count | Should -Be 0, \GitHub\Datto-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:149
 at <ScriptBlock>, \GitHub\Datto-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:149
 Expected 0, but got 2.
Tests completed in 44.89s
Tests Passed: 2107, Failed: 1, Skipped: 0 NotRun: 0
  • Ran all local unit tests
  • Validated -saasCustomerId int type documented in Swagger for API properly calls endpoint as expected with change from <string>

cksapp added 13 commits January 22, 2024 21:03
Updated links in contributing docs to link to project repo, also updates other comment based help in the functions.
Update the Set-DattoBulkSeatChange function parameters to accept pipeline input, and by property name to match other params in the function
The endpoint accept a '0' value, which is different from not including the parameter, by default with no parameter set the API returns 10 days of historical data.

With 0 value, only remote IDs can be returned if chosen by the module user. Since the API accepts the '0' value we should include it as well as valid input.
Updated some wording, removed extra lines, changed SaaS customer ID to 6 digit format
Updated help comments for SaaS Application endpoint, currently documented values added for reference
Require strict strongly typed parameters with the use of casting as enums rather than string.
This is to better align with changes reflected from Datto
Provides examples for O365 and GWS valid seat types.

Added reference to Google Seat Management and stipulation API endpoint does not function for SM 1.0
Link to Datto documentation - This external link could possibly change in the future so we may not wish to include in prod.
Updated $saasCustomerId var to [int] type when casting parameter to better match Datto Partner Portal Swagger documentation for expected value for customerId from bulkSeatChange endpoint.
Updated links to project repo under .github folder to point to proper URL
Updated help comments for SaaS Application endpoint, currently documented values added for reference.

Also updated PR template with deprecated dev branch missed prior
@cksapp cksapp marked this pull request as ready for review March 7, 2024 15:02
@Celerium
Copy link
Owner

Celerium commented Mar 9, 2024

Thank you very much again!

@Celerium Celerium closed this Mar 9, 2024
@Celerium Celerium reopened this Mar 9, 2024
@Celerium Celerium merged commit 31f7e88 into Celerium:main Mar 9, 2024
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants