Adopt File type for trust logos and MCP

Trust GraphQL and MCP still exposed presigned URL strings for
trust-center logos while console and connect already serve stable
File.downloadUrl paths. Phase 1 migrates the seven public logo
fields on trust GraphQL and the trust-center file references on MCP
to the shared File type; trust GraphQL NDA stays on fileUrl for a
follow-up.

Trust resolvers load public files through filemanager and map them
with types.NewFile. The trust app Relay queries and components now
read logo.downloadUrl. MCP specification, resolvers, and helpers
are updated in sync, including NDA on MCP where callers already
have file access.

filemanager is split into focused files and its URL surface is
narrowed to GenerateFileURL(file) for stable app URLs and
GeneratePresignedURL for S3 redirects. GetPublicFile remains the
DB entry point when only a file ID is known.

Add trust and MCP e2e coverage for public logo download URLs.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
Ludovic Vielle
2026-06-11 13:54:59 +02:00
parent e06f3e0520
commit eccef41767
60 changed files with 1004 additions and 400 deletions

View File

@@ -8846,6 +8846,35 @@ components:
direction:
$ref: "#/components/schemas/OrderDirection"
File:
type: object
required:
- id
- mime_type
- file_name
- size
- download_url
- created_at
- updated_at
properties:
id:
$ref: "#/components/schemas/GID"
mime_type:
type: string
file_name:
type: string
size:
type: integer
format: int64
download_url:
type: string
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
TrustCenter:
type: object
required:
@@ -8864,22 +8893,12 @@ components:
type: boolean
search_engine_indexing:
$ref: "#/components/schemas/SearchEngineIndexing"
logo_file_url:
type:
- string
- "null"
dark_logo_file_url:
type:
- string
- "null"
nda_file_name:
type:
- string
- "null"
nda_file_url:
type:
- string
- "null"
logo:
$ref: "#/components/schemas/File"
dark_logo:
$ref: "#/components/schemas/File"
nda:
$ref: "#/components/schemas/File"
created_at:
type: string
format: date-time
@@ -8908,10 +8927,8 @@ components:
type:
- string
- "null"
logo_url:
type:
- string
- "null"
logo:
$ref: "#/components/schemas/File"
rank:
type: integer
created_at:
@@ -8927,7 +8944,7 @@ components:
- id
- name
- category
- file_url
- file
- trust_center_visibility
- organization_id
- created_at
@@ -8939,8 +8956,8 @@ components:
type: string
category:
type: string
file_url:
type: string
file:
$ref: "#/components/schemas/File"
trust_center_visibility:
$ref: "#/components/schemas/TrustCenterVisibility"
organization_id: