Centralized path helpers for the Catalogue module.
All paths go through PhoenixKit.Utils.Routes.path/1 for prefix/locale handling.
Summary
Functions
Returns the download URL for a catalogue export.
Signed URL under which the raw PDF binary is served. Resolves via
core's Storage.URLSigner — the host app already routes
/file/:file_uuid/:variant/:token through core's FileController.
Returns the PDF.js viewer URL with the file pre-bound and the
optional page fragment set. The viewer assets are vendored under
priv/static/pdfjs/ and served at /_pdfjs/ by the host
endpoint's Plug.Static mount.
Functions
Returns the download URL for a catalogue export.
params is a map with required keys :destination, :format, and
:catalogue_uuids (a list of UUID strings). All scalar values are strings
or atoms. The catalogue_uuids list is encoded as repeated
catalogue_uuids[] query parameters.
@spec pdf_detail(Ecto.UUID.t()) :: String.t()
@spec pdf_detail(Ecto.UUID.t(), pos_integer()) :: String.t()
Signed URL under which the raw PDF binary is served. Resolves via
core's Storage.URLSigner — the host app already routes
/file/:file_uuid/:variant/:token through core's FileController.
@spec pdf_viewer(map(), pos_integer()) :: String.t()
Returns the PDF.js viewer URL with the file pre-bound and the
optional page fragment set. The viewer assets are vendored under
priv/static/pdfjs/ and served at /_pdfjs/ by the host
endpoint's Plug.Static mount.
The signed file URL is encoded via URI.encode_www_form/1 so
reserved characters in the underlying URL (?, &, =, #,
spaces) become percent-escaped query-param-safe bytes — URI.encode/1
alone does NOT escape those, which would corrupt the viewer's own
#page=N fragment if the file URL ever carries them.
@spec pdfs() :: String.t()