Switch console file fields to File download URLs

Replace presigned URL string fields (logoUrl, fileUrl, ndaFileName,
etc.) with nested File references resolved through /api/files/v1/.
Update console Relay queries and e2e coverage accordingly.

Route NDA upload through filemanager.PutFile and return stable IAM
org logo URLs for consistency with the files API.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-10 14:40:33 +02:00
parent 003fd2baf1
commit 3475dd0560
50 changed files with 545 additions and 386 deletions

View File

@@ -29,7 +29,7 @@ import (
"go.probo.inc/probo/pkg/gid"
)
func TestCommonThirdParties_QueryWithLogoURL(t *testing.T) {
func TestCommonThirdParties_QueryWithLogo(t *testing.T) {
t.Parallel()
owner := testutil.NewClient(t, testutil.RoleOwner)
@@ -42,25 +42,29 @@ func TestCommonThirdParties_QueryWithLogoURL(t *testing.T) {
commonThirdParties(name: $name) {
id
name
logoUrl
logo {
downloadUrl
}
}
}
`
var result struct {
CommonThirdParties []struct {
ID string `json:"id"`
Name string `json:"name"`
LogoURL *string `json:"logoUrl"`
ID string `json:"id"`
Name string `json:"name"`
Logo *struct {
DownloadURL string `json:"downloadUrl"`
} `json:"logo"`
} `json:"commonThirdParties"`
}
err := owner.Execute(query, map[string]any{"name": name}, &result)
require.NoError(t, err, "querying commonThirdParties.logoUrl must not surface a resource-not-found error")
require.NoError(t, err, "querying commonThirdParties.logo must not surface a resource-not-found error")
require.Len(t, result.CommonThirdParties, 1)
assert.Equal(t, id.String(), result.CommonThirdParties[0].ID)
assert.Equal(t, name, result.CommonThirdParties[0].Name)
assert.Nil(t, result.CommonThirdParties[0].LogoURL)
assert.Nil(t, result.CommonThirdParties[0].Logo)
}
func seedCommonThirdParty(t *testing.T, name string) gid.GID {