This commit is contained in:
Mythie
2025-01-02 15:33:37 +11:00
committed by David Nguyen
parent 9183f668d3
commit f7a98180d7
413 changed files with 29538 additions and 1606 deletions

View File

@ -1,4 +1,4 @@
import { type Field, FieldType } from '@documenso/prisma/client';
import { type Field, FieldType } from '@prisma/client';
import { ZFieldMetaSchema } from '../types/field-meta';

View File

@ -0,0 +1,9 @@
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';
export const formatAvatarUrl = (imageId?: string | null) => {
if (!imageId) {
return undefined;
}
return `${NEXT_PUBLIC_WEBAPP_URL()}/api/avatar/${imageId}`;
};

View File

@ -1,5 +1,5 @@
import type { Subscription } from '.prisma/client';
import { SubscriptionStatus } from '.prisma/client';
import type { Subscription } from '@prisma/client';
import { SubscriptionStatus } from '@prisma/client';
/**
* Returns true if there is a subscription that is active and is one of the provided price IDs.

View File

@ -1,10 +1,9 @@
import type { I18n } from '@lingui/core';
import { msg } from '@lingui/macro';
import type { DocumentAuditLog, DocumentMeta, Field, Recipient } from '@prisma/client';
import { RecipientRole } from '@prisma/client';
import { match } from 'ts-pattern';
import type { DocumentAuditLog, DocumentMeta, Field, Recipient } from '@documenso/prisma/client';
import { RecipientRole } from '@documenso/prisma/client';
import type {
TDocumentAuditLog,
TDocumentAuditLogDocumentMetaDiffSchema,

View File

@ -1,4 +1,4 @@
import type { Document, Recipient } from '@documenso/prisma/client';
import type { Document, Recipient } from '@prisma/client';
import type {
TDocumentAuthOptions,

View File

@ -1,4 +1,4 @@
import { DocumentVisibility, TeamMemberRole } from '@documenso/prisma/client';
import { DocumentVisibility, TeamMemberRole } from '@prisma/client';
export const determineDocumentVisibility = (
globalVisibility: DocumentVisibility | null | undefined,

View File

@ -1,4 +1,4 @@
import type { Field } from '@documenso/prisma/client';
import type { Field } from '@prisma/client';
/**
* Sort the fields by the Y position on the document.

View File

@ -9,7 +9,9 @@ import { APP_I18N_OPTIONS } from '../constants/i18n';
export async function dynamicActivate(i18nInstance: I18n, locale: string) {
const extension = process.env.NODE_ENV === 'development' ? 'po' : 'js';
const { messages } = await import(`../translations/${locale}/web.${extension}`);
// const { messages } = await import(`../translations/${locale}/web.${extension}`);
// todo
const messages = {};
i18nInstance.loadAndActivate({ locale, messages });
}

View File

@ -1,4 +1,5 @@
import type { User } from '@documenso/prisma/client';
import type { User } from '@prisma/client';
import type { DocumentWithRecipients } from '@documenso/prisma/types/document-with-recipient';
export type MaskRecipientTokensForDocumentOptions<T extends DocumentWithRecipients> = {

View File

@ -19,7 +19,7 @@ type GetRootHrefOptions = {
};
export const getRootHref = (
params: Record<string, string | string[]> | null,
params: Record<string, string | string[] | undefined> | null,
options: GetRootHrefOptions = {},
) => {
if (typeof params?.teamUrl === 'string') {

View File

@ -1,4 +1,4 @@
import type { Recipient } from '@documenso/prisma/client';
import type { Recipient } from '@prisma/client';
export const extractInitials = (text: string) =>
text

View File

@ -1,4 +1,4 @@
import { type Field, type Recipient, RecipientRole, SigningStatus } from '@documenso/prisma/client';
import { type Field, type Recipient, RecipientRole, SigningStatus } from '@prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';

View File

@ -3,7 +3,7 @@ import { I18nProvider } from '@lingui/react';
import type { RenderOptions } from '@documenso/email/render';
import { render } from '@documenso/email/render';
import { getI18nInstance } from '../client-only/providers/i18n.server';
import { getI18nInstance } from '../client-only/providers/i18n-server';
import {
APP_I18N_OPTIONS,
type SupportedLanguageCodes,

View File

@ -1,4 +1,4 @@
import type { TeamGlobalSettings } from '@documenso/prisma/client';
import type { TeamGlobalSettings } from '@prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';

View File

@ -1,4 +1,4 @@
import type { Recipient } from '@documenso/prisma/client';
import type { Recipient } from '@prisma/client';
import { WEBAPP_BASE_URL } from '../constants/app';