mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 01:15:49 +10:00
241929bb97
Add V2 API routes to download an envelope's certificate and audit log separately, and align the internal cert/audit log downloads to use envelopeId. Enforces document visibility via getEnvelopeWhereInput and loads field signatures so certificates render correctly.
24 lines
754 B
TypeScript
24 lines
754 B
TypeScript
import { authenticatedProcedure } from '../trpc';
|
|
import {
|
|
downloadEnvelopeCertificatePdfMeta,
|
|
ZDownloadEnvelopeCertificatePdfRequestSchema,
|
|
ZDownloadEnvelopeCertificatePdfResponseSchema,
|
|
} from './download-envelope-certificate-pdf.types';
|
|
|
|
export const downloadEnvelopeCertificatePdfRoute = authenticatedProcedure
|
|
.meta(downloadEnvelopeCertificatePdfMeta)
|
|
.input(ZDownloadEnvelopeCertificatePdfRequestSchema)
|
|
.output(ZDownloadEnvelopeCertificatePdfResponseSchema)
|
|
.query(({ input, ctx }) => {
|
|
const { envelopeId } = input;
|
|
|
|
ctx.logger.info({
|
|
input: {
|
|
envelopeId,
|
|
},
|
|
});
|
|
|
|
// This endpoint is purely for V2 API, which is implemented in the Hono remix server.
|
|
throw new Error('NOT_IMPLEMENTED');
|
|
});
|