diff --git a/client.go b/client.go index 9a6ae5b..2e5e665 100644 --- a/client.go +++ b/client.go @@ -342,6 +342,7 @@ func (sdk SDK) ArtifactUploadByteArray(request ArtifactUploadByteArrayRequest) e } type ArtifactDownloadRequest struct { + ID string `json:"id"` Module string `json:"module"` Type string `json:"type"` Name string `json:"name"` @@ -351,6 +352,7 @@ type ArtifactDownloadRequest struct { // ArtifactDownload request func (sdk SDK) ArtifactDownload(request ArtifactDownloadRequest) error { resp, err := sdk.client.R(). + SetQueryParam("id", request.ID). SetQueryParam("module", request.Module). SetQueryParam("type", request.Type). SetQueryParam("name", request.Name). @@ -367,6 +369,7 @@ func (sdk SDK) ArtifactDownload(request ArtifactDownloadRequest) error { } type ArtifactDownloadByteArrayRequest struct { + ID string `json:"id"` Module string `json:"module"` Type string `json:"type"` Name string `json:"name"` @@ -375,6 +378,7 @@ type ArtifactDownloadByteArrayRequest struct { // ArtifactDownloadByteArray request func (sdk SDK) ArtifactDownloadByteArray(request ArtifactDownloadByteArrayRequest) ([]byte, error) { resp, err := sdk.client.R(). + SetQueryParam("id", request.ID). SetQueryParam("module", request.Module). SetQueryParam("type", request.Type). SetQueryParam("name", request.Name). diff --git a/client_test.go b/client_test.go index 9d48db5..923b5c2 100644 --- a/client_test.go +++ b/client_test.go @@ -1,9 +1,10 @@ package cidsdk import ( - "github.com/stretchr/testify/assert" "os" "testing" + + "github.com/stretchr/testify/assert" ) func TestSDKHealth(t *testing.T) { diff --git a/const.go b/const.go index 714915c..ed9ae9d 100644 --- a/const.go +++ b/const.go @@ -10,6 +10,7 @@ const ( LanguageJavascript ProjectLanguage = "javascript" LanguageTypescript ProjectLanguage = "typescript" LanguagePython ProjectLanguage = "python" + LanguagePHP ProjectLanguage = "php" ) type ProjectBuildSystem string @@ -26,6 +27,8 @@ const ( BuildSystemPipfile ProjectBuildSystem = "pipfile" BuildSystemSetupPy ProjectBuildSystem = "setup.py" BuildSystemMkdocs ProjectBuildSystem = "mkdocs" + BuildSystemComposer ProjectBuildSystem = "composer" + BuildSystemDotNet ProjectBuildSystem = "dotnet" ) type ProjectBuildSystemSyntax string diff --git a/types.go b/types.go index 22eec82..765bd2e 100644 --- a/types.go +++ b/types.go @@ -150,6 +150,7 @@ const ( type ActionArtifact struct { BuildID string `json:"build_id,omitempty"` JobID string `json:"job_id,omitempty"` + ID string `json:"id,omitempty"` Module string `json:"module,omitempty"` Type ActionArtifactType `json:"type,omitempty"` Name string `json:"name,omitempty"`