Skip to content

Update Valid Target Platforms#11

Closed
Esnapp wants to merge 6 commits intoAction1Corp:mainfrom
Esnapp:main
Closed

Update Valid Target Platforms#11
Esnapp wants to merge 6 commits intoAction1Corp:mainfrom
Esnapp:main

Conversation

@Esnapp
Copy link
Copy Markdown

@Esnapp Esnapp commented Aug 20, 2025

Update Start-Action1PackageUpload $Platform parameter's ValidateSet to include the new 'Windows_ARM64', 'Mac_IntelCPU', and 'Mac_AppleSilicon' options as specified in the api docs here https://app.action1.com/apidocs/#/Software%20Repository.%20Upload%20Installation%20File/packages_all_packageId_versions_versionId_upload_post.

Update Start-Action1PackageUpload $Platform parameter's ValidateSet to include the new 'Windows_ARM64', 'Mac_IntelCPU', and 'Mac_AppleSilicon' options as specified in the api docs here https://app.action1.com/apidocs/#/Software%20Repository.%20Upload%20Installation%20File/packages_all_packageId_versions_versionId_upload_post.
Comment thread PSAction1.psm1
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this time the upload function is a part of future function as POC, it bears no functional value at this time. These will be added when that function is fully fleshed out. The PSAction1 module does not currently target the full specification, it is centered on specific customers greatest needs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, That makes sense. I'm working on a script that implements the full API doc now for updating our custom packages directly from vendor feeds and figured I'd chip in on this project whenever I ran into issues. Thanks for all your hard work!

@GeneMoody-Action1
Copy link
Copy Markdown
Collaborator

GeneMoody-Action1 commented Aug 20, 2025 via email

Esnapp added 3 commits August 21, 2025 13:24
Added and updated URI lookups and logic to support Getting (G_) Updating (U_) and New (N_) packages and versions.
Improved Start-Action1PackageUpload to update version metadata after upload and handle resume logic more robustly.
Extended Get-Action1, New-Action1, and Update-Action1 to support new 'Package' and 'Version' operations, including proper field filtering and path construction.
Added a new URI lookup for single version retrieval and refactored the logic in Start-Action1PackageUpload to simplify updating the uploaded file reference.
Improved Get-Action1 to support nested object queries with secondary IDs and streamlined argument handling for URI construction from nest if statements to a switch based arglist splat.
@Esnapp
Copy link
Copy Markdown
Author

Esnapp commented Aug 28, 2025

I've got this fleshed out and working with my test cases, that said I don't have a great way to test the resume functionality as I've yet to run into a 500 series error while uploading a file.
I've erred on the side of leaving previous functionality in place to make sure there are no breaking changes but this may lead to some ambiguity on the proper Query to pass as in the case of G_SoftwareRepository which will query the current org (unless $Org_ID == all) for packages and G_Packages which returns the packages in the enterprise scope. These should be easy enough to rename to be more in line with your preferred terminology or to update historical uri's and accept the risk of a breaking change.
The biggest portion I'm not happy with is having to add an $Id2 to Update-Action1 and Get-Action1 to support getting a version.

Let me know if you have any thoughts or suggestions and I can take a look at them and see if I can smooth anything out.

Esnapp added 2 commits August 28, 2025 10:33
Added explicit error messages when required parameters (Id2 for Package_ID and Id for Object_ID) are not provided in Get-Action1.
Also removed an incorrect check for the Query flag not equaling 'Settings' inside an if block that already checks for Query -eq 'Settings'
Cleaned up unnecessary blank lines for better readability.
Get-Action1 valid set expected CutomAttribute instead of CustomAttribute
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.

3 participants