Compare commits

..

6 Commits

Author SHA1 Message Date
Mythie
4326e27a2a v1.8.1-rc.3 2024-12-02 07:48:03 +11:00
Catalin Pit
62806298cf fix: wrong signing invitation message (#1497) 2024-12-02 07:47:11 +11:00
Mythie
87186e08b1 v1.8.1-rc.2 2024-11-29 15:09:03 +11:00
Mythie
b27fd800ed fix: add distribution settings to external api 2024-11-29 14:10:48 +11:00
David Nguyen
98d85b086d feat: add initial api logging (#1494)
Improve API logging and error handling between client and server side.
2024-11-28 16:05:37 +07:00
Mythie
04293968c6 chore: update embedding docs 2024-11-28 15:55:17 +11:00
105 changed files with 1796 additions and 2051 deletions

View File

@@ -139,3 +139,6 @@ E2E_TEST_AUTHENTICATE_USER_PASSWORD="test_Password123"
# [[REDIS]] # [[REDIS]]
NEXT_PRIVATE_REDIS_URL= NEXT_PRIVATE_REDIS_URL=
NEXT_PRIVATE_REDIS_TOKEN= NEXT_PRIVATE_REDIS_TOKEN=
# [[LOGGER]]
NEXT_PRIVATE_LOGGER_HONEY_BADGER_API_KEY=

View File

@@ -0,0 +1,9 @@
{
"index": "Get Started",
"react": "React Integration",
"vue": "Vue Integration",
"svelte": "Svelte Integration",
"solid": "Solid Integration",
"preact": "Preact Integration",
"css-variables": "CSS Variables"
}

View File

@@ -0,0 +1,120 @@
---
title: CSS Variables
description: Learn about all available CSS variables for customizing your embedded signing experience
---
# CSS Variables
Platform customers have access to a comprehensive set of CSS variables that can be used to customize the appearance of the embedded signing experience. These variables control everything from colors to spacing and can be used to match your application's design system.
## Available Variables
### Colors
| Variable | Description | Default |
| ----------------------- | ---------------------------------- | -------------- |
| `background` | Base background color | System default |
| `foreground` | Base text color | System default |
| `muted` | Muted/subtle background color | System default |
| `mutedForeground` | Muted/subtle text color | System default |
| `popover` | Popover/dropdown background color | System default |
| `popoverForeground` | Popover/dropdown text color | System default |
| `card` | Card background color | System default |
| `cardBorder` | Card border color | System default |
| `cardBorderTint` | Card border tint/highlight color | System default |
| `cardForeground` | Card text color | System default |
| `fieldCard` | Field card background color | System default |
| `fieldCardBorder` | Field card border color | System default |
| `fieldCardForeground` | Field card text color | System default |
| `widget` | Widget background color | System default |
| `widgetForeground` | Widget text color | System default |
| `border` | Default border color | System default |
| `input` | Input field border color | System default |
| `primary` | Primary action/button color | System default |
| `primaryForeground` | Primary action/button text color | System default |
| `secondary` | Secondary action/button color | System default |
| `secondaryForeground` | Secondary action/button text color | System default |
| `accent` | Accent/highlight color | System default |
| `accentForeground` | Accent/highlight text color | System default |
| `destructive` | Destructive/danger action color | System default |
| `destructiveForeground` | Destructive/danger text color | System default |
| `ring` | Focus ring color | System default |
| `warning` | Warning/alert color | System default |
### Spacing and Layout
| Variable | Description | Default |
| -------- | ------------------------------- | -------------- |
| `radius` | Border radius size in REM units | System default |
## Usage Example
Here's how to use these variables in your embedding implementation:
```jsx
const cssVars = {
// Colors
background: '#ffffff',
foreground: '#000000',
primary: '#0000ff',
primaryForeground: '#ffffff',
accent: '#4f46e5',
destructive: '#ef4444',
// Spacing
radius: '0.5rem'
};
// React/Preact
<EmbedDirectTemplate
token={token}
cssVars={cssVars}
/>
// Vue
<EmbedDirectTemplate
:token="token"
:cssVars="cssVars"
/>
// Svelte
<EmbedDirectTemplate
{token}
cssVars={cssVars}
/>
// Solid
<EmbedDirectTemplate
token={token}
cssVars={cssVars}
/>
```
## Color Format
Colors can be specified in any valid CSS color format:
- Hexadecimal: `#ff0000`
- RGB: `rgb(255, 0, 0)`
- HSL: `hsl(0, 100%, 50%)`
- Named colors: `red`
The colors will be automatically converted to the appropriate format internally.
## Best Practices
1. **Maintain Contrast**: When customizing colors, ensure there's sufficient contrast between background and foreground colors for accessibility.
2. **Test Dark Mode**: If you haven't disabled dark mode, test your color variables in both light and dark modes.
3. **Use Your Brand Colors**: Align the primary and accent colors with your brand's color scheme for a cohesive look.
4. **Consistent Radius**: Use a consistent border radius value that matches your application's design system.
## Related
- [React Integration](/developers/embedding/react)
- [Vue Integration](/developers/embedding/vue)
- [Svelte Integration](/developers/embedding/svelte)
- [Solid Integration](/developers/embedding/solid)
- [Preact Integration](/developers/embedding/preact)

View File

@@ -11,7 +11,11 @@ Our embedding feature lets you integrate our document signing experience into yo
Embedding is currently available for all users on a **Teams Plan** and above, as well as **Early Adopter's** within a team (Early Adopters can create a team for free). Embedding is currently available for all users on a **Teams Plan** and above, as well as **Early Adopter's** within a team (Early Adopters can create a team for free).
In the future, we will roll out a **Platform Plan** that will offer additional enhancements for embedding, including the option to remove Documenso branding for a more customized experience. Our **Platform Plan** offers enhanced customization features including:
- Custom CSS and styling variables
- Dark mode controls
- The removal of Documenso branding from the embedding experience
## How Embedding Works ## How Embedding Works
@@ -22,6 +26,49 @@ Embedding with Documenso allows you to handle document signing in two main ways:
_For most use-cases we recommend using direct templates, however if you have a need for a more advanced integration, we are happy to help you get started._ _For most use-cases we recommend using direct templates, however if you have a need for a more advanced integration, we are happy to help you get started._
## Customization Options
### Styling and Theming
Platform customers have access to advanced styling options to customize the embedding experience:
1. **Custom CSS**: You can provide custom CSS to style the embedded component:
```jsx
<EmbedDirectTemplate
token={token}
css={`
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
`}
/>
```
2. **CSS Variables**: Fine-tune the appearance using CSS variables for colors, spacing, and more:
```jsx
<EmbedDirectTemplate
token={token}
cssVars={{
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
}}
/>
```
For a complete list of available CSS variables and their usage, see our [CSS Variables](/developers/embedding/css-variables) documentation.
3. **Dark Mode Control**: Disable dark mode if it doesn't match your application's theme:
```jsx
<EmbedDirectTemplate token={token} darkModeDisabled={true} />
```
These customization options are available for both Direct Templates and Signing Token embeds.
## Supported Frameworks ## Supported Frameworks
We support embedding across a range of popular JavaScript frameworks, including: We support embedding across a range of popular JavaScript frameworks, including:
@@ -120,12 +167,11 @@ Once you've obtained the appropriate tokens, you can integrate the signing exper
If you're using **web components**, the integration process is slightly different. Keep in mind that web components are currently less tested but can still provide flexibility for general use cases. If you're using **web components**, the integration process is slightly different. Keep in mind that web components are currently less tested but can still provide flexibility for general use cases.
## Stay Tuned for the Platform Plan ## Related
While embedding is already a powerful tool, we're working on a **Platform Plan** that will introduce even more functionality. This plan will offer: - [React Integration](/developers/embedding/react)
- [Vue Integration](/developers/embedding/vue)
- Additional customization options - [Svelte Integration](/developers/embedding/svelte)
- The ability to remove Documenso branding - [Solid Integration](/developers/embedding/solid)
- Additional controls for the signing experience - [Preact Integration](/developers/embedding/preact)
- [CSS Variables](/developers/embedding/css-variables)
More details will be shared as we approach the release.

View File

@@ -44,6 +44,9 @@ const MyEmbeddingComponent = () => {
| email | string (optional) | The email the signer that will be used by default for signing | | email | string (optional) | The email the signer that will be used by default for signing |
| lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications | | lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications |
| externalId | string (optional) | The external ID to be used for the document that will be created upon completion | | externalId | string (optional) | The external ID to be used for the document that will be created upon completion |
| css | string (optional) | Custom CSS to style the embedded component (Platform Plan only) |
| cssVars | object (optional) | CSS variables for customizing colors, spacing, etc. (Platform Plan only) |
| darkModeDisabled | boolean (optional) | Disable dark mode functionality (Platform Plan only) |
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
@@ -75,3 +78,30 @@ const MyEmbeddingComponent = () => {
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
### Styling and Theming (Platform Plan)
Platform customers have access to advanced styling options:
```jsx
import { EmbedDirectTemplate } from '@documenso/embed-preact';
const MyEmbeddingComponent = () => {
const token = 'your-token';
const customCss = `
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
`;
const cssVars = {
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
};
return (
<EmbedDirectTemplate token={token} css={customCss} cssVars={cssVars} darkModeDisabled={true} />
);
};
```

View File

@@ -44,6 +44,9 @@ const MyEmbeddingComponent = () => {
| email | string (optional) | The email the signer that will be used by default for signing | | email | string (optional) | The email the signer that will be used by default for signing |
| lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications | | lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications |
| externalId | string (optional) | The external ID to be used for the document that will be created upon completion | | externalId | string (optional) | The external ID to be used for the document that will be created upon completion |
| css | string (optional) | Custom CSS to style the embedded component (Platform Plan only) |
| cssVars | object (optional) | CSS variables for customizing colors, spacing, etc. (Platform Plan only) |
| darkModeDisabled | boolean (optional) | Disable dark mode functionality (Platform Plan only) |
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
@@ -75,3 +78,34 @@ const MyEmbeddingComponent = () => {
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
### Styling and Theming (Platform Plan)
Platform customers have access to advanced styling options:
```jsx
import { EmbedDirectTemplate } from '@documenso/embed-react';
const MyEmbeddingComponent = () => {
return (
<EmbedDirectTemplate
token="your-token"
// Custom CSS
css={`
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
`}
// CSS Variables
cssVars={{
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
}}
// Dark Mode Control
darkModeDisabled={true}
/>
);
};
```

View File

@@ -44,6 +44,9 @@ const MyEmbeddingComponent = () => {
| email | string (optional) | The email the signer that will be used by default for signing | | email | string (optional) | The email the signer that will be used by default for signing |
| lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications | | lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications |
| externalId | string (optional) | The external ID to be used for the document that will be created upon completion | | externalId | string (optional) | The external ID to be used for the document that will be created upon completion |
| css | string (optional) | Custom CSS to style the embedded component (Platform Plan only) |
| cssVars | object (optional) | CSS variables for customizing colors, spacing, etc. (Platform Plan only) |
| darkModeDisabled | boolean (optional) | Disable dark mode functionality (Platform Plan only) |
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
@@ -75,3 +78,30 @@ const MyEmbeddingComponent = () => {
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
### Styling and Theming (Platform Plan)
Platform customers have access to advanced styling options:
```jsx
import { EmbedDirectTemplate } from '@documenso/embed-solid';
const MyEmbeddingComponent = () => {
const token = 'your-token';
const customCss = `
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
`;
const cssVars = {
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
};
return (
<EmbedDirectTemplate token={token} css={customCss} cssVars={cssVars} darkModeDisabled={true} />
);
};
```

View File

@@ -46,6 +46,9 @@ If you have a direct link template, you can simply provide the token for the tem
| email | string (optional) | The email the signer that will be used by default for signing | | email | string (optional) | The email the signer that will be used by default for signing |
| lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications | | lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications |
| externalId | string (optional) | The external ID to be used for the document that will be created upon completion | | externalId | string (optional) | The external ID to be used for the document that will be created upon completion |
| css | string (optional) | Custom CSS to style the embedded component (Platform Plan only) |
| cssVars | object (optional) | CSS variables for customizing colors, spacing, etc. (Platform Plan only) |
| darkModeDisabled | boolean (optional) | Disable dark mode functionality (Platform Plan only) |
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
@@ -77,3 +80,28 @@ const MyEmbeddingComponent = () => {
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
### Styling and Theming (Platform Plan)
Platform customers have access to advanced styling options:
```html
<script lang="ts">
import { EmbedDirectTemplate } from '@documenso/embed-svelte';
const token = 'your-token';
const customCss = `
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
`;
const cssVars = {
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
};
</script>
<EmbedDirectTemplate {token} css="{customCss}" cssVars="{cssVars}" darkModeDisabled="{true}" />
```

View File

@@ -46,6 +46,9 @@ If you have a direct link template, you can simply provide the token for the tem
| email | string (optional) | The email the signer that will be used by default for signing | | email | string (optional) | The email the signer that will be used by default for signing |
| lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications | | lockEmail | boolean (optional) | Whether or not the email field should be locked disallowing modifications |
| externalId | string (optional) | The external ID to be used for the document that will be created upon completion | | externalId | string (optional) | The external ID to be used for the document that will be created upon completion |
| css | string (optional) | Custom CSS to style the embedded component (Platform Plan only) |
| cssVars | object (optional) | CSS variables for customizing colors, spacing, etc. (Platform Plan only) |
| darkModeDisabled | boolean (optional) | Disable dark mode functionality (Platform Plan only) |
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
@@ -77,3 +80,35 @@ const MyEmbeddingComponent = () => {
| onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed | | onDocumentReady | function (optional) | A callback function that will be called when the document is loaded and ready to be signed |
| onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed | | onDocumentCompleted | function (optional) | A callback function that will be called when the document has been completed |
| onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document | | onDocumentError | function (optional) | A callback function that will be called when an error occurs with the document |
### Styling and Theming (Platform Plan)
Platform customers have access to advanced styling options:
```html
<script setup lang="ts">
import { EmbedDirectTemplate } from '@documenso/embed-vue';
const token = ref('your-token');
const customCss = `
.documenso-embed {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
`;
const cssVars = {
colorPrimary: '#0000FF',
colorBackground: '#F5F5F5',
borderRadius: '8px',
};
</script>
<template>
<EmbedDirectTemplate
:token="token"
:css="customCss"
:cssVars="cssVars"
:darkModeDisabled="true"
/>
</template>
```

View File

@@ -1,6 +1,6 @@
{ {
"name": "@documenso/marketing", "name": "@documenso/marketing",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"private": true, "private": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"scripts": { "scripts": {

View File

@@ -2,8 +2,8 @@ declare namespace NodeJS {
export interface ProcessEnv { export interface ProcessEnv {
NEXT_PUBLIC_WEBAPP_URL?: string; NEXT_PUBLIC_WEBAPP_URL?: string;
NEXT_PUBLIC_MARKETING_URL?: string; NEXT_PUBLIC_MARKETING_URL?: string;
NEXT_PRIVATE_INTERNAL_WEBAPP_URL?: string; NEXT_PRIVATE_INTERNAL_WEBAPP_URL?:string;
NEXT_PRIVATE_DATABASE_URL: string; NEXT_PRIVATE_DATABASE_URL: string;
NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID: string; NEXT_PUBLIC_STRIPE_COMMUNITY_PLAN_MONTHLY_PRICE_ID: string;

View File

@@ -1,6 +1,6 @@
{ {
"name": "@documenso/web", "name": "@documenso/web",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"private": true, "private": true,
"license": "AGPL-3.0", "license": "AGPL-3.0",
"scripts": { "scripts": {

View File

@@ -2,7 +2,7 @@ declare namespace NodeJS {
export interface ProcessEnv { export interface ProcessEnv {
NEXT_PUBLIC_WEBAPP_URL?: string; NEXT_PUBLIC_WEBAPP_URL?: string;
NEXT_PUBLIC_MARKETING_URL?: string; NEXT_PUBLIC_MARKETING_URL?: string;
NEXT_PRIVATE_INTERNAL_WEBAPP_URL?: string; NEXT_PRIVATE_INTERNAL_WEBAPP_URL?:string;
NEXT_PRIVATE_DATABASE_URL: string; NEXT_PRIVATE_DATABASE_URL: string;

View File

@@ -26,7 +26,7 @@ export const DocumentPageViewInformation = ({
const { _, i18n } = useLingui(); const { _, i18n } = useLingui();
const documentInformation = useMemo(() => { const documentInformation = useMemo(() => {
const info = [ return [
{ {
description: msg`Uploaded by`, description: msg`Uploaded by`,
value: userId === document.userId ? _(msg`You`) : document.User.name ?? document.User.email, value: userId === document.userId ? _(msg`You`) : document.User.name ?? document.User.email,
@@ -44,20 +44,8 @@ export const DocumentPageViewInformation = ({
.toRelative(), .toRelative(),
}, },
]; ];
// eslint-disable-next-line react-hooks/exhaustive-deps
if (document.deletedAt) { }, [isMounted, document, userId]);
info.push({
description: msg`Deleted`,
value:
document.deletedAt &&
DateTime.fromJSDate(document.deletedAt)
.setLocale(i18n.locales?.[0] || i18n.locale)
.toFormat('MMMM d, yyyy'),
});
}
return info;
}, [isMounted, document, i18n.locales?.[0] || i18n.locale, userId]);
return ( return (
<section className="dark:bg-background text-foreground border-border bg-widget flex flex-col rounded-xl border"> <section className="dark:bg-background text-foreground border-border bg-widget flex flex-col rounded-xl border">

View File

@@ -221,7 +221,7 @@ export const DocumentPageView = async ({ params, team }: DocumentPageViewProps)
<DocumentPageViewDropdown document={documentWithRecipients} team={team} /> <DocumentPageViewDropdown document={documentWithRecipients} team={team} />
</div> </div>
<p className="text-muted-foreground mt-2 px-4 text-sm"> <p className="text-muted-foreground mt-2 px-4 text-sm ">
{match(document.status) {match(document.status)
.with(DocumentStatus.COMPLETED, () => ( .with(DocumentStatus.COMPLETED, () => (
<Trans>This document has been signed by all recipients</Trans> <Trans>This document has been signed by all recipients</Trans>

View File

@@ -7,7 +7,6 @@ import Link from 'next/link';
import { Trans, msg } from '@lingui/macro'; import { Trans, msg } from '@lingui/macro';
import { useLingui } from '@lingui/react'; import { useLingui } from '@lingui/react';
import { import {
ArchiveRestore,
CheckCircle, CheckCircle,
Copy, Copy,
Download, Download,
@@ -24,8 +23,8 @@ import { useSession } from 'next-auth/react';
import { downloadPDF } from '@documenso/lib/client-only/download-pdf'; import { downloadPDF } from '@documenso/lib/client-only/download-pdf';
import { formatDocumentsPath } from '@documenso/lib/utils/teams'; import { formatDocumentsPath } from '@documenso/lib/utils/teams';
import type { Document, Recipient, Team, User } from '@documenso/prisma/client';
import { DocumentStatus, RecipientRole } from '@documenso/prisma/client'; import { DocumentStatus, RecipientRole } from '@documenso/prisma/client';
import type { Document, Recipient, Team, User } from '@documenso/prisma/client';
import type { DocumentWithData } from '@documenso/prisma/types/document-with-data'; import type { DocumentWithData } from '@documenso/prisma/types/document-with-data';
import { trpc as trpcClient } from '@documenso/trpc/client'; import { trpc as trpcClient } from '@documenso/trpc/client';
import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button'; import { DocumentShareButton } from '@documenso/ui/components/document/document-share-button';
@@ -44,7 +43,6 @@ import { ResendDocumentActionItem } from './_action-items/resend-document';
import { DeleteDocumentDialog } from './delete-document-dialog'; import { DeleteDocumentDialog } from './delete-document-dialog';
import { DuplicateDocumentDialog } from './duplicate-document-dialog'; import { DuplicateDocumentDialog } from './duplicate-document-dialog';
import { MoveDocumentDialog } from './move-document-dialog'; import { MoveDocumentDialog } from './move-document-dialog';
import { RestoreDocumentDialog } from './restore-document-dialog';
export type DataTableActionDropdownProps = { export type DataTableActionDropdownProps = {
row: Document & { row: Document & {
@@ -63,7 +61,6 @@ export const DataTableActionDropdown = ({ row, team }: DataTableActionDropdownPr
const [isDeleteDialogOpen, setDeleteDialogOpen] = useState(false); const [isDeleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [isDuplicateDialogOpen, setDuplicateDialogOpen] = useState(false); const [isDuplicateDialogOpen, setDuplicateDialogOpen] = useState(false);
const [isMoveDialogOpen, setMoveDialogOpen] = useState(false); const [isMoveDialogOpen, setMoveDialogOpen] = useState(false);
const [isRestoreDialogOpen, setRestoreDialogOpen] = useState(false);
if (!session) { if (!session) {
return null; return null;
@@ -79,7 +76,6 @@ export const DataTableActionDropdown = ({ row, team }: DataTableActionDropdownPr
// const isSigned = recipient?.signingStatus === SigningStatus.SIGNED; // const isSigned = recipient?.signingStatus === SigningStatus.SIGNED;
const isCurrentTeamDocument = team && row.team?.url === team.url; const isCurrentTeamDocument = team && row.team?.url === team.url;
const canManageDocument = Boolean(isOwner || isCurrentTeamDocument); const canManageDocument = Boolean(isOwner || isCurrentTeamDocument);
const isDeletedDocument = row.deletedAt !== null;
const documentsPath = formatDocumentsPath(team?.url); const documentsPath = formatDocumentsPath(team?.url);
@@ -185,23 +181,13 @@ export const DataTableActionDropdown = ({ row, team }: DataTableActionDropdownPr
Void Void
</DropdownMenuItem> */} </DropdownMenuItem> */}
{isDeletedDocument ? ( <DropdownMenuItem
<DropdownMenuItem onClick={() => setDeleteDialogOpen(true)}
onClick={() => setRestoreDialogOpen(true)} disabled={Boolean(!canManageDocument && team?.teamEmail)}
disabled={Boolean(!canManageDocument)} >
> <Trash2 className="mr-2 h-4 w-4" />
<ArchiveRestore className="mr-2 h-4 w-4" /> {canManageDocument ? _(msg`Delete`) : _(msg`Hide`)}
Restore </DropdownMenuItem>
</DropdownMenuItem>
) : (
<DropdownMenuItem
onClick={() => setDeleteDialogOpen(true)}
disabled={Boolean(!canManageDocument && team?.teamEmail)}
>
<Trash2 className="mr-2 h-4 w-4" />
{canManageDocument ? 'Delete' : 'Hide'}
</DropdownMenuItem>
)}
<DropdownMenuLabel> <DropdownMenuLabel>
<Trans>Share</Trans> <Trans>Share</Trans>
@@ -253,16 +239,6 @@ export const DataTableActionDropdown = ({ row, team }: DataTableActionDropdownPr
onOpenChange={setMoveDialogOpen} onOpenChange={setMoveDialogOpen}
/> />
<RestoreDocumentDialog
id={row.id}
status={row.status}
documentTitle={row.title}
open={isRestoreDialogOpen}
onOpenChange={setRestoreDialogOpen}
teamId={team?.id}
canManageDocument={canManageDocument}
/>
{isDuplicateDialogOpen && ( {isDuplicateDialogOpen && (
<DuplicateDocumentDialog <DuplicateDocumentDialog
id={row.id} id={row.id}

View File

@@ -4,10 +4,10 @@ import { Trans } from '@lingui/macro';
import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app'; import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session'; import { getRequiredServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
import type { PeriodSelectorValue } from '@documenso/lib/server-only/document/find-documents';
import { findDocuments } from '@documenso/lib/server-only/document/find-documents'; import { findDocuments } from '@documenso/lib/server-only/document/find-documents';
import type { GetStatsInput } from '@documenso/lib/server-only/document/get-stats-new'; import type { PeriodSelectorValue } from '@documenso/lib/server-only/document/find-documents';
import { getStats } from '@documenso/lib/server-only/document/get-stats-new'; import type { GetStatsInput } from '@documenso/lib/server-only/document/get-stats';
import { getStats } from '@documenso/lib/server-only/document/get-stats';
import { parseToIntegerArray } from '@documenso/lib/utils/params'; import { parseToIntegerArray } from '@documenso/lib/utils/params';
import { formatDocumentsPath } from '@documenso/lib/utils/teams'; import { formatDocumentsPath } from '@documenso/lib/utils/teams';
import type { Team, TeamEmail, TeamMemberRole } from '@documenso/prisma/client'; import type { Team, TeamEmail, TeamMemberRole } from '@documenso/prisma/client';
@@ -35,7 +35,7 @@ export interface DocumentsPageViewProps {
senderIds?: string; senderIds?: string;
search?: string; search?: string;
}; };
team?: Team & { teamEmail: TeamEmail | null } & { currentTeamMember?: { role: TeamMemberRole } }; team?: Team & { teamEmail?: TeamEmail | null } & { currentTeamMember?: { role: TeamMemberRole } };
} }
export const DocumentsPageView = async ({ searchParams = {}, team }: DocumentsPageViewProps) => { export const DocumentsPageView = async ({ searchParams = {}, team }: DocumentsPageViewProps) => {
@@ -50,14 +50,25 @@ export const DocumentsPageView = async ({ searchParams = {}, team }: DocumentsPa
const currentTeam = team const currentTeam = team
? { id: team.id, url: team.url, teamEmail: team.teamEmail?.email } ? { id: team.id, url: team.url, teamEmail: team.teamEmail?.email }
: undefined; : undefined;
const currentTeamMemberRole = team?.currentTeamMember?.role;
const getStatOptions: GetStatsInput = { const getStatOptions: GetStatsInput = {
user, user,
period, period,
team,
search, search,
}; };
if (team) {
getStatOptions.team = {
teamId: team.id,
teamEmail: team.teamEmail?.email,
senderIds,
currentTeamMemberRole,
currentUserEmail: user.email,
userId: user.id,
};
}
const stats = await getStats(getStatOptions); const stats = await getStats(getStatOptions);
const results = await findDocuments({ const results = await findDocuments({
@@ -117,7 +128,6 @@ export const DocumentsPageView = async ({ searchParams = {}, team }: DocumentsPa
ExtendedDocumentStatus.PENDING, ExtendedDocumentStatus.PENDING,
ExtendedDocumentStatus.COMPLETED, ExtendedDocumentStatus.COMPLETED,
ExtendedDocumentStatus.DRAFT, ExtendedDocumentStatus.DRAFT,
ExtendedDocumentStatus.BIN,
ExtendedDocumentStatus.ALL, ExtendedDocumentStatus.ALL,
].map((value) => ( ].map((value) => (
<TabsTrigger <TabsTrigger

View File

@@ -1,6 +1,6 @@
import { msg } from '@lingui/macro'; import { msg } from '@lingui/macro';
import { useLingui } from '@lingui/react'; import { useLingui } from '@lingui/react';
import { Bird, CheckCircle2, Trash } from 'lucide-react'; import { Bird, CheckCircle2 } from 'lucide-react';
import { match } from 'ts-pattern'; import { match } from 'ts-pattern';
import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status'; import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
@@ -30,11 +30,6 @@ export const EmptyDocumentState = ({ status }: EmptyDocumentProps) => {
message: msg`You have not yet created or received any documents. To create a document please upload one.`, message: msg`You have not yet created or received any documents. To create a document please upload one.`,
icon: Bird, icon: Bird,
})) }))
.with(ExtendedDocumentStatus.BIN, () => ({
title: msg`No documents in the bin`,
message: msg`There are no documents in the bin.`,
icon: Trash,
}))
.otherwise(() => ({ .otherwise(() => ({
title: msg`Nothing to do`, title: msg`Nothing to do`,
message: msg`All documents have been processed. Any new documents that are sent or received will show here.`, message: msg`All documents have been processed. Any new documents that are sent or received will show here.`,
@@ -47,6 +42,7 @@ export const EmptyDocumentState = ({ status }: EmptyDocumentProps) => {
data-testid="empty-document-state" data-testid="empty-document-state"
> >
<Icon className="h-12 w-12" strokeWidth={1.5} /> <Icon className="h-12 w-12" strokeWidth={1.5} />
<div className="text-center"> <div className="text-center">
<h3 className="text-lg font-semibold">{_(title)}</h3> <h3 className="text-lg font-semibold">{_(title)}</h3>

View File

@@ -1,90 +0,0 @@
import { useRouter } from 'next/navigation';
import type { DocumentStatus } from '@documenso/prisma/client';
import { trpc as trpcReact } from '@documenso/trpc/react';
import {
AlertDialog,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@documenso/ui/primitives/alert-dialog';
import { Button } from '@documenso/ui/primitives/button';
import { useToast } from '@documenso/ui/primitives/use-toast';
type RestoreDocumentDialogProps = {
id: number;
open: boolean;
onOpenChange: (_open: boolean) => void;
status: DocumentStatus;
documentTitle: string;
teamId?: number;
canManageDocument: boolean;
};
export function RestoreDocumentDialog({
id,
teamId,
open,
onOpenChange,
documentTitle,
canManageDocument,
}: RestoreDocumentDialogProps) {
const router = useRouter();
const { toast } = useToast();
const { mutateAsync: restoreDocument, isLoading } =
trpcReact.document.restoreDocument.useMutation({
onSuccess: () => {
router.refresh();
toast({
title: 'Document restored',
description: `"${documentTitle}" has been successfully restored`,
duration: 5000,
});
onOpenChange(false);
},
});
const onRestore = async () => {
try {
await restoreDocument({ id, teamId });
} catch {
toast({
title: 'Something went wrong',
description: 'This document could not be restored at this time. Please try again.',
variant: 'destructive',
duration: 7500,
});
}
};
return (
<AlertDialog open={open} onOpenChange={(value) => !isLoading && onOpenChange(value)}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
<AlertDialogDescription>
You are about to restore the document <strong>"{documentTitle}"</strong>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<Button
type="button"
loading={isLoading}
onClick={onRestore}
disabled={!canManageDocument}
>
Restore
</Button>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}

View File

@@ -53,6 +53,17 @@ export const SigningPageView = ({
}: SigningPageViewProps) => { }: SigningPageViewProps) => {
const { documentData, documentMeta } = document; const { documentData, documentMeta } = document;
const shouldUseTeamDetails =
document.teamId && document.team?.teamGlobalSettings?.includeSenderDetails === false;
let senderName = document.User.name ?? '';
let senderEmail = `(${document.User.email})`;
if (shouldUseTeamDetails) {
senderName = document.team?.name ?? '';
senderEmail = document.team?.teamEmail?.email ? `(${document.team.teamEmail.email})` : '';
}
return ( return (
<div className="mx-auto w-full max-w-screen-xl"> <div className="mx-auto w-full max-w-screen-xl">
<h1 <h1
@@ -63,27 +74,41 @@ export const SigningPageView = ({
</h1> </h1>
<div className="mt-2.5 flex flex-wrap items-center justify-between gap-x-6"> <div className="mt-2.5 flex flex-wrap items-center justify-between gap-x-6">
<div> <div className="max-w-[50ch]">
<p <span className="text-muted-foreground truncate" title={senderName}>
className="text-muted-foreground truncate" {senderName} {senderEmail}
title={document.User.name ? document.User.name : ''} </span>{' '}
> <span className="text-muted-foreground">
{document.User.name}
</p>
<p className="text-muted-foreground">
{match(recipient.role) {match(recipient.role)
.with(RecipientRole.VIEWER, () => ( .with(RecipientRole.VIEWER, () =>
<Trans>({document.User.email}) has invited you to view this document</Trans> document.teamId && !shouldUseTeamDetails ? (
)) <Trans>
.with(RecipientRole.SIGNER, () => ( on behalf of "{document.team?.name}" has invited you to view this document
<Trans>({document.User.email}) has invited you to sign this document</Trans> </Trans>
)) ) : (
.with(RecipientRole.APPROVER, () => ( <Trans>has invited you to view this document</Trans>
<Trans>({document.User.email}) has invited you to approve this document</Trans> ),
)) )
.with(RecipientRole.SIGNER, () =>
document.teamId && !shouldUseTeamDetails ? (
<Trans>
on behalf of "{document.team?.name}" has invited you to sign this document
</Trans>
) : (
<Trans>has invited you to sign this document</Trans>
),
)
.with(RecipientRole.APPROVER, () =>
document.teamId && !shouldUseTeamDetails ? (
<Trans>
on behalf of "{document.team?.name}" has invited you to approve this document
</Trans>
) : (
<Trans>has invited you to approve this document</Trans>
),
)
.otherwise(() => null)} .otherwise(() => null)}
</p> </span>
</div> </div>
<RejectDocumentDialog document={document} token={recipient.token} /> <RejectDocumentDialog document={document} token={recipient.token} />

View File

@@ -167,7 +167,6 @@ export const DocumentHistorySheet = ({
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_CREATED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_CREATED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_COMPLETED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_COMPLETED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_DELETED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_DELETED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RESTORED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_COMPLETED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_COMPLETED },
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_REJECTED }, { type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_REJECTED },

View File

@@ -3,7 +3,7 @@ import type { HTMLAttributes } from 'react';
import type { MessageDescriptor } from '@lingui/core'; import type { MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/macro'; import { msg } from '@lingui/macro';
import { useLingui } from '@lingui/react'; import { useLingui } from '@lingui/react';
import { CheckCircle2, Clock, File, TrashIcon } from 'lucide-react'; import { CheckCircle2, Clock, File } from 'lucide-react';
import type { LucideIcon } from 'lucide-react/dist/lucide-react'; import type { LucideIcon } from 'lucide-react/dist/lucide-react';
import type { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status'; import type { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
@@ -47,12 +47,6 @@ export const FRIENDLY_STATUS_MAP: Record<ExtendedDocumentStatus, FriendlyStatus>
labelExtended: msg`Document All`, labelExtended: msg`Document All`,
color: 'text-muted-foreground', color: 'text-muted-foreground',
}, },
BIN: {
label: msg`Bin`,
labelExtended: msg`Document Bin`,
icon: TrashIcon,
color: 'text-red-500 dark:text-red-200',
},
}; };
export type DocumentStatusProps = HTMLAttributes<HTMLSpanElement> & { export type DocumentStatusProps = HTMLAttributes<HTMLSpanElement> & {

View File

@@ -1,3 +1,5 @@
import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
import { buildLogger } from '@documenso/lib/utils/logger';
import * as trpcNext from '@documenso/trpc/server/adapters/next'; import * as trpcNext from '@documenso/trpc/server/adapters/next';
import { createTrpcContext } from '@documenso/trpc/server/context'; import { createTrpcContext } from '@documenso/trpc/server/context';
import { appRouter } from '@documenso/trpc/server/router'; import { appRouter } from '@documenso/trpc/server/router';
@@ -11,7 +13,44 @@ export const config = {
}, },
}; };
const logger = buildLogger();
export default trpcNext.createNextApiHandler({ export default trpcNext.createNextApiHandler({
router: appRouter, router: appRouter,
createContext: async ({ req, res }) => createTrpcContext({ req, res }), createContext: async ({ req, res }) => createTrpcContext({ req, res }),
onError(opts) {
const { error, path } = opts;
// Currently trialing changes with template and team router only.
if (!path || (!path.startsWith('template') && !path.startsWith('team'))) {
return;
}
// Always log the error for now.
console.error(error);
const appError = AppError.parseError(error.cause || error);
const isAppError = error.cause instanceof AppError;
// Only log AppErrors that are explicitly set to 500 or the error code
// is in the errorCodesToAlertOn list.
const isLoggableAppError =
isAppError && (appError.statusCode === 500 || errorCodesToAlertOn.includes(appError.code));
// Only log TRPC errors that are in the `errorCodesToAlertOn` list and is
// not an AppError.
const isLoggableTrpcError = !isAppError && errorCodesToAlertOn.includes(error.code);
if (isLoggableAppError || isLoggableTrpcError) {
logger.error(error, {
method: path,
context: {
appError: AppError.toJSON(appError),
},
});
}
},
}); });
const errorCodesToAlertOn = [AppErrorCode.UNKNOWN_ERROR, 'INTERNAL_SERVER_ERROR'];

144
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@documenso/root", "name": "@documenso/root",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@documenso/root", "name": "@documenso/root",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"workspaces": [ "workspaces": [
"apps/*", "apps/*",
"packages/*" "packages/*"
@@ -77,7 +77,7 @@
}, },
"apps/marketing": { "apps/marketing": {
"name": "@documenso/marketing", "name": "@documenso/marketing",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {
"@documenso/assets": "*", "@documenso/assets": "*",
@@ -438,7 +438,7 @@
}, },
"apps/web": { "apps/web": {
"name": "@documenso/web", "name": "@documenso/web",
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"dependencies": { "dependencies": {
"@documenso/api": "*", "@documenso/api": "*",
@@ -3498,6 +3498,34 @@
"resolved": "https://registry.npmjs.org/@hexagon/base64/-/base64-1.1.28.tgz", "resolved": "https://registry.npmjs.org/@hexagon/base64/-/base64-1.1.28.tgz",
"integrity": "sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw==" "integrity": "sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw=="
}, },
"node_modules/@honeybadger-io/core": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/@honeybadger-io/core/-/core-6.6.0.tgz",
"integrity": "sha512-B5X05huAsDs7NJOYm4bwHf2v0tMuTjBWLfumHH9DCblq8E1XrujlbbNkIdEHlzc01K9oAXuvsaBwVkE7G5+aLQ==",
"dependencies": {
"json-nd": "^1.0.0",
"stacktrace-parser": "^0.1.10"
},
"engines": {
"node": ">=14"
}
},
"node_modules/@honeybadger-io/js": {
"version": "6.10.1",
"resolved": "https://registry.npmjs.org/@honeybadger-io/js/-/js-6.10.1.tgz",
"integrity": "sha512-T5WAhYHWHXFMxjY4NSawSY945i8ISIL5/gsjN3m0xO+oXrBAFaul3wY5p/FGH6r6RfCrjHoHl9Iu7Ed9aO9Ehg==",
"dependencies": {
"@honeybadger-io/core": "^6.6.0",
"@types/aws-lambda": "^8.10.89",
"@types/express": "^4.17.13"
},
"bin": {
"honeybadger-checkins-sync": "scripts/check-ins-sync-bin.js"
},
"engines": {
"node": ">=14"
}
},
"node_modules/@hookform/resolvers": { "node_modules/@hookform/resolvers": {
"version": "3.3.2", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.3.2.tgz", "resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.3.2.tgz",
@@ -10956,6 +10984,20 @@
"@types/estree": "*" "@types/estree": "*"
} }
}, },
"node_modules/@types/aws-lambda": {
"version": "8.10.146",
"resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.146.tgz",
"integrity": "sha512-3BaDXYTh0e6UCJYL/jwV/3+GRslSc08toAiZSmleYtkAUyV5rtvdPYxrG/88uqvTuT6sb27WE9OS90ZNTIuQ0g=="
},
"node_modules/@types/body-parser": {
"version": "1.19.5",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz",
"integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==",
"dependencies": {
"@types/connect": "*",
"@types/node": "*"
}
},
"node_modules/@types/cacheable-request": { "node_modules/@types/cacheable-request": {
"version": "6.0.3", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz",
@@ -10968,6 +11010,14 @@
"@types/responselike": "^1.0.0" "@types/responselike": "^1.0.0"
} }
}, },
"node_modules/@types/connect": {
"version": "3.4.38",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
"integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/cookie": { "node_modules/@types/cookie": {
"version": "0.6.0", "version": "0.6.0",
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
@@ -11090,6 +11140,28 @@
"@types/estree": "*" "@types/estree": "*"
} }
}, },
"node_modules/@types/express": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz",
"integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==",
"dependencies": {
"@types/body-parser": "*",
"@types/express-serve-static-core": "^4.17.33",
"@types/qs": "*",
"@types/serve-static": "*"
}
},
"node_modules/@types/express-serve-static-core": {
"version": "4.19.6",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz",
"integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==",
"dependencies": {
"@types/node": "*",
"@types/qs": "*",
"@types/range-parser": "*",
"@types/send": "*"
}
},
"node_modules/@types/formidable": { "node_modules/@types/formidable": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/formidable/-/formidable-2.0.6.tgz",
@@ -11132,6 +11204,11 @@
"integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==",
"dev": true "dev": true
}, },
"node_modules/@types/http-errors": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz",
"integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA=="
},
"node_modules/@types/istanbul-lib-coverage": { "node_modules/@types/istanbul-lib-coverage": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
@@ -11201,6 +11278,11 @@
"resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.10.tgz", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.10.tgz",
"integrity": "sha512-Rllzc5KHk0Al5/WANwgSPl1/CwjqCy+AZrGd78zuK+jO9aDM6ffblZ+zIjgPNAaEBmlO0RYDvLNh7wD0zKVgEg==" "integrity": "sha512-Rllzc5KHk0Al5/WANwgSPl1/CwjqCy+AZrGd78zuK+jO9aDM6ffblZ+zIjgPNAaEBmlO0RYDvLNh7wD0zKVgEg=="
}, },
"node_modules/@types/mime": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
"integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w=="
},
"node_modules/@types/minimatch": { "node_modules/@types/minimatch": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz",
@@ -11338,6 +11420,11 @@
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz",
"integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==" "integrity": "sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng=="
}, },
"node_modules/@types/qs": {
"version": "6.9.17",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz",
"integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ=="
},
"node_modules/@types/ramda": { "node_modules/@types/ramda": {
"version": "0.29.9", "version": "0.29.9",
"resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.29.9.tgz", "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.29.9.tgz",
@@ -11346,6 +11433,11 @@
"types-ramda": "^0.29.6" "types-ramda": "^0.29.6"
} }
}, },
"node_modules/@types/range-parser": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
"integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ=="
},
"node_modules/@types/react": { "node_modules/@types/react": {
"version": "18.2.18", "version": "18.2.18",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.18.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.18.tgz",
@@ -11401,6 +11493,25 @@
"integrity": "sha512-T+YwkslhsM+CeuhYUxyAjWm7mJ5am/K10UX40RuA6k6Lc7eGtq8iY2xOzy7Vq0GOqhl/xZl5l2FwURZMTPTUww==", "integrity": "sha512-T+YwkslhsM+CeuhYUxyAjWm7mJ5am/K10UX40RuA6k6Lc7eGtq8iY2xOzy7Vq0GOqhl/xZl5l2FwURZMTPTUww==",
"dev": true "dev": true
}, },
"node_modules/@types/send": {
"version": "0.17.4",
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz",
"integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==",
"dependencies": {
"@types/mime": "^1",
"@types/node": "*"
}
},
"node_modules/@types/serve-static": {
"version": "1.15.7",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz",
"integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==",
"dependencies": {
"@types/http-errors": "*",
"@types/node": "*",
"@types/send": "*"
}
},
"node_modules/@types/swagger-ui-react": { "node_modules/@types/swagger-ui-react": {
"version": "4.18.3", "version": "4.18.3",
"resolved": "https://registry.npmjs.org/@types/swagger-ui-react/-/swagger-ui-react-4.18.3.tgz", "resolved": "https://registry.npmjs.org/@types/swagger-ui-react/-/swagger-ui-react-4.18.3.tgz",
@@ -21011,6 +21122,11 @@
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
"integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="
}, },
"node_modules/json-nd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-nd/-/json-nd-1.0.0.tgz",
"integrity": "sha512-8TIp0HZAY0VVrwRQJJPb4+nOTSPoOWZeEKBTLizUfQO4oym5Fc/MKqN8vEbLCxcyxDf2vwNxOQ1q84O49GWPyQ=="
},
"node_modules/json-parse-even-better-errors": { "node_modules/json-parse-even-better-errors": {
"version": "2.3.1", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
@@ -31249,6 +31365,25 @@
"integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
"dev": true "dev": true
}, },
"node_modules/stacktrace-parser": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz",
"integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==",
"dependencies": {
"type-fest": "^0.7.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/stacktrace-parser/node_modules/type-fest": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz",
"integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==",
"engines": {
"node": ">=8"
}
},
"node_modules/stampit": { "node_modules/stampit": {
"version": "4.3.2", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/stampit/-/stampit-4.3.2.tgz", "resolved": "https://registry.npmjs.org/stampit/-/stampit-4.3.2.tgz",
@@ -36484,6 +36619,7 @@
"@documenso/email": "*", "@documenso/email": "*",
"@documenso/prisma": "*", "@documenso/prisma": "*",
"@documenso/signing": "*", "@documenso/signing": "*",
"@honeybadger-io/js": "^6.10.1",
"@lingui/core": "^4.11.3", "@lingui/core": "^4.11.3",
"@lingui/macro": "^4.11.3", "@lingui/macro": "^4.11.3",
"@lingui/react": "^4.11.3", "@lingui/react": "^4.11.3",

View File

@@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"version": "1.8.1-rc.1", "version": "1.8.1-rc.3",
"scripts": { "scripts": {
"build": "turbo run build", "build": "turbo run build",
"build:web": "turbo run build --filter=@documenso/web", "build:web": "turbo run build --filter=@documenso/web",

View File

@@ -303,6 +303,8 @@ export const ApiContractV1Implementation = createNextRoute(ApiContractV1, {
signingOrder: body.meta.signingOrder, signingOrder: body.meta.signingOrder,
language: body.meta.language, language: body.meta.language,
typedSignatureEnabled: body.meta.typedSignatureEnabled, typedSignatureEnabled: body.meta.typedSignatureEnabled,
distributionMethod: body.meta.distributionMethod,
emailSettings: body.meta.emailSettings,
requestMetadata: extractNextApiRequestMetadata(args.req), requestMetadata: extractNextApiRequestMetadata(args.req),
}); });

View File

@@ -10,6 +10,7 @@ import {
ZDocumentActionAuthTypesSchema, ZDocumentActionAuthTypesSchema,
ZRecipientActionAuthTypesSchema, ZRecipientActionAuthTypesSchema,
} from '@documenso/lib/types/document-auth'; } from '@documenso/lib/types/document-auth';
import { ZDocumentEmailSettingsSchema } from '@documenso/lib/types/document-email';
import { ZFieldMetaSchema } from '@documenso/lib/types/field-meta'; import { ZFieldMetaSchema } from '@documenso/lib/types/field-meta';
import { import {
DocumentDataType, DocumentDataType,
@@ -133,8 +134,12 @@ export const ZCreateDocumentMutationSchema = z.object({
signingOrder: z.nativeEnum(DocumentSigningOrder).optional(), signingOrder: z.nativeEnum(DocumentSigningOrder).optional(),
language: z.enum(SUPPORTED_LANGUAGE_CODES).optional(), language: z.enum(SUPPORTED_LANGUAGE_CODES).optional(),
typedSignatureEnabled: z.boolean().optional().default(true), typedSignatureEnabled: z.boolean().optional().default(true),
distributionMethod: z.nativeEnum(DocumentDistributionMethod).optional(),
emailSettings: ZDocumentEmailSettingsSchema.optional(),
}) })
.partial(), .partial()
.optional()
.default({}),
authOptions: z authOptions: z
.object({ .object({
globalAccessAuth: ZDocumentAccessAuthTypesSchema.optional(), globalAccessAuth: ZDocumentAccessAuthTypesSchema.optional(),
@@ -257,6 +262,7 @@ export const ZGenerateDocumentFromTemplateMutationSchema = z.object({
language: z.enum(SUPPORTED_LANGUAGE_CODES), language: z.enum(SUPPORTED_LANGUAGE_CODES),
distributionMethod: z.nativeEnum(DocumentDistributionMethod), distributionMethod: z.nativeEnum(DocumentDistributionMethod),
typedSignatureEnabled: z.boolean(), typedSignatureEnabled: z.boolean(),
emailSettings: ZDocumentEmailSettingsSchema,
}) })
.partial() .partial()
.optional(), .optional(),

View File

@@ -13,7 +13,9 @@ export const getTeamPrices = async () => {
const priceIds = prices.map((price) => price.id); const priceIds = prices.map((price) => price.id);
if (!monthlyPrice || !yearlyPrice) { if (!monthlyPrice || !yearlyPrice) {
throw new AppError('INVALID_CONFIG', 'Missing monthly or yearly price'); throw new AppError('INVALID_CONFIG', {
message: 'Missing monthly or yearly price',
});
} }
return { return {

View File

@@ -43,7 +43,9 @@ export const transferTeamSubscription = async ({
const teamCustomerId = team.customerId; const teamCustomerId = team.customerId;
if (!teamCustomerId) { if (!teamCustomerId) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Missing customer ID.'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Missing customer ID.',
});
} }
const [teamRelatedPlanPriceIds, teamSeatPrices] = await Promise.all([ const [teamRelatedPlanPriceIds, teamSeatPrices] = await Promise.all([

View File

@@ -61,7 +61,7 @@ export const TemplateDocumentInvite = ({
<> <>
{includeSenderDetails ? ( {includeSenderDetails ? (
<Trans> <Trans>
{inviterName} on behalf of {teamName} has invited you to{' '} {inviterName} on behalf of "{teamName}" has invited you to{' '}
{_(actionVerb).toLowerCase()} {_(actionVerb).toLowerCase()}
</Trans> </Trans>
) : ( ) : (

View File

@@ -42,7 +42,7 @@ export const DocumentInviteEmailTemplate = ({
if (isTeamInvite) { if (isTeamInvite) {
previewText = includeSenderDetails previewText = includeSenderDetails
? msg`${inviterName} on behalf of ${teamName} has invited you to ${action} ${documentName}` ? msg`${inviterName} on behalf of "${teamName}" has invited you to ${action} ${documentName}`
: msg`${teamName} has invited you to ${action} ${documentName}`; : msg`${teamName} has invited you to ${action} ${documentName}`;
} }
@@ -90,14 +90,16 @@ export const DocumentInviteEmailTemplate = ({
<Container className="mx-auto mt-12 max-w-xl"> <Container className="mx-auto mt-12 max-w-xl">
<Section> <Section>
<Text className="my-4 text-base font-semibold"> {!isTeamInvite && (
<Trans> <Text className="my-4 text-base font-semibold">
{inviterName}{' '} <Trans>
<Link className="font-normal text-slate-400" href="mailto:{inviterEmail}"> {inviterName}{' '}
({inviterEmail}) <Link className="font-normal text-slate-400" href="mailto:{inviterEmail}">
</Link> ({inviterEmail})
</Trans> </Link>
</Text> </Trans>
</Text>
)}
<Text className="mt-2 text-base text-slate-400"> <Text className="mt-2 text-base text-slate-400">
{customBody ? ( {customBody ? (

View File

@@ -1,4 +1,4 @@
import { TRPCError } from '@trpc/server'; import type { TRPCError } from '@trpc/server';
import { match } from 'ts-pattern'; import { match } from 'ts-pattern';
import { z } from 'zod'; import { z } from 'zod';
@@ -8,46 +8,69 @@ import { TRPCClientError } from '@documenso/trpc/client';
* Generic application error codes. * Generic application error codes.
*/ */
export enum AppErrorCode { export enum AppErrorCode {
'ALREADY_EXISTS' = 'AlreadyExists', 'ALREADY_EXISTS' = 'ALREADY_EXISTS',
'EXPIRED_CODE' = 'ExpiredCode', 'EXPIRED_CODE' = 'EXPIRED_CODE',
'INVALID_BODY' = 'InvalidBody', 'INVALID_BODY' = 'INVALID_BODY',
'INVALID_REQUEST' = 'InvalidRequest', 'INVALID_REQUEST' = 'INVALID_REQUEST',
'LIMIT_EXCEEDED' = 'LimitExceeded', 'LIMIT_EXCEEDED' = 'LIMIT_EXCEEDED',
'NOT_FOUND' = 'NotFound', 'NOT_FOUND' = 'NOT_FOUND',
'NOT_SETUP' = 'NotSetup', 'NOT_SETUP' = 'NOT_SETUP',
'UNAUTHORIZED' = 'Unauthorized', 'UNAUTHORIZED' = 'UNAUTHORIZED',
'UNKNOWN_ERROR' = 'UnknownError', 'UNKNOWN_ERROR' = 'UNKNOWN_ERROR',
'RETRY_EXCEPTION' = 'RetryException', 'RETRY_EXCEPTION' = 'RETRY_EXCEPTION',
'SCHEMA_FAILED' = 'SchemaFailed', 'SCHEMA_FAILED' = 'SCHEMA_FAILED',
'TOO_MANY_REQUESTS' = 'TooManyRequests', 'TOO_MANY_REQUESTS' = 'TOO_MANY_REQUESTS',
'PROFILE_URL_TAKEN' = 'ProfileUrlTaken', 'PROFILE_URL_TAKEN' = 'PROFILE_URL_TAKEN',
'PREMIUM_PROFILE_URL' = 'PremiumProfileUrl', 'PREMIUM_PROFILE_URL' = 'PREMIUM_PROFILE_URL',
} }
const genericErrorCodeToTrpcErrorCodeMap: Record<string, TRPCError['code']> = { export const genericErrorCodeToTrpcErrorCodeMap: Record<
[AppErrorCode.ALREADY_EXISTS]: 'BAD_REQUEST', string,
[AppErrorCode.EXPIRED_CODE]: 'BAD_REQUEST', { code: TRPCError['code']; status: number }
[AppErrorCode.INVALID_BODY]: 'BAD_REQUEST', > = {
[AppErrorCode.INVALID_REQUEST]: 'BAD_REQUEST', [AppErrorCode.ALREADY_EXISTS]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.NOT_FOUND]: 'NOT_FOUND', [AppErrorCode.EXPIRED_CODE]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.NOT_SETUP]: 'BAD_REQUEST', [AppErrorCode.INVALID_BODY]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.UNAUTHORIZED]: 'UNAUTHORIZED', [AppErrorCode.INVALID_REQUEST]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.UNKNOWN_ERROR]: 'INTERNAL_SERVER_ERROR', [AppErrorCode.NOT_FOUND]: { code: 'NOT_FOUND', status: 404 },
[AppErrorCode.RETRY_EXCEPTION]: 'INTERNAL_SERVER_ERROR', [AppErrorCode.NOT_SETUP]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.SCHEMA_FAILED]: 'INTERNAL_SERVER_ERROR', [AppErrorCode.UNAUTHORIZED]: { code: 'UNAUTHORIZED', status: 401 },
[AppErrorCode.TOO_MANY_REQUESTS]: 'TOO_MANY_REQUESTS', [AppErrorCode.UNKNOWN_ERROR]: { code: 'INTERNAL_SERVER_ERROR', status: 500 },
[AppErrorCode.PROFILE_URL_TAKEN]: 'BAD_REQUEST', [AppErrorCode.RETRY_EXCEPTION]: { code: 'INTERNAL_SERVER_ERROR', status: 500 },
[AppErrorCode.PREMIUM_PROFILE_URL]: 'BAD_REQUEST', [AppErrorCode.SCHEMA_FAILED]: { code: 'INTERNAL_SERVER_ERROR', status: 500 },
[AppErrorCode.TOO_MANY_REQUESTS]: { code: 'TOO_MANY_REQUESTS', status: 429 },
[AppErrorCode.PROFILE_URL_TAKEN]: { code: 'BAD_REQUEST', status: 400 },
[AppErrorCode.PREMIUM_PROFILE_URL]: { code: 'BAD_REQUEST', status: 400 },
}; };
export const ZAppErrorJsonSchema = z.object({ export const ZAppErrorJsonSchema = z.object({
code: z.string(), code: z.string(),
message: z.string().optional(), message: z.string().optional(),
userMessage: z.string().optional(), userMessage: z.string().optional(),
statusCode: z.number().optional(),
}); });
export type TAppErrorJsonSchema = z.infer<typeof ZAppErrorJsonSchema>; export type TAppErrorJsonSchema = z.infer<typeof ZAppErrorJsonSchema>;
type AppErrorOptions = {
/**
* An internal message for logging.
*/
message?: string;
/**
* A message which can be potientially displayed to the user.
*/
userMessage?: string;
/**
* The status code to be associated with the error.
*
* Mainly used for API -> Frontend communication and logging filtering.
*/
statusCode?: number;
};
export class AppError extends Error { export class AppError extends Error {
/** /**
* The error code. * The error code.
@@ -59,6 +82,11 @@ export class AppError extends Error {
*/ */
userMessage?: string; userMessage?: string;
/**
* The status code to be associated with the error.
*/
statusCode?: number;
/** /**
* Create a new AppError. * Create a new AppError.
* *
@@ -66,10 +94,12 @@ export class AppError extends Error {
* @param message An internal error message. * @param message An internal error message.
* @param userMessage A error message which can be displayed to the user. * @param userMessage A error message which can be displayed to the user.
*/ */
public constructor(errorCode: string, message?: string, userMessage?: string) { public constructor(errorCode: string, options?: AppErrorOptions) {
super(message || errorCode); super(options?.message || errorCode);
this.code = errorCode; this.code = errorCode;
this.userMessage = userMessage; this.userMessage = options?.userMessage;
this.statusCode = options?.statusCode;
} }
/** /**
@@ -84,16 +114,21 @@ export class AppError extends Error {
// Handle TRPC errors. // Handle TRPC errors.
if (error instanceof TRPCClientError) { if (error instanceof TRPCClientError) {
const parsedJsonError = AppError.parseFromJSONString(error.message); const parsedJsonError = AppError.parseFromJSON(error.data?.appError);
return parsedJsonError || new AppError('UnknownError', error.message);
const fallbackError = new AppError(AppErrorCode.UNKNOWN_ERROR, {
message: error.message,
});
return parsedJsonError || fallbackError;
} }
// Handle completely unknown errors. // Handle completely unknown errors.
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const { code, message, userMessage } = error as { const { code, message, userMessage, statusCode } = error as {
code: unknown; code: unknown;
message: unknown; message: unknown;
status: unknown; statusCode: unknown;
userMessage: unknown; userMessage: unknown;
}; };
@@ -102,16 +137,15 @@ export class AppError extends Error {
const validUserMessage: string | undefined = const validUserMessage: string | undefined =
typeof userMessage === 'string' ? userMessage : undefined; typeof userMessage === 'string' ? userMessage : undefined;
return new AppError(validCode, validMessage, validUserMessage); const validStatusCode = typeof statusCode === 'number' ? statusCode : undefined;
}
static parseErrorToTRPCError(error: unknown): TRPCError { const options: AppErrorOptions = {
const appError = AppError.parseError(error); message: validMessage,
userMessage: validUserMessage,
statusCode: validStatusCode,
};
return new TRPCError({ return new AppError(validCode, options);
code: genericErrorCodeToTrpcErrorCodeMap[appError.code] || 'BAD_REQUEST',
message: AppError.toJSONString(appError),
});
} }
/** /**
@@ -120,12 +154,26 @@ export class AppError extends Error {
* @param appError The AppError to convert to JSON. * @param appError The AppError to convert to JSON.
* @returns A JSON object representing the AppError. * @returns A JSON object representing the AppError.
*/ */
static toJSON({ code, message, userMessage }: AppError): TAppErrorJsonSchema { static toJSON({ code, message, userMessage, statusCode }: AppError): TAppErrorJsonSchema {
return { const data: TAppErrorJsonSchema = {
code, code,
message,
userMessage,
}; };
// Explicity only set values if it exists, since TRPC will add meta for undefined
// values which clutters up API responses.
if (message) {
data.message = message;
}
if (userMessage) {
data.userMessage = userMessage;
}
if (statusCode) {
data.statusCode = statusCode;
}
return data;
} }
/** /**
@@ -138,15 +186,21 @@ export class AppError extends Error {
return JSON.stringify(AppError.toJSON(appError)); return JSON.stringify(AppError.toJSON(appError));
} }
static parseFromJSONString(jsonString: string): AppError | null { static parseFromJSON(value: unknown): AppError | null {
try { try {
const parsed = ZAppErrorJsonSchema.safeParse(JSON.parse(jsonString)); const parsed = ZAppErrorJsonSchema.safeParse(value);
if (!parsed.success) { if (!parsed.success) {
return null; return null;
} }
return new AppError(parsed.data.code, parsed.data.message, parsed.data.userMessage); const { message, userMessage, statusCode } = parsed.data;
return new AppError(parsed.data.code, {
message,
userMessage,
statusCode,
});
} catch { } catch {
return null; return null;
} }

View File

@@ -133,7 +133,7 @@ export const SEND_SIGNING_EMAIL_JOB_DEFINITION = {
if (!emailMessage) { if (!emailMessage) {
emailMessage = i18n._( emailMessage = i18n._(
team.teamGlobalSettings?.includeSenderDetails team.teamGlobalSettings?.includeSenderDetails
? msg`${user.name} on behalf of ${team.name} has invited you to ${recipientActionVerb} the document "${document.title}".` ? msg`${user.name} on behalf of "${team.name}" has invited you to ${recipientActionVerb} the document "${document.title}".`
: msg`${team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`, : msg`${team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`,
); );
} }

View File

@@ -128,7 +128,7 @@ export const SEAL_DOCUMENT_JOB_DEFINITION = {
const pdfData = await getFile(documentData); const pdfData = await getFile(documentData);
const certificateData = const certificateData =
(document.team?.teamGlobalSettings?.includeSigningCertificate ?? true) document.team?.teamGlobalSettings?.includeSigningCertificate ?? true
? await getCertificatePdf({ ? await getCertificatePdf({
documentId, documentId,
language: document.documentMeta?.language, language: document.documentMeta?.language,

View File

@@ -25,6 +25,7 @@
"@documenso/email": "*", "@documenso/email": "*",
"@documenso/prisma": "*", "@documenso/prisma": "*",
"@documenso/signing": "*", "@documenso/signing": "*",
"@honeybadger-io/js": "^6.10.1",
"@lingui/core": "^4.11.3", "@lingui/core": "^4.11.3",
"@lingui/macro": "^4.11.3", "@lingui/macro": "^4.11.3",
"@lingui/react": "^4.11.3", "@lingui/react": "^4.11.3",
@@ -62,4 +63,4 @@
"@types/luxon": "^3.3.1", "@types/luxon": "^3.3.1",
"@types/pg": "^8.11.4" "@types/pg": "^8.11.4"
} }
} }

View File

@@ -13,7 +13,6 @@ export const getDocumentStats = async () => {
[ExtendedDocumentStatus.DRAFT]: 0, [ExtendedDocumentStatus.DRAFT]: 0,
[ExtendedDocumentStatus.PENDING]: 0, [ExtendedDocumentStatus.PENDING]: 0,
[ExtendedDocumentStatus.COMPLETED]: 0, [ExtendedDocumentStatus.COMPLETED]: 0,
[ExtendedDocumentStatus.BIN]: 0,
[ExtendedDocumentStatus.ALL]: 0, [ExtendedDocumentStatus.ALL]: 0,
}; };

View File

@@ -40,7 +40,9 @@ export const createPasskeyAuthenticationOptions = async ({
}); });
if (!preferredPasskey) { if (!preferredPasskey) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Requested passkey not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Requested passkey not found',
});
} }
} }

View File

@@ -50,7 +50,9 @@ export const createPasskey = async ({
}); });
if (!verificationToken) { if (!verificationToken) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Challenge token not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Challenge token not found',
});
} }
await prisma.verificationToken.deleteMany({ await prisma.verificationToken.deleteMany({
@@ -61,7 +63,9 @@ export const createPasskey = async ({
}); });
if (verificationToken.expires < new Date()) { if (verificationToken.expires < new Date()) {
throw new AppError(AppErrorCode.EXPIRED_CODE, 'Challenge token expired'); throw new AppError(AppErrorCode.EXPIRED_CODE, {
message: 'Challenge token expired',
});
} }
const { rpId: expectedRPID, origin: expectedOrigin } = getAuthenticatorOptions(); const { rpId: expectedRPID, origin: expectedOrigin } = getAuthenticatorOptions();
@@ -74,7 +78,9 @@ export const createPasskey = async ({
}); });
if (!verification.verified || !verification.registrationInfo) { if (!verification.verified || !verification.registrationInfo) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Verification failed'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Verification failed',
});
} }
const { credentialPublicKey, credentialID, counter, credentialDeviceType, credentialBackedUp } = const { credentialPublicKey, credentialID, counter, credentialDeviceType, credentialBackedUp } =

View File

@@ -47,7 +47,9 @@ export const createDocument = async ({
teamId !== undefined && teamId !== undefined &&
!user.teamMembers.some((teamMember) => teamMember.teamId === teamId) !user.teamMembers.some((teamMember) => teamMember.teamId === teamId)
) { ) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Team not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Team not found',
});
} }
let team: (Team & { teamGlobalSettings: TeamGlobalSettings | null }) | null = null; let team: (Team & { teamGlobalSettings: TeamGlobalSettings | null }) | null = null;

View File

@@ -158,16 +158,6 @@ const handleDocumentOwnerDelete = async ({
}), }),
}); });
// Soft delete for document recipients since the owner is deleting it
await tx.recipient.updateMany({
where: {
documentId: document.id,
},
data: {
documentDeletedAt: new Date().toISOString(),
},
});
return await tx.document.update({ return await tx.document.update({
where: { where: {
id: document.id, id: document.id,

View File

@@ -64,7 +64,6 @@ export const findDocumentAuditLogs = async ({
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_COMPLETED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_COMPLETED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_CREATED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_CREATED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_DELETED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_DELETED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RESTORED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_OPENED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_COMPLETED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_COMPLETED,
DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_REJECTED, DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RECIPIENT_REJECTED,

View File

@@ -2,8 +2,15 @@ import { DateTime } from 'luxon';
import { P, match } from 'ts-pattern'; import { P, match } from 'ts-pattern';
import { prisma } from '@documenso/prisma'; import { prisma } from '@documenso/prisma';
import type { Document, DocumentSource, Team, TeamEmail, User } from '@documenso/prisma/client'; import { RecipientRole, SigningStatus, TeamMemberRole } from '@documenso/prisma/client';
import { Prisma, RecipientRole, SigningStatus, TeamMemberRole } from '@documenso/prisma/client'; import type {
Document,
DocumentSource,
Prisma,
Team,
TeamEmail,
User,
} from '@documenso/prisma/client';
import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status'; import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
import { DocumentVisibility } from '../../types/document-visibility'; import { DocumentVisibility } from '../../types/document-visibility';
@@ -81,12 +88,14 @@ export const findDocuments = async ({
const teamMemberRole = team?.members[0].role ?? null; const teamMemberRole = team?.members[0].role ?? null;
const termFilters = match(term) const termFilters = match(term)
.with(P.string.minLength(1), () => ({ .with(P.string.minLength(1), () => {
title: { return {
contains: term, title: {
mode: Prisma.QueryMode.insensitive, contains: term,
}, mode: 'insensitive',
})) },
} as const;
})
.otherwise(() => undefined); .otherwise(() => undefined);
const searchFilter: Prisma.DocumentWhereInput = { const searchFilter: Prisma.DocumentWhereInput = {
@@ -132,8 +141,6 @@ export const findDocuments = async ({
let filters: Prisma.DocumentWhereInput | null = findDocumentsFilter(status, user); let filters: Prisma.DocumentWhereInput | null = findDocumentsFilter(status, user);
console.log('find documets team', team);
if (team) { if (team) {
filters = findTeamDocumentsFilter(status, team, visibilityFilters); filters = findTeamDocumentsFilter(status, team, visibilityFilters);
} }
@@ -286,21 +293,19 @@ export const findDocuments = async ({
} satisfies FindResultSet<typeof data>; } satisfies FindResultSet<typeof data>;
}; };
export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User) => { const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User) => {
return match<ExtendedDocumentStatus, Prisma.DocumentWhereInput>(status) return match<ExtendedDocumentStatus, Prisma.DocumentWhereInput>(status)
.with(ExtendedDocumentStatus.ALL, () => ({ .with(ExtendedDocumentStatus.ALL, () => ({
OR: [ OR: [
{ {
userId: user.id, userId: user.id,
teamId: null, teamId: null,
deletedAt: null,
}, },
{ {
status: ExtendedDocumentStatus.COMPLETED, status: ExtendedDocumentStatus.COMPLETED,
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
documentDeletedAt: null,
}, },
}, },
}, },
@@ -309,7 +314,6 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
documentDeletedAt: null,
}, },
}, },
}, },
@@ -326,7 +330,6 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
role: { role: {
not: RecipientRole.CC, not: RecipientRole.CC,
}, },
documentDeletedAt: null,
}, },
}, },
})) }))
@@ -341,7 +344,6 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
userId: user.id, userId: user.id,
teamId: null, teamId: null,
status: ExtendedDocumentStatus.PENDING, status: ExtendedDocumentStatus.PENDING,
deletedAt: null,
}, },
{ {
status: ExtendedDocumentStatus.PENDING, status: ExtendedDocumentStatus.PENDING,
@@ -352,7 +354,6 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
role: { role: {
not: RecipientRole.CC, not: RecipientRole.CC,
}, },
documentDeletedAt: null,
}, },
}, },
}, },
@@ -364,49 +365,12 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
userId: user.id, userId: user.id,
teamId: null, teamId: null,
status: ExtendedDocumentStatus.COMPLETED, status: ExtendedDocumentStatus.COMPLETED,
deletedAt: null,
}, },
{ {
status: ExtendedDocumentStatus.COMPLETED, status: ExtendedDocumentStatus.COMPLETED,
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
documentDeletedAt: null,
},
},
},
],
}))
.with(ExtendedDocumentStatus.BIN, () => ({
OR: [
{
userId: user.id,
teamId: null,
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
{
status: ExtendedDocumentStatus.PENDING,
Recipient: {
some: {
email: user.email,
signingStatus: SigningStatus.SIGNED,
documentDeletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
},
},
{
status: ExtendedDocumentStatus.COMPLETED,
Recipient: {
some: {
email: user.email,
signingStatus: SigningStatus.SIGNED,
documentDeletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
}, },
}, },
}, },
@@ -444,7 +408,7 @@ export const findDocumentsFilter = (status: ExtendedDocumentStatus, user: User)
* @param team The team to find the documents for. * @param team The team to find the documents for.
* @returns A filter which can be applied to the Prisma Document schema. * @returns A filter which can be applied to the Prisma Document schema.
*/ */
export const findTeamDocumentsFilter = ( const findTeamDocumentsFilter = (
status: ExtendedDocumentStatus, status: ExtendedDocumentStatus,
team: Team & { teamEmail: TeamEmail | null }, team: Team & { teamEmail: TeamEmail | null },
visibilityFilters: Prisma.DocumentWhereInput[], visibilityFilters: Prisma.DocumentWhereInput[],
@@ -454,16 +418,17 @@ export const findTeamDocumentsFilter = (
return match<ExtendedDocumentStatus, Prisma.DocumentWhereInput | null>(status) return match<ExtendedDocumentStatus, Prisma.DocumentWhereInput | null>(status)
.with(ExtendedDocumentStatus.ALL, () => { .with(ExtendedDocumentStatus.ALL, () => {
const filter: Prisma.DocumentWhereInput = { const filter: Prisma.DocumentWhereInput = {
// Filter to display all documents that belong to the team.
OR: [ OR: [
{ {
teamId: team.id, teamId: team.id,
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}, },
], ],
}; };
if (teamEmail && filter.OR) { if (teamEmail && filter.OR) {
// Filter to display all documents received by the team email that are not draft.
filter.OR.push({ filter.OR.push({
status: { status: {
not: ExtendedDocumentStatus.DRAFT, not: ExtendedDocumentStatus.DRAFT,
@@ -473,15 +438,14 @@ export const findTeamDocumentsFilter = (
email: teamEmail, email: teamEmail,
}, },
}, },
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}); });
// Filter to display all documents that have been sent by the team email.
filter.OR.push({ filter.OR.push({
User: { User: {
email: teamEmail, email: teamEmail,
}, },
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}); });
} }
@@ -489,6 +453,7 @@ export const findTeamDocumentsFilter = (
return filter; return filter;
}) })
.with(ExtendedDocumentStatus.INBOX, () => { .with(ExtendedDocumentStatus.INBOX, () => {
// Return a filter that will return nothing.
if (!teamEmail) { if (!teamEmail) {
return null; return null;
} }
@@ -506,7 +471,6 @@ export const findTeamDocumentsFilter = (
}, },
}, },
}, },
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}; };
}) })
@@ -516,7 +480,6 @@ export const findTeamDocumentsFilter = (
{ {
teamId: team.id, teamId: team.id,
status: ExtendedDocumentStatus.DRAFT, status: ExtendedDocumentStatus.DRAFT,
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}, },
], ],
@@ -528,7 +491,6 @@ export const findTeamDocumentsFilter = (
User: { User: {
email: teamEmail, email: teamEmail,
}, },
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}); });
} }
@@ -541,7 +503,6 @@ export const findTeamDocumentsFilter = (
{ {
teamId: team.id, teamId: team.id,
status: ExtendedDocumentStatus.PENDING, status: ExtendedDocumentStatus.PENDING,
deletedAt: null,
OR: visibilityFilters, OR: visibilityFilters,
}, },
], ],
@@ -570,7 +531,6 @@ export const findTeamDocumentsFilter = (
OR: visibilityFilters, OR: visibilityFilters,
}, },
], ],
deletedAt: null,
}); });
} }
@@ -579,7 +539,6 @@ export const findTeamDocumentsFilter = (
.with(ExtendedDocumentStatus.COMPLETED, () => { .with(ExtendedDocumentStatus.COMPLETED, () => {
const filter: Prisma.DocumentWhereInput = { const filter: Prisma.DocumentWhereInput = {
status: ExtendedDocumentStatus.COMPLETED, status: ExtendedDocumentStatus.COMPLETED,
deletedAt: null,
OR: [ OR: [
{ {
teamId: team.id, teamId: team.id,
@@ -609,42 +568,5 @@ export const findTeamDocumentsFilter = (
return filter; return filter;
}) })
.with(ExtendedDocumentStatus.BIN, () => {
const filters: Prisma.DocumentWhereInput[] = [
{
teamId: team.id,
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
];
if (teamEmail) {
filters.push(
{
User: {
email: teamEmail,
},
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
{
Recipient: {
some: {
email: teamEmail,
documentDeletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
},
},
);
}
return {
OR: filters,
};
})
.exhaustive(); .exhaustive();
}; };

View File

@@ -4,6 +4,7 @@ import { prisma } from '@documenso/prisma';
import type { Prisma } from '@documenso/prisma/client'; import type { Prisma } from '@documenso/prisma/client';
import { TeamMemberRole } from '@documenso/prisma/client'; import { TeamMemberRole } from '@documenso/prisma/client';
import { AppError, AppErrorCode } from '../../errors/app-error';
import { DocumentVisibility } from '../../types/document-visibility'; import { DocumentVisibility } from '../../types/document-visibility';
import { getTeamById } from '../team/get-team'; import { getTeamById } from '../team/get-team';
@@ -20,7 +21,7 @@ export const getDocumentById = async ({ id, userId, teamId }: GetDocumentByIdOpt
teamId, teamId,
}); });
return await prisma.document.findFirstOrThrow({ const document = await prisma.document.findFirst({
where: documentWhereInput, where: documentWhereInput,
include: { include: {
documentData: true, documentData: true,
@@ -45,6 +46,14 @@ export const getDocumentById = async ({ id, userId, teamId }: GetDocumentByIdOpt
}, },
}, },
}); });
if (!document) {
throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Document could not be found',
});
}
return document;
}; };
export type GetDocumentWhereInputOptions = { export type GetDocumentWhereInputOptions = {

View File

@@ -81,6 +81,17 @@ export const getDocumentAndSenderByToken = async ({
token, token,
}, },
}, },
team: {
select: {
name: true,
teamEmail: true,
teamGlobalSettings: {
select: {
includeSenderDetails: true,
},
},
},
},
}, },
}); });
@@ -107,7 +118,9 @@ export const getDocumentAndSenderByToken = async ({
} }
if (!documentAccessValid) { if (!documentAccessValid) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Invalid access values'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Invalid access values',
});
} }
return { return {
@@ -167,7 +180,9 @@ export const getDocumentAndRecipientByToken = async ({
} }
if (!documentAccessValid) { if (!documentAccessValid) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Invalid access values'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Invalid access values',
});
} }
return { return {

View File

@@ -1,118 +0,0 @@
import { DateTime } from 'luxon';
import { match } from 'ts-pattern';
import {
type PeriodSelectorValue,
findDocumentsFilter,
findTeamDocumentsFilter,
} from '@documenso/lib/server-only/document/find-documents';
import { prisma } from '@documenso/prisma';
import type { Prisma, Team, TeamEmail, User } from '@documenso/prisma/client';
import { DocumentVisibility, TeamMemberRole } from '@documenso/prisma/client';
import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
export type GetStatsInput = {
user: User;
team?: Team & { teamEmail: TeamEmail | null } & { currentTeamMember?: { role: TeamMemberRole } };
period?: PeriodSelectorValue;
search?: string;
};
export const getStats = async ({ user, period, search, ...options }: GetStatsInput) => {
let createdAt: Prisma.DocumentWhereInput['createdAt'];
if (period) {
const daysAgo = parseInt(period.replace(/d$/, ''), 10);
const startOfPeriod = DateTime.now().minus({ days: daysAgo }).startOf('day');
createdAt = {
gte: startOfPeriod.toJSDate(),
};
}
const stats: Record<ExtendedDocumentStatus, number> = {
[ExtendedDocumentStatus.DRAFT]: 0,
[ExtendedDocumentStatus.PENDING]: 0,
[ExtendedDocumentStatus.COMPLETED]: 0,
[ExtendedDocumentStatus.INBOX]: 0,
[ExtendedDocumentStatus.ALL]: 0,
[ExtendedDocumentStatus.BIN]: 0,
};
const searchFilter: Prisma.DocumentWhereInput = search
? {
OR: [
{ title: { contains: search, mode: 'insensitive' } },
{ Recipient: { some: { name: { contains: search, mode: 'insensitive' } } } },
{ Recipient: { some: { email: { contains: search, mode: 'insensitive' } } } },
],
}
: {};
const visibilityFilters = [
match(options.team?.currentTeamMember?.role)
.with(TeamMemberRole.ADMIN, () => ({
visibility: {
in: [
DocumentVisibility.EVERYONE,
DocumentVisibility.MANAGER_AND_ABOVE,
DocumentVisibility.ADMIN,
],
},
}))
.with(TeamMemberRole.MANAGER, () => ({
visibility: {
in: [DocumentVisibility.EVERYONE, DocumentVisibility.MANAGER_AND_ABOVE],
},
}))
.otherwise(() => ({ visibility: DocumentVisibility.EVERYONE })),
];
const statusCounts = await Promise.all(
Object.values(ExtendedDocumentStatus).map(async (status) => {
if (status === ExtendedDocumentStatus.ALL) {
return;
}
const filter = options.team
? findTeamDocumentsFilter(status, options.team, visibilityFilters)
: findDocumentsFilter(status, user);
if (filter === null) {
return { status, count: 0 };
}
const whereClause = {
...filter,
...(createdAt && { createdAt }),
...searchFilter,
};
const count = await prisma.document.count({
where: whereClause,
});
return { status, count };
}),
);
statusCounts.forEach((result) => {
if (result) {
stats[result.status] = result.count;
if (
result.status !== ExtendedDocumentStatus.BIN &&
[
ExtendedDocumentStatus.DRAFT,
ExtendedDocumentStatus.PENDING,
ExtendedDocumentStatus.COMPLETED,
ExtendedDocumentStatus.INBOX,
].includes(result.status)
) {
stats[ExtendedDocumentStatus.ALL] += result.count;
}
}
});
return stats;
};

View File

@@ -1,16 +1,12 @@
import { DateTime } from 'luxon'; import { DateTime } from 'luxon';
import { match } from 'ts-pattern'; import { match } from 'ts-pattern';
// eslint-disable-next-line import/no-extraneous-dependencies
import type { PeriodSelectorValue } from '@documenso/lib/server-only/document/find-documents'; import type { PeriodSelectorValue } from '@documenso/lib/server-only/document/find-documents';
import { prisma } from '@documenso/prisma'; import { prisma } from '@documenso/prisma';
import { TeamMemberRole } from '@documenso/prisma/client';
import type { Prisma, User } from '@documenso/prisma/client'; import type { Prisma, User } from '@documenso/prisma/client';
import { import { SigningStatus } from '@documenso/prisma/client';
DocumentVisibility, import { DocumentVisibility } from '@documenso/prisma/client';
RecipientRole,
SigningStatus,
TeamMemberRole,
} from '@documenso/prisma/client';
import { isExtendedDocumentStatus } from '@documenso/prisma/guards/is-extended-document-status'; import { isExtendedDocumentStatus } from '@documenso/prisma/guards/is-extended-document-status';
import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status'; import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status';
@@ -34,7 +30,7 @@ export const getStats = async ({ user, period, search, ...options }: GetStatsInp
}; };
} }
const [ownerCounts, notSignedCounts, hasSignedCounts, deletedCounts] = await (options.team const [ownerCounts, notSignedCounts, hasSignedCounts] = await (options.team
? getTeamCounts({ ? getTeamCounts({
...options.team, ...options.team,
createdAt, createdAt,
@@ -50,7 +46,6 @@ export const getStats = async ({ user, period, search, ...options }: GetStatsInp
[ExtendedDocumentStatus.COMPLETED]: 0, [ExtendedDocumentStatus.COMPLETED]: 0,
[ExtendedDocumentStatus.INBOX]: 0, [ExtendedDocumentStatus.INBOX]: 0,
[ExtendedDocumentStatus.ALL]: 0, [ExtendedDocumentStatus.ALL]: 0,
[ExtendedDocumentStatus.BIN]: 0,
}; };
ownerCounts.forEach((stat) => { ownerCounts.forEach((stat) => {
@@ -71,10 +66,6 @@ export const getStats = async ({ user, period, search, ...options }: GetStatsInp
} }
}); });
deletedCounts.forEach((stat) => {
stats[ExtendedDocumentStatus.BIN] += stat._count._all;
});
Object.keys(stats).forEach((key) => { Object.keys(stats).forEach((key) => {
if (key !== ExtendedDocumentStatus.ALL && isExtendedDocumentStatus(key)) { if (key !== ExtendedDocumentStatus.ALL && isExtendedDocumentStatus(key)) {
stats[ExtendedDocumentStatus.ALL] += stats[key]; stats[ExtendedDocumentStatus.ALL] += stats[key];
@@ -107,45 +98,25 @@ const getCounts = async ({ user, createdAt, search }: GetCountsOption) => {
_all: true, _all: true,
}, },
where: { where: {
OR: [ userId: user.id,
{
userId: user.id,
teamId: null,
deletedAt: null,
},
{
status: {
not: ExtendedDocumentStatus.DRAFT,
},
Recipient: {
some: {
email: user.email,
documentDeletedAt: null,
},
},
},
],
createdAt, createdAt,
teamId: null,
deletedAt: null,
AND: [searchFilter], AND: [searchFilter],
}, },
}), }),
// Not signed counts (Inbox). // Not signed counts.
prisma.document.groupBy({ prisma.document.groupBy({
by: ['status'], by: ['status'],
_count: { _count: {
_all: true, _all: true,
}, },
where: { where: {
status: { status: ExtendedDocumentStatus.PENDING,
not: ExtendedDocumentStatus.DRAFT,
},
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
signingStatus: SigningStatus.NOT_SIGNED, signingStatus: SigningStatus.NOT_SIGNED,
role: {
not: RecipientRole.CC,
},
documentDeletedAt: null, documentDeletedAt: null,
}, },
}, },
@@ -160,70 +131,20 @@ const getCounts = async ({ user, createdAt, search }: GetCountsOption) => {
_all: true, _all: true,
}, },
where: { where: {
OR: [
{
userId: user.id,
teamId: null,
status: ExtendedDocumentStatus.PENDING,
deletedAt: null,
},
{
status: ExtendedDocumentStatus.PENDING,
Recipient: {
some: {
email: user.email,
signingStatus: SigningStatus.SIGNED,
role: {
not: RecipientRole.CC,
},
documentDeletedAt: null,
},
},
},
{
userId: user.id,
teamId: null,
status: ExtendedDocumentStatus.COMPLETED,
deletedAt: null,
},
{
status: ExtendedDocumentStatus.COMPLETED,
Recipient: {
some: {
email: user.email,
documentDeletedAt: null,
},
},
},
],
createdAt, createdAt,
AND: [searchFilter], User: {
}, email: {
}), not: user.email,
// Deleted counts.
prisma.document.groupBy({
by: ['status'],
_count: {
_all: true,
},
where: {
OR: [
{
userId: user.id,
teamId: null,
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
}, },
},
OR: [
{ {
status: ExtendedDocumentStatus.PENDING, status: ExtendedDocumentStatus.PENDING,
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
signingStatus: SigningStatus.SIGNED, signingStatus: SigningStatus.SIGNED,
documentDeletedAt: { documentDeletedAt: null,
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
}, },
}, },
}, },
@@ -232,9 +153,8 @@ const getCounts = async ({ user, createdAt, search }: GetCountsOption) => {
Recipient: { Recipient: {
some: { some: {
email: user.email, email: user.email,
documentDeletedAt: { signingStatus: SigningStatus.SIGNED,
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(), documentDeletedAt: null,
},
}, },
}, },
}, },
@@ -257,7 +177,9 @@ type GetTeamCountsOption = {
}; };
const getTeamCounts = async (options: GetTeamCountsOption) => { const getTeamCounts = async (options: GetTeamCountsOption) => {
const { createdAt, teamId, teamEmail, senderIds = [], currentTeamMemberRole, search } = options; const { createdAt, teamId, teamEmail } = options;
const senderIds = options.senderIds ?? [];
const userIdWhereClause: Prisma.DocumentWhereInput['userId'] = const userIdWhereClause: Prisma.DocumentWhereInput['userId'] =
senderIds.length > 0 senderIds.length > 0
@@ -266,226 +188,148 @@ const getTeamCounts = async (options: GetTeamCountsOption) => {
} }
: undefined; : undefined;
const searchFilter: Prisma.DocumentWhereInput = search const searchFilter: Prisma.DocumentWhereInput = {
? { OR: [
OR: [ { title: { contains: options.search, mode: 'insensitive' } },
{ title: { contains: search, mode: 'insensitive' } }, { Recipient: { some: { name: { contains: options.search, mode: 'insensitive' } } } },
{ Recipient: { some: { name: { contains: search, mode: 'insensitive' } } } }, { Recipient: { some: { email: { contains: options.search, mode: 'insensitive' } } } },
{ Recipient: { some: { email: { contains: search, mode: 'insensitive' } } } }, ],
], };
}
: {};
const visibilityFilters = [ let ownerCountsWhereInput: Prisma.DocumentWhereInput = {
match(currentTeamMemberRole) userId: userIdWhereClause,
.with(TeamMemberRole.ADMIN, () => ({ createdAt,
visibility: { teamId,
in: [ deletedAt: null,
DocumentVisibility.EVERYONE, };
DocumentVisibility.MANAGER_AND_ABOVE,
DocumentVisibility.ADMIN,
],
},
}))
.with(TeamMemberRole.MANAGER, () => ({
visibility: {
in: [DocumentVisibility.EVERYONE, DocumentVisibility.MANAGER_AND_ABOVE],
},
}))
.otherwise(() => ({ visibility: DocumentVisibility.EVERYONE })),
];
return Promise.all([ let notSignedCountsGroupByArgs = null;
// Owner counts (ALL) let hasSignedCountsGroupByArgs = null;
prisma.document.groupBy({
by: ['status'], const visibilityFiltersWhereInput: Prisma.DocumentWhereInput = {
_count: { _all: true }, AND: [
where: { { deletedAt: null },
{
OR: [ OR: [
match(options.currentTeamMemberRole)
.with(TeamMemberRole.ADMIN, () => ({
visibility: {
in: [
DocumentVisibility.EVERYONE,
DocumentVisibility.MANAGER_AND_ABOVE,
DocumentVisibility.ADMIN,
],
},
}))
.with(TeamMemberRole.MANAGER, () => ({
visibility: {
in: [DocumentVisibility.EVERYONE, DocumentVisibility.MANAGER_AND_ABOVE],
},
}))
.otherwise(() => ({
visibility: {
equals: DocumentVisibility.EVERYONE,
},
})),
{ {
teamId, OR: [
deletedAt: null, { userId: options.userId },
OR: visibilityFilters, { Recipient: { some: { email: options.currentUserEmail } } },
],
}, },
...(teamEmail
? [
{
status: {
not: ExtendedDocumentStatus.DRAFT,
},
Recipient: {
some: {
email: teamEmail,
documentDeletedAt: null,
},
},
deletedAt: null,
OR: visibilityFilters,
},
{
User: {
email: teamEmail,
},
deletedAt: null,
OR: visibilityFilters,
},
]
: []),
], ],
},
],
};
ownerCountsWhereInput = {
...ownerCountsWhereInput,
...visibilityFiltersWhereInput,
...searchFilter,
};
if (teamEmail) {
ownerCountsWhereInput = {
userId: userIdWhereClause,
createdAt,
OR: [
{
teamId,
},
{
User: {
email: teamEmail,
},
},
],
deletedAt: null,
};
notSignedCountsGroupByArgs = {
by: ['status'],
_count: {
_all: true,
},
where: {
userId: userIdWhereClause, userId: userIdWhereClause,
createdAt, createdAt,
...searchFilter, status: ExtendedDocumentStatus.PENDING,
Recipient: {
some: {
email: teamEmail,
signingStatus: SigningStatus.NOT_SIGNED,
documentDeletedAt: null,
},
},
deletedAt: null,
}, },
}), } satisfies Prisma.DocumentGroupByArgs;
// Not signed counts (INBOX) hasSignedCountsGroupByArgs = {
prisma.document.groupBy({
by: ['status'], by: ['status'],
_count: { _all: true }, _count: {
where: teamEmail _all: true,
? { },
userId: userIdWhereClause, where: {
createdAt, userId: userIdWhereClause,
status: { createdAt,
not: ExtendedDocumentStatus.DRAFT, OR: [
}, {
status: ExtendedDocumentStatus.PENDING,
Recipient: { Recipient: {
some: { some: {
email: teamEmail, email: teamEmail,
signingStatus: SigningStatus.NOT_SIGNED, signingStatus: SigningStatus.SIGNED,
role: { documentDeletedAt: null,
not: RecipientRole.CC,
},
}, },
}, },
deletedAt: null, deletedAt: null,
OR: visibilityFilters,
...searchFilter,
}
: {
userId: userIdWhereClause,
createdAt,
AND: [
{
OR: [{ id: -1 }], // Empty set if no team email
},
searchFilter,
],
},
}),
// Has signed counts (PENDING + COMPLETED)
prisma.document.groupBy({
by: ['status'],
_count: { _all: true },
where: {
userId: userIdWhereClause,
createdAt,
OR: [
{
teamId,
status: ExtendedDocumentStatus.PENDING,
deletedAt: null,
OR: visibilityFilters,
}, },
{ {
teamId,
status: ExtendedDocumentStatus.COMPLETED, status: ExtendedDocumentStatus.COMPLETED,
Recipient: {
some: {
email: teamEmail,
signingStatus: SigningStatus.SIGNED,
documentDeletedAt: null,
},
},
deletedAt: null, deletedAt: null,
OR: visibilityFilters,
}, },
...(teamEmail
? [
{
status: ExtendedDocumentStatus.PENDING,
OR: [
{
Recipient: {
some: {
email: teamEmail,
signingStatus: SigningStatus.SIGNED,
role: {
not: RecipientRole.CC,
},
documentDeletedAt: null,
},
},
OR: visibilityFilters,
},
{
User: {
email: teamEmail,
},
OR: visibilityFilters,
},
],
deletedAt: null,
},
{
status: ExtendedDocumentStatus.COMPLETED,
OR: [
{
Recipient: {
some: {
email: teamEmail,
documentDeletedAt: null,
},
},
OR: visibilityFilters,
},
{
User: {
email: teamEmail,
},
OR: visibilityFilters,
},
],
deletedAt: null,
},
]
: []),
], ],
...searchFilter,
}, },
}), } satisfies Prisma.DocumentGroupByArgs;
}
// Deleted counts (BIN) return Promise.all([
prisma.document.groupBy({ prisma.document.groupBy({
by: ['status'], by: ['status'],
_count: { _all: true }, _count: {
where: { _all: true,
OR: [
{
teamId,
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
...(teamEmail
? [
{
User: {
email: teamEmail,
},
deletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
{
Recipient: {
some: {
email: teamEmail,
documentDeletedAt: {
gte: DateTime.now().minus({ days: 30 }).startOf('day').toJSDate(),
},
},
},
},
]
: []),
],
...searchFilter,
}, },
where: ownerCountsWhereInput,
}), }),
notSignedCountsGroupByArgs ? prisma.document.groupBy(notSignedCountsGroupByArgs) : [],
hasSignedCountsGroupByArgs ? prisma.document.groupBy(hasSignedCountsGroupByArgs) : [],
]); ]);
}; };

View File

@@ -106,7 +106,9 @@ export const isRecipientAuthorized = async ({
// Should not be possible. // Should not be possible.
if (!user) { if (!user) {
throw new AppError(AppErrorCode.NOT_FOUND, 'User not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'User not found',
});
} }
return await verifyTwoFactorAuthenticationToken({ return await verifyTwoFactorAuthenticationToken({
@@ -164,7 +166,9 @@ const verifyPasskey = async ({
}); });
if (!passkey) { if (!passkey) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Passkey not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Passkey not found',
});
} }
const verificationToken = await prisma.verificationToken const verificationToken = await prisma.verificationToken
@@ -177,11 +181,15 @@ const verifyPasskey = async ({
.catch(() => null); .catch(() => null);
if (!verificationToken) { if (!verificationToken) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Token not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Token not found',
});
} }
if (verificationToken.expires < new Date()) { if (verificationToken.expires < new Date()) {
throw new AppError(AppErrorCode.EXPIRED_CODE, 'Token expired'); throw new AppError(AppErrorCode.EXPIRED_CODE, {
message: 'Token expired',
});
} }
const { rpId, origin } = getAuthenticatorOptions(); const { rpId, origin } = getAuthenticatorOptions();
@@ -199,7 +207,9 @@ const verifyPasskey = async ({
}).catch(() => null); // May want to log this for insights. }).catch(() => null); // May want to log this for insights.
if (verification?.verified !== true) { if (verification?.verified !== true) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'User is not authorized'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'User is not authorized',
});
} }
await prisma.passkey.update({ await prisma.passkey.update({

View File

@@ -134,7 +134,7 @@ export const resendDocument = async ({
emailMessage = emailMessage =
customEmail?.message || customEmail?.message ||
i18n._( i18n._(
msg`${user.name} on behalf of ${document.team.name} has invited you to ${recipientActionVerb} the document "${document.title}".`, msg`${user.name} on behalf of "${document.team.name}" has invited you to ${recipientActionVerb} the document "${document.title}".`,
); );
} }

View File

@@ -1,149 +0,0 @@
'use server';
import { prisma } from '@documenso/prisma';
import type { Document, DocumentMeta, Recipient, User } from '@documenso/prisma/client';
import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs';
import type { RequestMetadata } from '../../universal/extract-request-metadata';
import { createDocumentAuditLogData } from '../../utils/document-audit-logs';
export type RestoreDocumentOptions = {
id: number;
userId: number;
teamId?: number;
requestMetadata?: RequestMetadata;
};
export const restoreDocument = async ({
id,
userId,
teamId,
requestMetadata,
}: RestoreDocumentOptions) => {
const user = await prisma.user.findUnique({
where: {
id: userId,
},
});
if (!user) {
throw new Error('User not found');
}
const document = await prisma.document.findUnique({
where: {
id,
},
include: {
Recipient: true,
documentMeta: true,
team: {
select: {
members: true,
},
},
},
});
if (!document || (teamId !== undefined && teamId !== document.teamId)) {
throw new Error('Document not found');
}
const isUserOwner = document.userId === userId;
const isUserTeamMember = document.team?.members.some((member) => member.userId === userId);
const userRecipient = document.Recipient.find((recipient) => recipient.email === user.email);
if (!isUserOwner && !isUserTeamMember && !userRecipient) {
throw new Error('Not allowed');
}
// Handle restoring the actual document if user has permission.
if (isUserOwner || isUserTeamMember) {
await handleDocumentOwnerRestore({
document,
user,
requestMetadata,
});
}
// Continue to show the document to the user if they are a recipient.
if (userRecipient?.documentDeletedAt !== null) {
await prisma.recipient
.update({
where: {
id: userRecipient?.id,
},
data: {
documentDeletedAt: null,
},
})
.catch(() => {
// Do nothing.
});
}
// Return partial document for API v1 response.
return {
id: document.id,
userId: document.userId,
teamId: document.teamId,
title: document.title,
status: document.status,
documentDataId: document.documentDataId,
createdAt: document.createdAt,
updatedAt: document.updatedAt,
completedAt: document.completedAt,
};
};
type HandleDocumentOwnerRestoreOptions = {
document: Document & {
Recipient: Recipient[];
documentMeta: DocumentMeta | null;
};
user: User;
requestMetadata?: RequestMetadata;
};
const handleDocumentOwnerRestore = async ({
document,
user,
requestMetadata,
}: HandleDocumentOwnerRestoreOptions) => {
if (!document.deletedAt) {
return;
}
// Restore soft-deleted documents.
return await prisma.$transaction(async (tx) => {
await tx.documentAuditLog.create({
data: createDocumentAuditLogData({
documentId: document.id,
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RESTORED,
user,
requestMetadata,
data: {
type: 'RESTORE',
},
}),
});
await tx.recipient.updateMany({
where: {
documentId: document.id,
},
data: {
documentDeletedAt: null,
},
});
return await tx.document.update({
where: {
id: document.id,
},
data: {
deletedAt: null,
},
});
});
};

View File

@@ -101,7 +101,7 @@ export const sealDocument = async ({
const pdfData = await getFile(documentData); const pdfData = await getFile(documentData);
const certificateData = const certificateData =
(document.team?.teamGlobalSettings?.includeSigningCertificate ?? true) document.team?.teamGlobalSettings?.includeSigningCertificate ?? true
? await getCertificatePdf({ ? await getCertificatePdf({
documentId, documentId,
language: document.documentMeta?.language, language: document.documentMeta?.language,

View File

@@ -37,7 +37,9 @@ export const updateDocumentSettings = async ({
requestMetadata, requestMetadata,
}: UpdateDocumentSettingsOptions) => { }: UpdateDocumentSettingsOptions) => {
if (!data.title && !data.globalAccessAuth && !data.globalActionAuth) { if (!data.title && !data.globalAccessAuth && !data.globalActionAuth) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Missing data to update'); throw new AppError(AppErrorCode.INVALID_BODY, {
message: 'Missing data to update',
});
} }
const user = await prisma.user.findFirstOrThrow({ const user = await prisma.user.findFirstOrThrow({
@@ -96,10 +98,9 @@ export const updateDocumentSettings = async ({
!allowedVisibilities.includes(document.visibility) || !allowedVisibilities.includes(document.visibility) ||
(data.visibility && !allowedVisibilities.includes(data.visibility)) (data.visibility && !allowedVisibilities.includes(data.visibility))
) { ) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to update the document visibility',
'You do not have permission to update the document visibility', });
);
} }
}) })
.with(TeamMemberRole.MEMBER, () => { .with(TeamMemberRole.MEMBER, () => {
@@ -107,17 +108,15 @@ export const updateDocumentSettings = async ({
document.visibility !== DocumentVisibility.EVERYONE || document.visibility !== DocumentVisibility.EVERYONE ||
(data.visibility && data.visibility !== DocumentVisibility.EVERYONE) (data.visibility && data.visibility !== DocumentVisibility.EVERYONE)
) { ) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to update the document visibility',
'You do not have permission to update the document visibility', });
);
} }
}) })
.otherwise(() => { .otherwise(() => {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to update the document',
'You do not have permission to update the document', });
);
}); });
} }
@@ -142,10 +141,9 @@ export const updateDocumentSettings = async ({
}); });
if (!isDocumentEnterprise) { if (!isDocumentEnterprise) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to set the action auth',
'You do not have permission to set the action auth', });
);
} }
} }
@@ -161,10 +159,9 @@ export const updateDocumentSettings = async ({
const auditLogs: CreateDocumentAuditLogDataResponse[] = []; const auditLogs: CreateDocumentAuditLogDataResponse[] = [];
if (!isTitleSame && document.status !== DocumentStatus.DRAFT) { if (!isTitleSame && document.status !== DocumentStatus.DRAFT) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_BODY, {
AppErrorCode.INVALID_BODY, message: 'You cannot update the title if the document has been sent',
'You cannot update the title if the document has been sent', });
);
} }
if (!isTitleSame) { if (!isTitleSame) {

View File

@@ -45,7 +45,9 @@ export const validateFieldAuth = async ({
}); });
if (!isValid) { if (!isValid) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Invalid authentication values'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Invalid authentication values',
});
} }
return derivedRecipientActionAuth; return derivedRecipientActionAuth;

View File

@@ -5,11 +5,7 @@ import { getToken } from 'next-auth/jwt';
import { LOCAL_FEATURE_FLAGS } from '@documenso/lib/constants/feature-flags'; import { LOCAL_FEATURE_FLAGS } from '@documenso/lib/constants/feature-flags';
import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client'; import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client';
import { import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL, NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../constants/app';
NEXT_PRIVATE_INTERNAL_WEBAPP_URL,
NEXT_PUBLIC_MARKETING_URL,
NEXT_PUBLIC_WEBAPP_URL,
} from '../../constants/app';
import { extractDistinctUserId, mapJwtToFlagProperties } from './get'; import { extractDistinctUserId, mapJwtToFlagProperties } from './get';
/** /**

View File

@@ -7,11 +7,7 @@ import { getToken } from 'next-auth/jwt';
import { LOCAL_FEATURE_FLAGS, extractPostHogConfig } from '@documenso/lib/constants/feature-flags'; import { LOCAL_FEATURE_FLAGS, extractPostHogConfig } from '@documenso/lib/constants/feature-flags';
import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client'; import PostHogServerClient from '@documenso/lib/server-only/feature-flags/get-post-hog-server-client';
import { import { NEXT_PUBLIC_MARKETING_URL, NEXT_PUBLIC_WEBAPP_URL, NEXT_PRIVATE_INTERNAL_WEBAPP_URL } from '../../constants/app';
NEXT_PRIVATE_INTERNAL_WEBAPP_URL,
NEXT_PUBLIC_MARKETING_URL,
NEXT_PUBLIC_WEBAPP_URL,
} from '../../constants/app';
/** /**
* Evaluate a single feature flag based on the current user if possible. * Evaluate a single feature flag based on the current user if possible.
@@ -71,7 +67,7 @@ export default async function handleFeatureFlagGet(req: Request) {
if (origin.startsWith(NEXT_PUBLIC_MARKETING_URL() ?? 'http://localhost:3001')) { if (origin.startsWith(NEXT_PUBLIC_MARKETING_URL() ?? 'http://localhost:3001')) {
res.headers.set('Access-Control-Allow-Origin', origin); res.headers.set('Access-Control-Allow-Origin', origin);
} }
if (origin.startsWith(NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? 'http://localhost:3000')) { if (origin.startsWith(NEXT_PRIVATE_INTERNAL_WEBAPP_URL ?? 'http://localhost:3000')) {
res.headers.set('Access-Control-Allow-Origin', origin); res.headers.set('Access-Control-Allow-Origin', origin);
} }

View File

@@ -104,7 +104,9 @@ export const setFieldsForDocument = async ({
// Each field MUST have a recipient associated with it. // Each field MUST have a recipient associated with it.
if (!recipient) { if (!recipient) {
throw new AppError(AppErrorCode.INVALID_REQUEST, `Recipient not found for field ${field.id}`); throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: `Recipient not found for field ${field.id}`,
});
} }
// Check whether the existing field can be modified. // Check whether the existing field can be modified.
@@ -113,10 +115,10 @@ export const setFieldsForDocument = async ({
hasFieldBeenChanged(existing, field) && hasFieldBeenChanged(existing, field) &&
!canRecipientFieldsBeModified(recipient, existingFields) !canRecipientFieldsBeModified(recipient, existingFields)
) { ) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_REQUEST, {
AppErrorCode.INVALID_REQUEST, message:
'Cannot modify a field where the recipient has already interacted with the document', 'Cannot modify a field where the recipient has already interacted with the document',
); });
} }
return { return {

View File

@@ -115,7 +115,9 @@ export const getPublicProfileByUrl = async ({
// Log as critical error. // Log as critical error.
if (user?.profile && team?.profile) { if (user?.profile && team?.profile) {
console.error('Profile URL is ambiguous', { profileUrl, userId: user.id, teamId: team.id }); console.error('Profile URL is ambiguous', { profileUrl, userId: user.id, teamId: team.id });
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Profile URL is ambiguous'); throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: 'Profile URL is ambiguous',
});
} }
if (user?.profile?.enabled) { if (user?.profile?.enabled) {
@@ -177,5 +179,7 @@ export const getPublicProfileByUrl = async ({
}; };
} }
throw new AppError(AppErrorCode.NOT_FOUND, 'Profile not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Profile not found',
});
}; };

View File

@@ -18,10 +18,9 @@ export const getTeamTokens = async ({ userId, teamId }: GetUserTokensOptions) =>
}); });
if (teamMember?.role !== TeamMemberRole.ADMIN) { if (teamMember?.role !== TeamMemberRole.ADMIN) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have the required permissions to view this page.',
'You do not have the required permissions to view this page.', });
);
} }
return await prisma.apiToken.findMany({ return await prisma.apiToken.findMany({

View File

@@ -105,10 +105,9 @@ export const setRecipientsForDocument = async ({
}); });
if (!isDocumentEnterprise) { if (!isDocumentEnterprise) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to set the action auth',
'You do not have permission to set the action auth', });
);
} }
} }
@@ -142,10 +141,9 @@ export const setRecipientsForDocument = async ({
hasRecipientBeenChanged(existing, recipient) && hasRecipientBeenChanged(existing, recipient) &&
!canRecipientBeModified(existing, document.Field) !canRecipientBeModified(existing, document.Field)
) { ) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_REQUEST, {
AppErrorCode.INVALID_REQUEST, message: 'Cannot modify a recipient who has already interacted with the document',
'Cannot modify a recipient who has already interacted with the document', });
);
} }
return { return {

View File

@@ -72,10 +72,9 @@ export const setRecipientsForTemplate = async ({
}); });
if (!isDocumentEnterprise) { if (!isDocumentEnterprise) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to set the action auth',
'You do not have permission to set the action auth', });
);
} }
} }
@@ -119,14 +118,15 @@ export const setRecipientsForTemplate = async ({
); );
if (updatedDirectRecipient?.role === RecipientRole.CC) { if (updatedDirectRecipient?.role === RecipientRole.CC) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Cannot set direct recipient as CC'); throw new AppError(AppErrorCode.INVALID_BODY, {
message: 'Cannot set direct recipient as CC',
});
} }
if (deletedDirectRecipient) { if (deletedDirectRecipient) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_BODY, {
AppErrorCode.INVALID_BODY, message: 'Cannot delete direct recipient while direct template exists',
'Cannot delete direct recipient while direct template exists', });
);
} }
} }

View File

@@ -96,10 +96,9 @@ export const updateRecipient = async ({
}); });
if (!isDocumentEnterprise) { if (!isDocumentEnterprise) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to set the action auth',
'You do not have permission to set the action auth', });
);
} }
} }

View File

@@ -47,6 +47,8 @@ export const createTeamPendingCheckoutSession = async ({
console.error(e); console.error(e);
// Absorb all the errors incase Stripe throws something sensitive. // Absorb all the errors incase Stripe throws something sensitive.
throw new AppError(AppErrorCode.UNKNOWN_ERROR, 'Something went wrong.'); throw new AppError(AppErrorCode.UNKNOWN_ERROR, {
message: 'Something went wrong.',
});
} }
}; };

View File

@@ -55,10 +55,9 @@ export const createTeamEmailVerification = async ({
}); });
if (team.teamEmail || team.emailVerification) { if (team.teamEmail || team.emailVerification) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_REQUEST, {
AppErrorCode.INVALID_REQUEST, message: 'Team already has an email or existing email verification.',
'Team already has an email or existing email verification.', });
);
} }
const existingTeamEmail = await tx.teamEmail.findFirst({ const existingTeamEmail = await tx.teamEmail.findFirst({
@@ -68,7 +67,9 @@ export const createTeamEmailVerification = async ({
}); });
if (existingTeamEmail) { if (existingTeamEmail) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Email already taken by another team.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Email already taken by another team.',
});
} }
const { token, expiresAt } = createTokenVerification({ hours: 1 }); const { token, expiresAt } = createTokenVerification({ hours: 1 });
@@ -97,7 +98,9 @@ export const createTeamEmailVerification = async ({
const target = z.array(z.string()).safeParse(err.meta?.target); const target = z.array(z.string()).safeParse(err.meta?.target);
if (err.code === 'P2002' && target.success && target.data.includes('email')) { if (err.code === 'P2002' && target.success && target.data.includes('email')) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Email already taken by another team.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Email already taken by another team.',
});
} }
throw err; throw err;

View File

@@ -69,7 +69,9 @@ export const createTeamMemberInvites = async ({
const currentTeamMember = team.members.find((member) => member.user.id === userId); const currentTeamMember = team.members.find((member) => member.user.id === userId);
if (!currentTeamMember) { if (!currentTeamMember) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'User not part of team.'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'User not part of team.',
});
} }
const usersToInvite = invitations.filter((invitation) => { const usersToInvite = invitations.filter((invitation) => {
@@ -91,10 +93,9 @@ export const createTeamMemberInvites = async ({
); );
if (unauthorizedRoleAccess) { if (unauthorizedRoleAccess) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'User does not have permission to set high level roles',
'User does not have permission to set high level roles', });
);
} }
const teamMemberInvites = usersToInvite.map(({ email, role }) => ({ const teamMemberInvites = usersToInvite.map(({ email, role }) => ({
@@ -127,11 +128,10 @@ export const createTeamMemberInvites = async ({
if (sendEmailResultErrorList.length > 0) { if (sendEmailResultErrorList.length > 0) {
console.error(JSON.stringify(sendEmailResultErrorList)); console.error(JSON.stringify(sendEmailResultErrorList));
throw new AppError( throw new AppError('EmailDeliveryFailed', {
'EmailDeliveryFailed', message: 'Failed to send invite emails to one or more users.',
'Failed to send invite emails to one or more users.', userMessage: `Failed to send invites to ${sendEmailResultErrorList.length}/${teamMemberInvites.length} users.`,
`Failed to send invites to ${sendEmailResultErrorList.length}/${teamMemberInvites.length} users.`, });
);
} }
}; };

View File

@@ -87,7 +87,9 @@ export const createTeam = async ({
}); });
if (existingUserProfileWithUrl) { if (existingUserProfileWithUrl) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'URL already taken.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'URL already taken.',
});
} }
await tx.team.create({ await tx.team.create({
@@ -131,15 +133,21 @@ export const createTeam = async ({
}); });
if (existingUserProfileWithUrl) { if (existingUserProfileWithUrl) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'URL already taken.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'URL already taken.',
});
} }
if (existingTeamWithUrl) { if (existingTeamWithUrl) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Team URL already exists.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Team URL already exists.',
});
} }
if (!customerId) { if (!customerId) {
throw new AppError(AppErrorCode.UNKNOWN_ERROR, 'Missing customer ID for pending teams.'); throw new AppError(AppErrorCode.UNKNOWN_ERROR, {
message: 'Missing customer ID for pending teams.',
});
} }
return await tx.teamPending.create({ return await tx.teamPending.create({
@@ -166,7 +174,9 @@ export const createTeam = async ({
const target = z.array(z.string()).safeParse(err.meta?.target); const target = z.array(z.string()).safeParse(err.meta?.target);
if (err.code === 'P2002' && target.success && target.data.includes('url')) { if (err.code === 'P2002' && target.success && target.data.includes('url')) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Team URL already exists.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Team URL already exists.',
});
} }
throw err; throw err;

View File

@@ -60,11 +60,13 @@ export const deleteTeamMembers = async ({
); );
if (!currentTeamMember) { if (!currentTeamMember) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Team member record does not exist'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Team member record does not exist',
});
} }
if (teamMembersToRemove.find((member) => member.userId === team.ownerUserId)) { if (teamMembersToRemove.find((member) => member.userId === team.ownerUserId)) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Cannot remove the team owner'); throw new AppError(AppErrorCode.UNAUTHORIZED, { message: 'Cannot remove the team owner' });
} }
const isMemberToRemoveHigherRole = teamMembersToRemove.some( const isMemberToRemoveHigherRole = teamMembersToRemove.some(
@@ -72,7 +74,9 @@ export const deleteTeamMembers = async ({
); );
if (isMemberToRemoveHigherRole) { if (isMemberToRemoveHigherRole) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Cannot remove a member with a higher role'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Cannot remove a member with a higher role',
});
} }
// Remove the team members. // Remove the team members.

View File

@@ -24,7 +24,9 @@ export const findTeamInvoices = async ({ userId, teamId }: FindTeamInvoicesOptio
}); });
if (!team.customerId) { if (!team.customerId) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Team has no customer ID.'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Team has no customer ID.',
});
} }
const results = await getInvoices({ customerId: team.customerId }); const results = await getInvoices({ customerId: team.customerId });

View File

@@ -33,7 +33,9 @@ export const getTeamPublicProfile = async ({
}); });
if (!team) { if (!team) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Team not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Team not found',
});
} }
// Create and return the public profile. // Create and return the public profile.
@@ -47,7 +49,9 @@ export const getTeamPublicProfile = async ({
}); });
if (!profile) { if (!profile) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Failed to create public profile'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Failed to create public profile',
});
} }
return { return {

View File

@@ -38,16 +38,17 @@ export const resendTeamEmailVerification = async ({
}); });
if (!team) { if (!team) {
throw new AppError('TeamNotFound', 'User is not a member of the team.'); throw new AppError('TeamNotFound', {
message: 'User is not a member of the team.',
});
} }
const { emailVerification } = team; const { emailVerification } = team;
if (!emailVerification) { if (!emailVerification) {
throw new AppError( throw new AppError('VerificationNotFound', {
'VerificationNotFound', message: 'No team email verification exists for this team.',
'No team email verification exists for this team.', });
);
} }
const { token, expiresAt } = createTokenVerification({ hours: 1 }); const { token, expiresAt } = createTokenVerification({ hours: 1 });

View File

@@ -55,7 +55,7 @@ export const resendTeamMemberInvitation = async ({
}); });
if (!team) { if (!team) {
throw new AppError('TeamNotFound', 'User is not a valid member of the team.'); throw new AppError('TeamNotFound', { message: 'User is not a valid member of the team.' });
} }
const teamMemberInvite = await tx.teamMemberInvite.findUniqueOrThrow({ const teamMemberInvite = await tx.teamMemberInvite.findUniqueOrThrow({
@@ -66,7 +66,7 @@ export const resendTeamMemberInvitation = async ({
}); });
if (!teamMemberInvite) { if (!teamMemberInvite) {
throw new AppError('InviteNotFound', 'No invite exists for this user.'); throw new AppError('InviteNotFound', { message: 'No invite exists for this user.' });
} }
await sendTeamMemberInviteEmail({ await sendTeamMemberInviteEmail({

View File

@@ -48,11 +48,11 @@ export const updateTeamMember = async ({
const teamMemberToUpdate = team.members.find((member) => member.id === teamMemberId); const teamMemberToUpdate = team.members.find((member) => member.id === teamMemberId);
if (!teamMemberToUpdate || !currentTeamMember) { if (!teamMemberToUpdate || !currentTeamMember) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Team member does not exist'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'Team member does not exist' });
} }
if (teamMemberToUpdate.userId === team.ownerUserId) { if (teamMemberToUpdate.userId === team.ownerUserId) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Cannot update the owner'); throw new AppError(AppErrorCode.UNAUTHORIZED, { message: 'Cannot update the owner' });
} }
const isMemberToUpdateHigherRole = !isTeamRoleWithinUserHierarchy( const isMemberToUpdateHigherRole = !isTeamRoleWithinUserHierarchy(
@@ -61,7 +61,9 @@ export const updateTeamMember = async ({
); );
if (isMemberToUpdateHigherRole) { if (isMemberToUpdateHigherRole) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'Cannot update a member with a higher role'); throw new AppError(AppErrorCode.UNAUTHORIZED, {
message: 'Cannot update a member with a higher role',
});
} }
const isNewMemberRoleHigherThanCurrentRole = !isTeamRoleWithinUserHierarchy( const isNewMemberRoleHigherThanCurrentRole = !isTeamRoleWithinUserHierarchy(
@@ -70,10 +72,9 @@ export const updateTeamMember = async ({
); );
if (isNewMemberRoleHigherThanCurrentRole) { if (isNewMemberRoleHigherThanCurrentRole) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'Cannot give a member a role higher than the user initating the update',
'Cannot give a member a role higher than the user initating the update', });
);
} }
return await tx.teamMember.update({ return await tx.teamMember.update({

View File

@@ -24,7 +24,9 @@ export const updateTeam = async ({ userId, teamId, data }: UpdateTeamOptions) =>
}); });
if (foundPendingTeamWithUrl) { if (foundPendingTeamWithUrl) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Team URL already exists.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Team URL already exists.',
});
} }
const team = await tx.team.update({ const team = await tx.team.update({
@@ -57,7 +59,9 @@ export const updateTeam = async ({ userId, teamId, data }: UpdateTeamOptions) =>
const target = z.array(z.string()).safeParse(err.meta?.target); const target = z.array(z.string()).safeParse(err.meta?.target);
if (err.code === 'P2002' && target.success && target.data.includes('url')) { if (err.code === 'P2002' && target.success && target.data.includes('url')) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Team URL already exists.'); throw new AppError(AppErrorCode.ALREADY_EXISTS, {
message: 'Team URL already exists.',
});
} }
throw err; throw err;

View File

@@ -101,7 +101,7 @@ export const createDocumentFromDirectTemplate = async ({
}); });
if (!template?.directLink?.enabled) { if (!template?.directLink?.enabled) {
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Invalid or missing template'); throw new AppError(AppErrorCode.INVALID_REQUEST, { message: 'Invalid or missing template' });
} }
const { Recipient: recipients, directLink, User: templateOwner } = template; const { Recipient: recipients, directLink, User: templateOwner } = template;
@@ -111,15 +111,19 @@ export const createDocumentFromDirectTemplate = async ({
); );
if (!directTemplateRecipient || directTemplateRecipient.role === RecipientRole.CC) { if (!directTemplateRecipient || directTemplateRecipient.role === RecipientRole.CC) {
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Invalid or missing direct recipient'); throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: 'Invalid or missing direct recipient',
});
} }
if (template.updatedAt.getTime() !== templateUpdatedAt.getTime()) { if (template.updatedAt.getTime() !== templateUpdatedAt.getTime()) {
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Template no longer matches'); throw new AppError(AppErrorCode.INVALID_REQUEST, { message: 'Template no longer matches' });
} }
if (user && user.email !== directRecipientEmail) { if (user && user.email !== directRecipientEmail) {
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Email must match if you are logged in'); throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: 'Email must match if you are logged in',
});
} }
const { derivedRecipientAccessAuth, documentAuthOption: templateAuthOptions } = const { derivedRecipientAccessAuth, documentAuthOption: templateAuthOptions } =
@@ -136,7 +140,7 @@ export const createDocumentFromDirectTemplate = async ({
.exhaustive(); .exhaustive();
if (!isAccessAuthValid) { if (!isAccessAuthValid) {
throw new AppError(AppErrorCode.UNAUTHORIZED, 'You must be logged in'); throw new AppError(AppErrorCode.UNAUTHORIZED, { message: 'You must be logged in' });
} }
const directTemplateRecipientAuthOptions = ZRecipientAuthOptionsSchema.parse( const directTemplateRecipientAuthOptions = ZRecipientAuthOptionsSchema.parse(
@@ -163,7 +167,9 @@ export const createDocumentFromDirectTemplate = async ({
); );
if (!signedFieldValue) { if (!signedFieldValue) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Invalid, missing or changed fields'); throw new AppError(AppErrorCode.INVALID_BODY, {
message: 'Invalid, missing or changed fields',
});
} }
if (templateField.type === FieldType.NAME && directRecipientName === undefined) { if (templateField.type === FieldType.NAME && directRecipientName === undefined) {

View File

@@ -16,6 +16,7 @@ import type { SupportedLanguageCodes } from '../../constants/i18n';
import { AppError, AppErrorCode } from '../../errors/app-error'; import { AppError, AppErrorCode } from '../../errors/app-error';
import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs'; import { DOCUMENT_AUDIT_LOG_TYPE } from '../../types/document-audit-logs';
import { ZRecipientAuthOptionsSchema } from '../../types/document-auth'; import { ZRecipientAuthOptionsSchema } from '../../types/document-auth';
import type { TDocumentEmailSettings } from '../../types/document-email';
import { ZFieldMetaSchema } from '../../types/field-meta'; import { ZFieldMetaSchema } from '../../types/field-meta';
import type { RequestMetadata } from '../../universal/extract-request-metadata'; import type { RequestMetadata } from '../../universal/extract-request-metadata';
import { createDocumentAuditLogData } from '../../utils/document-audit-logs'; import { createDocumentAuditLogData } from '../../utils/document-audit-logs';
@@ -65,6 +66,7 @@ export type CreateDocumentFromTemplateOptions = {
language?: SupportedLanguageCodes; language?: SupportedLanguageCodes;
distributionMethod?: DocumentDistributionMethod; distributionMethod?: DocumentDistributionMethod;
typedSignatureEnabled?: boolean; typedSignatureEnabled?: boolean;
emailSettings?: TDocumentEmailSettings;
}; };
requestMetadata?: RequestMetadata; requestMetadata?: RequestMetadata;
}; };
@@ -120,7 +122,9 @@ export const createDocumentFromTemplate = async ({
}); });
if (!template) { if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Template not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
} }
// Check that all the passed in recipient IDs can be associated with a template recipient. // Check that all the passed in recipient IDs can be associated with a template recipient.
@@ -130,10 +134,9 @@ export const createDocumentFromTemplate = async ({
); );
if (!foundRecipient) { if (!foundRecipient) {
throw new AppError( throw new AppError(AppErrorCode.INVALID_BODY, {
AppErrorCode.INVALID_BODY, message: `Recipient with ID ${recipient.id} not found in the template.`,
`Recipient with ID ${recipient.id} not found in the template.`, });
);
} }
}); });
@@ -188,7 +191,9 @@ export const createDocumentFromTemplate = async ({
redirectUrl: override?.redirectUrl || template.templateMeta?.redirectUrl, redirectUrl: override?.redirectUrl || template.templateMeta?.redirectUrl,
distributionMethod: distributionMethod:
override?.distributionMethod || template.templateMeta?.distributionMethod, override?.distributionMethod || template.templateMeta?.distributionMethod,
emailSettings: template.templateMeta?.emailSettings || undefined, // last `undefined` is due to JsonValue's
emailSettings:
override?.emailSettings || template.templateMeta?.emailSettings || undefined,
signingOrder: signingOrder:
override?.signingOrder || override?.signingOrder ||
template.templateMeta?.signingOrder || template.templateMeta?.signingOrder ||

View File

@@ -47,18 +47,18 @@ export const createTemplateDirectLink = async ({
}); });
if (!template) { if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Template not found'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'Template not found' });
} }
if (template.directLink) { if (template.directLink) {
throw new AppError(AppErrorCode.ALREADY_EXISTS, 'Direct template already exists'); throw new AppError(AppErrorCode.ALREADY_EXISTS, { message: 'Direct template already exists' });
} }
if ( if (
directRecipientId && directRecipientId &&
!template.Recipient.find((recipient) => recipient.id === directRecipientId) !template.Recipient.find((recipient) => recipient.id === directRecipientId)
) { ) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Recipient not found'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'Recipient not found' });
} }
if ( if (
@@ -67,7 +67,9 @@ export const createTemplateDirectLink = async ({
(recipient) => recipient.email.toLowerCase() === DIRECT_TEMPLATE_RECIPIENT_EMAIL, (recipient) => recipient.email.toLowerCase() === DIRECT_TEMPLATE_RECIPIENT_EMAIL,
) )
) { ) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Cannot generate placeholder direct recipient'); throw new AppError(AppErrorCode.INVALID_BODY, {
message: 'Cannot generate placeholder direct recipient',
});
} }
return await prisma.$transaction(async (tx) => { return await prisma.$transaction(async (tx) => {

View File

@@ -39,7 +39,9 @@ export const deleteTemplateDirectLink = async ({
}); });
if (!template) { if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Template not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
} }
const { directLink } = template; const { directLink } = template;

View File

@@ -53,7 +53,9 @@ export const getTemplateById = async ({ id, userId, teamId }: GetTemplateByIdOpt
}); });
if (!template) { if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Template not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
} }
return template; return template;

View File

@@ -1,6 +1,8 @@
import { prisma } from '@documenso/prisma'; import { prisma } from '@documenso/prisma';
import type { TemplateWithDetails } from '@documenso/prisma/types/template'; import type { TemplateWithDetails } from '@documenso/prisma/types/template';
import { AppError, AppErrorCode } from '../../errors/app-error';
export type GetTemplateWithDetailsByIdOptions = { export type GetTemplateWithDetailsByIdOptions = {
id: number; id: number;
userId: number; userId: number;
@@ -10,7 +12,7 @@ export const getTemplateWithDetailsById = async ({
id, id,
userId, userId,
}: GetTemplateWithDetailsByIdOptions): Promise<TemplateWithDetails> => { }: GetTemplateWithDetailsByIdOptions): Promise<TemplateWithDetails> => {
return await prisma.template.findFirstOrThrow({ const template = await prisma.template.findFirst({
where: { where: {
id, id,
OR: [ OR: [
@@ -36,4 +38,12 @@ export const getTemplateWithDetailsById = async ({
Field: true, Field: true,
}, },
}); });
if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
}
return template;
}; };

View File

@@ -40,13 +40,17 @@ export const toggleTemplateDirectLink = async ({
}); });
if (!template) { if (!template) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Template not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Template not found',
});
} }
const { directLink } = template; const { directLink } = template;
if (!directLink) { if (!directLink) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Direct template link not found'); throw new AppError(AppErrorCode.NOT_FOUND, {
message: 'Direct template link not found',
});
} }
return await prisma.templateDirectLink.update({ return await prisma.templateDirectLink.update({

View File

@@ -34,7 +34,9 @@ export const updateTemplateSettings = async ({
data, data,
}: UpdateTemplateSettingsOptions) => { }: UpdateTemplateSettingsOptions) => {
if (Object.values(data).length === 0 && Object.keys(meta ?? {}).length === 0) { if (Object.values(data).length === 0 && Object.keys(meta ?? {}).length === 0) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Missing data to update'); throw new AppError(AppErrorCode.INVALID_BODY, {
message: 'Missing data to update',
});
} }
const template = await prisma.template.findFirstOrThrow({ const template = await prisma.template.findFirstOrThrow({
@@ -82,10 +84,9 @@ export const updateTemplateSettings = async ({
}); });
if (!isDocumentEnterprise) { if (!isDocumentEnterprise) {
throw new AppError( throw new AppError(AppErrorCode.UNAUTHORIZED, {
AppErrorCode.UNAUTHORIZED, message: 'You do not have permission to set the action auth',
'You do not have permission to set the action auth', });
);
} }
} }

View File

@@ -38,11 +38,10 @@ export const createUser = async ({ name, email, password, signature, url }: Crea
}); });
if (urlExists) { if (urlExists) {
throw new AppError( throw new AppError(AppErrorCode.PROFILE_URL_TAKEN, {
AppErrorCode.PROFILE_URL_TAKEN, message: 'Profile username is taken',
'Profile username is taken', userMessage: 'The profile username is already taken',
'The profile username is already taken', });
);
} }
} }

View File

@@ -26,7 +26,7 @@ export const getUserPublicProfile = async ({
}); });
if (!user) { if (!user) {
throw new AppError(AppErrorCode.NOT_FOUND, 'User not found'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'User not found' });
} }
// Create and return the public profile. // Create and return the public profile.
@@ -39,7 +39,7 @@ export const getUserPublicProfile = async ({
}); });
if (!profile) { if (!profile) {
throw new AppError(AppErrorCode.NOT_FOUND, 'Failed to create public profile'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'Failed to create public profile' });
} }
return { return {

View File

@@ -13,7 +13,7 @@ export type UpdatePublicProfileOptions = {
export const updatePublicProfile = async ({ userId, data }: UpdatePublicProfileOptions) => { export const updatePublicProfile = async ({ userId, data }: UpdatePublicProfileOptions) => {
if (Object.values(data).length === 0) { if (Object.values(data).length === 0) {
throw new AppError(AppErrorCode.INVALID_BODY, 'Missing data to update'); throw new AppError(AppErrorCode.INVALID_BODY, { message: 'Missing data to update' });
} }
const { url, bio, enabled } = data; const { url, bio, enabled } = data;
@@ -25,13 +25,15 @@ export const updatePublicProfile = async ({ userId, data }: UpdatePublicProfileO
}); });
if (!user) { if (!user) {
throw new AppError(AppErrorCode.NOT_FOUND, 'User not found'); throw new AppError(AppErrorCode.NOT_FOUND, { message: 'User not found' });
} }
const finalUrl = url ?? user.url; const finalUrl = url ?? user.url;
if (!finalUrl && enabled) { if (!finalUrl && enabled) {
throw new AppError(AppErrorCode.INVALID_REQUEST, 'Cannot enable a profile without a URL'); throw new AppError(AppErrorCode.INVALID_REQUEST, {
message: 'Cannot enable a profile without a URL',
});
} }
if (url) { if (url) {
@@ -57,7 +59,9 @@ export const updatePublicProfile = async ({ userId, data }: UpdatePublicProfileO
}); });
if (isUrlTakenByAnotherUser || isUrlTakenByAnotherTeam) { if (isUrlTakenByAnotherUser || isUrlTakenByAnotherTeam) {
throw new AppError(AppErrorCode.PROFILE_URL_TAKEN, 'The profile username is already taken'); throw new AppError(AppErrorCode.PROFILE_URL_TAKEN, {
message: 'The profile username is already taken',
});
} }
} }

View File

@@ -135,11 +135,11 @@ msgstr "{prefix} hat das Dokument erstellt"
msgid "{prefix} deleted the document" msgid "{prefix} deleted the document"
msgstr "{prefix} hat das Dokument gelöscht" msgstr "{prefix} hat das Dokument gelöscht"
#: packages/lib/utils/document-audit-logs.ts:339 #: packages/lib/utils/document-audit-logs.ts:335
msgid "{prefix} moved the document to team" msgid "{prefix} moved the document to team"
msgstr "{prefix} hat das Dokument ins Team verschoben" msgstr "{prefix} hat das Dokument ins Team verschoben"
#: packages/lib/utils/document-audit-logs.ts:323 #: packages/lib/utils/document-audit-logs.ts:319
msgid "{prefix} opened the document" msgid "{prefix} opened the document"
msgstr "{prefix} hat das Dokument geöffnet" msgstr "{prefix} hat das Dokument geöffnet"
@@ -151,27 +151,23 @@ msgstr "{prefix} hat ein Feld entfernt"
msgid "{prefix} removed a recipient" msgid "{prefix} removed a recipient"
msgstr "{prefix} hat einen Empfänger entfernt" msgstr "{prefix} hat einen Empfänger entfernt"
#: packages/lib/utils/document-audit-logs.ts:369 #: packages/lib/utils/document-audit-logs.ts:365
msgid "{prefix} resent an email to {0}" msgid "{prefix} resent an email to {0}"
msgstr "{prefix} hat eine E-Mail an {0} erneut gesendet" msgstr "{prefix} hat eine E-Mail an {0} erneut gesendet"
#: packages/lib/utils/document-audit-logs.ts:295 #: packages/lib/utils/document-audit-logs.ts:366
msgid "{prefix} restored the document"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:370
msgid "{prefix} sent an email to {0}" msgid "{prefix} sent an email to {0}"
msgstr "{prefix} hat eine E-Mail an {0} gesendet" msgstr "{prefix} hat eine E-Mail an {0} gesendet"
#: packages/lib/utils/document-audit-logs.ts:335 #: packages/lib/utils/document-audit-logs.ts:331
msgid "{prefix} sent the document" msgid "{prefix} sent the document"
msgstr "{prefix} hat das Dokument gesendet" msgstr "{prefix} hat das Dokument gesendet"
#: packages/lib/utils/document-audit-logs.ts:299 #: packages/lib/utils/document-audit-logs.ts:295
msgid "{prefix} signed a field" msgid "{prefix} signed a field"
msgstr "{prefix} hat ein Feld unterschrieben" msgstr "{prefix} hat ein Feld unterschrieben"
#: packages/lib/utils/document-audit-logs.ts:303 #: packages/lib/utils/document-audit-logs.ts:299
msgid "{prefix} unsigned a field" msgid "{prefix} unsigned a field"
msgstr "{prefix} hat ein Feld ungültig gemacht" msgstr "{prefix} hat ein Feld ungültig gemacht"
@@ -183,27 +179,27 @@ msgstr "{prefix} hat ein Feld aktualisiert"
msgid "{prefix} updated a recipient" msgid "{prefix} updated a recipient"
msgstr "{prefix} hat einen Empfänger aktualisiert" msgstr "{prefix} hat einen Empfänger aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:319 #: packages/lib/utils/document-audit-logs.ts:315
msgid "{prefix} updated the document" msgid "{prefix} updated the document"
msgstr "{prefix} hat das Dokument aktualisiert" msgstr "{prefix} hat das Dokument aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:311 #: packages/lib/utils/document-audit-logs.ts:307
msgid "{prefix} updated the document access auth requirements" msgid "{prefix} updated the document access auth requirements"
msgstr "{prefix} hat die Anforderungen an die Dokumentenzugriffsautorisierung aktualisiert" msgstr "{prefix} hat die Anforderungen an die Dokumentenzugriffsautorisierung aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:331 #: packages/lib/utils/document-audit-logs.ts:327
msgid "{prefix} updated the document external ID" msgid "{prefix} updated the document external ID"
msgstr "{prefix} hat die externe ID des Dokuments aktualisiert" msgstr "{prefix} hat die externe ID des Dokuments aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:315 #: packages/lib/utils/document-audit-logs.ts:311
msgid "{prefix} updated the document signing auth requirements" msgid "{prefix} updated the document signing auth requirements"
msgstr "{prefix} hat die Authentifizierungsanforderungen für die Dokumentenunterzeichnung aktualisiert" msgstr "{prefix} hat die Authentifizierungsanforderungen für die Dokumentenunterzeichnung aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:327 #: packages/lib/utils/document-audit-logs.ts:323
msgid "{prefix} updated the document title" msgid "{prefix} updated the document title"
msgstr "{prefix} hat den Titel des Dokuments aktualisiert" msgstr "{prefix} hat den Titel des Dokuments aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:307 #: packages/lib/utils/document-audit-logs.ts:303
msgid "{prefix} updated the document visibility" msgid "{prefix} updated the document visibility"
msgstr "{prefix} hat die Sichtbarkeit des Dokuments aktualisiert" msgstr "{prefix} hat die Sichtbarkeit des Dokuments aktualisiert"
@@ -231,27 +227,27 @@ msgstr "{teamName} hat Sie eingeladen, {action} {documentName}"
msgid "{teamName} ownership transfer request" msgid "{teamName} ownership transfer request"
msgstr "Anfrage zur Übertragung des Eigentums von {teamName}" msgstr "Anfrage zur Übertragung des Eigentums von {teamName}"
#: packages/lib/utils/document-audit-logs.ts:347 #: packages/lib/utils/document-audit-logs.ts:343
msgid "{userName} approved the document" msgid "{userName} approved the document"
msgstr "{userName} hat das Dokument genehmigt" msgstr "{userName} hat das Dokument genehmigt"
#: packages/lib/utils/document-audit-logs.ts:348 #: packages/lib/utils/document-audit-logs.ts:344
msgid "{userName} CC'd the document" msgid "{userName} CC'd the document"
msgstr "{userName} hat das Dokument in CC gesetzt" msgstr "{userName} hat das Dokument in CC gesetzt"
#: packages/lib/utils/document-audit-logs.ts:349 #: packages/lib/utils/document-audit-logs.ts:345
msgid "{userName} completed their task" msgid "{userName} completed their task"
msgstr "{userName} hat ihre Aufgabe abgeschlossen" msgstr "{userName} hat ihre Aufgabe abgeschlossen"
#: packages/lib/utils/document-audit-logs.ts:359 #: packages/lib/utils/document-audit-logs.ts:355
msgid "{userName} rejected the document" msgid "{userName} rejected the document"
msgstr "{userName} hat das Dokument abgelehnt" msgstr "{userName} hat das Dokument abgelehnt"
#: packages/lib/utils/document-audit-logs.ts:345 #: packages/lib/utils/document-audit-logs.ts:341
msgid "{userName} signed the document" msgid "{userName} signed the document"
msgstr "{userName} hat das Dokument unterschrieben" msgstr "{userName} hat das Dokument unterschrieben"
#: packages/lib/utils/document-audit-logs.ts:346 #: packages/lib/utils/document-audit-logs.ts:342
msgid "{userName} viewed the document" msgid "{userName} viewed the document"
msgstr "{userName} hat das Dokument angesehen" msgstr "{userName} hat das Dokument angesehen"
@@ -345,7 +341,7 @@ msgstr "Ein Empfänger wurde entfernt"
msgid "A recipient was updated" msgid "A recipient was updated"
msgstr "Ein Empfänger wurde aktualisiert" msgstr "Ein Empfänger wurde aktualisiert"
#: packages/lib/server-only/team/create-team-email-verification.ts:156 #: packages/lib/server-only/team/create-team-email-verification.ts:159
msgid "A request to use your email has been initiated by {0} on Documenso" msgid "A request to use your email has been initiated by {0} on Documenso"
msgstr "Eine Anfrage zur Verwendung Ihrer E-Mail wurde von {0} auf Documenso initiiert" msgstr "Eine Anfrage zur Verwendung Ihrer E-Mail wurde von {0} auf Documenso initiiert"
@@ -692,17 +688,17 @@ msgstr "Dokument \"{0}\" - Ablehnung Bestätigt"
msgid "Document access" msgid "Document access"
msgstr "Dokumentenzugriff" msgstr "Dokumentenzugriff"
#: packages/lib/utils/document-audit-logs.ts:310 #: packages/lib/utils/document-audit-logs.ts:306
msgid "Document access auth updated" msgid "Document access auth updated"
msgstr "Die Authentifizierung für den Dokumentenzugriff wurde aktualisiert" msgstr "Die Authentifizierung für den Dokumentenzugriff wurde aktualisiert"
#: packages/lib/server-only/document/delete-document.ts:256 #: packages/lib/server-only/document/delete-document.ts:246
#: packages/lib/server-only/document/super-delete-document.ts:98 #: packages/lib/server-only/document/super-delete-document.ts:98
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Dokument storniert" msgstr "Dokument storniert"
#: packages/lib/utils/document-audit-logs.ts:373 #: packages/lib/utils/document-audit-logs.ts:369
#: packages/lib/utils/document-audit-logs.ts:374 #: packages/lib/utils/document-audit-logs.ts:370
msgid "Document completed" msgid "Document completed"
msgstr "Dokument abgeschlossen" msgstr "Dokument abgeschlossen"
@@ -715,7 +711,7 @@ msgid "Document created"
msgstr "Dokument erstellt" msgstr "Dokument erstellt"
#: packages/email/templates/document-created-from-direct-template.tsx:32 #: packages/email/templates/document-created-from-direct-template.tsx:32
#: packages/lib/server-only/template/create-document-from-direct-template.ts:567 #: packages/lib/server-only/template/create-document-from-direct-template.ts:573
msgid "Document created from direct template" msgid "Document created from direct template"
msgstr "Dokument erstellt aus direkter Vorlage" msgstr "Dokument erstellt aus direkter Vorlage"
@@ -740,15 +736,15 @@ msgstr "Dokument gelöscht!"
msgid "Document Distribution Method" msgid "Document Distribution Method"
msgstr "Verteilungsmethode für Dokumente" msgstr "Verteilungsmethode für Dokumente"
#: packages/lib/utils/document-audit-logs.ts:330 #: packages/lib/utils/document-audit-logs.ts:326
msgid "Document external ID updated" msgid "Document external ID updated"
msgstr "Externe ID des Dokuments aktualisiert" msgstr "Externe ID des Dokuments aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:338 #: packages/lib/utils/document-audit-logs.ts:334
msgid "Document moved to team" msgid "Document moved to team"
msgstr "Dokument ins Team verschoben" msgstr "Dokument ins Team verschoben"
#: packages/lib/utils/document-audit-logs.ts:322 #: packages/lib/utils/document-audit-logs.ts:318
msgid "Document opened" msgid "Document opened"
msgstr "Dokument geöffnet" msgstr "Dokument geöffnet"
@@ -763,27 +759,23 @@ msgstr "Dokument Abgelehnt"
#~ msgid "Document Rejection Confirmed" #~ msgid "Document Rejection Confirmed"
#~ msgstr "Document Rejection Confirmed" #~ msgstr "Document Rejection Confirmed"
#: packages/lib/utils/document-audit-logs.ts:294 #: packages/lib/utils/document-audit-logs.ts:330
msgid "Document restored"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:334
msgid "Document sent" msgid "Document sent"
msgstr "Dokument gesendet" msgstr "Dokument gesendet"
#: packages/lib/utils/document-audit-logs.ts:314 #: packages/lib/utils/document-audit-logs.ts:310
msgid "Document signing auth updated" msgid "Document signing auth updated"
msgstr "Dokument unterzeichnen Authentifizierung aktualisiert" msgstr "Dokument unterzeichnen Authentifizierung aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:326 #: packages/lib/utils/document-audit-logs.ts:322
msgid "Document title updated" msgid "Document title updated"
msgstr "Dokumenttitel aktualisiert" msgstr "Dokumenttitel aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:318 #: packages/lib/utils/document-audit-logs.ts:314
msgid "Document updated" msgid "Document updated"
msgstr "Dokument aktualisiert" msgstr "Dokument aktualisiert"
#: packages/lib/utils/document-audit-logs.ts:306 #: packages/lib/utils/document-audit-logs.ts:302
msgid "Document visibility updated" msgid "Document visibility updated"
msgstr "Sichtbarkeit des Dokuments aktualisiert" msgstr "Sichtbarkeit des Dokuments aktualisiert"
@@ -829,11 +821,11 @@ msgstr "E-Mail ist erforderlich"
msgid "Email Options" msgid "Email Options"
msgstr "E-Mail-Optionen" msgstr "E-Mail-Optionen"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email resent" msgid "Email resent"
msgstr "E-Mail erneut gesendet" msgstr "E-Mail erneut gesendet"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email sent" msgid "Email sent"
msgstr "E-Mail gesendet" msgstr "E-Mail gesendet"
@@ -898,11 +890,11 @@ msgstr "Feldbeschriftung"
msgid "Field placeholder" msgid "Field placeholder"
msgstr "Feldplatzhalter" msgstr "Feldplatzhalter"
#: packages/lib/utils/document-audit-logs.ts:298 #: packages/lib/utils/document-audit-logs.ts:294
msgid "Field signed" msgid "Field signed"
msgstr "Feld unterschrieben" msgstr "Feld unterschrieben"
#: packages/lib/utils/document-audit-logs.ts:302 #: packages/lib/utils/document-audit-logs.ts:298
msgid "Field unsigned" msgid "Field unsigned"
msgstr "Feld nicht unterschrieben" msgstr "Feld nicht unterschrieben"
@@ -1207,8 +1199,8 @@ msgstr "Grund für die Ablehnung: {rejectionReason}"
msgid "Receives copy" msgid "Receives copy"
msgstr "Erhält Kopie" msgstr "Erhält Kopie"
#: packages/lib/utils/document-audit-logs.ts:342 #: packages/lib/utils/document-audit-logs.ts:338
#: packages/lib/utils/document-audit-logs.ts:357 #: packages/lib/utils/document-audit-logs.ts:353
msgid "Recipient" msgid "Recipient"
msgstr "Empfänger" msgstr "Empfänger"
@@ -1782,7 +1774,7 @@ msgstr "Du wurdest eingeladen, {0} auf Documenso beizutreten"
msgid "You have been invited to join the following team" msgid "You have been invited to join the following team"
msgstr "Du wurdest eingeladen, dem folgenden Team beizutreten" msgstr "Du wurdest eingeladen, dem folgenden Team beizutreten"
#: packages/lib/server-only/recipient/set-recipients-for-document.ts:329 #: packages/lib/server-only/recipient/set-recipients-for-document.ts:327
msgid "You have been removed from a document" msgid "You have been removed from a document"
msgstr "Du wurdest von einem Dokument entfernt" msgstr "Du wurdest von einem Dokument entfernt"

View File

@@ -291,7 +291,7 @@ msgstr "Bestätigung"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100 #: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:127 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164 #: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118 #: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46
@@ -413,7 +413,7 @@ msgstr "Alle"
msgid "All documents" msgid "All documents"
msgstr "Alle Dokumente" msgstr "Alle Dokumente"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:40 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "All documents have been processed. Any new documents that are sent or received will show here." msgid "All documents have been processed. Any new documents that are sent or received will show here."
msgstr "Alle Dokumente wurden verarbeitet. Alle neuen Dokumente, die gesendet oder empfangen werden, werden hier angezeigt." msgstr "Alle Dokumente wurden verarbeitet. Alle neuen Dokumente, die gesendet oder empfangen werden, werden hier angezeigt."
@@ -516,7 +516,7 @@ msgstr "Ein Fehler ist aufgetreten, während das direkte Links-Signieren deaktiv
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:111 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:107
msgid "An error occurred while downloading your document." msgid "An error occurred while downloading your document."
msgstr "Ein Fehler ist aufgetreten, während dein Dokument heruntergeladen wurde." msgstr "Ein Fehler ist aufgetreten, während dein Dokument heruntergeladen wurde."
@@ -676,7 +676,7 @@ msgstr "App-Version"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:150 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:146
#: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142 #: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142
msgid "Approve" msgid "Approve"
msgstr "Genehmigen" msgstr "Genehmigen"
@@ -784,10 +784,6 @@ msgstr "Basisdetails"
msgid "Billing" msgid "Billing"
msgstr "Abrechnung" msgstr "Abrechnung"
#: apps/web/src/components/formatter/document-status.tsx:51
msgid "Bin"
msgstr ""
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42 #: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42
msgid "Branding Preferences" msgid "Branding Preferences"
msgstr "Markenpräferenzen" msgstr "Markenpräferenzen"
@@ -1287,6 +1283,7 @@ msgid "delete"
msgstr "löschen" msgstr "löschen"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211
@@ -1364,7 +1361,6 @@ msgid "Delete your account and all its contents, including completed documents.
msgstr "Löschen Sie Ihr Konto und alle Inhalte, einschließlich abgeschlossener Dokumente. Diese Aktion ist irreversibel und führt zur Kündigung Ihres Abonnements, seien Sie also vorsichtig." msgstr "Löschen Sie Ihr Konto und alle Inhalte, einschließlich abgeschlossener Dokumente. Diese Aktion ist irreversibel und führt zur Kündigung Ihres Abonnements, seien Sie also vorsichtig."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41 #: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:50
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97
msgid "Deleted" msgid "Deleted"
msgstr "Gelöscht" msgstr "Gelöscht"
@@ -1481,10 +1477,6 @@ msgstr "Dokument Alle"
msgid "Document Approved" msgid "Document Approved"
msgstr "Dokument genehmigt" msgstr "Dokument genehmigt"
#: apps/web/src/components/formatter/document-status.tsx:52
msgid "Document Bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40 #: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Dokument abgebrochen" msgstr "Dokument abgebrochen"
@@ -1619,7 +1611,7 @@ msgstr "Dokument wird dauerhaft gelöscht"
#: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109 #: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109
#: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16 #: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16
#: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15 #: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15
#: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:108 #: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:119
#: apps/web/src/app/(profile)/p/[url]/page.tsx:166 #: apps/web/src/app/(profile)/p/[url]/page.tsx:166
#: apps/web/src/app/not-found.tsx:21 #: apps/web/src/app/not-found.tsx:21
#: apps/web/src/components/(dashboard)/common/command-menu.tsx:205 #: apps/web/src/components/(dashboard)/common/command-menu.tsx:205
@@ -1649,7 +1641,7 @@ msgstr "Haben Sie kein Konto? <0>Registrieren</0>"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:166 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:162
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185 #: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107
@@ -1690,7 +1682,7 @@ msgid "Due to an unpaid invoice, your team has been restricted. Please settle th
msgstr "Aufgrund einer unbezahlten Rechnung wurde Ihrem Team der Zugriff eingeschränkt. Bitte begleichen Sie die Zahlung, um den vollumfänglichen Zugang zu Ihrem Team wiederherzustellen." msgstr "Aufgrund einer unbezahlten Rechnung wurde Ihrem Team der Zugriff eingeschränkt. Bitte begleichen Sie die Zahlung, um den vollumfänglichen Zugang zu Ihrem Team wiederherzustellen."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:171 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:167
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74
@@ -1701,7 +1693,7 @@ msgstr "Duplizieren"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:156
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95 #: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65
@@ -2020,6 +2012,7 @@ msgstr "So funktioniert es:"
msgid "Hey Im Timur" msgid "Hey Im Timur"
msgstr "Hey, ich bin Timur" msgstr "Hey, ich bin Timur"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155 #: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155
msgid "Hide" msgid "Hide"
@@ -2070,7 +2063,7 @@ msgstr "Posteingang Dokumente"
msgid "Include the Signing Certificate in the Document" msgid "Include the Signing Certificate in the Document"
msgstr "" msgstr ""
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:53
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50 #: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50
msgid "Information" msgid "Information"
msgstr "Information" msgstr "Information"
@@ -2403,7 +2396,7 @@ msgstr "Dokument in Team verschieben"
msgid "Move Template to Team" msgid "Move Template to Team"
msgstr "Vorlage in Team verschieben" msgstr "Vorlage in Team verschieben"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:178 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:174
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85
msgid "Move to Team" msgid "Move to Team"
msgstr "In Team verschieben" msgstr "In Team verschieben"
@@ -2467,10 +2460,6 @@ msgstr "Nächstes Feld"
msgid "No active drafts" msgid "No active drafts"
msgstr "Keine aktiven Entwürfe" msgstr "Keine aktiven Entwürfe"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "No documents in the bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99 #: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time." msgid "No further action is required from you at this time."
msgstr "Es sind derzeit keine weiteren Maßnahmen Ihrerseits erforderlich." msgstr "Es sind derzeit keine weiteren Maßnahmen Ihrerseits erforderlich."
@@ -2527,7 +2516,7 @@ msgid "Not supported"
msgstr "Nicht unterstützt" msgstr "Nicht unterstützt"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:39 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "Nothing to do" msgid "Nothing to do"
msgstr "Nichts zu tun" msgstr "Nichts zu tun"
@@ -3217,12 +3206,12 @@ msgid "Setup"
msgstr "Einrichten" msgstr "Einrichten"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:207 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:193
msgid "Share" msgid "Share"
msgstr "Teilen" msgstr "Teilen"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:233 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:219
msgid "Share Signing Card" msgid "Share Signing Card"
msgstr "Signaturkarte teilen" msgstr "Signaturkarte teilen"
@@ -3244,7 +3233,7 @@ msgstr "Vorlagen in Ihrem Team-Öffentliches Profil anzeigen, damit Ihre Zielgru
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:143 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:139
#: apps/web/src/app/(profile)/p/[url]/page.tsx:192 #: apps/web/src/app/(profile)/p/[url]/page.tsx:192
#: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229 #: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182 #: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182
@@ -3368,7 +3357,7 @@ msgid "Signing in..."
msgstr "Anmeldung..." msgstr "Anmeldung..."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:217 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:203
msgid "Signing Links" msgid "Signing Links"
msgstr "Signierlinks" msgstr "Signierlinks"
@@ -3399,7 +3388,7 @@ msgstr "Website Einstellungen"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:110 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:106
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72
#: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62 #: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62
@@ -3884,10 +3873,6 @@ msgstr "Es gibt derzeit keine aktiven Entwürfe. Sie können ein Dokument hochla
msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed." msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed."
msgstr "Es gibt noch keine abgeschlossenen Dokumente. Dokumente, die Sie erstellt oder erhalten haben, werden hier angezeigt, sobald sie abgeschlossen sind." msgstr "Es gibt noch keine abgeschlossenen Dokumente. Dokumente, die Sie erstellt oder erhalten haben, werden hier angezeigt, sobald sie abgeschlossen sind."
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "There are no documents in the bin."
msgstr ""
#: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70 #: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70
msgid "They have permission on your behalf to:" msgid "They have permission on your behalf to:"
msgstr "Sie haben in Ihrem Namen die Erlaubnis, zu:" msgstr "Sie haben in Ihrem Namen die Erlaubnis, zu:"
@@ -4447,7 +4432,7 @@ msgstr "Versionsverlauf"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:132
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168
msgid "View" msgid "View"

View File

@@ -130,11 +130,11 @@ msgstr "{prefix} created the document"
msgid "{prefix} deleted the document" msgid "{prefix} deleted the document"
msgstr "{prefix} deleted the document" msgstr "{prefix} deleted the document"
#: packages/lib/utils/document-audit-logs.ts:339 #: packages/lib/utils/document-audit-logs.ts:335
msgid "{prefix} moved the document to team" msgid "{prefix} moved the document to team"
msgstr "{prefix} moved the document to team" msgstr "{prefix} moved the document to team"
#: packages/lib/utils/document-audit-logs.ts:323 #: packages/lib/utils/document-audit-logs.ts:319
msgid "{prefix} opened the document" msgid "{prefix} opened the document"
msgstr "{prefix} opened the document" msgstr "{prefix} opened the document"
@@ -146,27 +146,23 @@ msgstr "{prefix} removed a field"
msgid "{prefix} removed a recipient" msgid "{prefix} removed a recipient"
msgstr "{prefix} removed a recipient" msgstr "{prefix} removed a recipient"
#: packages/lib/utils/document-audit-logs.ts:369 #: packages/lib/utils/document-audit-logs.ts:365
msgid "{prefix} resent an email to {0}" msgid "{prefix} resent an email to {0}"
msgstr "{prefix} resent an email to {0}" msgstr "{prefix} resent an email to {0}"
#: packages/lib/utils/document-audit-logs.ts:295 #: packages/lib/utils/document-audit-logs.ts:366
msgid "{prefix} restored the document"
msgstr "{prefix} restored the document"
#: packages/lib/utils/document-audit-logs.ts:370
msgid "{prefix} sent an email to {0}" msgid "{prefix} sent an email to {0}"
msgstr "{prefix} sent an email to {0}" msgstr "{prefix} sent an email to {0}"
#: packages/lib/utils/document-audit-logs.ts:335 #: packages/lib/utils/document-audit-logs.ts:331
msgid "{prefix} sent the document" msgid "{prefix} sent the document"
msgstr "{prefix} sent the document" msgstr "{prefix} sent the document"
#: packages/lib/utils/document-audit-logs.ts:299 #: packages/lib/utils/document-audit-logs.ts:295
msgid "{prefix} signed a field" msgid "{prefix} signed a field"
msgstr "{prefix} signed a field" msgstr "{prefix} signed a field"
#: packages/lib/utils/document-audit-logs.ts:303 #: packages/lib/utils/document-audit-logs.ts:299
msgid "{prefix} unsigned a field" msgid "{prefix} unsigned a field"
msgstr "{prefix} unsigned a field" msgstr "{prefix} unsigned a field"
@@ -178,27 +174,27 @@ msgstr "{prefix} updated a field"
msgid "{prefix} updated a recipient" msgid "{prefix} updated a recipient"
msgstr "{prefix} updated a recipient" msgstr "{prefix} updated a recipient"
#: packages/lib/utils/document-audit-logs.ts:319 #: packages/lib/utils/document-audit-logs.ts:315
msgid "{prefix} updated the document" msgid "{prefix} updated the document"
msgstr "{prefix} updated the document" msgstr "{prefix} updated the document"
#: packages/lib/utils/document-audit-logs.ts:311 #: packages/lib/utils/document-audit-logs.ts:307
msgid "{prefix} updated the document access auth requirements" msgid "{prefix} updated the document access auth requirements"
msgstr "{prefix} updated the document access auth requirements" msgstr "{prefix} updated the document access auth requirements"
#: packages/lib/utils/document-audit-logs.ts:331 #: packages/lib/utils/document-audit-logs.ts:327
msgid "{prefix} updated the document external ID" msgid "{prefix} updated the document external ID"
msgstr "{prefix} updated the document external ID" msgstr "{prefix} updated the document external ID"
#: packages/lib/utils/document-audit-logs.ts:315 #: packages/lib/utils/document-audit-logs.ts:311
msgid "{prefix} updated the document signing auth requirements" msgid "{prefix} updated the document signing auth requirements"
msgstr "{prefix} updated the document signing auth requirements" msgstr "{prefix} updated the document signing auth requirements"
#: packages/lib/utils/document-audit-logs.ts:327 #: packages/lib/utils/document-audit-logs.ts:323
msgid "{prefix} updated the document title" msgid "{prefix} updated the document title"
msgstr "{prefix} updated the document title" msgstr "{prefix} updated the document title"
#: packages/lib/utils/document-audit-logs.ts:307 #: packages/lib/utils/document-audit-logs.ts:303
msgid "{prefix} updated the document visibility" msgid "{prefix} updated the document visibility"
msgstr "{prefix} updated the document visibility" msgstr "{prefix} updated the document visibility"
@@ -226,27 +222,27 @@ msgstr "{teamName} has invited you to {action} {documentName}"
msgid "{teamName} ownership transfer request" msgid "{teamName} ownership transfer request"
msgstr "{teamName} ownership transfer request" msgstr "{teamName} ownership transfer request"
#: packages/lib/utils/document-audit-logs.ts:347 #: packages/lib/utils/document-audit-logs.ts:343
msgid "{userName} approved the document" msgid "{userName} approved the document"
msgstr "{userName} approved the document" msgstr "{userName} approved the document"
#: packages/lib/utils/document-audit-logs.ts:348 #: packages/lib/utils/document-audit-logs.ts:344
msgid "{userName} CC'd the document" msgid "{userName} CC'd the document"
msgstr "{userName} CC'd the document" msgstr "{userName} CC'd the document"
#: packages/lib/utils/document-audit-logs.ts:349 #: packages/lib/utils/document-audit-logs.ts:345
msgid "{userName} completed their task" msgid "{userName} completed their task"
msgstr "{userName} completed their task" msgstr "{userName} completed their task"
#: packages/lib/utils/document-audit-logs.ts:359 #: packages/lib/utils/document-audit-logs.ts:355
msgid "{userName} rejected the document" msgid "{userName} rejected the document"
msgstr "{userName} rejected the document" msgstr "{userName} rejected the document"
#: packages/lib/utils/document-audit-logs.ts:345 #: packages/lib/utils/document-audit-logs.ts:341
msgid "{userName} signed the document" msgid "{userName} signed the document"
msgstr "{userName} signed the document" msgstr "{userName} signed the document"
#: packages/lib/utils/document-audit-logs.ts:346 #: packages/lib/utils/document-audit-logs.ts:342
msgid "{userName} viewed the document" msgid "{userName} viewed the document"
msgstr "{userName} viewed the document" msgstr "{userName} viewed the document"
@@ -340,7 +336,7 @@ msgstr "A recipient was removed"
msgid "A recipient was updated" msgid "A recipient was updated"
msgstr "A recipient was updated" msgstr "A recipient was updated"
#: packages/lib/server-only/team/create-team-email-verification.ts:156 #: packages/lib/server-only/team/create-team-email-verification.ts:159
msgid "A request to use your email has been initiated by {0} on Documenso" msgid "A request to use your email has been initiated by {0} on Documenso"
msgstr "A request to use your email has been initiated by {0} on Documenso" msgstr "A request to use your email has been initiated by {0} on Documenso"
@@ -687,17 +683,17 @@ msgstr "Document \"{0}\" - Rejection Confirmed"
msgid "Document access" msgid "Document access"
msgstr "Document access" msgstr "Document access"
#: packages/lib/utils/document-audit-logs.ts:310 #: packages/lib/utils/document-audit-logs.ts:306
msgid "Document access auth updated" msgid "Document access auth updated"
msgstr "Document access auth updated" msgstr "Document access auth updated"
#: packages/lib/server-only/document/delete-document.ts:256 #: packages/lib/server-only/document/delete-document.ts:246
#: packages/lib/server-only/document/super-delete-document.ts:98 #: packages/lib/server-only/document/super-delete-document.ts:98
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Document Cancelled" msgstr "Document Cancelled"
#: packages/lib/utils/document-audit-logs.ts:373 #: packages/lib/utils/document-audit-logs.ts:369
#: packages/lib/utils/document-audit-logs.ts:374 #: packages/lib/utils/document-audit-logs.ts:370
msgid "Document completed" msgid "Document completed"
msgstr "Document completed" msgstr "Document completed"
@@ -710,7 +706,7 @@ msgid "Document created"
msgstr "Document created" msgstr "Document created"
#: packages/email/templates/document-created-from-direct-template.tsx:32 #: packages/email/templates/document-created-from-direct-template.tsx:32
#: packages/lib/server-only/template/create-document-from-direct-template.ts:567 #: packages/lib/server-only/template/create-document-from-direct-template.ts:573
msgid "Document created from direct template" msgid "Document created from direct template"
msgstr "Document created from direct template" msgstr "Document created from direct template"
@@ -735,15 +731,15 @@ msgstr "Document Deleted!"
msgid "Document Distribution Method" msgid "Document Distribution Method"
msgstr "Document Distribution Method" msgstr "Document Distribution Method"
#: packages/lib/utils/document-audit-logs.ts:330 #: packages/lib/utils/document-audit-logs.ts:326
msgid "Document external ID updated" msgid "Document external ID updated"
msgstr "Document external ID updated" msgstr "Document external ID updated"
#: packages/lib/utils/document-audit-logs.ts:338 #: packages/lib/utils/document-audit-logs.ts:334
msgid "Document moved to team" msgid "Document moved to team"
msgstr "Document moved to team" msgstr "Document moved to team"
#: packages/lib/utils/document-audit-logs.ts:322 #: packages/lib/utils/document-audit-logs.ts:318
msgid "Document opened" msgid "Document opened"
msgstr "Document opened" msgstr "Document opened"
@@ -758,27 +754,23 @@ msgstr "Document Rejected"
#~ msgid "Document Rejection Confirmed" #~ msgid "Document Rejection Confirmed"
#~ msgstr "Document Rejection Confirmed" #~ msgstr "Document Rejection Confirmed"
#: packages/lib/utils/document-audit-logs.ts:294 #: packages/lib/utils/document-audit-logs.ts:330
msgid "Document restored"
msgstr "Document restored"
#: packages/lib/utils/document-audit-logs.ts:334
msgid "Document sent" msgid "Document sent"
msgstr "Document sent" msgstr "Document sent"
#: packages/lib/utils/document-audit-logs.ts:314 #: packages/lib/utils/document-audit-logs.ts:310
msgid "Document signing auth updated" msgid "Document signing auth updated"
msgstr "Document signing auth updated" msgstr "Document signing auth updated"
#: packages/lib/utils/document-audit-logs.ts:326 #: packages/lib/utils/document-audit-logs.ts:322
msgid "Document title updated" msgid "Document title updated"
msgstr "Document title updated" msgstr "Document title updated"
#: packages/lib/utils/document-audit-logs.ts:318 #: packages/lib/utils/document-audit-logs.ts:314
msgid "Document updated" msgid "Document updated"
msgstr "Document updated" msgstr "Document updated"
#: packages/lib/utils/document-audit-logs.ts:306 #: packages/lib/utils/document-audit-logs.ts:302
msgid "Document visibility updated" msgid "Document visibility updated"
msgstr "Document visibility updated" msgstr "Document visibility updated"
@@ -824,11 +816,11 @@ msgstr "Email is required"
msgid "Email Options" msgid "Email Options"
msgstr "Email Options" msgstr "Email Options"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email resent" msgid "Email resent"
msgstr "Email resent" msgstr "Email resent"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email sent" msgid "Email sent"
msgstr "Email sent" msgstr "Email sent"
@@ -893,11 +885,11 @@ msgstr "Field label"
msgid "Field placeholder" msgid "Field placeholder"
msgstr "Field placeholder" msgstr "Field placeholder"
#: packages/lib/utils/document-audit-logs.ts:298 #: packages/lib/utils/document-audit-logs.ts:294
msgid "Field signed" msgid "Field signed"
msgstr "Field signed" msgstr "Field signed"
#: packages/lib/utils/document-audit-logs.ts:302 #: packages/lib/utils/document-audit-logs.ts:298
msgid "Field unsigned" msgid "Field unsigned"
msgstr "Field unsigned" msgstr "Field unsigned"
@@ -1202,8 +1194,8 @@ msgstr "Reason for rejection: {rejectionReason}"
msgid "Receives copy" msgid "Receives copy"
msgstr "Receives copy" msgstr "Receives copy"
#: packages/lib/utils/document-audit-logs.ts:342 #: packages/lib/utils/document-audit-logs.ts:338
#: packages/lib/utils/document-audit-logs.ts:357 #: packages/lib/utils/document-audit-logs.ts:353
msgid "Recipient" msgid "Recipient"
msgstr "Recipient" msgstr "Recipient"
@@ -1777,7 +1769,7 @@ msgstr "You have been invited to join {0} on Documenso"
msgid "You have been invited to join the following team" msgid "You have been invited to join the following team"
msgstr "You have been invited to join the following team" msgstr "You have been invited to join the following team"
#: packages/lib/server-only/recipient/set-recipients-for-document.ts:329 #: packages/lib/server-only/recipient/set-recipients-for-document.ts:327
msgid "You have been removed from a document" msgid "You have been removed from a document"
msgstr "You have been removed from a document" msgstr "You have been removed from a document"

View File

@@ -286,7 +286,7 @@ msgstr "Acknowledgment"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100 #: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:127 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164 #: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118 #: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46
@@ -408,7 +408,7 @@ msgstr "All"
msgid "All documents" msgid "All documents"
msgstr "All documents" msgstr "All documents"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:40 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "All documents have been processed. Any new documents that are sent or received will show here." msgid "All documents have been processed. Any new documents that are sent or received will show here."
msgstr "All documents have been processed. Any new documents that are sent or received will show here." msgstr "All documents have been processed. Any new documents that are sent or received will show here."
@@ -511,7 +511,7 @@ msgstr "An error occurred while disabling direct link signing."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:111 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:107
msgid "An error occurred while downloading your document." msgid "An error occurred while downloading your document."
msgstr "An error occurred while downloading your document." msgstr "An error occurred while downloading your document."
@@ -671,7 +671,7 @@ msgstr "App Version"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:150 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:146
#: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142 #: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142
msgid "Approve" msgid "Approve"
msgstr "Approve" msgstr "Approve"
@@ -779,10 +779,6 @@ msgstr "Basic details"
msgid "Billing" msgid "Billing"
msgstr "Billing" msgstr "Billing"
#: apps/web/src/components/formatter/document-status.tsx:51
msgid "Bin"
msgstr "Bin"
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42 #: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42
msgid "Branding Preferences" msgid "Branding Preferences"
msgstr "Branding Preferences" msgstr "Branding Preferences"
@@ -1282,6 +1278,7 @@ msgid "delete"
msgstr "delete" msgstr "delete"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211
@@ -1359,7 +1356,6 @@ msgid "Delete your account and all its contents, including completed documents.
msgstr "Delete your account and all its contents, including completed documents. This action is irreversible and will cancel your subscription, so proceed with caution." msgstr "Delete your account and all its contents, including completed documents. This action is irreversible and will cancel your subscription, so proceed with caution."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41 #: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:50
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97
msgid "Deleted" msgid "Deleted"
msgstr "Deleted" msgstr "Deleted"
@@ -1476,10 +1472,6 @@ msgstr "Document All"
msgid "Document Approved" msgid "Document Approved"
msgstr "Document Approved" msgstr "Document Approved"
#: apps/web/src/components/formatter/document-status.tsx:52
msgid "Document Bin"
msgstr "Document Bin"
#: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40 #: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Document Cancelled" msgstr "Document Cancelled"
@@ -1614,7 +1606,7 @@ msgstr "Document will be permanently deleted"
#: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109 #: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109
#: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16 #: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16
#: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15 #: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15
#: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:108 #: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:119
#: apps/web/src/app/(profile)/p/[url]/page.tsx:166 #: apps/web/src/app/(profile)/p/[url]/page.tsx:166
#: apps/web/src/app/not-found.tsx:21 #: apps/web/src/app/not-found.tsx:21
#: apps/web/src/components/(dashboard)/common/command-menu.tsx:205 #: apps/web/src/components/(dashboard)/common/command-menu.tsx:205
@@ -1644,7 +1636,7 @@ msgstr "Don't have an account? <0>Sign up</0>"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:166 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:162
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185 #: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107
@@ -1685,7 +1677,7 @@ msgid "Due to an unpaid invoice, your team has been restricted. Please settle th
msgstr "Due to an unpaid invoice, your team has been restricted. Please settle the payment to restore full access to your team." msgstr "Due to an unpaid invoice, your team has been restricted. Please settle the payment to restore full access to your team."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:171 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:167
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74
@@ -1696,7 +1688,7 @@ msgstr "Duplicate"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:156
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95 #: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65
@@ -2015,6 +2007,7 @@ msgstr "Here's how it works:"
msgid "Hey Im Timur" msgid "Hey Im Timur"
msgstr "Hey Im Timur" msgstr "Hey Im Timur"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155 #: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155
msgid "Hide" msgid "Hide"
@@ -2065,7 +2058,7 @@ msgstr "Inbox documents"
msgid "Include the Signing Certificate in the Document" msgid "Include the Signing Certificate in the Document"
msgstr "Include the Signing Certificate in the Document" msgstr "Include the Signing Certificate in the Document"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:53
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50 #: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50
msgid "Information" msgid "Information"
msgstr "Information" msgstr "Information"
@@ -2398,7 +2391,7 @@ msgstr "Move Document to Team"
msgid "Move Template to Team" msgid "Move Template to Team"
msgstr "Move Template to Team" msgstr "Move Template to Team"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:178 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:174
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85
msgid "Move to Team" msgid "Move to Team"
msgstr "Move to Team" msgstr "Move to Team"
@@ -2462,10 +2455,6 @@ msgstr "Next field"
msgid "No active drafts" msgid "No active drafts"
msgstr "No active drafts" msgstr "No active drafts"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "No documents in the bin"
msgstr "No documents in the bin"
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99 #: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time." msgid "No further action is required from you at this time."
msgstr "No further action is required from you at this time." msgstr "No further action is required from you at this time."
@@ -2522,7 +2511,7 @@ msgid "Not supported"
msgstr "Not supported" msgstr "Not supported"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:39 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "Nothing to do" msgid "Nothing to do"
msgstr "Nothing to do" msgstr "Nothing to do"
@@ -3212,12 +3201,12 @@ msgid "Setup"
msgstr "Setup" msgstr "Setup"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:207 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:193
msgid "Share" msgid "Share"
msgstr "Share" msgstr "Share"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:233 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:219
msgid "Share Signing Card" msgid "Share Signing Card"
msgstr "Share Signing Card" msgstr "Share Signing Card"
@@ -3239,7 +3228,7 @@ msgstr "Show templates in your team public profile for your audience to sign and
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:143 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:139
#: apps/web/src/app/(profile)/p/[url]/page.tsx:192 #: apps/web/src/app/(profile)/p/[url]/page.tsx:192
#: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229 #: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182 #: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182
@@ -3363,7 +3352,7 @@ msgid "Signing in..."
msgstr "Signing in..." msgstr "Signing in..."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:217 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:203
msgid "Signing Links" msgid "Signing Links"
msgstr "Signing Links" msgstr "Signing Links"
@@ -3394,7 +3383,7 @@ msgstr "Site Settings"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:110 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:106
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72
#: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62 #: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62
@@ -3879,10 +3868,6 @@ msgstr "There are no active drafts at the current moment. You can upload a docum
msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed." msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed."
msgstr "There are no completed documents yet. Documents that you have created or received will appear here once completed." msgstr "There are no completed documents yet. Documents that you have created or received will appear here once completed."
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "There are no documents in the bin."
msgstr "There are no documents in the bin."
#: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70 #: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70
msgid "They have permission on your behalf to:" msgid "They have permission on your behalf to:"
msgstr "They have permission on your behalf to:" msgstr "They have permission on your behalf to:"
@@ -4442,7 +4427,7 @@ msgstr "Version History"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:132
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168
msgid "View" msgid "View"

View File

@@ -135,11 +135,11 @@ msgstr "{prefix} creó el documento"
msgid "{prefix} deleted the document" msgid "{prefix} deleted the document"
msgstr "{prefix} eliminó el documento" msgstr "{prefix} eliminó el documento"
#: packages/lib/utils/document-audit-logs.ts:339 #: packages/lib/utils/document-audit-logs.ts:335
msgid "{prefix} moved the document to team" msgid "{prefix} moved the document to team"
msgstr "{prefix} movió el documento al equipo" msgstr "{prefix} movió el documento al equipo"
#: packages/lib/utils/document-audit-logs.ts:323 #: packages/lib/utils/document-audit-logs.ts:319
msgid "{prefix} opened the document" msgid "{prefix} opened the document"
msgstr "{prefix} abrió el documento" msgstr "{prefix} abrió el documento"
@@ -151,27 +151,23 @@ msgstr "{prefix} eliminó un campo"
msgid "{prefix} removed a recipient" msgid "{prefix} removed a recipient"
msgstr "{prefix} eliminó un destinatario" msgstr "{prefix} eliminó un destinatario"
#: packages/lib/utils/document-audit-logs.ts:369 #: packages/lib/utils/document-audit-logs.ts:365
msgid "{prefix} resent an email to {0}" msgid "{prefix} resent an email to {0}"
msgstr "{prefix} reenviaron un correo electrónico a {0}" msgstr "{prefix} reenviaron un correo electrónico a {0}"
#: packages/lib/utils/document-audit-logs.ts:295 #: packages/lib/utils/document-audit-logs.ts:366
msgid "{prefix} restored the document"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:370
msgid "{prefix} sent an email to {0}" msgid "{prefix} sent an email to {0}"
msgstr "{prefix} envió un correo electrónico a {0}" msgstr "{prefix} envió un correo electrónico a {0}"
#: packages/lib/utils/document-audit-logs.ts:335 #: packages/lib/utils/document-audit-logs.ts:331
msgid "{prefix} sent the document" msgid "{prefix} sent the document"
msgstr "{prefix} envió el documento" msgstr "{prefix} envió el documento"
#: packages/lib/utils/document-audit-logs.ts:299 #: packages/lib/utils/document-audit-logs.ts:295
msgid "{prefix} signed a field" msgid "{prefix} signed a field"
msgstr "{prefix} firmó un campo" msgstr "{prefix} firmó un campo"
#: packages/lib/utils/document-audit-logs.ts:303 #: packages/lib/utils/document-audit-logs.ts:299
msgid "{prefix} unsigned a field" msgid "{prefix} unsigned a field"
msgstr "{prefix} no firmó un campo" msgstr "{prefix} no firmó un campo"
@@ -183,27 +179,27 @@ msgstr "{prefix} actualizó un campo"
msgid "{prefix} updated a recipient" msgid "{prefix} updated a recipient"
msgstr "{prefix} actualizó un destinatario" msgstr "{prefix} actualizó un destinatario"
#: packages/lib/utils/document-audit-logs.ts:319 #: packages/lib/utils/document-audit-logs.ts:315
msgid "{prefix} updated the document" msgid "{prefix} updated the document"
msgstr "{prefix} actualizó el documento" msgstr "{prefix} actualizó el documento"
#: packages/lib/utils/document-audit-logs.ts:311 #: packages/lib/utils/document-audit-logs.ts:307
msgid "{prefix} updated the document access auth requirements" msgid "{prefix} updated the document access auth requirements"
msgstr "{prefix} actualizó los requisitos de autorización de acceso al documento" msgstr "{prefix} actualizó los requisitos de autorización de acceso al documento"
#: packages/lib/utils/document-audit-logs.ts:331 #: packages/lib/utils/document-audit-logs.ts:327
msgid "{prefix} updated the document external ID" msgid "{prefix} updated the document external ID"
msgstr "{prefix} actualizó el ID externo del documento" msgstr "{prefix} actualizó el ID externo del documento"
#: packages/lib/utils/document-audit-logs.ts:315 #: packages/lib/utils/document-audit-logs.ts:311
msgid "{prefix} updated the document signing auth requirements" msgid "{prefix} updated the document signing auth requirements"
msgstr "{prefix} actualizó los requisitos de autenticación para la firma del documento" msgstr "{prefix} actualizó los requisitos de autenticación para la firma del documento"
#: packages/lib/utils/document-audit-logs.ts:327 #: packages/lib/utils/document-audit-logs.ts:323
msgid "{prefix} updated the document title" msgid "{prefix} updated the document title"
msgstr "{prefix} actualizó el título del documento" msgstr "{prefix} actualizó el título del documento"
#: packages/lib/utils/document-audit-logs.ts:307 #: packages/lib/utils/document-audit-logs.ts:303
msgid "{prefix} updated the document visibility" msgid "{prefix} updated the document visibility"
msgstr "{prefix} actualizó la visibilidad del documento" msgstr "{prefix} actualizó la visibilidad del documento"
@@ -231,27 +227,27 @@ msgstr "{teamName} te ha invitado a {action} {documentName}"
msgid "{teamName} ownership transfer request" msgid "{teamName} ownership transfer request"
msgstr "solicitud de transferencia de propiedad de {teamName}" msgstr "solicitud de transferencia de propiedad de {teamName}"
#: packages/lib/utils/document-audit-logs.ts:347 #: packages/lib/utils/document-audit-logs.ts:343
msgid "{userName} approved the document" msgid "{userName} approved the document"
msgstr "{userName} aprobó el documento" msgstr "{userName} aprobó el documento"
#: packages/lib/utils/document-audit-logs.ts:348 #: packages/lib/utils/document-audit-logs.ts:344
msgid "{userName} CC'd the document" msgid "{userName} CC'd the document"
msgstr "{userName} envió una copia del documento" msgstr "{userName} envió una copia del documento"
#: packages/lib/utils/document-audit-logs.ts:349 #: packages/lib/utils/document-audit-logs.ts:345
msgid "{userName} completed their task" msgid "{userName} completed their task"
msgstr "{userName} completó su tarea" msgstr "{userName} completó su tarea"
#: packages/lib/utils/document-audit-logs.ts:359 #: packages/lib/utils/document-audit-logs.ts:355
msgid "{userName} rejected the document" msgid "{userName} rejected the document"
msgstr "{userName} rechazó el documento" msgstr "{userName} rechazó el documento"
#: packages/lib/utils/document-audit-logs.ts:345 #: packages/lib/utils/document-audit-logs.ts:341
msgid "{userName} signed the document" msgid "{userName} signed the document"
msgstr "{userName} firmó el documento" msgstr "{userName} firmó el documento"
#: packages/lib/utils/document-audit-logs.ts:346 #: packages/lib/utils/document-audit-logs.ts:342
msgid "{userName} viewed the document" msgid "{userName} viewed the document"
msgstr "{userName} vio el documento" msgstr "{userName} vio el documento"
@@ -345,7 +341,7 @@ msgstr "Se eliminó un destinatario"
msgid "A recipient was updated" msgid "A recipient was updated"
msgstr "Se actualizó un destinatario" msgstr "Se actualizó un destinatario"
#: packages/lib/server-only/team/create-team-email-verification.ts:156 #: packages/lib/server-only/team/create-team-email-verification.ts:159
msgid "A request to use your email has been initiated by {0} on Documenso" msgid "A request to use your email has been initiated by {0} on Documenso"
msgstr "Se ha iniciado una solicitud para usar tu correo electrónico por {0} en Documenso" msgstr "Se ha iniciado una solicitud para usar tu correo electrónico por {0} en Documenso"
@@ -692,17 +688,17 @@ msgstr "Documento \"{0}\" - Rechazo confirmado"
msgid "Document access" msgid "Document access"
msgstr "Acceso al documento" msgstr "Acceso al documento"
#: packages/lib/utils/document-audit-logs.ts:310 #: packages/lib/utils/document-audit-logs.ts:306
msgid "Document access auth updated" msgid "Document access auth updated"
msgstr "Se actualizó la autenticación de acceso al documento" msgstr "Se actualizó la autenticación de acceso al documento"
#: packages/lib/server-only/document/delete-document.ts:256 #: packages/lib/server-only/document/delete-document.ts:246
#: packages/lib/server-only/document/super-delete-document.ts:98 #: packages/lib/server-only/document/super-delete-document.ts:98
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Documento cancelado" msgstr "Documento cancelado"
#: packages/lib/utils/document-audit-logs.ts:373 #: packages/lib/utils/document-audit-logs.ts:369
#: packages/lib/utils/document-audit-logs.ts:374 #: packages/lib/utils/document-audit-logs.ts:370
msgid "Document completed" msgid "Document completed"
msgstr "Documento completado" msgstr "Documento completado"
@@ -715,7 +711,7 @@ msgid "Document created"
msgstr "Documento creado" msgstr "Documento creado"
#: packages/email/templates/document-created-from-direct-template.tsx:32 #: packages/email/templates/document-created-from-direct-template.tsx:32
#: packages/lib/server-only/template/create-document-from-direct-template.ts:567 #: packages/lib/server-only/template/create-document-from-direct-template.ts:573
msgid "Document created from direct template" msgid "Document created from direct template"
msgstr "Documento creado a partir de plantilla directa" msgstr "Documento creado a partir de plantilla directa"
@@ -740,15 +736,15 @@ msgstr "¡Documento eliminado!"
msgid "Document Distribution Method" msgid "Document Distribution Method"
msgstr "Método de distribución de documentos" msgstr "Método de distribución de documentos"
#: packages/lib/utils/document-audit-logs.ts:330 #: packages/lib/utils/document-audit-logs.ts:326
msgid "Document external ID updated" msgid "Document external ID updated"
msgstr "ID externo del documento actualizado" msgstr "ID externo del documento actualizado"
#: packages/lib/utils/document-audit-logs.ts:338 #: packages/lib/utils/document-audit-logs.ts:334
msgid "Document moved to team" msgid "Document moved to team"
msgstr "Documento movido al equipo" msgstr "Documento movido al equipo"
#: packages/lib/utils/document-audit-logs.ts:322 #: packages/lib/utils/document-audit-logs.ts:318
msgid "Document opened" msgid "Document opened"
msgstr "Documento abierto" msgstr "Documento abierto"
@@ -763,27 +759,23 @@ msgstr "Documento Rechazado"
#~ msgid "Document Rejection Confirmed" #~ msgid "Document Rejection Confirmed"
#~ msgstr "Document Rejection Confirmed" #~ msgstr "Document Rejection Confirmed"
#: packages/lib/utils/document-audit-logs.ts:294 #: packages/lib/utils/document-audit-logs.ts:330
msgid "Document restored"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:334
msgid "Document sent" msgid "Document sent"
msgstr "Documento enviado" msgstr "Documento enviado"
#: packages/lib/utils/document-audit-logs.ts:314 #: packages/lib/utils/document-audit-logs.ts:310
msgid "Document signing auth updated" msgid "Document signing auth updated"
msgstr "Se actualizó la autenticación de firma del documento" msgstr "Se actualizó la autenticación de firma del documento"
#: packages/lib/utils/document-audit-logs.ts:326 #: packages/lib/utils/document-audit-logs.ts:322
msgid "Document title updated" msgid "Document title updated"
msgstr "Título del documento actualizado" msgstr "Título del documento actualizado"
#: packages/lib/utils/document-audit-logs.ts:318 #: packages/lib/utils/document-audit-logs.ts:314
msgid "Document updated" msgid "Document updated"
msgstr "Documento actualizado" msgstr "Documento actualizado"
#: packages/lib/utils/document-audit-logs.ts:306 #: packages/lib/utils/document-audit-logs.ts:302
msgid "Document visibility updated" msgid "Document visibility updated"
msgstr "Visibilidad del documento actualizada" msgstr "Visibilidad del documento actualizada"
@@ -829,11 +821,11 @@ msgstr "Se requiere email"
msgid "Email Options" msgid "Email Options"
msgstr "Opciones de correo electrónico" msgstr "Opciones de correo electrónico"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email resent" msgid "Email resent"
msgstr "Correo electrónico reeenviado" msgstr "Correo electrónico reeenviado"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email sent" msgid "Email sent"
msgstr "Correo electrónico enviado" msgstr "Correo electrónico enviado"
@@ -898,11 +890,11 @@ msgstr "Etiqueta de campo"
msgid "Field placeholder" msgid "Field placeholder"
msgstr "Marcador de posición de campo" msgstr "Marcador de posición de campo"
#: packages/lib/utils/document-audit-logs.ts:298 #: packages/lib/utils/document-audit-logs.ts:294
msgid "Field signed" msgid "Field signed"
msgstr "Campo firmado" msgstr "Campo firmado"
#: packages/lib/utils/document-audit-logs.ts:302 #: packages/lib/utils/document-audit-logs.ts:298
msgid "Field unsigned" msgid "Field unsigned"
msgstr "Campo no firmado" msgstr "Campo no firmado"
@@ -1207,8 +1199,8 @@ msgstr "Razón del rechazo: {rejectionReason}"
msgid "Receives copy" msgid "Receives copy"
msgstr "Recibe copia" msgstr "Recibe copia"
#: packages/lib/utils/document-audit-logs.ts:342 #: packages/lib/utils/document-audit-logs.ts:338
#: packages/lib/utils/document-audit-logs.ts:357 #: packages/lib/utils/document-audit-logs.ts:353
msgid "Recipient" msgid "Recipient"
msgstr "Destinatario" msgstr "Destinatario"
@@ -1782,7 +1774,7 @@ msgstr "Te han invitado a unirte a {0} en Documenso"
msgid "You have been invited to join the following team" msgid "You have been invited to join the following team"
msgstr "Te han invitado a unirte al siguiente equipo" msgstr "Te han invitado a unirte al siguiente equipo"
#: packages/lib/server-only/recipient/set-recipients-for-document.ts:329 #: packages/lib/server-only/recipient/set-recipients-for-document.ts:327
msgid "You have been removed from a document" msgid "You have been removed from a document"
msgstr "Te han eliminado de un documento" msgstr "Te han eliminado de un documento"

View File

@@ -291,7 +291,7 @@ msgstr "Reconocimiento"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100 #: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:127 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164 #: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118 #: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46
@@ -413,7 +413,7 @@ msgstr "Todos"
msgid "All documents" msgid "All documents"
msgstr "Todos los documentos" msgstr "Todos los documentos"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:40 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "All documents have been processed. Any new documents that are sent or received will show here." msgid "All documents have been processed. Any new documents that are sent or received will show here."
msgstr "Todos los documentos han sido procesados. Cualquier nuevo documento que se envíe o reciba aparecerá aquí." msgstr "Todos los documentos han sido procesados. Cualquier nuevo documento que se envíe o reciba aparecerá aquí."
@@ -516,7 +516,7 @@ msgstr "Ocurrió un error al desactivar la firma de enlace directo."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:111 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:107
msgid "An error occurred while downloading your document." msgid "An error occurred while downloading your document."
msgstr "Ocurrió un error al descargar tu documento." msgstr "Ocurrió un error al descargar tu documento."
@@ -676,7 +676,7 @@ msgstr "Versión de la Aplicación"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:150 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:146
#: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142 #: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142
msgid "Approve" msgid "Approve"
msgstr "Aprobar" msgstr "Aprobar"
@@ -784,10 +784,6 @@ msgstr "Detalles básicos"
msgid "Billing" msgid "Billing"
msgstr "Facturación" msgstr "Facturación"
#: apps/web/src/components/formatter/document-status.tsx:51
msgid "Bin"
msgstr ""
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42 #: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42
msgid "Branding Preferences" msgid "Branding Preferences"
msgstr "Preferencias de marca" msgstr "Preferencias de marca"
@@ -1287,6 +1283,7 @@ msgid "delete"
msgstr "eliminar" msgstr "eliminar"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211
@@ -1364,7 +1361,6 @@ msgid "Delete your account and all its contents, including completed documents.
msgstr "Eliminar su cuenta y todo su contenido, incluidos documentos completados. Esta acción es irreversible y cancelará su suscripción, así que proceda con cuidado." msgstr "Eliminar su cuenta y todo su contenido, incluidos documentos completados. Esta acción es irreversible y cancelará su suscripción, así que proceda con cuidado."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41 #: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:50
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97
msgid "Deleted" msgid "Deleted"
msgstr "Eliminado" msgstr "Eliminado"
@@ -1481,10 +1477,6 @@ msgstr "Documentar Todo"
msgid "Document Approved" msgid "Document Approved"
msgstr "Documento Aprobado" msgstr "Documento Aprobado"
#: apps/web/src/components/formatter/document-status.tsx:52
msgid "Document Bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40 #: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Documento Cancelado" msgstr "Documento Cancelado"
@@ -1619,7 +1611,7 @@ msgstr "El documento será eliminado permanentemente"
#: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109 #: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109
#: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16 #: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16
#: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15 #: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15
#: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:108 #: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:119
#: apps/web/src/app/(profile)/p/[url]/page.tsx:166 #: apps/web/src/app/(profile)/p/[url]/page.tsx:166
#: apps/web/src/app/not-found.tsx:21 #: apps/web/src/app/not-found.tsx:21
#: apps/web/src/components/(dashboard)/common/command-menu.tsx:205 #: apps/web/src/components/(dashboard)/common/command-menu.tsx:205
@@ -1649,7 +1641,7 @@ msgstr "¿No tienes una cuenta? <0>Regístrate</0>"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:166 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:162
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185 #: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107
@@ -1690,7 +1682,7 @@ msgid "Due to an unpaid invoice, your team has been restricted. Please settle th
msgstr "Debido a una factura impaga, tu equipo ha sido restringido. Realiza el pago para restaurar el acceso completo a tu equipo." msgstr "Debido a una factura impaga, tu equipo ha sido restringido. Realiza el pago para restaurar el acceso completo a tu equipo."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:171 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:167
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74
@@ -1701,7 +1693,7 @@ msgstr "Duplicar"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:156
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95 #: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65
@@ -2020,6 +2012,7 @@ msgstr "Así es como funciona:"
msgid "Hey Im Timur" msgid "Hey Im Timur"
msgstr "Hola, soy Timur" msgstr "Hola, soy Timur"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155 #: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155
msgid "Hide" msgid "Hide"
@@ -2070,7 +2063,7 @@ msgstr "Documentos en bandeja de entrada"
msgid "Include the Signing Certificate in the Document" msgid "Include the Signing Certificate in the Document"
msgstr "" msgstr ""
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:53
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50 #: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50
msgid "Information" msgid "Information"
msgstr "Información" msgstr "Información"
@@ -2403,7 +2396,7 @@ msgstr "Mover documento al equipo"
msgid "Move Template to Team" msgid "Move Template to Team"
msgstr "Mover plantilla al equipo" msgstr "Mover plantilla al equipo"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:178 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:174
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85
msgid "Move to Team" msgid "Move to Team"
msgstr "Mover al equipo" msgstr "Mover al equipo"
@@ -2467,10 +2460,6 @@ msgstr "Siguiente campo"
msgid "No active drafts" msgid "No active drafts"
msgstr "No hay borradores activos" msgstr "No hay borradores activos"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "No documents in the bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99 #: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time." msgid "No further action is required from you at this time."
msgstr "No further action is required from you at this time." msgstr "No further action is required from you at this time."
@@ -2527,7 +2516,7 @@ msgid "Not supported"
msgstr "No soportado" msgstr "No soportado"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:39 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "Nothing to do" msgid "Nothing to do"
msgstr "Nada que hacer" msgstr "Nada que hacer"
@@ -3217,12 +3206,12 @@ msgid "Setup"
msgstr "Configuración" msgstr "Configuración"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:207 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:193
msgid "Share" msgid "Share"
msgstr "Compartir" msgstr "Compartir"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:233 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:219
msgid "Share Signing Card" msgid "Share Signing Card"
msgstr "Compartir tarjeta de firma" msgstr "Compartir tarjeta de firma"
@@ -3244,7 +3233,7 @@ msgstr "Mostrar plantillas en el perfil público de tu equipo para que tu audien
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:143 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:139
#: apps/web/src/app/(profile)/p/[url]/page.tsx:192 #: apps/web/src/app/(profile)/p/[url]/page.tsx:192
#: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229 #: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182 #: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182
@@ -3368,7 +3357,7 @@ msgid "Signing in..."
msgstr "Iniciando sesión..." msgstr "Iniciando sesión..."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:217 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:203
msgid "Signing Links" msgid "Signing Links"
msgstr "Enlaces de firma" msgstr "Enlaces de firma"
@@ -3399,7 +3388,7 @@ msgstr "Configuraciones del sitio"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:110 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:106
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72
#: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62 #: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62
@@ -3884,10 +3873,6 @@ msgstr "No hay borradores activos en este momento. Puedes subir un documento par
msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed." msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed."
msgstr "Aún no hay documentos completados. Los documentos que hayas creado o recibido aparecerán aquí una vez completados." msgstr "Aún no hay documentos completados. Los documentos que hayas creado o recibido aparecerán aquí una vez completados."
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "There are no documents in the bin."
msgstr ""
#: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70 #: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70
msgid "They have permission on your behalf to:" msgid "They have permission on your behalf to:"
msgstr "Tienen permiso en tu nombre para:" msgstr "Tienen permiso en tu nombre para:"
@@ -4447,7 +4432,7 @@ msgstr "Historial de Versiones"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:132
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168
msgid "View" msgid "View"

View File

@@ -135,11 +135,11 @@ msgstr "{prefix} a créé le document"
msgid "{prefix} deleted the document" msgid "{prefix} deleted the document"
msgstr "{prefix} a supprimé le document" msgstr "{prefix} a supprimé le document"
#: packages/lib/utils/document-audit-logs.ts:339 #: packages/lib/utils/document-audit-logs.ts:335
msgid "{prefix} moved the document to team" msgid "{prefix} moved the document to team"
msgstr "{prefix} a déplacé le document vers l'équipe" msgstr "{prefix} a déplacé le document vers l'équipe"
#: packages/lib/utils/document-audit-logs.ts:323 #: packages/lib/utils/document-audit-logs.ts:319
msgid "{prefix} opened the document" msgid "{prefix} opened the document"
msgstr "{prefix} a ouvert le document" msgstr "{prefix} a ouvert le document"
@@ -151,27 +151,23 @@ msgstr "{prefix} a supprimé un champ"
msgid "{prefix} removed a recipient" msgid "{prefix} removed a recipient"
msgstr "{prefix} a supprimé un destinataire" msgstr "{prefix} a supprimé un destinataire"
#: packages/lib/utils/document-audit-logs.ts:369 #: packages/lib/utils/document-audit-logs.ts:365
msgid "{prefix} resent an email to {0}" msgid "{prefix} resent an email to {0}"
msgstr "{prefix} a renvoyé un e-mail à {0}" msgstr "{prefix} a renvoyé un e-mail à {0}"
#: packages/lib/utils/document-audit-logs.ts:295 #: packages/lib/utils/document-audit-logs.ts:366
msgid "{prefix} restored the document"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:370
msgid "{prefix} sent an email to {0}" msgid "{prefix} sent an email to {0}"
msgstr "{prefix} a envoyé un email à {0}" msgstr "{prefix} a envoyé un email à {0}"
#: packages/lib/utils/document-audit-logs.ts:335 #: packages/lib/utils/document-audit-logs.ts:331
msgid "{prefix} sent the document" msgid "{prefix} sent the document"
msgstr "{prefix} a envoyé le document" msgstr "{prefix} a envoyé le document"
#: packages/lib/utils/document-audit-logs.ts:299 #: packages/lib/utils/document-audit-logs.ts:295
msgid "{prefix} signed a field" msgid "{prefix} signed a field"
msgstr "{prefix} a signé un champ" msgstr "{prefix} a signé un champ"
#: packages/lib/utils/document-audit-logs.ts:303 #: packages/lib/utils/document-audit-logs.ts:299
msgid "{prefix} unsigned a field" msgid "{prefix} unsigned a field"
msgstr "{prefix} n'a pas signé un champ" msgstr "{prefix} n'a pas signé un champ"
@@ -183,27 +179,27 @@ msgstr "{prefix} a mis à jour un champ"
msgid "{prefix} updated a recipient" msgid "{prefix} updated a recipient"
msgstr "{prefix} a mis à jour un destinataire" msgstr "{prefix} a mis à jour un destinataire"
#: packages/lib/utils/document-audit-logs.ts:319 #: packages/lib/utils/document-audit-logs.ts:315
msgid "{prefix} updated the document" msgid "{prefix} updated the document"
msgstr "{prefix} a mis à jour le document" msgstr "{prefix} a mis à jour le document"
#: packages/lib/utils/document-audit-logs.ts:311 #: packages/lib/utils/document-audit-logs.ts:307
msgid "{prefix} updated the document access auth requirements" msgid "{prefix} updated the document access auth requirements"
msgstr "{prefix} a mis à jour les exigences d'authentification d'accès au document" msgstr "{prefix} a mis à jour les exigences d'authentification d'accès au document"
#: packages/lib/utils/document-audit-logs.ts:331 #: packages/lib/utils/document-audit-logs.ts:327
msgid "{prefix} updated the document external ID" msgid "{prefix} updated the document external ID"
msgstr "{prefix} a mis à jour l'ID externe du document" msgstr "{prefix} a mis à jour l'ID externe du document"
#: packages/lib/utils/document-audit-logs.ts:315 #: packages/lib/utils/document-audit-logs.ts:311
msgid "{prefix} updated the document signing auth requirements" msgid "{prefix} updated the document signing auth requirements"
msgstr "{prefix} a mis à jour les exigences d'authentification pour la signature du document" msgstr "{prefix} a mis à jour les exigences d'authentification pour la signature du document"
#: packages/lib/utils/document-audit-logs.ts:327 #: packages/lib/utils/document-audit-logs.ts:323
msgid "{prefix} updated the document title" msgid "{prefix} updated the document title"
msgstr "{prefix} a mis à jour le titre du document" msgstr "{prefix} a mis à jour le titre du document"
#: packages/lib/utils/document-audit-logs.ts:307 #: packages/lib/utils/document-audit-logs.ts:303
msgid "{prefix} updated the document visibility" msgid "{prefix} updated the document visibility"
msgstr "{prefix} a mis à jour la visibilité du document" msgstr "{prefix} a mis à jour la visibilité du document"
@@ -231,27 +227,27 @@ msgstr "{teamName} vous a invité à {action} {documentName}"
msgid "{teamName} ownership transfer request" msgid "{teamName} ownership transfer request"
msgstr "Demande de transfert de propriété de {teamName}" msgstr "Demande de transfert de propriété de {teamName}"
#: packages/lib/utils/document-audit-logs.ts:347 #: packages/lib/utils/document-audit-logs.ts:343
msgid "{userName} approved the document" msgid "{userName} approved the document"
msgstr "{userName} a approuvé le document" msgstr "{userName} a approuvé le document"
#: packages/lib/utils/document-audit-logs.ts:348 #: packages/lib/utils/document-audit-logs.ts:344
msgid "{userName} CC'd the document" msgid "{userName} CC'd the document"
msgstr "{userName} a mis en copie le document" msgstr "{userName} a mis en copie le document"
#: packages/lib/utils/document-audit-logs.ts:349 #: packages/lib/utils/document-audit-logs.ts:345
msgid "{userName} completed their task" msgid "{userName} completed their task"
msgstr "{userName} a complété sa tâche" msgstr "{userName} a complété sa tâche"
#: packages/lib/utils/document-audit-logs.ts:359 #: packages/lib/utils/document-audit-logs.ts:355
msgid "{userName} rejected the document" msgid "{userName} rejected the document"
msgstr "{userName} a rejeté le document" msgstr "{userName} a rejeté le document"
#: packages/lib/utils/document-audit-logs.ts:345 #: packages/lib/utils/document-audit-logs.ts:341
msgid "{userName} signed the document" msgid "{userName} signed the document"
msgstr "{userName} a signé le document" msgstr "{userName} a signé le document"
#: packages/lib/utils/document-audit-logs.ts:346 #: packages/lib/utils/document-audit-logs.ts:342
msgid "{userName} viewed the document" msgid "{userName} viewed the document"
msgstr "{userName} a consulté le document" msgstr "{userName} a consulté le document"
@@ -345,7 +341,7 @@ msgstr "Un destinataire a été supprimé"
msgid "A recipient was updated" msgid "A recipient was updated"
msgstr "Un destinataire a été mis à jour" msgstr "Un destinataire a été mis à jour"
#: packages/lib/server-only/team/create-team-email-verification.ts:156 #: packages/lib/server-only/team/create-team-email-verification.ts:159
msgid "A request to use your email has been initiated by {0} on Documenso" msgid "A request to use your email has been initiated by {0} on Documenso"
msgstr "Une demande d'utilisation de votre e-mail a été initiée par {0} sur Documenso" msgstr "Une demande d'utilisation de votre e-mail a été initiée par {0} sur Documenso"
@@ -692,17 +688,17 @@ msgstr "Document \"{0}\" - Rejet Confirmé"
msgid "Document access" msgid "Document access"
msgstr "Accès au document" msgstr "Accès au document"
#: packages/lib/utils/document-audit-logs.ts:310 #: packages/lib/utils/document-audit-logs.ts:306
msgid "Document access auth updated" msgid "Document access auth updated"
msgstr "L'authentification d'accès au document a été mise à jour" msgstr "L'authentification d'accès au document a été mise à jour"
#: packages/lib/server-only/document/delete-document.ts:256 #: packages/lib/server-only/document/delete-document.ts:246
#: packages/lib/server-only/document/super-delete-document.ts:98 #: packages/lib/server-only/document/super-delete-document.ts:98
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Document Annulé" msgstr "Document Annulé"
#: packages/lib/utils/document-audit-logs.ts:373 #: packages/lib/utils/document-audit-logs.ts:369
#: packages/lib/utils/document-audit-logs.ts:374 #: packages/lib/utils/document-audit-logs.ts:370
msgid "Document completed" msgid "Document completed"
msgstr "Document terminé" msgstr "Document terminé"
@@ -715,7 +711,7 @@ msgid "Document created"
msgstr "Document créé" msgstr "Document créé"
#: packages/email/templates/document-created-from-direct-template.tsx:32 #: packages/email/templates/document-created-from-direct-template.tsx:32
#: packages/lib/server-only/template/create-document-from-direct-template.ts:567 #: packages/lib/server-only/template/create-document-from-direct-template.ts:573
msgid "Document created from direct template" msgid "Document created from direct template"
msgstr "Document créé à partir d'un modèle direct" msgstr "Document créé à partir d'un modèle direct"
@@ -740,15 +736,15 @@ msgstr "Document Supprimé !"
msgid "Document Distribution Method" msgid "Document Distribution Method"
msgstr "Méthode de distribution du document" msgstr "Méthode de distribution du document"
#: packages/lib/utils/document-audit-logs.ts:330 #: packages/lib/utils/document-audit-logs.ts:326
msgid "Document external ID updated" msgid "Document external ID updated"
msgstr "ID externe du document mis à jour" msgstr "ID externe du document mis à jour"
#: packages/lib/utils/document-audit-logs.ts:338 #: packages/lib/utils/document-audit-logs.ts:334
msgid "Document moved to team" msgid "Document moved to team"
msgstr "Document déplacé vers l'équipe" msgstr "Document déplacé vers l'équipe"
#: packages/lib/utils/document-audit-logs.ts:322 #: packages/lib/utils/document-audit-logs.ts:318
msgid "Document opened" msgid "Document opened"
msgstr "Document ouvert" msgstr "Document ouvert"
@@ -763,27 +759,23 @@ msgstr "Document Rejeté"
#~ msgid "Document Rejection Confirmed" #~ msgid "Document Rejection Confirmed"
#~ msgstr "Document Rejection Confirmed" #~ msgstr "Document Rejection Confirmed"
#: packages/lib/utils/document-audit-logs.ts:294 #: packages/lib/utils/document-audit-logs.ts:330
msgid "Document restored"
msgstr ""
#: packages/lib/utils/document-audit-logs.ts:334
msgid "Document sent" msgid "Document sent"
msgstr "Document envoyé" msgstr "Document envoyé"
#: packages/lib/utils/document-audit-logs.ts:314 #: packages/lib/utils/document-audit-logs.ts:310
msgid "Document signing auth updated" msgid "Document signing auth updated"
msgstr "Authentification de signature de document mise à jour" msgstr "Authentification de signature de document mise à jour"
#: packages/lib/utils/document-audit-logs.ts:326 #: packages/lib/utils/document-audit-logs.ts:322
msgid "Document title updated" msgid "Document title updated"
msgstr "Titre du document mis à jour" msgstr "Titre du document mis à jour"
#: packages/lib/utils/document-audit-logs.ts:318 #: packages/lib/utils/document-audit-logs.ts:314
msgid "Document updated" msgid "Document updated"
msgstr "Document mis à jour" msgstr "Document mis à jour"
#: packages/lib/utils/document-audit-logs.ts:306 #: packages/lib/utils/document-audit-logs.ts:302
msgid "Document visibility updated" msgid "Document visibility updated"
msgstr "Visibilité du document mise à jour" msgstr "Visibilité du document mise à jour"
@@ -829,11 +821,11 @@ msgstr "L'email est requis"
msgid "Email Options" msgid "Email Options"
msgstr "Options d'email" msgstr "Options d'email"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email resent" msgid "Email resent"
msgstr "Email renvoyé" msgstr "Email renvoyé"
#: packages/lib/utils/document-audit-logs.ts:367 #: packages/lib/utils/document-audit-logs.ts:363
msgid "Email sent" msgid "Email sent"
msgstr "Email envoyé" msgstr "Email envoyé"
@@ -898,11 +890,11 @@ msgstr "Étiquette du champ"
msgid "Field placeholder" msgid "Field placeholder"
msgstr "Espace réservé du champ" msgstr "Espace réservé du champ"
#: packages/lib/utils/document-audit-logs.ts:298 #: packages/lib/utils/document-audit-logs.ts:294
msgid "Field signed" msgid "Field signed"
msgstr "Champ signé" msgstr "Champ signé"
#: packages/lib/utils/document-audit-logs.ts:302 #: packages/lib/utils/document-audit-logs.ts:298
msgid "Field unsigned" msgid "Field unsigned"
msgstr "Champ non signé" msgstr "Champ non signé"
@@ -1207,8 +1199,8 @@ msgstr "Raison du rejet : {rejectionReason}"
msgid "Receives copy" msgid "Receives copy"
msgstr "Recevoir une copie" msgstr "Recevoir une copie"
#: packages/lib/utils/document-audit-logs.ts:342 #: packages/lib/utils/document-audit-logs.ts:338
#: packages/lib/utils/document-audit-logs.ts:357 #: packages/lib/utils/document-audit-logs.ts:353
msgid "Recipient" msgid "Recipient"
msgstr "Destinataire" msgstr "Destinataire"
@@ -1782,7 +1774,7 @@ msgstr "Vous avez été invité à rejoindre {0} sur Documenso"
msgid "You have been invited to join the following team" msgid "You have been invited to join the following team"
msgstr "Vous avez été invité à rejoindre l'équipe suivante" msgstr "Vous avez été invité à rejoindre l'équipe suivante"
#: packages/lib/server-only/recipient/set-recipients-for-document.ts:329 #: packages/lib/server-only/recipient/set-recipients-for-document.ts:327
msgid "You have been removed from a document" msgid "You have been removed from a document"
msgstr "Vous avez été supprimé d'un document" msgstr "Vous avez été supprimé d'un document"

View File

@@ -291,7 +291,7 @@ msgstr "Reconnaissance"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:108
#: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100 #: apps/web/src/app/(dashboard)/documents/[id]/logs/document-logs-data-table.tsx:100
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:127 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164 #: apps/web/src/app/(dashboard)/settings/public-profile/public-templates-data-table.tsx:164
#: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118 #: apps/web/src/app/(dashboard)/settings/security/activity/user-security-activity-data-table.tsx:118
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/data-table.tsx:46
@@ -413,7 +413,7 @@ msgstr "Tout"
msgid "All documents" msgid "All documents"
msgstr "Tous les documents" msgstr "Tous les documents"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:40 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "All documents have been processed. Any new documents that are sent or received will show here." msgid "All documents have been processed. Any new documents that are sent or received will show here."
msgstr "Tous les documents ont été traités. Tous nouveaux documents envoyés ou reçus s'afficheront ici." msgstr "Tous les documents ont été traités. Tous nouveaux documents envoyés ou reçus s'afficheront ici."
@@ -516,7 +516,7 @@ msgstr "Une erreur est survenue lors de la désactivation de la signature par li
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:64
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:92
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:76
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:111 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:107
msgid "An error occurred while downloading your document." msgid "An error occurred while downloading your document."
msgstr "Une erreur est survenue lors du téléchargement de votre document." msgstr "Une erreur est survenue lors du téléchargement de votre document."
@@ -676,7 +676,7 @@ msgstr "Version de l'application"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:89
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:120
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:150 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:146
#: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142 #: apps/web/src/app/(signing)/sign/[token]/sign-dialog.tsx:142
msgid "Approve" msgid "Approve"
msgstr "Approuver" msgstr "Approuver"
@@ -784,10 +784,6 @@ msgstr "Détails de base"
msgid "Billing" msgid "Billing"
msgstr "Facturation" msgstr "Facturation"
#: apps/web/src/components/formatter/document-status.tsx:51
msgid "Bin"
msgstr ""
#: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42 #: apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx:42
msgid "Branding Preferences" msgid "Branding Preferences"
msgstr "Préférences de branding" msgstr "Préférences de branding"
@@ -1287,6 +1283,7 @@ msgid "delete"
msgstr "supprimer" msgstr "supprimer"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:144
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:177
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:211
@@ -1364,7 +1361,6 @@ msgid "Delete your account and all its contents, including completed documents.
msgstr "Supprimez votre compte et tout son contenu, y compris les documents complétés. Cette action est irréversible et annulera votre abonnement, alors procédez avec prudence." msgstr "Supprimez votre compte et tout son contenu, y compris les documents complétés. Cette action est irréversible et annulera votre abonnement, alors procédez avec prudence."
#: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41 #: apps/web/src/app/(dashboard)/admin/documents/[id]/page.tsx:41
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:50
#: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97 #: apps/web/src/app/(internal)/%5F%5Fhtmltopdf/audit-log/page.tsx:97
msgid "Deleted" msgid "Deleted"
msgstr "Supprimé" msgstr "Supprimé"
@@ -1481,10 +1477,6 @@ msgstr "Document Tout"
msgid "Document Approved" msgid "Document Approved"
msgstr "Document Approuvé" msgstr "Document Approuvé"
#: apps/web/src/components/formatter/document-status.tsx:52
msgid "Document Bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40 #: apps/web/src/app/(signing)/sign/[token]/no-longer-available.tsx:40
msgid "Document Cancelled" msgid "Document Cancelled"
msgstr "Document Annulé" msgstr "Document Annulé"
@@ -1619,7 +1611,7 @@ msgstr "Le document sera supprimé de manière permanente"
#: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109 #: apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx:109
#: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16 #: apps/web/src/app/(dashboard)/documents/[id]/loading.tsx:16
#: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15 #: apps/web/src/app/(dashboard)/documents/[id]/sent/page.tsx:15
#: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:108 #: apps/web/src/app/(dashboard)/documents/documents-page-view.tsx:119
#: apps/web/src/app/(profile)/p/[url]/page.tsx:166 #: apps/web/src/app/(profile)/p/[url]/page.tsx:166
#: apps/web/src/app/not-found.tsx:21 #: apps/web/src/app/not-found.tsx:21
#: apps/web/src/components/(dashboard)/common/command-menu.tsx:205 #: apps/web/src/components/(dashboard)/common/command-menu.tsx:205
@@ -1649,7 +1641,7 @@ msgstr "Vous n'avez pas de compte? <0>Inscrivez-vous</0>"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:111
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:123
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:141
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:166 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:162
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:110
#: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185 #: apps/web/src/components/forms/2fa/enable-authenticator-app-dialog.tsx:185
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:107
@@ -1690,7 +1682,7 @@ msgid "Due to an unpaid invoice, your team has been restricted. Please settle th
msgstr "En raison d'une facture impayée, votre équipe a été restreinte. Veuillez régler le paiement pour rétablir l'accès complet à votre équipe." msgstr "En raison d'une facture impayée, votre équipe a été restreinte. Veuillez régler le paiement pour rétablir l'accès complet à votre équipe."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:136
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:171 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:167
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:85
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:118
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:74
@@ -1701,7 +1693,7 @@ msgstr "Dupliquer"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:104
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:115
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:102
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:156
#: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111 #: apps/web/src/app/(dashboard)/settings/security/passkeys/user-passkeys-data-table-actions.tsx:111
#: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95 #: apps/web/src/app/(dashboard)/settings/webhooks/page.tsx:95
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:65
@@ -2020,6 +2012,7 @@ msgstr "Voici comment cela fonctionne :"
msgid "Hey Im Timur" msgid "Hey Im Timur"
msgstr "Salut, je suis Timur" msgstr "Salut, je suis Timur"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:189
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:202
#: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155 #: apps/web/src/app/(dashboard)/settings/public-profile/public-profile-page-view.tsx:155
msgid "Hide" msgid "Hide"
@@ -2070,7 +2063,7 @@ msgstr "Documents de la boîte de réception"
msgid "Include the Signing Certificate in the Document" msgid "Include the Signing Certificate in the Document"
msgstr "" msgstr ""
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-information.tsx:53
#: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50 #: apps/web/src/app/(dashboard)/templates/[id]/template-page-view-information.tsx:50
msgid "Information" msgid "Information"
msgstr "Information" msgstr "Information"
@@ -2403,7 +2396,7 @@ msgstr "Déplacer le document vers l'équipe"
msgid "Move Template to Team" msgid "Move Template to Team"
msgstr "Déplacer le modèle vers l'équipe" msgstr "Déplacer le modèle vers l'équipe"
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:178 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:174
#: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85 #: apps/web/src/app/(dashboard)/templates/data-table-action-dropdown.tsx:85
msgid "Move to Team" msgid "Move to Team"
msgstr "Déplacer vers l'équipe" msgstr "Déplacer vers l'équipe"
@@ -2467,10 +2460,6 @@ msgstr "Champ suivant"
msgid "No active drafts" msgid "No active drafts"
msgstr "Pas de brouillons actifs" msgstr "Pas de brouillons actifs"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "No documents in the bin"
msgstr ""
#: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99 #: apps/web/src/app/(signing)/sign/[token]/rejected/page.tsx:99
msgid "No further action is required from you at this time." msgid "No further action is required from you at this time."
msgstr "Aucune autre action n'est requise de votre part pour le moment." msgstr "Aucune autre action n'est requise de votre part pour le moment."
@@ -2527,7 +2516,7 @@ msgid "Not supported"
msgstr "Non pris en charge" msgstr "Non pris en charge"
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:19
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:39 #: apps/web/src/app/(dashboard)/documents/empty-state.tsx:34
msgid "Nothing to do" msgid "Nothing to do"
msgstr "Rien à faire" msgstr "Rien à faire"
@@ -3217,12 +3206,12 @@ msgid "Setup"
msgstr "Configuration" msgstr "Configuration"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:148
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:207 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:193
msgid "Share" msgid "Share"
msgstr "Partager" msgstr "Partager"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:179
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:233 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:219
msgid "Share Signing Card" msgid "Share Signing Card"
msgstr "Partager la carte de signature" msgstr "Partager la carte de signature"
@@ -3244,7 +3233,7 @@ msgstr "Afficher des modèles dans le profil public de votre équipe pour que vo
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:83
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:114
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:143 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:139
#: apps/web/src/app/(profile)/p/[url]/page.tsx:192 #: apps/web/src/app/(profile)/p/[url]/page.tsx:192
#: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229 #: apps/web/src/app/(signing)/sign/[token]/auto-sign.tsx:229
#: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182 #: apps/web/src/app/(signing)/sign/[token]/document-action-auth-2fa.tsx:182
@@ -3368,7 +3357,7 @@ msgid "Signing in..."
msgstr "Connexion en cours..." msgstr "Connexion en cours..."
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-dropdown.tsx:160
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:217 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:203
msgid "Signing Links" msgid "Signing Links"
msgstr "Liens de signature" msgstr "Liens de signature"
@@ -3399,7 +3388,7 @@ msgstr "Paramètres du site"
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-audit-log-button.tsx:65
#: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68 #: apps/web/src/app/(dashboard)/documents/[id]/logs/download-certificate-button.tsx:68
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:75
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:110 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:106
#: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82 #: apps/web/src/app/(dashboard)/documents/delete-document-dialog.tsx:82
#: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72 #: apps/web/src/app/(dashboard)/documents/duplicate-document-dialog.tsx:72
#: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62 #: apps/web/src/app/(dashboard)/settings/billing/billing-plans.tsx:62
@@ -3884,10 +3873,6 @@ msgstr "Il n'y a pas de brouillons actifs pour le moment. Vous pouvez téléchar
msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed." msgid "There are no completed documents yet. Documents that you have created or received will appear here once completed."
msgstr "Il n'y a pas encore de documents complétés. Les documents que vous avez créés ou reçus apparaîtront ici une fois complétés." msgstr "Il n'y a pas encore de documents complétés. Les documents que vous avez créés ou reçus apparaîtront ici une fois complétés."
#: apps/web/src/app/(dashboard)/documents/empty-state.tsx:35
msgid "There are no documents in the bin."
msgstr ""
#: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70 #: apps/web/src/app/(dashboard)/settings/teams/team-email-usage.tsx:70
msgid "They have permission on your behalf to:" msgid "They have permission on your behalf to:"
msgstr "Ils ont la permission en votre nom de:" msgstr "Ils ont la permission en votre nom de:"
@@ -4447,7 +4432,7 @@ msgstr "Historique des versions"
#: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95 #: apps/web/src/app/(dashboard)/documents/[id]/document-page-view-button.tsx:95
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:126
#: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135 #: apps/web/src/app/(dashboard)/documents/data-table-action-button.tsx:135
#: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:136 #: apps/web/src/app/(dashboard)/documents/data-table-action-dropdown.tsx:132
#: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100 #: apps/web/src/components/(teams)/tables/team-billing-invoices-data-table.tsx:100
#: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168 #: apps/web/src/components/forms/2fa/view-recovery-codes-dialog.tsx:168
msgid "View" msgid "View"

View File

@@ -26,7 +26,6 @@ export const ZDocumentAuditLogTypeSchema = z.enum([
'DOCUMENT_COMPLETED', // When the document is sealed and fully completed. 'DOCUMENT_COMPLETED', // When the document is sealed and fully completed.
'DOCUMENT_CREATED', // When the document is created. 'DOCUMENT_CREATED', // When the document is created.
'DOCUMENT_DELETED', // When the document is soft deleted. 'DOCUMENT_DELETED', // When the document is soft deleted.
'DOCUMENT_RESTORED', // When the document is restored.
'DOCUMENT_FIELD_INSERTED', // When a field is inserted (signed/approved/etc) by a recipient. 'DOCUMENT_FIELD_INSERTED', // When a field is inserted (signed/approved/etc) by a recipient.
'DOCUMENT_FIELD_UNINSERTED', // When a field is uninserted by a recipient. 'DOCUMENT_FIELD_UNINSERTED', // When a field is uninserted by a recipient.
'DOCUMENT_VISIBILITY_UPDATED', // When the document visibility scope is updated 'DOCUMENT_VISIBILITY_UPDATED', // When the document visibility scope is updated
@@ -226,16 +225,6 @@ export const ZDocumentAuditLogEventDocumentDeletedSchema = z.object({
}), }),
}); });
/**
* Event: Document restored.
*/
export const ZDocumentAuditLogEventDocumentRestoredSchema = z.object({
type: z.literal(DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RESTORED),
data: z.object({
type: z.enum(['RESTORE']),
}),
});
/** /**
* Event: Document field inserted. * Event: Document field inserted.
*/ */
@@ -501,7 +490,6 @@ export const ZDocumentAuditLogSchema = ZDocumentAuditLogBaseSchema.and(
ZDocumentAuditLogEventDocumentCreatedSchema, ZDocumentAuditLogEventDocumentCreatedSchema,
ZDocumentAuditLogEventDocumentDeletedSchema, ZDocumentAuditLogEventDocumentDeletedSchema,
ZDocumentAuditLogEventDocumentMovedToTeamSchema, ZDocumentAuditLogEventDocumentMovedToTeamSchema,
ZDocumentAuditLogEventDocumentRestoredSchema,
ZDocumentAuditLogEventDocumentFieldInsertedSchema, ZDocumentAuditLogEventDocumentFieldInsertedSchema,
ZDocumentAuditLogEventDocumentFieldUninsertedSchema, ZDocumentAuditLogEventDocumentFieldUninsertedSchema,
ZDocumentAuditLogEventDocumentVisibilitySchema, ZDocumentAuditLogEventDocumentVisibilitySchema,

View File

@@ -290,10 +290,6 @@ export const formatDocumentAuditLogAction = (
anonymous: msg`Document deleted`, anonymous: msg`Document deleted`,
identified: msg`${prefix} deleted the document`, identified: msg`${prefix} deleted the document`,
})) }))
.with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_RESTORED }, () => ({
anonymous: msg`Document restored`,
identified: msg`${prefix} restored the document`,
}))
.with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELD_INSERTED }, () => ({ .with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_FIELD_INSERTED }, () => ({
anonymous: msg`Field signed`, anonymous: msg`Field signed`,
identified: msg`${prefix} signed a field`, identified: msg`${prefix} signed a field`,

View File

@@ -0,0 +1,108 @@
import Honeybadger from '@honeybadger-io/js';
export const buildLogger = () => {
if (process.env.NEXT_PRIVATE_LOGGER_HONEY_BADGER_API_KEY) {
return new HoneybadgerLogger();
}
return new DefaultLogger();
};
interface LoggerDescriptionOptions {
method?: string;
path?: string;
context?: Record<string, unknown>;
/**
* The type of log to be captured.
*
* Defaults to `info`.
*/
level?: 'info' | 'error' | 'critical';
}
/**
* Basic logger implementation intended to be used in the server side for capturing
* explicit errors and other logs.
*
* Not intended to capture the request and responses.
*/
interface Logger {
log(message: string, options?: LoggerDescriptionOptions): void;
error(error: Error, options?: LoggerDescriptionOptions): void;
}
class DefaultLogger implements Logger {
log(_message: string, _options?: LoggerDescriptionOptions) {
// Do nothing.
}
error(_error: Error, _options?: LoggerDescriptionOptions): void {
// Do nothing.
}
}
class HoneybadgerLogger implements Logger {
constructor() {
if (!process.env.NEXT_PRIVATE_LOGGER_HONEY_BADGER_API_KEY) {
throw new Error('NEXT_PRIVATE_LOGGER_HONEY_BADGER_API_KEY is not set');
}
Honeybadger.configure({
apiKey: process.env.NEXT_PRIVATE_LOGGER_HONEY_BADGER_API_KEY,
});
}
/**
* Honeybadger doesn't really have a non-error logging system.
*/
log(message: string, options?: LoggerDescriptionOptions) {
const { context = {}, level = 'info' } = options || {};
try {
Honeybadger.event({
message,
context: {
level,
...context,
},
});
} catch (err) {
console.error(err);
// Do nothing.
}
}
error(error: Error, options?: LoggerDescriptionOptions): void {
const { context = {}, level = 'error', method, path } = options || {};
const tags = [`level:${level}`];
let errorMessage = error.message;
if (method) {
tags.push(`method:${method}`);
errorMessage = `[${method}]: ${error.message}`;
}
if (path) {
tags.push(`path:${path}`);
}
try {
Honeybadger.notify(errorMessage, {
context: {
level,
...context,
},
tags,
});
} catch (err) {
console.error(err);
// Do nothing.
}
}
}

View File

@@ -4,7 +4,6 @@ export const ExtendedDocumentStatus = {
...DocumentStatus, ...DocumentStatus,
INBOX: 'INBOX', INBOX: 'INBOX',
ALL: 'ALL', ALL: 'ALL',
BIN: 'BIN',
} as const; } as const;
export type ExtendedDocumentStatus = export type ExtendedDocumentStatus =

View File

@@ -44,10 +44,9 @@ export const authRouter = router({
const { name, email, password, signature, url } = input; const { name, email, password, signature, url } = input;
if (IS_BILLING_ENABLED() && url && url.length < 6) { if (IS_BILLING_ENABLED() && url && url.length < 6) {
throw new AppError( throw new AppError(AppErrorCode.PREMIUM_PROFILE_URL, {
AppErrorCode.PREMIUM_PROFILE_URL, message: 'Only subscribers can have a username shorter than 6 characters',
'Only subscribers can have a username shorter than 6 characters', });
);
} }
const user = await createUser({ name, email, password, signature, url }); const user = await createUser({ name, email, password, signature, url });
@@ -66,7 +65,7 @@ export const authRouter = router({
const error = AppError.parseError(err); const error = AppError.parseError(err);
if (error.code !== AppErrorCode.UNKNOWN_ERROR) { if (error.code !== AppErrorCode.UNKNOWN_ERROR) {
throw AppError.parseErrorToTRPCError(error); throw error;
} }
let message = let message =
@@ -118,7 +117,7 @@ export const authRouter = router({
} catch (err) { } catch (err) {
console.error(err); console.error(err);
throw AppError.parseErrorToTRPCError(err); throw err;
} }
}), }),

View File

@@ -17,7 +17,6 @@ import { getDocumentAndSenderByToken } from '@documenso/lib/server-only/document
import { getDocumentWithDetailsById } from '@documenso/lib/server-only/document/get-document-with-details-by-id'; import { getDocumentWithDetailsById } from '@documenso/lib/server-only/document/get-document-with-details-by-id';
import { moveDocumentToTeam } from '@documenso/lib/server-only/document/move-document-to-team'; import { moveDocumentToTeam } from '@documenso/lib/server-only/document/move-document-to-team';
import { resendDocument } from '@documenso/lib/server-only/document/resend-document'; import { resendDocument } from '@documenso/lib/server-only/document/resend-document';
import { restoreDocument } from '@documenso/lib/server-only/document/restore-document';
import { searchDocumentsWithKeyword } from '@documenso/lib/server-only/document/search-documents-with-keyword'; import { searchDocumentsWithKeyword } from '@documenso/lib/server-only/document/search-documents-with-keyword';
import { sendDocument } from '@documenso/lib/server-only/document/send-document'; import { sendDocument } from '@documenso/lib/server-only/document/send-document';
import { updateDocumentSettings } from '@documenso/lib/server-only/document/update-document-settings'; import { updateDocumentSettings } from '@documenso/lib/server-only/document/update-document-settings';
@@ -39,7 +38,6 @@ import {
ZGetDocumentWithDetailsByIdQuerySchema, ZGetDocumentWithDetailsByIdQuerySchema,
ZMoveDocumentsToTeamSchema, ZMoveDocumentsToTeamSchema,
ZResendDocumentMutationSchema, ZResendDocumentMutationSchema,
ZRestoreDocumentMutationSchema,
ZSearchDocumentsMutationSchema, ZSearchDocumentsMutationSchema,
ZSendDocumentMutationSchema, ZSendDocumentMutationSchema,
ZSetPasswordForDocumentMutationSchema, ZSetPasswordForDocumentMutationSchema,
@@ -225,32 +223,6 @@ export const documentRouter = router({
} }
}), }),
restoreDocument: authenticatedProcedure
.input(ZRestoreDocumentMutationSchema)
.mutation(async ({ input, ctx }) => {
try {
const { id, teamId } = input;
const userId = ctx.user.id;
const restoredDocument = await restoreDocument({
id,
userId,
teamId,
requestMetadata: extractNextApiRequestMetadata(ctx.req),
});
return restoredDocument;
} catch (err) {
console.error(err);
throw new TRPCError({
code: 'BAD_REQUEST',
message: 'We were unable to restore this document. Please try again later.',
});
}
}),
findDocumentAuditLogs: authenticatedProcedure findDocumentAuditLogs: authenticatedProcedure
.input(ZFindDocumentAuditLogsQuerySchema) .input(ZFindDocumentAuditLogsQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {

View File

@@ -211,11 +211,6 @@ export const ZDeleteDraftDocumentMutationSchema = z.object({
teamId: z.number().min(1).optional(), teamId: z.number().min(1).optional(),
}); });
export const ZRestoreDocumentMutationSchema = z.object({
id: z.number().min(1),
teamId: z.number().min(1).optional(),
});
export type TDeleteDraftDocumentMutationSchema = z.infer<typeof ZDeleteDraftDocumentMutationSchema>; export type TDeleteDraftDocumentMutationSchema = z.infer<typeof ZDeleteDraftDocumentMutationSchema>;
export const ZSearchDocumentsMutationSchema = z.object({ export const ZSearchDocumentsMutationSchema = z.object({

View File

@@ -1,6 +1,5 @@
import { TRPCError } from '@trpc/server'; import { TRPCError } from '@trpc/server';
import { AppError } from '@documenso/lib/errors/app-error';
import { getFieldById } from '@documenso/lib/server-only/field/get-field-by-id'; import { getFieldById } from '@documenso/lib/server-only/field/get-field-by-id';
import { removeSignedFieldWithToken } from '@documenso/lib/server-only/field/remove-signed-field-with-token'; import { removeSignedFieldWithToken } from '@documenso/lib/server-only/field/remove-signed-field-with-token';
import { setFieldsForDocument } from '@documenso/lib/server-only/field/set-fields-for-document'; import { setFieldsForDocument } from '@documenso/lib/server-only/field/set-fields-for-document';
@@ -96,7 +95,7 @@ export const fieldRouter = router({
} catch (err) { } catch (err) {
console.error(err); console.error(err);
throw AppError.parseErrorToTRPCError(err); throw err;
} }
}), }),

View File

@@ -100,10 +100,9 @@ export const profileRouter = router({
); );
if (subscriptions.length === 0) { if (subscriptions.length === 0) {
throw new AppError( throw new AppError(AppErrorCode.PREMIUM_PROFILE_URL, {
AppErrorCode.PREMIUM_PROFILE_URL, message: 'Only subscribers can have a username shorter than 6 characters',
'Only subscribers can have a username shorter than 6 characters', });
);
} }
} }
@@ -123,7 +122,7 @@ export const profileRouter = router({
const error = AppError.parseError(err); const error = AppError.parseError(err);
if (error.code !== AppErrorCode.UNKNOWN_ERROR) { if (error.code !== AppErrorCode.UNKNOWN_ERROR) {
throw AppError.parseErrorToTRPCError(error); throw error;
} }
throw new TRPCError({ throw new TRPCError({

View File

@@ -76,412 +76,238 @@ export const teamRouter = router({
acceptTeamInvitation: authenticatedProcedure acceptTeamInvitation: authenticatedProcedure
.input(ZAcceptTeamInvitationMutationSchema) .input(ZAcceptTeamInvitationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await acceptTeamInvitation({
return await acceptTeamInvitation({ teamId: input.teamId,
teamId: input.teamId, userId: ctx.user.id,
userId: ctx.user.id, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
declineTeamInvitation: authenticatedProcedure declineTeamInvitation: authenticatedProcedure
.input(ZDeclineTeamInvitationMutationSchema) .input(ZDeclineTeamInvitationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await declineTeamInvitation({
return await declineTeamInvitation({ teamId: input.teamId,
teamId: input.teamId, userId: ctx.user.id,
userId: ctx.user.id, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
createBillingPortal: authenticatedProcedure createBillingPortal: authenticatedProcedure
.input(ZCreateTeamBillingPortalMutationSchema) .input(ZCreateTeamBillingPortalMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await createTeamBillingPortal({
return await createTeamBillingPortal({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
createTeam: authenticatedProcedure createTeam: authenticatedProcedure
.input(ZCreateTeamMutationSchema) .input(ZCreateTeamMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await createTeam({
return await createTeam({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
createTeamEmailVerification: authenticatedProcedure createTeamEmailVerification: authenticatedProcedure
.input(ZCreateTeamEmailVerificationMutationSchema) .input(ZCreateTeamEmailVerificationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await createTeamEmailVerification({
return await createTeamEmailVerification({ teamId: input.teamId,
teamId: input.teamId, userId: ctx.user.id,
userId: ctx.user.id, data: {
data: { email: input.email,
email: input.email, name: input.name,
name: input.name, },
}, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
createTeamMemberInvites: authenticatedProcedure createTeamMemberInvites: authenticatedProcedure
.input(ZCreateTeamMemberInvitesMutationSchema) .input(ZCreateTeamMemberInvitesMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await createTeamMemberInvites({
return await createTeamMemberInvites({ userId: ctx.user.id,
userId: ctx.user.id, userName: ctx.user.name ?? '',
userName: ctx.user.name ?? '', ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
createTeamPendingCheckout: authenticatedProcedure createTeamPendingCheckout: authenticatedProcedure
.input(ZCreateTeamPendingCheckoutMutationSchema) .input(ZCreateTeamPendingCheckoutMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await createTeamPendingCheckoutSession({
return await createTeamPendingCheckoutSession({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeam: authenticatedProcedure deleteTeam: authenticatedProcedure
.input(ZDeleteTeamMutationSchema) .input(ZDeleteTeamMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeam({
return await deleteTeam({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamEmail: authenticatedProcedure deleteTeamEmail: authenticatedProcedure
.input(ZDeleteTeamEmailMutationSchema) .input(ZDeleteTeamEmailMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamEmail({
return await deleteTeamEmail({ userId: ctx.user.id,
userId: ctx.user.id, userEmail: ctx.user.email,
userEmail: ctx.user.email, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamEmailVerification: authenticatedProcedure deleteTeamEmailVerification: authenticatedProcedure
.input(ZDeleteTeamEmailVerificationMutationSchema) .input(ZDeleteTeamEmailVerificationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamEmailVerification({
return await deleteTeamEmailVerification({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamMemberInvitations: authenticatedProcedure deleteTeamMemberInvitations: authenticatedProcedure
.input(ZDeleteTeamMemberInvitationsMutationSchema) .input(ZDeleteTeamMemberInvitationsMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamMemberInvitations({
return await deleteTeamMemberInvitations({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamMembers: authenticatedProcedure deleteTeamMembers: authenticatedProcedure
.input(ZDeleteTeamMembersMutationSchema) .input(ZDeleteTeamMembersMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamMembers({
return await deleteTeamMembers({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamPending: authenticatedProcedure deleteTeamPending: authenticatedProcedure
.input(ZDeleteTeamPendingMutationSchema) .input(ZDeleteTeamPendingMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamPending({
return await deleteTeamPending({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
deleteTeamTransferRequest: authenticatedProcedure deleteTeamTransferRequest: authenticatedProcedure
.input(ZDeleteTeamTransferRequestMutationSchema) .input(ZDeleteTeamTransferRequestMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await deleteTeamTransferRequest({
return await deleteTeamTransferRequest({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
findTeamInvoices: authenticatedProcedure findTeamInvoices: authenticatedProcedure
.input(ZFindTeamInvoicesQuerySchema) .input(ZFindTeamInvoicesQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {
try { return await findTeamInvoices({
return await findTeamInvoices({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
findTeamMemberInvites: authenticatedProcedure findTeamMemberInvites: authenticatedProcedure
.input(ZFindTeamMemberInvitesQuerySchema) .input(ZFindTeamMemberInvitesQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {
try { return await findTeamMemberInvites({
return await findTeamMemberInvites({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
findTeamMembers: authenticatedProcedure findTeamMembers: authenticatedProcedure
.input(ZFindTeamMembersQuerySchema) .input(ZFindTeamMembersQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {
try { return await findTeamMembers({
return await findTeamMembers({
userId: ctx.user.id,
...input,
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}),
findTeams: authenticatedProcedure.input(ZFindTeamsQuerySchema).query(async ({ input, ctx }) => {
try {
return await findTeams({
userId: ctx.user.id, userId: ctx.user.id,
...input, ...input,
}); });
} catch (err) { }),
console.error(err);
throw AppError.parseErrorToTRPCError(err); findTeams: authenticatedProcedure.input(ZFindTeamsQuerySchema).query(async ({ input, ctx }) => {
} return await findTeams({
userId: ctx.user.id,
...input,
});
}), }),
findTeamsPending: authenticatedProcedure findTeamsPending: authenticatedProcedure
.input(ZFindTeamsPendingQuerySchema) .input(ZFindTeamsPendingQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {
try { return await findTeamsPending({
return await findTeamsPending({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeam: authenticatedProcedure.input(ZGetTeamQuerySchema).query(async ({ input, ctx }) => { getTeam: authenticatedProcedure.input(ZGetTeamQuerySchema).query(async ({ input, ctx }) => {
try { return await getTeamById({ teamId: input.teamId, userId: ctx.user.id });
return await getTeamById({ teamId: input.teamId, userId: ctx.user.id });
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeamEmailByEmail: authenticatedProcedure.query(async ({ ctx }) => { getTeamEmailByEmail: authenticatedProcedure.query(async ({ ctx }) => {
try { return await getTeamEmailByEmail({ email: ctx.user.email });
return await getTeamEmailByEmail({ email: ctx.user.email });
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeamInvitations: authenticatedProcedure.query(async ({ ctx }) => { getTeamInvitations: authenticatedProcedure.query(async ({ ctx }) => {
try { return await getTeamInvitations({ email: ctx.user.email });
return await getTeamInvitations({ email: ctx.user.email });
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeamMembers: authenticatedProcedure getTeamMembers: authenticatedProcedure
.input(ZGetTeamMembersQuerySchema) .input(ZGetTeamMembersQuerySchema)
.query(async ({ input, ctx }) => { .query(async ({ input, ctx }) => {
try { return await getTeamMembers({ teamId: input.teamId, userId: ctx.user.id });
return await getTeamMembers({ teamId: input.teamId, userId: ctx.user.id });
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeamPrices: authenticatedProcedure.query(async () => { getTeamPrices: authenticatedProcedure.query(async () => {
try { return await getTeamPrices();
return await getTeamPrices();
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
getTeams: authenticatedProcedure.query(async ({ ctx }) => { getTeams: authenticatedProcedure.query(async ({ ctx }) => {
try { return await getTeams({ userId: ctx.user.id });
return await getTeams({ userId: ctx.user.id });
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
leaveTeam: authenticatedProcedure leaveTeam: authenticatedProcedure
.input(ZLeaveTeamMutationSchema) .input(ZLeaveTeamMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await leaveTeam({
return await leaveTeam({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeam: authenticatedProcedure updateTeam: authenticatedProcedure
.input(ZUpdateTeamMutationSchema) .input(ZUpdateTeamMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await updateTeam({
return await updateTeam({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeamEmail: authenticatedProcedure updateTeamEmail: authenticatedProcedure
.input(ZUpdateTeamEmailMutationSchema) .input(ZUpdateTeamEmailMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await updateTeamEmail({
return await updateTeamEmail({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeamMember: authenticatedProcedure updateTeamMember: authenticatedProcedure
.input(ZUpdateTeamMemberMutationSchema) .input(ZUpdateTeamMemberMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await updateTeamMember({
return await updateTeamMember({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeamPublicProfile: authenticatedProcedure updateTeamPublicProfile: authenticatedProcedure
@@ -506,7 +332,7 @@ export const teamRouter = router({
const error = AppError.parseError(err); const error = AppError.parseError(err);
if (error.code !== AppErrorCode.UNKNOWN_ERROR) { if (error.code !== AppErrorCode.UNKNOWN_ERROR) {
throw AppError.parseErrorToTRPCError(error); throw error;
} }
throw new TRPCError({ throw new TRPCError({
@@ -520,48 +346,30 @@ export const teamRouter = router({
requestTeamOwnershipTransfer: authenticatedProcedure requestTeamOwnershipTransfer: authenticatedProcedure
.input(ZRequestTeamOwnerhsipTransferMutationSchema) .input(ZRequestTeamOwnerhsipTransferMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { return await requestTeamOwnershipTransfer({
return await requestTeamOwnershipTransfer({ userId: ctx.user.id,
userId: ctx.user.id, userName: ctx.user.name ?? '',
userName: ctx.user.name ?? '', ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
resendTeamEmailVerification: authenticatedProcedure resendTeamEmailVerification: authenticatedProcedure
.input(ZResendTeamEmailVerificationMutationSchema) .input(ZResendTeamEmailVerificationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { await resendTeamEmailVerification({
await resendTeamEmailVerification({ userId: ctx.user.id,
userId: ctx.user.id, ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
resendTeamMemberInvitation: authenticatedProcedure resendTeamMemberInvitation: authenticatedProcedure
.input(ZResendTeamMemberInvitationMutationSchema) .input(ZResendTeamMemberInvitationMutationSchema)
.mutation(async ({ input, ctx }) => { .mutation(async ({ input, ctx }) => {
try { await resendTeamMemberInvitation({
await resendTeamMemberInvitation({ userId: ctx.user.id,
userId: ctx.user.id, userName: ctx.user.name ?? '',
userName: ctx.user.name ?? '', ...input,
...input, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeamBrandingSettings: authenticatedProcedure updateTeamBrandingSettings: authenticatedProcedure
@@ -569,17 +377,11 @@ export const teamRouter = router({
.mutation(async ({ ctx, input }) => { .mutation(async ({ ctx, input }) => {
const { teamId, settings } = input; const { teamId, settings } = input;
try { return await updateTeamBrandingSettings({
return await updateTeamBrandingSettings({ userId: ctx.user.id,
userId: ctx.user.id, teamId,
teamId, settings,
settings, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
updateTeamDocumentSettings: authenticatedProcedure updateTeamDocumentSettings: authenticatedProcedure
@@ -587,16 +389,10 @@ export const teamRouter = router({
.mutation(async ({ ctx, input }) => { .mutation(async ({ ctx, input }) => {
const { teamId, settings } = input; const { teamId, settings } = input;
try { return await updateTeamDocumentSettings({
return await updateTeamDocumentSettings({ userId: ctx.user.id,
userId: ctx.user.id, teamId,
teamId, settings,
settings, });
});
} catch (err) {
console.error(err);
throw AppError.parseErrorToTRPCError(err);
}
}), }),
}); });

Some files were not shown because too many files have changed in this diff Show More