mirror of
https://github.com/documenso/documenso.git
synced 2025-11-21 20:21:38 +10:00
Compare commits
7 Commits
v2.0.12
...
docs/self-
| Author | SHA1 | Date | |
|---|---|---|---|
| 18ad50bf5a | |||
| 11d9bde8f8 | |||
| fa1680aaf1 | |||
| 798b6bd750 | |||
| 8fbace0f61 | |||
| 1bbd04be9b | |||
| 6aa56fe7e0 |
@ -275,7 +275,15 @@ The environment variables listed above are a subset of those available for confi
|
|||||||
| `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` | The secondary encryption key for symmetric encryption and decryption (at least 32 characters). |
|
| `NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY` | The secondary encryption key for symmetric encryption and decryption (at least 32 characters). |
|
||||||
| `NEXT_PRIVATE_GOOGLE_CLIENT_ID` | The Google client ID for Google authentication (optional). |
|
| `NEXT_PRIVATE_GOOGLE_CLIENT_ID` | The Google client ID for Google authentication (optional). |
|
||||||
| `NEXT_PRIVATE_GOOGLE_CLIENT_SECRET` | The Google client secret for Google authentication (optional). |
|
| `NEXT_PRIVATE_GOOGLE_CLIENT_SECRET` | The Google client secret for Google authentication (optional). |
|
||||||
|
| `NEXT_PRIVATE_MICROSOFT_CLIENT_ID` | The Microsoft client ID for Microsoft authentication (optional). |
|
||||||
|
| `NEXT_PRIVATE_MICROSOFT_CLIENT_SECRET` | The Microsoft client secret for Microsoft authentication (optional). |
|
||||||
|
| `NEXT_PRIVATE_OIDC_CLIENT_ID` | The OIDC client ID for OIDC authentication (optional). |
|
||||||
|
| `NEXT_PRIVATE_OIDC_CLIENT_SECRET` | The OIDC client secret for OIDC authentication (optional). |
|
||||||
|
| `NEXT_PRIVATE_OIDC_WELL_KNOWN` | The well-known URL for the OIDC provider (optional). |
|
||||||
|
| `NEXT_PRIVATE_OIDC_PROVIDER_LABEL` | The label to display for the OIDC provider button (optional). |
|
||||||
|
| `NEXT_PRIVATE_OIDC_SKIP_VERIFY` | Whether to skip email verification for OIDC accounts (optional, default `false`). |
|
||||||
| `NEXT_PUBLIC_WEBAPP_URL` | The URL for the web application. |
|
| `NEXT_PUBLIC_WEBAPP_URL` | The URL for the web application. |
|
||||||
|
| `NEXT_PUBLIC_SUPPORT_EMAIL` | The support email address displayed to users (default `support@documenso.com`). |
|
||||||
| `NEXT_PRIVATE_DATABASE_URL` | The URL for the primary database connection (with connection pooling). |
|
| `NEXT_PRIVATE_DATABASE_URL` | The URL for the primary database connection (with connection pooling). |
|
||||||
| `NEXT_PRIVATE_DIRECT_DATABASE_URL` | The URL for the direct database connection (without connection pooling). |
|
| `NEXT_PRIVATE_DIRECT_DATABASE_URL` | The URL for the direct database connection (without connection pooling). |
|
||||||
| `NEXT_PRIVATE_SIGNING_TRANSPORT` | The signing transport to use. Available options: local (default) |
|
| `NEXT_PRIVATE_SIGNING_TRANSPORT` | The signing transport to use. Available options: local (default) |
|
||||||
@ -297,6 +305,7 @@ The environment variables listed above are a subset of those available for confi
|
|||||||
| `NEXT_PRIVATE_SMTP_APIKEY_USER` | The API key user for the SMTP server for the `smtp-api` transport. |
|
| `NEXT_PRIVATE_SMTP_APIKEY_USER` | The API key user for the SMTP server for the `smtp-api` transport. |
|
||||||
| `NEXT_PRIVATE_SMTP_APIKEY` | The API key for the SMTP server for the `smtp-api` transport. |
|
| `NEXT_PRIVATE_SMTP_APIKEY` | The API key for the SMTP server for the `smtp-api` transport. |
|
||||||
| `NEXT_PRIVATE_SMTP_SECURE` | Whether to force the use of TLS for the SMTP server for SMTP transports. |
|
| `NEXT_PRIVATE_SMTP_SECURE` | Whether to force the use of TLS for the SMTP server for SMTP transports. |
|
||||||
|
| `NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS` | Whether to ignore TLS errors for the SMTP server (useful for self-signed certificates). |
|
||||||
| `NEXT_PRIVATE_SMTP_FROM_ADDRESS` | The email address for the "from" address. |
|
| `NEXT_PRIVATE_SMTP_FROM_ADDRESS` | The email address for the "from" address. |
|
||||||
| `NEXT_PRIVATE_SMTP_FROM_NAME` | The sender name for the "from" address. |
|
| `NEXT_PRIVATE_SMTP_FROM_NAME` | The sender name for the "from" address. |
|
||||||
| `NEXT_PRIVATE_RESEND_API_KEY` | The API key for Resend.com for the `resend` transport. |
|
| `NEXT_PRIVATE_RESEND_API_KEY` | The API key for Resend.com for the `resend` transport. |
|
||||||
@ -308,6 +317,7 @@ The environment variables listed above are a subset of those available for confi
|
|||||||
| `NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT` | The maximum document upload limit displayed to the user (in MB). |
|
| `NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT` | The maximum document upload limit displayed to the user (in MB). |
|
||||||
| `NEXT_PUBLIC_POSTHOG_KEY` | The optional PostHog key for analytics and feature flags. |
|
| `NEXT_PUBLIC_POSTHOG_KEY` | The optional PostHog key for analytics and feature flags. |
|
||||||
| `NEXT_PUBLIC_DISABLE_SIGNUP` | Whether to disable user signups through the /signup page. |
|
| `NEXT_PUBLIC_DISABLE_SIGNUP` | Whether to disable user signups through the /signup page. |
|
||||||
|
| `NEXT_PRIVATE_BROWSERLESS_URL` | The URL for a Browserless.io instance to generate PDFs (optional). |
|
||||||
|
|
||||||
## Run as a Service
|
## Run as a Service
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import { msg } from '@lingui/core/macro';
|
|||||||
import { Trans, useLingui } from '@lingui/react/macro';
|
import { Trans, useLingui } from '@lingui/react/macro';
|
||||||
import { FieldType, RecipientRole } from '@prisma/client';
|
import { FieldType, RecipientRole } from '@prisma/client';
|
||||||
import { FileTextIcon } from 'lucide-react';
|
import { FileTextIcon } from 'lucide-react';
|
||||||
import { Link } from 'react-router';
|
import { Link, useSearchParams } from 'react-router';
|
||||||
import { isDeepEqual } from 'remeda';
|
import { isDeepEqual } from 'remeda';
|
||||||
import { match } from 'ts-pattern';
|
import { match } from 'ts-pattern';
|
||||||
|
|
||||||
@ -65,6 +65,8 @@ const FieldSettingsTypeTranslations: Record<FieldType, MessageDescriptor> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const EnvelopeEditorFieldsPage = () => {
|
export const EnvelopeEditorFieldsPage = () => {
|
||||||
|
const [searchParams] = useSearchParams();
|
||||||
|
|
||||||
const { envelope, editorFields, relativePath } = useCurrentEnvelopeEditor();
|
const { envelope, editorFields, relativePath } = useCurrentEnvelopeEditor();
|
||||||
|
|
||||||
const { currentEnvelopeItem } = useCurrentEnvelopeRender();
|
const { currentEnvelopeItem } = useCurrentEnvelopeRender();
|
||||||
@ -208,6 +210,37 @@ export const EnvelopeEditorFieldsPage = () => {
|
|||||||
<section>
|
<section>
|
||||||
<Separator className="my-4" />
|
<Separator className="my-4" />
|
||||||
|
|
||||||
|
{searchParams.get('devmode') && (
|
||||||
|
<>
|
||||||
|
<div className="px-4">
|
||||||
|
<h3 className="text-foreground mb-3 text-sm font-semibold">
|
||||||
|
<Trans>Developer Mode</Trans>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div className="bg-muted/50 border-border text-foreground space-y-2 rounded-md border p-3 text-sm">
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Pos X: </span>
|
||||||
|
{selectedField.positionX.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Pos Y: </span>
|
||||||
|
{selectedField.positionY.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Width: </span>
|
||||||
|
{selectedField.width.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span className="text-muted-foreground min-w-12">Height: </span>
|
||||||
|
{selectedField.height.toFixed(2)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Separator className="my-4" />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
<div className="[&_label]:text-foreground/70 px-4 [&_label]:text-xs">
|
<div className="[&_label]:text-foreground/70 px-4 [&_label]:text-xs">
|
||||||
<h3 className="text-sm font-semibold">
|
<h3 className="text-sm font-semibold">
|
||||||
{t(FieldSettingsTypeTranslations[selectedField.type])}
|
{t(FieldSettingsTypeTranslations[selectedField.type])}
|
||||||
|
|||||||
@ -106,5 +106,5 @@
|
|||||||
"vite-plugin-babel-macros": "^1.0.6",
|
"vite-plugin-babel-macros": "^1.0.6",
|
||||||
"vite-tsconfig-paths": "^5.1.4"
|
"vite-tsconfig-paths": "^5.1.4"
|
||||||
},
|
},
|
||||||
"version": "2.0.12"
|
"version": "2.0.13"
|
||||||
}
|
}
|
||||||
|
|||||||
6
package-lock.json
generated
6
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@documenso/root",
|
"name": "@documenso/root",
|
||||||
"version": "2.0.12",
|
"version": "2.0.13",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@documenso/root",
|
"name": "@documenso/root",
|
||||||
"version": "2.0.12",
|
"version": "2.0.13",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"apps/*",
|
"apps/*",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
@ -101,7 +101,7 @@
|
|||||||
},
|
},
|
||||||
"apps/remix": {
|
"apps/remix": {
|
||||||
"name": "@documenso/remix",
|
"name": "@documenso/remix",
|
||||||
"version": "2.0.12",
|
"version": "2.0.13",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cantoo/pdf-lib": "^2.5.2",
|
"@cantoo/pdf-lib": "^2.5.2",
|
||||||
"@documenso/api": "*",
|
"@documenso/api": "*",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "2.0.12",
|
"version": "2.0.13",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build",
|
"build": "turbo run build",
|
||||||
"dev": "turbo run dev --filter=@documenso/remix",
|
"dev": "turbo run dev --filter=@documenso/remix",
|
||||||
|
|||||||
@ -1,6 +1,16 @@
|
|||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
export const SUPPORTED_LANGUAGE_CODES = ['de', 'en', 'fr', 'es', 'it', 'pl'] as const;
|
export const SUPPORTED_LANGUAGE_CODES = [
|
||||||
|
'de',
|
||||||
|
'en',
|
||||||
|
'fr',
|
||||||
|
'es',
|
||||||
|
'it',
|
||||||
|
'pl',
|
||||||
|
'ja',
|
||||||
|
'ko',
|
||||||
|
'zh',
|
||||||
|
] as const;
|
||||||
|
|
||||||
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
export const ZSupportedLanguageCodeSchema = z.enum(SUPPORTED_LANGUAGE_CODES).catch('en');
|
||||||
|
|
||||||
@ -54,6 +64,18 @@ export const SUPPORTED_LANGUAGES: Record<string, SupportedLanguage> = {
|
|||||||
short: 'pl',
|
short: 'pl',
|
||||||
full: 'Polish',
|
full: 'Polish',
|
||||||
},
|
},
|
||||||
|
ja: {
|
||||||
|
short: 'ja',
|
||||||
|
full: 'Japanese',
|
||||||
|
},
|
||||||
|
ko: {
|
||||||
|
short: 'ko',
|
||||||
|
full: 'Korean',
|
||||||
|
},
|
||||||
|
zh: {
|
||||||
|
short: 'zh',
|
||||||
|
full: 'Chinese',
|
||||||
|
},
|
||||||
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
} satisfies Record<SupportedLanguageCodes, SupportedLanguage>;
|
||||||
|
|
||||||
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
export const isValidLanguageCode = (code: unknown): code is SupportedLanguageCodes =>
|
||||||
|
|||||||
@ -25,7 +25,6 @@ import { signPdf } from '@documenso/signing';
|
|||||||
|
|
||||||
import { AppError, AppErrorCode } from '../../../errors/app-error';
|
import { AppError, AppErrorCode } from '../../../errors/app-error';
|
||||||
import { sendCompletedEmail } from '../../../server-only/document/send-completed-email';
|
import { sendCompletedEmail } from '../../../server-only/document/send-completed-email';
|
||||||
import PostHogServerClient from '../../../server-only/feature-flags/get-post-hog-server-client';
|
|
||||||
import { getAuditLogsPdf } from '../../../server-only/htmltopdf/get-audit-logs-pdf';
|
import { getAuditLogsPdf } from '../../../server-only/htmltopdf/get-audit-logs-pdf';
|
||||||
import { getCertificatePdf } from '../../../server-only/htmltopdf/get-certificate-pdf';
|
import { getCertificatePdf } from '../../../server-only/htmltopdf/get-certificate-pdf';
|
||||||
import { addRejectionStampToPdf } from '../../../server-only/pdf/add-rejection-stamp-to-pdf';
|
import { addRejectionStampToPdf } from '../../../server-only/pdf/add-rejection-stamp-to-pdf';
|
||||||
@ -62,6 +61,7 @@ export const run = async ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { documentId, sendEmail = true, isResealing = false, requestMetadata } = payload;
|
const { documentId, sendEmail = true, isResealing = false, requestMetadata } = payload;
|
||||||
|
|
||||||
|
const { envelopeId, envelopeStatus, isRejected } = await io.runTask('seal-document', async () => {
|
||||||
const envelope = await prisma.envelope.findFirstOrThrow({
|
const envelope = await prisma.envelope.findFirstOrThrow({
|
||||||
where: {
|
where: {
|
||||||
type: EnvelopeType.DOCUMENT,
|
type: EnvelopeType.DOCUMENT,
|
||||||
@ -102,24 +102,7 @@ export const run = async ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seems silly but we need to do this in case the job is re-ran
|
let envelopeItems = envelope.envelopeItems;
|
||||||
// after it has already run through the update task further below.
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
const documentStatus = await io.runTask('get-document-status', async () => {
|
|
||||||
return envelope.status;
|
|
||||||
});
|
|
||||||
|
|
||||||
// This is the same case as above.
|
|
||||||
let envelopeItems = await io.runTask(
|
|
||||||
'get-document-data-id',
|
|
||||||
// eslint-disable-next-line @typescript-eslint/require-await
|
|
||||||
async () => {
|
|
||||||
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
||||||
return envelope.envelopeItems.map(({ field, ...rest }) => ({
|
|
||||||
...rest,
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
if (envelopeItems.length < 1) {
|
if (envelopeItems.length < 1) {
|
||||||
throw new Error(`Document ${envelope.id} has no envelope items`);
|
throw new Error(`Document ${envelope.id} has no envelope items`);
|
||||||
@ -189,44 +172,9 @@ export const run = async ({
|
|||||||
settings,
|
settings,
|
||||||
});
|
});
|
||||||
|
|
||||||
// !: The commented out code is our desired implementation but we're seemingly
|
|
||||||
// !: running into issues with inngest parallelism in production.
|
|
||||||
// !: Until this is resolved we will do this sequentially which is slower but
|
|
||||||
// !: will actually work.
|
|
||||||
// const decoratePromises: Array<Promise<{ oldDocumentDataId: string; newDocumentDataId: string }>> =
|
|
||||||
// [];
|
|
||||||
|
|
||||||
// for (const envelopeItem of envelopeItems) {
|
|
||||||
// const task = io.runTask(`decorate-${envelopeItem.id}`, async () => {
|
|
||||||
// const envelopeItemFields = envelope.envelopeItems.find(
|
|
||||||
// (item) => item.id === envelopeItem.id,
|
|
||||||
// )?.field;
|
|
||||||
|
|
||||||
// if (!envelopeItemFields) {
|
|
||||||
// throw new Error(`Envelope item fields not found for envelope item ${envelopeItem.id}`);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return decorateAndSignPdf({
|
|
||||||
// envelope,
|
|
||||||
// envelopeItem,
|
|
||||||
// envelopeItemFields,
|
|
||||||
// isRejected,
|
|
||||||
// rejectionReason,
|
|
||||||
// certificateData,
|
|
||||||
// auditLogData,
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
|
|
||||||
// decoratePromises.push(task);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const newDocumentData = await Promise.all(decoratePromises);
|
|
||||||
|
|
||||||
// TODO: Remove once parallelization is working
|
|
||||||
const newDocumentData: Array<{ oldDocumentDataId: string; newDocumentDataId: string }> = [];
|
const newDocumentData: Array<{ oldDocumentDataId: string; newDocumentDataId: string }> = [];
|
||||||
|
|
||||||
for (const envelopeItem of envelopeItems) {
|
for (const envelopeItem of envelopeItems) {
|
||||||
const result = await io.runTask(`decorate-${envelopeItem.id}`, async () => {
|
|
||||||
const envelopeItemFields = envelope.envelopeItems.find(
|
const envelopeItemFields = envelope.envelopeItems.find(
|
||||||
(item) => item.id === envelopeItem.id,
|
(item) => item.id === envelopeItem.id,
|
||||||
)?.field;
|
)?.field;
|
||||||
@ -235,7 +183,7 @@ export const run = async ({
|
|||||||
throw new Error(`Envelope item fields not found for envelope item ${envelopeItem.id}`);
|
throw new Error(`Envelope item fields not found for envelope item ${envelopeItem.id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return decorateAndSignPdf({
|
const result = await decorateAndSignPdf({
|
||||||
envelope,
|
envelope,
|
||||||
envelopeItem,
|
envelopeItem,
|
||||||
envelopeItemFields,
|
envelopeItemFields,
|
||||||
@ -244,25 +192,10 @@ export const run = async ({
|
|||||||
certificateData,
|
certificateData,
|
||||||
auditLogData,
|
auditLogData,
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
newDocumentData.push(result);
|
newDocumentData.push(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
const postHog = PostHogServerClient();
|
|
||||||
|
|
||||||
if (postHog) {
|
|
||||||
postHog.capture({
|
|
||||||
distinctId: nanoid(),
|
|
||||||
event: 'App: Document Sealed',
|
|
||||||
properties: {
|
|
||||||
documentId: envelope.id,
|
|
||||||
isRejected,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
await io.runTask('update-document', async () => {
|
|
||||||
await prisma.$transaction(async (tx) => {
|
await prisma.$transaction(async (tx) => {
|
||||||
for (const { oldDocumentDataId, newDocumentDataId } of newDocumentData) {
|
for (const { oldDocumentDataId, newDocumentDataId } of newDocumentData) {
|
||||||
const newData = await tx.documentData.findFirstOrThrow({
|
const newData = await tx.documentData.findFirstOrThrow({
|
||||||
@ -304,18 +237,24 @@ export const run = async ({
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
envelopeId: envelope.id,
|
||||||
|
envelopeStatus: envelope.status,
|
||||||
|
isRejected,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
await io.runTask('send-completed-email', async () => {
|
await io.runTask('send-completed-email', async () => {
|
||||||
let shouldSendCompletedEmail = sendEmail && !isResealing && !isRejected;
|
let shouldSendCompletedEmail = sendEmail && !isResealing && !isRejected;
|
||||||
|
|
||||||
if (isResealing && !isDocumentCompleted(envelope.status)) {
|
if (isResealing && !isDocumentCompleted(envelopeStatus)) {
|
||||||
shouldSendCompletedEmail = sendEmail;
|
shouldSendCompletedEmail = sendEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldSendCompletedEmail) {
|
if (shouldSendCompletedEmail) {
|
||||||
await sendCompletedEmail({
|
await sendCompletedEmail({
|
||||||
id: { type: 'envelopeId', id: envelope.id },
|
id: { type: 'envelopeId', id: envelopeId },
|
||||||
requestMetadata,
|
requestMetadata,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -323,7 +262,7 @@ export const run = async ({
|
|||||||
|
|
||||||
const updatedEnvelope = await prisma.envelope.findFirstOrThrow({
|
const updatedEnvelope = await prisma.envelope.findFirstOrThrow({
|
||||||
where: {
|
where: {
|
||||||
id: envelope.id,
|
id: envelopeId,
|
||||||
},
|
},
|
||||||
include: {
|
include: {
|
||||||
documentMeta: true,
|
documentMeta: true,
|
||||||
|
|||||||
@ -31,26 +31,16 @@ export const viewedDocument = async ({
|
|||||||
type: EnvelopeType.DOCUMENT,
|
type: EnvelopeType.DOCUMENT,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: {
|
|
||||||
envelope: {
|
|
||||||
include: {
|
|
||||||
documentMeta: true,
|
|
||||||
recipients: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!recipient) {
|
if (!recipient) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { envelope } = recipient;
|
|
||||||
|
|
||||||
await prisma.documentAuditLog.create({
|
await prisma.documentAuditLog.create({
|
||||||
data: createDocumentAuditLogData({
|
data: createDocumentAuditLogData({
|
||||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_VIEWED,
|
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_VIEWED,
|
||||||
envelopeId: envelope.id,
|
envelopeId: recipient.envelopeId,
|
||||||
user: {
|
user: {
|
||||||
name: recipient.name,
|
name: recipient.name,
|
||||||
email: recipient.email,
|
email: recipient.email,
|
||||||
@ -86,7 +76,7 @@ export const viewedDocument = async ({
|
|||||||
await tx.documentAuditLog.create({
|
await tx.documentAuditLog.create({
|
||||||
data: createDocumentAuditLogData({
|
data: createDocumentAuditLogData({
|
||||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED,
|
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED,
|
||||||
envelopeId: envelope.id,
|
envelopeId: recipient.envelopeId,
|
||||||
user: {
|
user: {
|
||||||
name: recipient.name,
|
name: recipient.name,
|
||||||
email: recipient.email,
|
email: recipient.email,
|
||||||
@ -103,6 +93,16 @@ export const viewedDocument = async ({
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const envelope = await prisma.envelope.findUniqueOrThrow({
|
||||||
|
where: {
|
||||||
|
id: recipient.envelopeId,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
documentMeta: true,
|
||||||
|
recipients: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
await triggerWebhook({
|
await triggerWebhook({
|
||||||
event: WebhookTriggerEvents.DOCUMENT_OPENED,
|
event: WebhookTriggerEvents.DOCUMENT_OPENED,
|
||||||
data: ZWebhookDocumentSchema.parse(mapEnvelopeToWebhookDocumentPayload(envelope)),
|
data: ZWebhookDocumentSchema.parse(mapEnvelopeToWebhookDocumentPayload(envelope)),
|
||||||
|
|||||||
11043
packages/lib/translations/ja/web.po
Normal file
11043
packages/lib/translations/ja/web.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Language: pl\n"
|
"Language: pl\n"
|
||||||
"Project-Id-Version: documenso-app\n"
|
"Project-Id-Version: documenso-app\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"PO-Revision-Date: 2025-11-12 06:14\n"
|
"PO-Revision-Date: 2025-11-17 02:33\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: Polish\n"
|
"Language-Team: Polish\n"
|
||||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
|
||||||
@ -8943,13 +8943,13 @@ msgstr "Tytuł nie może być pusty"
|
|||||||
#. placeholder {2}: recipient.email
|
#. placeholder {2}: recipient.email
|
||||||
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
||||||
msgid "To {0} this {1}, you need to be logged in as <0>{2}</0>"
|
msgid "To {0} this {1}, you need to be logged in as <0>{2}</0>"
|
||||||
msgstr ""
|
msgstr "Aby {0} ten {1}, musisz być zalogowany jako <0>{2}</0>"
|
||||||
|
|
||||||
#. placeholder {0}: actionVerb.toLowerCase()
|
#. placeholder {0}: actionVerb.toLowerCase()
|
||||||
#. placeholder {1}: actionTarget.toLowerCase()
|
#. placeholder {1}: actionTarget.toLowerCase()
|
||||||
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
#: apps/remix/app/components/general/document-signing/document-signing-auth-account.tsx
|
||||||
msgid "To {0} this {1}, you need to be logged in."
|
msgid "To {0} this {1}, you need to be logged in."
|
||||||
msgstr ""
|
msgstr "Aby {0} ten {1}, musisz być zalogowany."
|
||||||
|
|
||||||
#: apps/remix/app/routes/_unauthenticated+/organisation.invite.$token.tsx
|
#: apps/remix/app/routes/_unauthenticated+/organisation.invite.$token.tsx
|
||||||
msgid "To accept this invitation you must create an account."
|
msgid "To accept this invitation you must create an account."
|
||||||
@ -10532,7 +10532,7 @@ msgstr "Nie możesz przesyłać zaszyfrowanych plików PDF"
|
|||||||
#: apps/remix/app/components/general/envelope/envelope-upload-button.tsx
|
#: apps/remix/app/components/general/envelope/envelope-upload-button.tsx
|
||||||
#: apps/remix/app/components/general/envelope/envelope-drop-zone-wrapper.tsx
|
#: apps/remix/app/components/general/envelope/envelope-drop-zone-wrapper.tsx
|
||||||
msgid "You cannot upload more than {maximumEnvelopeItemCount} items per envelope."
|
msgid "You cannot upload more than {maximumEnvelopeItemCount} items per envelope."
|
||||||
msgstr ""
|
msgstr "Nie możesz przesłać więcej niż {maximumEnvelopeItemCount} elementów na kopertę."
|
||||||
|
|
||||||
#: apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx
|
#: apps/remix/app/routes/_authenticated+/o.$orgUrl.settings.billing.tsx
|
||||||
msgid "You currently have an inactive <0>{currentProductName}</0> subscription"
|
msgid "You currently have an inactive <0>{currentProductName}</0> subscription"
|
||||||
|
|||||||
11043
packages/lib/translations/zh/web.po
Normal file
11043
packages/lib/translations/zh/web.po
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user