feat: implement template search functionality (#2376)

- Added  function to handle template searches based on user input
- Introduced in the TRPC router to facilitate authenticated template
searches
- Updated to include template search results alongside document search
results
- Enhanced query handling by enabling searches only when the input is
valid
- Created corresponding Zod schemas for request and response validation
in
This commit is contained in:
Catalin Pit 2026-03-09 01:44:51 +02:00 committed by GitHub
parent 6c8726b58c
commit c4754553c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 1292 additions and 927 deletions

View file

@ -0,0 +1,113 @@
---
date: 2026-03-07
title: Search Query Optimization
---
## Problem
The `searchDocumentsWithKeyword` and `searchTemplatesWithKeyword` functions generate a single massive Prisma `findMany` with 7 OR branches. This produces a SQL query that:
- Joins `Team` twice (aliased j3 and j8) for the two team-access branches
- Embeds 4-level deep EXISTS subqueries (`TeamGroup -> OrganisationGroup -> OrganisationGroupMember -> OrganisationMember`) for each team branch
- Uses `ILIKE` across multiple columns with no way for Postgres to use indexes effectively across the OR
- Includes `recipients: true` on the result even though only a small subset of fields are needed
- Fetches all matching rows then filters visibility **in application code**
With 1,000 documents seeded under `medium-account@documenso.com`, this query is noticeably slow.
---
## Option A: Pre-resolve team IDs, keep Prisma
**Change:** Before the envelope query, resolve the user's accessible team IDs in a single query:
```ts
const teamIds = await prisma.teamGroup
.findMany({
where: {
organisationGroup: {
organisationGroupMembers: {
some: { organisationMember: { userId } },
},
},
},
select: { teamId: true },
})
.then((rows) => [...new Set(rows.map((r) => r.teamId))]);
```
Then replace `team: buildTeamWhereQuery(...)` with `teamId: { in: teamIds }` in the envelope query.
**Benefits:**
- Eliminates the duplicated 4-level deep join chain from the envelope query
- The team ID resolution is a simple indexed lookup (runs once, not twice)
- Minimal code change -- still Prisma, same structure
- Can also pre-resolve team roles to move visibility filtering into the WHERE clause
**Drawbacks:**
- Still a single large OR query with ILIKE branches
- Prisma still generates suboptimal SQL for the remaining OR conditions
---
## Option B: Kysely rewrite with pre-resolved teams
**Change:** Rewrite using Kysely (already set up in codebase as `kyselyPrisma.$kysely`). Follow the pattern in `find-envelopes.ts` -- use Kysely for filtering/ID fetching, then Prisma for hydration.
Structure as a UNION of targeted queries instead of a single OR:
```
Query 1: owned docs matching title/externalId (simple indexed lookup)
Query 2: docs where user is recipient matching title (EXISTS on Recipient)
Query 3: team docs matching title/externalId (using pre-resolved teamIds)
UNION ALL -> deduplicate -> ORDER BY createdAt DESC -> LIMIT 20
```
Then hydrate the 20 IDs with Prisma for the include data.
**Benefits:**
- Each sub-query is simple and independently optimizable by Postgres
- UNION eliminates the massive OR which forces bad query plans
- Kysely gives control over exact SQL structure
- Only hydrate the final 20 results (not all matches)
- Follows existing `find-envelopes.ts` pattern -- not a new paradigm
**Drawbacks:**
- More code than Option A
- Two query layers (Kysely for IDs, Prisma for hydration)
---
## Option C: Hybrid -- pre-resolve teams + simplify Prisma OR
**Change:** Pre-resolve team IDs (like Option A), but also restructure the Prisma query to reduce OR branches:
- Merge "owned + title" and "owned + externalId" and "owned + recipient email" into a single owned-docs branch with nested OR
- Merge "team + title" and "team + externalId" into a single team-docs branch
- Keep "recipient inbox" branches separate
This reduces from 7 OR branches to ~3-4, with simpler conditions in each.
**Benefits:**
- Simpler than Kysely rewrite
- Fewer OR branches = better query plan
- Pre-resolved team IDs eliminate the deep joins
- Still pure Prisma
**Drawbacks:**
- Postgres still has to handle OR across different access patterns in one query
- Less control over SQL than Kysely
---
## Recommendation
**Option B (Kysely)** is the strongest choice. The codebase already uses this exact pattern for `find-envelopes.ts` which solves the same class of problem. The UNION approach gives Postgres the best chance at using indexes per sub-query. Pre-resolving team IDs is a prerequisite for all options and is trivially cheap.
The template search query has the same structure and should get the same treatment.

1
.gitignore vendored
View file

@ -63,6 +63,7 @@ CLAUDE.md
# scripts
scripts/output*
scripts/bench-*
# license
.documenso-license.json

View file

@ -4,6 +4,7 @@ import type { MessageDescriptor } from '@lingui/core';
import { msg } from '@lingui/core/macro';
import { useLingui } from '@lingui/react';
import { Trans } from '@lingui/react/macro';
import { keepPreviousData } from '@tanstack/react-query';
import { CheckIcon, Loader, Monitor, Moon, Sun } from 'lucide-react';
import { useHotkeys } from 'react-hotkeys-hook';
import { useNavigate } from 'react-router';
@ -65,14 +66,16 @@ export function AppCommandMenu({ open, onOpenChange }: AppCommandMenuProps) {
const [pages, setPages] = useState<string[]>([]);
const debouncedSearch = useDebouncedValue(search, 200);
const hasValidSearch = debouncedSearch.trim().length > 0;
const { data: searchDocumentsData, isPending: isSearchingDocuments } =
const { data: searchDocumentsData, isFetching: isFetchingDocuments } =
trpcReact.document.search.useQuery(
{
query: debouncedSearch,
},
{
placeholderData: (previousData) => previousData,
enabled: open === true && hasValidSearch,
placeholderData: keepPreviousData,
// Do not batch this due to relatively long request time compared to
// other queries which are generally batched with this.
...SKIP_QUERY_BATCH_META,
@ -80,6 +83,19 @@ export function AppCommandMenu({ open, onOpenChange }: AppCommandMenuProps) {
},
);
const { data: searchTemplatesData, isFetching: isFetchingTemplates } =
trpcReact.template.search.useQuery(
{
query: debouncedSearch,
},
{
enabled: open === true && hasValidSearch,
placeholderData: keepPreviousData,
...SKIP_QUERY_BATCH_META,
...DO_NOT_INVALIDATE_QUERY_ON_MUTATION,
},
);
const teamUrl = useMemo(() => {
let teamUrl = currentTeam?.url || null;
@ -134,17 +150,23 @@ export function AppCommandMenu({ open, onOpenChange }: AppCommandMenuProps) {
];
}, [currentTeam, organisations]);
const searchResults = useMemo(() => {
if (!searchDocumentsData) {
return [];
}
const documentSearchResults =
hasValidSearch && searchDocumentsData
? searchDocumentsData.map((document) => ({
label: document.title,
path: document.path,
value: document.value,
}))
: [];
return searchDocumentsData.map((document) => ({
label: document.title,
path: document.path,
value: document.value,
}));
}, [searchDocumentsData]);
const templateSearchResults =
hasValidSearch && searchTemplatesData
? searchTemplatesData.map((template) => ({
label: template.title,
path: template.path,
value: template.value,
}))
: [];
const currentPage = pages[pages.length - 1];
@ -222,19 +244,9 @@ export function AppCommandMenu({ open, onOpenChange }: AppCommandMenuProps) {
/>
<CommandList>
{isSearchingDocuments ? (
<CommandEmpty>
<div className="flex items-center justify-center">
<span className="animate-spin">
<Loader />
</span>
</div>
</CommandEmpty>
) : (
<CommandEmpty>
<Trans>No results found.</Trans>
</CommandEmpty>
)}
<CommandEmpty>
<Trans>No results found.</Trans>
</CommandEmpty>
{!currentPage && (
<>
@ -263,9 +275,27 @@ export function AppCommandMenu({ open, onOpenChange }: AppCommandMenuProps) {
</CommandItem>
</CommandGroup>
{searchResults.length > 0 && (
{(isFetchingDocuments || documentSearchResults.length > 0) && (
<CommandGroup className="mx-2 p-0 pb-2" heading={_(msg`Your documents`)}>
<Commands push={push} pages={searchResults} />
{isFetchingDocuments ? (
<div className="flex items-center justify-center py-2">
<Loader className="h-4 w-4 animate-spin" />
</div>
) : (
<Commands push={push} pages={documentSearchResults} />
)}
</CommandGroup>
)}
{(isFetchingTemplates || templateSearchResults.length > 0) && (
<CommandGroup className="mx-2 p-0 pb-2" heading={_(msg`Your templates`)}>
{isFetchingTemplates ? (
<div className="flex items-center justify-center py-2">
<Loader className="h-4 w-4 animate-spin" />
</div>
) : (
<Commands push={push} pages={templateSearchResults} />
)}
</CommandGroup>
)}
</>

769
build.log
View file

@ -1,769 +0,0 @@
> @documenso/remix@2.0.14 build
> ./.bin/build.sh
[Build]: Extracting and compiling translations
> @documenso/root@2.0.14 translate
> npm run translate:extract && npm run translate:compile
> @documenso/root@2.0.14 translate:extract
> lingui extract --clean
✔ Done in 2s
Catalog statistics for packages/lib/translations/{locale}/web:
┌─────────────┬─────────────┬─────────┐
│ Language │ Total count │ Missing │
├─────────────┼─────────────┼─────────┤
│ en (source) │ 2311 │ - │
│ de │ 2311 │ 23 │
│ es │ 2311 │ 23 │
│ fr │ 2311 │ 23 │
│ it │ 2311 │ 26 │
│ ja │ 2311 │ 23 │
│ ko │ 2311 │ 23 │
│ pl │ 2311 │ 23 │
│ pt-BR │ 2311 │ 69 │
│ zh │ 2311 │ 23 │
└─────────────┴─────────────┴─────────┘
(Use "npm run translate:extract" to update catalogs with new messages.)
(Use "npm run translate:compile" to compile catalogs for production. Alternatively, use bundler plugins: https://lingui.dev/ref/cli#compiling-catalogs-in-ci)
> @documenso/root@2.0.14 translate:compile
> lingui compile
Compiling message catalogs…
Done in 943ms
[Build]: Building app
> @documenso/remix@2.0.14 build:app
> npm run typecheck && cross-env NODE_ENV=production react-router build
> @documenso/remix@2.0.14 typecheck
> react-router typegen && tsc
app/components/forms/email-preferences-form.tsx(66,7): error TS2322: Type 'JsonValue' is not assignable to type '{ recipientSigningRequest?: boolean | undefined; recipientRemoved?: boolean | undefined; recipientSigned?: boolean | undefined; documentPending?: boolean | undefined; documentCompleted?: boolean | undefined; documentDeleted?: boolean | undefined; ownerDocumentCompleted?: boolean | undefined; } | null | undefined'.
Type 'string' has no properties in common with type '{ recipientSigningRequest?: boolean | undefined; recipientRemoved?: boolean | undefined; recipientSigned?: boolean | undefined; documentPending?: boolean | undefined; documentCompleted?: boolean | undefined; documentDeleted?: boolean | undefined; ownerDocumentCompleted?: boolean | undefined; }'.
app/components/forms/email-preferences-form.tsx(81,41): error TS2345: Argument of type '(data: { emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }) => Promise<...>' is not assignable to parameter of type 'SubmitHandler<TFieldValues>'.
Types of parameters 'data' and 'data' are incompatible.
Type 'TFieldValues' is not assignable to type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }'.
Type 'FieldValues' is missing the following properties from type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }': emailReplyTo, emailId, emailDocumentSettings
app/components/forms/email-preferences-form.tsx(88,15): error TS2322: Type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValues>' is not assignable to type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }> ...'.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
Type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, TFieldVal...' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }>'.
Type 'TFieldValues' is not assignable to type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }'.
Type 'FieldValues' is missing the following properties from type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }': emailReplyTo, emailId, emailDocumentSettings
app/components/forms/email-preferences-form.tsx(129,13): error TS2322: Type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValues>' is not assignable to type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }> ...'.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
Type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, TFieldVal...' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }>'.
Type 'TFieldValues' is not assignable to type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }'.
Type 'FieldValues' is missing the following properties from type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }': emailReplyTo, emailId, emailDocumentSettings
app/components/forms/email-preferences-form.tsx(179,13): error TS2322: Type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValues>' is not assignable to type 'Control<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }> ...'.
Type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, TFieldValu...' is not assignable to type 'Resolver<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, any, { ...; }>'.
Type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, TFieldVal...' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }, { ...; }>...'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }>'.
Type 'TFieldValues' is not assignable to type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }'.
Type 'FieldValues' is missing the following properties from type '{ emailReplyTo: string | null; emailId: string | null; emailDocumentSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null; }': emailReplyTo, emailId, emailDocumentSettings
app/components/forms/subscription-claim-form.tsx(43,7): error TS2322: Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; } | undefined'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; } | undefined'.
app/components/forms/subscription-claim-form.tsx(49,41): error TS2345: Argument of type '(data: { name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }) => Promise<...>' is not assignable to parameter of type 'SubmitHandler<TFieldValues>'.
Types of parameters 'data' and 'data' are incompatible.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/forms/subscription-claim-form.tsx(52,13): error TS2322: Type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues> | undefined' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }> | undefined'.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
Type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, TFieldValues> | Promise<...>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }>'.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/forms/subscription-claim-form.tsx(68,13): error TS2322: Type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues> | undefined' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }> | undefined'.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
Type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, TFieldValues> | Promise<...>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }>'.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/forms/subscription-claim-form.tsx(92,13): error TS2322: Type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues> | undefined' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }> | undefined'.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
Type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, TFieldValues> | Promise<...>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }>'.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/forms/subscription-claim-form.tsx(116,13): error TS2322: Type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues> | undefined' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }> | undefined'.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
Type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, TFieldValues> | Promise<...>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }>'.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/forms/subscription-claim-form.tsx(148,19): error TS2322: Type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Control<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
The types of '_options.resolver' are incompatible between these types.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues> | undefined' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }> | undefined'.
Type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, TFieldValues>' is not assignable to type 'Resolver<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, any, { ...; }>'.
Type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, TFieldValues> | Promise<...>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverResult<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }, { ...; }> | Promise<...>'.
Type 'ResolverSuccess<TFieldValues>' is not assignable to type 'ResolverSuccess<{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }>'.
Type 'TFieldValues' is not assignable to type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Type 'FieldValues' is missing the following properties from type '{ name: string; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; ... 7 more ...; allowEnvelopes?: boolean | undefined; }; }': name, teamCount, memberCount, envelopeItemCount, flags
app/components/general/document-signing/document-signing-field-container.tsx(136,28): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
app/components/general/document-signing/document-signing-field-container.tsx(178,28): error TS2339: Property 'label' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'label' does not exist on type 'string'.
app/components/general/document-signing/document-signing-field-container.tsx(190,32): error TS2339: Property 'label' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'label' does not exist on type 'string'.
app/components/general/envelope-editor/envelope-generic-page-renderer.tsx(50,5): error TS2322: Type '{ inserted: boolean; customText: string; recipient: Pick<{ id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: JsonValue; ... 7 more ...; sendStatus: SendStatus; }, "id" | ... 2 more ... | "signingStatus">; ... 11 more ...; envelopeItemId: string; }[]' is not assignable to type 'GenericLocalField[]'.
Type '{ inserted: boolean; customText: string; recipient: Pick<{ id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: JsonValue | null; ... 7 more ...; sendStatus: $Enums.SendStatus; }, "id" | ... 2 more ... | "signingStatus">; ... 11 more ...; envelopeItemI...' is not assignable to type 'GenericLocalField'.
Type '{ inserted: boolean; customText: string; recipient: Pick<{ id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: JsonValue | null; ... 7 more ...; sendStatus: $Enums.SendStatus; }, "id" | ... 2 more ... | "signingStatus">; ... 11 more ...; envelopeItemI...' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
app/components/general/envelope-editor/envelope-generic-page-renderer.tsx(74,22): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
app/components/general/envelope-signing/envelope-signer-page-renderer.tsx(181,69): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
app/routes/_authenticated+/t.$teamUrl+/documents.$id.legacy_editor.tsx(137,9): error TS2322: Type '{ folder: null; envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 31 more ...; documentMetaId: string; }' is not assignable to type '{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; templateId?: number | ... 1 more ... | undefined; }'.
The types of 'documentMeta.emailSettings' are incompatible between these types.
Type 'JsonValue' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | null'.
Type 'string' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; }'.
app/routes/_authenticated+/t.$teamUrl+/templates.$id.legacy_editor.tsx(109,9): error TS2322: Type '{ folder: null; envelopeId: string; type: $Enums.TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 29 more ...; documentMetaId: string; }' is not assignable to type '{ type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateMeta: { ...; }; }'.
Types of property 'fields' are incompatible.
Type '{ documentId: null; templateId: number; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: null; templateId: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
app/routes/_internal+/[__htmltopdf]+/certificate.tsx(98,20): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/_internal+/[__htmltopdf]+/certificate.tsx(98,44): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
app/routes/_recipient+/d.$token+/_index.tsx(211,15): error TS2322: Type '{ readonly folder: null; readonly id: number; readonly envelopeId: string; readonly type: $Enums.TemplateType; readonly visibility: $Enums.DocumentVisibility; readonly externalId: string | null; ... 15 more ...; readonly envelopeItems: { ...; }[]; }' is not assignable to type 'Omit<{ type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateMeta: { ...; }; }, "user">'.
Types of property 'fields' are incompatible.
Type '{ templateId: number; documentId: null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ templateId: number; documentId: null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
app/routes/_unauthenticated+/o.$orgUrl.signin.tsx(76,6): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
app/routes/_unauthenticated+/o.$orgUrl.signin.tsx(76,43): error TS2339: Property 'authenticationPortal' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'authenticationPortal' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(45,39): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(45,63): error TS2339: Property 'embedSigningWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigningWhiteLabel' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(46,25): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(46,49): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(51,32): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(51,56): error TS2339: Property 'embedSigning' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigning' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(161,39): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(161,63): error TS2339: Property 'embedSigningWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigningWhiteLabel' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(162,25): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(162,49): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
app/routes/embed+/_v0+/direct.$token.tsx(164,32): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/direct.$token.tsx(164,56): error TS2339: Property 'embedSigning' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigning' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(64,39): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(64,63): error TS2339: Property 'embedSigningWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigningWhiteLabel' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(65,25): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(65,49): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(70,32): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(70,56): error TS2339: Property 'embedSigning' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigning' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(197,39): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(197,63): error TS2339: Property 'embedSigningWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigningWhiteLabel' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(198,25): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(198,49): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
app/routes/embed+/_v0+/sign.$token.tsx(200,32): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/_v0+/sign.$token.tsx(200,56): error TS2339: Property 'embedSigning' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigning' does not exist on type 'string'.
app/routes/embed+/v1+/authoring+/_layout.tsx(35,37): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/v1+/authoring+/_layout.tsx(35,61): error TS2339: Property 'embedAuthoringWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedAuthoringWhiteLabel' does not exist on type 'string'.
app/routes/embed+/v1+/authoring+/document.edit.$id.tsx(112,88): error TS2345: Argument of type '() => { title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: $Enums.DocumentDistributionMethod; emailSettings: string | ... 4 more ... | JsonArray; ... 6 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' is not assignable to parameter of type '{ meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers: { .....'.
Type '() => { title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: $Enums.DocumentDistributionMethod; emailSettings: string | ... 4 more ... | JsonArray; ... 6 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' is not assignable to type '() => { meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers...'.
Call signature return types '{ title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: DocumentDistributionMethod; ... 7 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' and '{ meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers: { .....' are incompatible.
The types of 'meta.emailSettings' are incompatible between these types.
Type 'string | number | boolean | { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | JsonObject | JsonArray' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; }'.
Type 'string' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; }'.
app/routes/embed+/v1+/authoring+/document.edit.$id.tsx(144,75): error TS2345: Argument of type '() => { fields: { nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' is not assignable to parameter of type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | (() => { ...; } | null) | null'.
Type '() => { fields: { nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' is not assignable to type '() => { fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | null'.
Call signature return types '{ fields: { nativeId: number; formId: string; type: FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' and '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | null' are incompatible.
The types of 'fields' are incompatible between these types.
Type '{ nativeId: number; formId: string; type: FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; pageHeight: number; ... 7 more ...; nativeId?: number | undefined; }[]'.
Type '{ nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; pageHeight: number; ... 7 more ...; nativeId?: number | undefined; }'.
Types of property 'fieldMeta' are incompatible.
Type 'string | number | boolean | JsonObject | JsonArray | undefined' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | undefined'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | undefined'.
app/routes/embed+/v1+/authoring+/template.edit.$id.tsx(112,88): error TS2345: Argument of type '() => { title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: $Enums.DocumentDistributionMethod; emailSettings: string | ... 4 more ... | JsonArray; ... 6 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' is not assignable to parameter of type '{ meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers: { .....'.
Type '() => { title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: $Enums.DocumentDistributionMethod; emailSettings: string | ... 4 more ... | JsonArray; ... 6 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' is not assignable to type '() => { meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers...'.
Call signature return types '{ title: string; documentData: undefined; meta: { subject: string | undefined; message: string | undefined; distributionMethod: DocumentDistributionMethod; ... 7 more ...; redirectUrl: string | undefined; }; signers: { ...; }[]; }' and '{ meta: { timezone: string; signingOrder: "PARALLEL" | "SEQUENTIAL"; distributionMethod: "EMAIL" | "NONE"; emailSettings: { recipientSigningRequest: boolean; recipientRemoved: boolean; ... 4 more ...; ownerDocumentCompleted: boolean; }; ... 7 more ...; externalId?: string | undefined; }; title: string; signers: { .....' are incompatible.
The types of 'meta.emailSettings' are incompatible between these types.
Type 'string | number | boolean | { recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; } | JsonObject | JsonArray' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; }'.
Type 'string' is not assignable to type '{ recipientSigningRequest: boolean; recipientRemoved: boolean; recipientSigned: boolean; documentPending: boolean; documentCompleted: boolean; documentDeleted: boolean; ownerDocumentCompleted: boolean; }'.
app/routes/embed+/v1+/authoring+/template.edit.$id.tsx(144,75): error TS2345: Argument of type '() => { fields: { nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' is not assignable to parameter of type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | (() => { ...; } | null) | null'.
Type '() => { fields: { nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' is not assignable to type '() => { fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | null'.
Call signature return types '{ fields: { nativeId: number; formId: string; type: FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]; }' and '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; ... 8 more ...; nativeId?: number | undefined; }[]; } | null' are incompatible.
The types of 'fields' are incompatible between these types.
Type '{ nativeId: number; formId: string; type: FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; pageHeight: number; ... 7 more ...; nativeId?: number | undefined; }[]'.
Type '{ nativeId: number; formId: string; type: $Enums.FieldType; signerEmail: string; inserted: boolean; recipientId: number; pageNumber: number; pageX: number; pageY: number; pageWidth: number; pageHeight: number; fieldMeta: string | ... 4 more ... | undefined; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; recipientId: number; pageWidth: number; pageHeight: number; ... 7 more ...; nativeId?: number | undefined; }'.
Types of property 'fieldMeta' are incompatible.
Type 'string | number | boolean | JsonObject | JsonArray | undefined' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | undefined'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | undefined'.
app/routes/embed+/v1+/multisign+/_index.tsx(56,31): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/v1+/multisign+/_index.tsx(56,55): error TS2339: Property 'embedSigningWhiteLabel' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedSigningWhiteLabel' does not exist on type 'string'.
app/routes/embed+/v1+/multisign+/_index.tsx(57,25): error TS18047: 'organisationClaim.flags' is possibly 'null'.
app/routes/embed+/v1+/multisign+/_index.tsx(57,49): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
../../packages/api/v1/implementation.ts(488,3): error TS2322: Type '(args: { body: { globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; title: string; type?: "PUBLIC" | "PRIVATE" | undefined; ... 6 more ...; attachments?: { ...; }[] | undefined; }; headers: { ...; }; }, { request }: B) => Promise<...>' is not assignable to type 'AppRouteImplementationOrOptions<{ method: "POST"; body: ZodObject<{ title: ZodString; folderId: ZodOptional<ZodString>; externalId: ZodOptional<ZodNullable<ZodString>>; ... 7 more ...; attachments: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; summary: "Create a new template and get a presigned URL"...'.
Type '(args: { body: { globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; title: string; type?: "PUBLIC" | "PRIVATE" | undefined; ... 6 more ...; attachments?: { ...; }[] | undefined; }; headers: { ...; }; }, { request }: B) => Promise<...>' is not assignable to type 'AppRouteImplementation<{ method: "POST"; body: ZodObject<{ title: ZodString; folderId: ZodOptional<ZodString>; externalId: ZodOptional<ZodNullable<ZodString>>; ... 7 more ...; attachments: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; summary: "Create a new template and get a presigned URL"; path: "...'.
Type 'Promise<{ status: 500; body: { message: string; uploadUrl?: undefined; template?: undefined; }; } | { status: 400; body: { message: string; uploadUrl?: undefined; template?: undefined; }; } | { status: 200; body: { ...; }; } | { ...; } | { ...; }>' is not assignable to type 'Promise<Prettify<AppRouteResponses<{ method: "POST"; body: ZodObject<{ title: ZodString; folderId: ZodOptional<ZodString>; externalId: ZodOptional<ZodNullable<ZodString>>; ... 7 more ...; attachments: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; summary: "Create a new template and get a presigned U...'.
Type '{ status: 500; body: { message: string; uploadUrl?: undefined; template?: undefined; }; } | { status: 400; body: { message: string; uploadUrl?: undefined; template?: undefined; }; } | { status: 200; body: { ...; }; } | { ...; } | { ...; }' is not assignable to type 'Prettify<AppRouteResponses<{ method: "POST"; body: ZodObject<{ title: ZodString; folderId: ZodOptional<ZodString>; externalId: ZodOptional<ZodNullable<ZodString>>; ... 7 more ...; attachments: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; summary: "Create a new template and get a presigned URL"; pat...'.
Type '{ status: 200; body: { uploadUrl: string; template: { envelopeId: string; type: $Enums.TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; message?: u...' is not assignable to type 'Prettify<AppRouteResponses<{ method: "POST"; body: ZodObject<{ title: ZodString; folderId: ZodOptional<ZodString>; externalId: ZodOptional<ZodNullable<ZodString>>; ... 7 more ...; attachments: ZodOptional<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; summary: "Create a new template and get a presigned URL"; pat...'.
Type '{ status: 200; body: { uploadUrl: string; template: { envelopeId: string; type: $Enums.TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; message?: u...' is not assignable to type '{ status: 200; body: { template: { type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { ...; } | null; ... 15 more ...; templateDocumentDataId?: string | undefined; }; uploadUrl: string; }; }'.
The types of 'body.template.fields' are incompatible between these types.
Type '{ documentId: null; templateId: number; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: null; templateId: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/auth/server/lib/utils/organisation-portal.ts(50,6): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/auth/server/lib/utils/organisation-portal.ts(50,43): error TS2339: Property 'authenticationPortal' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'authenticationPortal' does not exist on type 'string'.
../../packages/ee/server-only/limits/server.ts(83,7): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/ee/server-only/limits/server.ts(83,44): error TS2339: Property 'unlimitedDocuments' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'unlimitedDocuments' does not exist on type 'string'.
../../packages/lib/server-only/email/get-email-context.ts(170,7): error TS18047: 'claims.flags' is possibly 'null'.
../../packages/lib/server-only/email/get-email-context.ts(170,20): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
../../packages/lib/server-only/email/get-email-context.ts(221,7): error TS18047: 'claims.flags' is possibly 'null'.
../../packages/lib/server-only/email/get-email-context.ts(221,20): error TS2339: Property 'hidePoweredBy' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'hidePoweredBy' does not exist on type 'string'.
../../packages/lib/server-only/email/get-email-context.ts(235,8): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/email/get-email-context.ts(235,45): error TS2339: Property 'emailDomains' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'emailDomains' does not exist on type 'string'.
../../packages/lib/server-only/envelope/create-envelope.ts(216,6): error TS18047: 'team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/envelope/create-envelope.ts(216,48): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/envelope/get-envelope-for-direct-template-signing.ts(144,5): error TS2322: Type '{ documentMeta: { id: string; language: string; message: string | null; subject: string | null; timezone: string | null; dateFormat: string | null; redirectUrl: string | null; signingOrder: DocumentSigningOrder; ... 7 more ...; emailId: string | null; }; ... 4 more ...; directLink: { ...; } | null; } & { ...; }' is not assignable to type '{ type: "DOCUMENT" | "TEMPLATE"; id: string; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { language: string; timezone: string | null; dateFormat: string | null; ... 6 more ...; distributionMethod: "EMAIL" | "NONE"; }; ... 12 more ...; recipients: { ...; }[]; }'.
Types of property 'authOptions' are incompatible.
Type 'JsonValue' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; } | null'.
Type 'string' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; }'.
../../packages/lib/server-only/envelope/get-envelope-for-direct-template-signing.ts(148,7): error TS2322: Type '({ signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; } & { type: FieldType; ... 12 more ...; inserted: boolean; })[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; ...'.
Type '{ signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; } & { type: FieldType; ... 12 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/lib/server-only/envelope/get-envelope-for-recipient-signing.ts(284,5): error TS2322: Type '{ documentMeta: { id: string; language: string; message: string | null; subject: string | null; timezone: string | null; dateFormat: string | null; redirectUrl: string | null; signingOrder: DocumentSigningOrder; ... 7 more ...; emailId: string | null; }; team: { ...; }; user: { ...; }; envelopeItems: { ...; }[]; rec...' is not assignable to type '{ type: "DOCUMENT" | "TEMPLATE"; id: string; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { language: string; timezone: string | null; dateFormat: string | null; ... 6 more ...; distributionMethod: "EMAIL" | "NONE"; }; ... 12 more ...; recipients: { ...; }[]; }'.
Types of property 'authOptions' are incompatible.
Type 'JsonValue' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; } | null'.
Type 'string' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; }'.
../../packages/lib/server-only/envelope/get-envelope-for-recipient-signing.ts(285,5): error TS2322: Type '{ fields: ({ signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; } & { type: FieldType; ... 12 more ...; inserted: boolean; })[]; } & { ...; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 13 more ...; signature?: { ...; } | ... 1 more ... | undefined; }[]; ... 10 more ...'.
Types of property 'fields' are incompatible.
Type '({ signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; } & { type: FieldType; ... 12 more ...; inserted: boolean; })[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; ...'.
Type '{ signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; } & { type: FieldType; ... 12 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/lib/server-only/envelope/update-envelope.ts(119,42): error TS18047: 'envelope.team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/envelope/update-envelope.ts(119,93): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/field/sign-field-with-token.ts(212,24): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
../../packages/lib/server-only/field/sign-field-with-token.ts(217,42): error TS2589: Type instantiation is excessively deep and possibly infinite.
../../packages/lib/server-only/field/sign-field-with-token.ts(223,24): error TS2339: Property 'filter' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'filter' does not exist on type 'string'.
../../packages/lib/server-only/field/sign-field-with-token.ts(223,32): error TS7006: Parameter 'v' implicitly has an 'any' type.
../../packages/lib/server-only/field/sign-field-with-token.ts(223,54): error TS7006: Parameter 'v' implicitly has an 'any' type.
../../packages/lib/server-only/field/sign-field-with-token.ts(226,70): error TS2339: Property 'find' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'find' does not exist on type 'string'.
../../packages/lib/server-only/field/sign-field-with-token.ts(226,76): error TS7006: Parameter 'v' implicitly has an 'any' type.
../../packages/lib/server-only/field/update-envelope-fields.ts(102,77): error TS2339: Property 'type' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'type' does not exist on type 'string'.
../../packages/lib/server-only/organisation/create-organisation.ts(64,7): error TS2322: Type '{ id: string; typedSignatureEnabled: boolean; uploadSignatureEnabled: boolean; drawSignatureEnabled: boolean; emailReplyTo: string | null; emailId: string | null; documentVisibility: $Enums.DocumentVisibility; ... 10 more ...; brandingCompanyDetails: string; }' is not assignable to type '(Without<OrganisationGlobalSettingsCreateInput, OrganisationGlobalSettingsUncheckedCreateInput> & OrganisationGlobalSettingsUncheckedCreateInput) | (Without<...> & OrganisationGlobalSettingsCreateInput)'.
Type '{ id: string; typedSignatureEnabled: boolean; uploadSignatureEnabled: boolean; drawSignatureEnabled: boolean; emailReplyTo: string | null; emailId: string | null; documentVisibility: $Enums.DocumentVisibility; ... 10 more ...; brandingCompanyDetails: string; }' is not assignable to type 'Without<OrganisationGlobalSettingsCreateInput, OrganisationGlobalSettingsUncheckedCreateInput> & OrganisationGlobalSettingsUncheckedCreateInput'.
Type '{ id: string; typedSignatureEnabled: boolean; uploadSignatureEnabled: boolean; drawSignatureEnabled: boolean; emailReplyTo: string | null; emailId: string | null; documentVisibility: $Enums.DocumentVisibility; ... 10 more ...; brandingCompanyDetails: string; }' is not assignable to type 'OrganisationGlobalSettingsUncheckedCreateInput'.
Types of property 'emailDocumentSettings' are incompatible.
Type 'JsonValue' is not assignable to type 'JsonNull | InputJsonValue'.
Type 'null' is not assignable to type 'JsonNull | InputJsonValue'.
../../packages/lib/server-only/organisation/create-organisation.ts(206,7): error TS2698: Spread types may only be created from object types.
../../packages/lib/server-only/pdf/insert-field-in-pdf-v2.ts(41,7): error TS2322: Type '{ width: number; height: number; positionX: number; positionY: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 8 more ...; renderId: string; }' is not assignable to type 'FieldToRender'.
Type '{ width: number; height: number; positionX: number; positionY: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 8 more ...; renderId: string; }' is not assignable to type '{ renderId: string; width: number; height: number; positionX: number; positionY: number; fieldMeta?: { type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | u...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 10 more ... | undefined'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 10 more ... | undefined'.
../../packages/lib/server-only/recipient/create-envelope-recipients.ts(80,36): error TS18047: 'envelope.team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/recipient/create-envelope-recipients.ts(80,87): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/recipient/set-document-recipients.ts(109,36): error TS18047: 'envelope.team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/recipient/set-document-recipients.ts(109,87): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/recipient/set-template-recipients.ts(73,36): error TS18047: 'envelope.team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/recipient/set-template-recipients.ts(73,87): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/recipient/update-envelope-recipients.ts(88,36): error TS18047: 'envelope.team.organisation.organisationClaim.flags' is possibly 'null'.
../../packages/lib/server-only/recipient/update-envelope-recipients.ts(88,87): error TS2339: Property 'cfr21' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'cfr21' does not exist on type 'string'.
../../packages/lib/server-only/team/create-team.ts(138,11): error TS2322: Type '{ id: string; typedSignatureEnabled: boolean | null; uploadSignatureEnabled: boolean | null; drawSignatureEnabled: boolean | null; emailReplyTo: string | null; emailId: string | null; ... 11 more ...; brandingCompanyDetails: string | null; }' is not assignable to type '(Without<TeamGlobalSettingsCreateInput, TeamGlobalSettingsUncheckedCreateInput> & TeamGlobalSettingsUncheckedCreateInput) | (Without<...> & TeamGlobalSettingsCreateInput)'.
Type '{ id: string; typedSignatureEnabled: boolean | null; uploadSignatureEnabled: boolean | null; drawSignatureEnabled: boolean | null; emailReplyTo: string | null; emailId: string | null; ... 11 more ...; brandingCompanyDetails: string | null; }' is not assignable to type 'Without<TeamGlobalSettingsCreateInput, TeamGlobalSettingsUncheckedCreateInput> & TeamGlobalSettingsUncheckedCreateInput'.
Type '{ id: string; typedSignatureEnabled: boolean | null; uploadSignatureEnabled: boolean | null; drawSignatureEnabled: boolean | null; emailReplyTo: string | null; emailId: string | null; ... 11 more ...; brandingCompanyDetails: string | null; }' is not assignable to type 'TeamGlobalSettingsUncheckedCreateInput'.
Types of property 'emailDocumentSettings' are incompatible.
Type 'JsonValue' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue | undefined'.
Type 'null' is not assignable to type 'NullableJsonNullValueInput | InputJsonValue | undefined'.
../../packages/lib/server-only/template/create-document-from-direct-template.ts(661,59): error TS2339: Property 'actionAuth' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'actionAuth' does not exist on type 'string'.
../../packages/lib/server-only/template/create-document-from-template.ts(150,9): error TS2698: Spread types may only be created from object types.
../../packages/lib/server-only/template/create-document-from-template.ts(167,9): error TS2698: Spread types may only be created from object types.
../../packages/lib/server-only/template/create-document-from-template.ts(208,9): error TS2698: Spread types may only be created from object types.
../../packages/lib/server-only/template/create-document-from-template.ts(253,9): error TS2698: Spread types may only be created from object types.
../../packages/lib/server-only/template/create-document-from-template.ts(283,9): error TS2698: Spread types may only be created from object types.
../../packages/lib/utils/document.ts(85,5): error TS2322: Type 'JsonValue' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; } | null'.
Type 'string' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; }'.
../../packages/lib/utils/document.ts(86,5): error TS2322: Type 'JsonValue' is not assignable to type 'Record<string, string | number | boolean> | null'.
Type 'string' is not assignable to type 'Record<string, string | number | boolean>'.
../../packages/lib/utils/document.ts(125,5): error TS2322: Type 'JsonValue' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; } | null'.
Type 'string' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; }'.
../../packages/lib/utils/document.ts(126,5): error TS2322: Type 'JsonValue' is not assignable to type 'Record<string, string | number | boolean> | null'.
Type 'string' is not assignable to type 'Record<string, string | number | boolean>'.
../../packages/lib/utils/document.ts(146,5): error TS2322: Type '{ documentId: number | null; templateId: number | null; id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: JsonValue; ... 7 more ...; sendStatus: SendStatus; }[]' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: { accessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; actionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD" | "EXPLICIT_NONE")[]; } | null; ... 9 more ...; templateId?: number | ... 1 more...'.
Type '{ documentId: number | null; templateId: number | null; id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: JsonValue | null; ... 7 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; envelopeId: string; authOptions: { accessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; actionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD" | "EXPLICIT_NONE")[]; } | null; ... 9 more ...; templateId?: number | ... 1 more...'.
Types of property 'authOptions' are incompatible.
Type 'JsonValue' is not assignable to type '{ accessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; actionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD" | "EXPLICIT_NONE")[]; } | null'.
Type 'string' is not assignable to type '{ accessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; actionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD" | "EXPLICIT_NONE")[]; }'.
../../packages/lib/utils/templates.ts(61,5): error TS2322: Type 'JsonValue' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; } | null'.
Type 'string' is not assignable to type '{ globalAccessAuth: ("ACCOUNT" | "TWO_FACTOR_AUTH")[]; globalActionAuth: ("ACCOUNT" | "PASSKEY" | "TWO_FACTOR_AUTH" | "PASSWORD")[]; }'.
../../packages/trpc/server/admin-router/find-subscription-claims.ts(17,10): error TS2345: Argument of type '({ input }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: SessionUser; session: { id: string; createdAt: Date; updatedAt: Date; userId: number; ipAddress: string | null; userAgent: string | null; sessionToken: string; expiresAt: Date; }; ... 4 more ...; res: Response; }, { ...; }>) => Promise<...>' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: SessionUser; session: { id: string; createdAt: Date; updatedAt: Date; userId: number; ipAddress: string | null; userAgent: string | null; sessionToken: string; expiresAt: Date; }; ... 4 more ...; res: Response; }, { ...; }, { ...; }, unknown>'.
Type 'Promise<{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }>' is not assignable to type 'MaybePromise<{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }[]; count: number; perPage: number; curr...'.
Type 'Promise<{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }>' is not assignable to type 'Promise<{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }[]; count: number; perPage: number; currentPa...'.
Type '{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: Prisma.JsonValue; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }' is not assignable to type '{ data: { id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }[]; count: number; perPage: number; currentPage: numb...'.
Types of property 'data' are incompatible.
Type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }[]' is not assignable to type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }[]'.
Type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }' is not assignable to type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Types of property 'flags' are incompatible.
Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
../../packages/trpc/server/admin-router/find-subscription-claims.ts(70,5): error TS2322: Type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }[]' is not assignable to type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }[]'.
Type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: JsonValue; }' is not assignable to type '{ id: string; name: string; createdAt: Date; updatedAt: Date; locked: boolean; teamCount: number; memberCount: number; envelopeItemCount: number; flags: { allowCustomBranding?: boolean | undefined; ... 9 more ...; allowEnvelopes?: boolean | undefined; }; }'.
Types of property 'flags' are incompatible.
Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
../../packages/trpc/server/admin-router/get-admin-organisation.ts(13,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: SessionUser; session: { id: string; createdAt: Date; updatedAt: Date; userId: number; ipAddress: string | null; userAgent: string | null; sessionToken: string; expiresAt: Date; }; ... 4 more ...; res: Response; }, { ...; }>) => Promise<...>' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: SessionUser; session: { id: string; createdAt: Date; updatedAt: Date; userId: number; ipAddress: string | null; userAgent: string | null; sessionToken: string; expiresAt: Date; }; ... 4 more ...; res: Response; }, { ...; }, { ...; }, unknown>'.
Type 'Promise<{ subscription: { id: number; status: SubscriptionStatus; priceId: string; createdAt: Date; updatedAt: Date; customerId: string; organisationId: string; planId: string; periodEnd: Date | null; cancelAtPeriodEnd: boolean; } | null; organisationClaim: { ...; }; organisationGlobalSettings: { ...; }; members: ({...' is not assignable to type 'MaybePromise<{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }>'.
Type 'Promise<{ subscription: { id: number; status: SubscriptionStatus; priceId: string; createdAt: Date; updatedAt: Date; customerId: string; organisationId: string; planId: string; periodEnd: Date | null; cancelAtPeriodEnd: boolean; } | null; organisationClaim: { ...; }; organisationGlobalSettings: { ...; }; members: ({...' is not assignable to type 'Promise<{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }>'.
Type '{ subscription: { id: number; status: SubscriptionStatus; priceId: string; createdAt: Date; updatedAt: Date; customerId: string; organisationId: string; planId: string; periodEnd: Date | null; cancelAtPeriodEnd: boolean; } | null; organisationClaim: { ...; }; organisationGlobalSettings: { ...; }; members: ({ ...; } ...' is not assignable to type '{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }'.
The types of 'organisationClaim.flags' are incompatible between these types.
Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
../../packages/trpc/server/admin-router/update-subscription-claim.ts(30,49): error TS2345: Argument of type 'JsonValue' is not assignable to parameter of type 'Partial<{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }>'.
Type 'null' is not assignable to type 'Partial<{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }>'.
../../packages/trpc/server/document-router/attachment/find-attachments.ts(24,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }>' is not assignable to type 'MaybePromise<{ data: { data: string; type: "link"; id: string; label: string; }[]; }>'.
Type 'Promise<{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }>' is not assignable to type 'Promise<{ data: { data: string; type: "link"; id: string; label: string; }[]; }>'.
Type '{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }' is not assignable to type '{ data: { data: string; type: "link"; id: string; label: string; }[]; }'.
Types of property 'data' are incompatible.
Type '{ data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]' is not assignable to type '{ data: string; type: "link"; id: string; label: string; }[]'.
Type '{ data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }' is not assignable to type '{ data: string; type: "link"; id: string; label: string; }'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type '"link"'.
../../packages/trpc/server/document-router/create-document-temporary.ts(28,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ document: { envelopeId: string; documentDataId: string; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; folder: { ...; } | null; uploadUrl: string; }>' is not assignable to type 'MaybePromise<{ document: { id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; ... 15 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }; uploadUr...'.
Type 'Promise<{ document: { envelopeId: string; documentDataId: string; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; folder: { ...; } | null; uploadUrl: string; }>' is not assignable to type 'Promise<{ document: { id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; ... 15 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }; uploadUrl: st...'.
Type '{ document: { envelopeId: string; documentDataId: string; documentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; folder: { ...; } | null; uploadUrl: string; }' is not assignable to type '{ document: { id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; ... 15 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }; uploadUrl: string; }'.
The types of 'document.fields' are incompatible between these types.
Type '{ documentId: number; templateId: null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number; templateId: null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/document-router/get-document.ts(14,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; id: number; ... 31 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined;...'.
Type 'Promise<{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; id: number; ... 31 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }>'.
Type '{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 32 more ...; documentMetaId: string; }' is not assignable to type '{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }'.
Types of property 'fields' are incompatible.
Type '{ documentId: number; templateId: null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number; templateId: null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/document-router/update-document.ts(18,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ id: number; envelopeId: string; type: EnvelopeType; source: DocumentSource; status: DocumentStatus; createdAt: Date; updatedAt: Date; ... 18 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; updatedAt: Date; userId: number; ... 13 more ...; documentDataId?: string | undefined; }>'.
Type 'Promise<{ id: number; envelopeId: string; type: EnvelopeType; source: DocumentSource; status: DocumentStatus; createdAt: Date; updatedAt: Date; ... 18 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; updatedAt: Date; userId: number; ... 13 more ...; documentDataId?: string | undefined; }>'.
Type '{ id: number; envelopeId: string; type: $Enums.EnvelopeType; source: $Enums.DocumentSource; status: $Enums.DocumentStatus; ... 20 more ...; documentMetaId: string; }' is not assignable to type '{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; updatedAt: Date; userId: number; ... 13 more ...; documentDataId?: string | undefined; }'.
Types of property 'formValues' are incompatible.
Type 'JsonValue' is not assignable to type 'Record<string, string | number | boolean> | null'.
Type 'string' is not assignable to type 'Record<string, string | number | boolean>'.
../../packages/trpc/server/embedding-router/create-embedding-presign-token.ts(47,14): error TS18047: 'organisationClaim.flags' is possibly 'null'.
../../packages/trpc/server/embedding-router/create-embedding-presign-token.ts(47,38): error TS2339: Property 'embedAuthoring' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'embedAuthoring' does not exist on type 'string'.
../../packages/trpc/server/embedding-router/get-multi-sign-document.ts(17,10): error TS2345: Argument of type '({ input, ctx: { metadata } }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: null; session: null; metadata: ApiRequestMetadata; teamId: number | undefined; logger: Logger<...>; req: Request; res: Response; } | { ...; }, { ...; }>) => Promise<...>' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: null; session: null; metadata: ApiRequestMetadata; teamId: number | undefined; logger: Logger<...>; req: Request; res: Response; } | { ...; }, { ...; }, { ...; }, unknown>'.
Type 'Promise<{ folder: null; fields: { recipient: { documentId: number; templateId: null; fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 14 more ...; sendStatus: SendStatus; }; ... 16 more ...; inserted: boolean; }[]; ... 3...' is not assignable to type 'MaybePromise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 10 more ...; emailSettings?: unknown; } | null; ... 19 more ...; documentDataId?: string | undefined; }>'.
Type 'Promise<{ folder: null; fields: { recipient: { documentId: number; templateId: null; fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 14 more ...; sendStatus: SendStatus; }; ... 16 more ...; inserted: boolean; }[]; ... 3...' is not assignable to type 'Promise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 10 more ...; emailSettings?: unknown; } | null; ... 19 more ...; documentDataId?: string | undefined; }>'.
Type '{ folder: null; fields: { recipient: { documentId: number; templateId: null; fields: { type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 14 more ...; sendStatus: $Enums.SendStatus; }; ... 16 more ...; inserted: boolean; }[]; ... 31 more ...; documentMetaId:...' is not assignable to type '{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 10 more ...; emailSettings?: unknown; } | null; ... 19 more ...; documentDataId?: string | undefined; }'.
Types of property 'fields' are incompatible.
Type '{ recipient: { documentId: number; templateId: null; fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 14 more ...; sendStatus: SendStatus; }; ... 16 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; ... 12 mor...'.
Type '{ recipient: { documentId: number; templateId: null; fields: { type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }[]; ... 14 more ...; sendStatus: $Enums.SendStatus; }; ... 16 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; signature: { id: number; recipientId: number; fieldId: number; created: Date; signatureImageAsBase64: string | null; typedSignature: string | null; } | null; ... 12 mor...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/enterprise-router/create-organisation-email-domain.ts(50,10): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/trpc/server/enterprise-router/create-organisation-email-domain.ts(50,47): error TS2339: Property 'emailDomains' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'emailDomains' does not exist on type 'string'.
../../packages/trpc/server/enterprise-router/get-organisation-authentication-portal.ts(67,8): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/trpc/server/enterprise-router/get-organisation-authentication-portal.ts(67,45): error TS2339: Property 'authenticationPortal' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'authenticationPortal' does not exist on type 'string'.
../../packages/trpc/server/enterprise-router/update-organisation-authentication-portal.ts(50,10): error TS18047: 'organisation.organisationClaim.flags' is possibly 'null'.
../../packages/trpc/server/enterprise-router/update-organisation-authentication-portal.ts(50,47): error TS2339: Property 'authenticationPortal' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'authenticationPortal' does not exist on type 'string'.
../../packages/trpc/server/envelope-router/attachment/find-attachments.ts(16,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }>' is not assignable to type 'MaybePromise<{ data: { data: string; type: "link"; id: string; label: string; }[]; }>'.
Type 'Promise<{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }>' is not assignable to type 'Promise<{ data: { data: string; type: "link"; id: string; label: string; }[]; }>'.
Type '{ data: { data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]; }' is not assignable to type '{ data: { data: string; type: "link"; id: string; label: string; }[]; }'.
Types of property 'data' are incompatible.
Type '{ data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }[]' is not assignable to type '{ data: string; type: "link"; id: string; label: string; }[]'.
Type '{ data: string; type: string; id: string; label: string; createdAt: Date; updatedAt: Date; envelopeId: string; }' is not assignable to type '{ data: string; type: "link"; id: string; label: string; }'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type '"link"'.
../../packages/trpc/server/envelope-router/envelope-fields/create-envelope-fields.ts(14,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ data: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templat...'.
Type 'Promise<{ data: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?:...'.
Type '{ data: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Types of property 'data' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/envelope-fields/get-envelope-field.ts(14,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; inserted: boole...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; inserted: boolean; }>'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/envelope-fields/update-envelope-fields.ts(14,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ data: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templat...'.
Type 'Promise<{ data: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?:...'.
Type '{ data: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ data: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Types of property 'data' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/envelope-recipients/get-envelope-recipient.ts(16,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }[]; } & { ...; }>' is not assignable to type 'MaybePromise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ...'.
Type 'Promise<{ fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }[]; } & { ...; }>' is not assignable to type 'Promise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 9...'.
Type '{ fields: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }[]; } & { ...; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 9 more .....'.
Types of property 'fields' are incompatible.
Type '{ type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/get-envelope.ts(14,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ user: { id: number; name: string; email: string; }; documentMeta: { id: string; language: string; message: string | null; subject: string | null; timezone: string | null; dateFormat: string | null; ... 9 more ...; emailId: string | null; }; ... 30 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; ... 14 more ...; emailSettings?: unknown; }; ... 23 more ...; authOptions?: unknown; }>'.
Type 'Promise<{ user: { id: number; name: string; email: string; }; documentMeta: { id: string; language: string; message: string | null; subject: string | null; timezone: string | null; dateFormat: string | null; ... 9 more ...; emailId: string | null; }; ... 30 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; ... 14 more ...; emailSettings?: unknown; }; ... 23 more ...; authOptions?: unknown; }>'.
Type '{ user: { id: number; name: string; email: string; }; documentMeta: { id: string; language: string; message: string | null; subject: string | null; timezone: string | null; dateFormat: string | null; ... 9 more ...; emailId: string | null; }; ... 30 more ...; documentMetaId: string; }' is not assignable to type '{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; ... 14 more ...; emailSettings?: unknown; }; ... 23 more ...; authOptions?: unknown; }'.
Types of property 'fields' are incompatible.
Type '{ type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; ...'.
Type '{ type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 10 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/sign-envelope-field.ts(22,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: null; session: null; metadata: ApiRequestMetadata; teamId: number | undefined; logger: Logger<...>; req: Request; res: Response; } | { ...; }, { ...; }>) => Promise<...>' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: null; session: null; metadata: ApiRequestMetadata; teamId: number | undefined; logger: Logger<...>; req: Request; res: Response; } | { ...; }, { ...; }, { ...; }, unknown>'.
Type 'Promise<{ signedField: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }; }>' is not assignable to type 'MaybePromise<{ signedField: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; ...'.
Type 'Promise<{ signedField: { type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; recipientId: number; ... 5 more ...; inserted: boolean; }; }>' is not assignable to type 'Promise<{ signedField: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; signa...'.
Type '{ signedField: { type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }; }' is not assignable to type '{ signedField: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 11 more ...; signature?: {...'.
The types of 'signedField.fieldMeta' are incompatible between these types.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/envelope-router/sign-envelope-field.ts(123,26): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
../../packages/trpc/server/envelope-router/update-envelope.ts(14,13): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ type: EnvelopeType; id: string; source: DocumentSource; status: DocumentStatus; createdAt: Date; updatedAt: Date; userId: number; ... 17 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; ... 15 more ...; authOptions?: unknown; }>'.
Type 'Promise<{ type: EnvelopeType; id: string; source: DocumentSource; status: DocumentStatus; createdAt: Date; updatedAt: Date; userId: number; ... 17 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; ... 15 more ...; authOptions?: unknown; }>'.
Type '{ type: EnvelopeType; id: string; source: DocumentSource; status: DocumentStatus; createdAt: Date; updatedAt: Date; userId: number; ... 17 more ...; documentMetaId: string; }' is not assignable to type '{ type: "DOCUMENT" | "TEMPLATE"; id: string; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; createdAt: Date; ... 15 more ...; authOptions?: unknown; }'.
Types of property 'formValues' are incompatible.
Type 'JsonValue' is not assignable to type 'Record<string, string | number | boolean> | null'.
Type 'string' is not assignable to type 'Record<string, string | number | boolean>'.
../../packages/trpc/server/field-router/router.ts(61,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(94,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(140,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(182,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(222,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(285,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; ... 9 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; ... 9 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ formId: string | undefined; documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(333,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(380,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(413,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(455,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'MaybePromise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: nu...'.
Type 'Promise<{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }>' is not assignable to type 'Promise<{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: number ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(495,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/field-router/router.ts(557,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; ... 9 more ...; inserted: boolean; }[]; }>' is not assignable to type 'MaybePromise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templ...'.
Type 'Promise<{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; ... 9 more ...; inserted: boolean; }[]; }>' is not assignable to type 'Promise<{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId...'.
Type '{ fields: { formId: string | undefined; documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; }' is not assignable to type '{ fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; ... 5 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; templateId?: numbe...'.
Types of property 'fields' are incompatible.
Type '{ formId: string | undefined; documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ formId: string | undefined; documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/organisation-router/get-organisation-session.ts(69,3): error TS2322: Type '{ teams: { currentTeamRole: TeamMemberRole; teamGroups: ({ organisationGroup: { type: OrganisationGroupType; id: string; name: string | null; organisationRole: OrganisationMemberRole; organisationId: string; }; } & { ...; })[]; ... 6 more ...; teamGlobalSettingsId: string; }[]; ... 15 more ...; organisationAuthentic...' is not assignable to type '{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 5 more ...; currentOrganisationRole: "ADMIN" | ... 1 more ... | "MEMBER"; }[]'.
Type '{ teams: { currentTeamRole: TeamMemberRole; teamGroups: ({ organisationGroup: { type: $Enums.OrganisationGroupType; id: string; name: string | null; organisationRole: $Enums.OrganisationMemberRole; organisationId: string; }; } & { ...; })[]; ... 6 more ...; teamGlobalSettingsId: string; }[]; ... 15 more ...; organis...' is not assignable to type '{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 5 more ...; currentOrganisationRole: "ADMIN" | ... 1 more ... | "MEMBER"; }'.
The types of 'organisationClaim.flags' are incompatible between these types.
Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
../../packages/trpc/server/organisation-router/get-organisation.ts(14,10): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ teams: { id: number; name: string; url: string; createdAt: Date; avatarImageId: string | null; organisationId: string; teamGlobalSettingsId: string; }[]; subscription: { id: number; status: SubscriptionStatus; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 14 more ...; organisationAuthentication...' is not assignable to type 'MaybePromise<{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }>'.
Type 'Promise<{ teams: { id: number; name: string; url: string; createdAt: Date; avatarImageId: string | null; organisationId: string; teamGlobalSettingsId: string; }[]; subscription: { id: number; status: SubscriptionStatus; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 14 more ...; organisationAuthentication...' is not assignable to type 'Promise<{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }>'.
Type '{ teams: { id: number; name: string; url: string; createdAt: Date; avatarImageId: string | null; organisationId: string; teamGlobalSettingsId: string; }[]; subscription: { id: number; status: $Enums.SubscriptionStatus; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 14 more ...; organisationAuthenticationP...' is not assignable to type '{ type: "PERSONAL" | "ORGANISATION"; id: string; name: string; url: string; createdAt: Date; updatedAt: Date; subscription: { id: number; status: "ACTIVE" | "PAST_DUE" | "INACTIVE"; ... 7 more ...; cancelAtPeriodEnd: boolean; } | null; ... 6 more ...; teams: { ...; }[]; }'.
The types of 'organisationClaim.flags' are incompatible between these types.
Type 'JsonValue' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
Type 'null' is not assignable to type '{ allowCustomBranding?: boolean | undefined; hidePoweredBy?: boolean | undefined; unlimitedDocuments?: boolean | undefined; emailDomains?: boolean | undefined; embedAuthoring?: boolean | undefined; ... 5 more ...; allowEnvelopes?: boolean | undefined; }'.
../../packages/trpc/server/recipient-router/router.ts(65,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: SendStatus; }>' is not assignable to type 'MaybePromise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: SendStatus; }>' is not assignable to type 'Promise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 1...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/recipient-router/router.ts(174,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }>' is not assignable to type 'MaybePromise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }>' is not assignable to type 'Promise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 1...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/recipient-router/router.ts(213,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ recipients: { fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]; }>' is not assignable to type 'MaybePromise<{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...'.
Type 'Promise<{ recipients: { fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]; }>' is not assignable to type 'Promise<{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...; ...'.
Type '{ recipients: { fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }[]; }' is not assignable to type '{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...; authOpti...'.
Types of property 'recipients' are incompatible.
Type '{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/recipient-router/router.ts(320,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: SendStatus; }>' is not assignable to type 'MaybePromise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: SendStatus; }>' is not assignable to type 'Promise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 1...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 17 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/recipient-router/router.ts(429,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }>' is not assignable to type 'MaybePromise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ...'.
Type 'Promise<{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }>' is not assignable to type 'Promise<{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 1...'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/recipient-router/router.ts(468,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ recipients: { fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]; }>' is not assignable to type 'MaybePromise<{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...'.
Type 'Promise<{ recipients: { fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]; }>' is not assignable to type 'Promise<{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...; ...'.
Type '{ recipients: { fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }[]; }' is not assignable to type '{ recipients: { id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | ... 4 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ...; authOpti...'.
Types of property 'recipients' are incompatible.
Type '{ fields: { documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: SendStatus; }[]' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Type '{ fields: { documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; ... 10 more ...; inserted: boolean; }[]; ... 16 more ...; sendStatus: $Enums.SendStatus; }' is not assignable to type '{ id: number; name: string; token: string; email: string; signingOrder: number | null; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 11 more ....'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/template-router/router.ts(74,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ data: { id: number; envelopeId: string; type: TemplateType; visibility: DocumentVisibility; externalId: string | null; title: string; userId: number; ... 12 more ...; directLink: { ...; } | null; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }>' is not assignable to type 'MaybePromise<{ data: { type: "PUBLIC" | "PRIVATE"; id: number; team: { id: number; url: string; } | null; createdAt: Date; updatedAt: Date; userId: number; fields: { type: "EMAIL" | "SIGNATURE" | ... 8 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 13 more ...; tem...'.
Type 'Promise<{ data: { id: number; envelopeId: string; type: TemplateType; visibility: DocumentVisibility; externalId: string | null; title: string; userId: number; ... 12 more ...; directLink: { ...; } | null; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }>' is not assignable to type 'Promise<{ data: { type: "PUBLIC" | "PRIVATE"; id: number; team: { id: number; url: string; } | null; createdAt: Date; updatedAt: Date; userId: number; fields: { type: "EMAIL" | "SIGNATURE" | ... 8 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 13 more ...; template...'.
Type '{ data: { id: number; envelopeId: string; type: $Enums.TemplateType; visibility: $Enums.DocumentVisibility; externalId: string | null; title: string; userId: number; teamId: number; ... 11 more ...; directLink: { ...; } | null; }[]; count: number; currentPage: number; perPage: number; totalPages: number; }' is not assignable to type '{ data: { type: "PUBLIC" | "PRIVATE"; id: number; team: { id: number; url: string; } | null; createdAt: Date; updatedAt: Date; userId: number; fields: { type: "EMAIL" | "SIGNATURE" | ... 8 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 13 more ...; templateDocument...'.
Types of property 'data' are incompatible.
Type '{ id: number; envelopeId: string; type: TemplateType; visibility: DocumentVisibility; externalId: string | null; title: string; userId: number; teamId: number; ... 11 more ...; directLink: { ...; } | null; }[]' is not assignable to type '{ type: "PUBLIC" | "PRIVATE"; id: number; team: { id: number; url: string; } | null; createdAt: Date; updatedAt: Date; userId: number; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | ... 7 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 13 more ...; templ...'.
Type '{ id: number; envelopeId: string; type: $Enums.TemplateType; visibility: $Enums.DocumentVisibility; externalId: string | null; title: string; userId: number; teamId: number; ... 11 more ...; directLink: { ...; } | null; }' is not assignable to type '{ type: "PUBLIC" | "PRIVATE"; id: number; team: { id: number; url: string; } | null; createdAt: Date; updatedAt: Date; userId: number; fields: { type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | ... 7 more ... | "DROPDOWN"; ... 14 more ...; templateId?: number | ... 1 more ... | undefined; }[]; ... 13 more ...; templ...'.
Types of property 'fields' are incompatible.
Type '{ documentId: number | null; templateId: number | null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; ... 7 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number | null; templateId: number | null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; ... 9 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/template-router/router.ts(137,12): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ envelopeId: string; type: TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string | undefined;...'.
Type 'Promise<{ envelopeId: string; type: TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string | undefined; }>'.
Type '{ envelopeId: string; type: $Enums.TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }' is not assignable to type '{ type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string | undefined; }'.
Types of property 'fields' are incompatible.
Type '{ documentId: null; templateId: number; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: null; templateId: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/template-router/router.ts(253,15): error TS2345: Argument of type '({ input, ctx }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ template: { envelopeId: string; type: TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; uploadUrl: string; }>' is not assignable to type 'MaybePromise<{ template: { type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string ...'.
Type 'Promise<{ template: { envelopeId: string; type: TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; uploadUrl: string; }>' is not assignable to type 'Promise<{ template: { type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string | und...'.
Type '{ template: { envelopeId: string; type: $Enums.TemplateType; templateDocumentDataId: string; templateDocumentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 30 more ...; documentMetaId: string; }; uploadUrl: string; }' is not assignable to type '{ template: { type: "PUBLIC" | "PRIVATE"; id: number; createdAt: Date; updatedAt: Date; userId: number; user: { id: number; name: string | null; email: string; }; folder: { type: "DOCUMENT" | "TEMPLATE"; ... 8 more ...; parentId: string | null; } | null; ... 15 more ...; templateDocumentDataId?: string | undefined; ...'.
The types of 'template.fields' are incompatible between these types.
Type '{ documentId: null; templateId: number; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: null; templateId: number; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/trpc/server/template-router/router.ts(453,15): error TS2345: Argument of type '({ ctx, input }: ProcedureResolverOptions<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "ap...' is not assignable to parameter of type 'ProcedureResolver<TrpcContext, TrpcRouteMeta, { user: { id: number; name: string | null; email: string; disabled: boolean; }; session: null; metadata: { auditUser: { id: null; email: null; name: string; } | { ...; }; auth: "api"; requestMetadata: { ...; }; source: "app" | ... 1 more ... | "apiV2"; }; teamId: number;...'.
Type 'Promise<{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; id: number; ... 31 more ...; documentMetaId: string; }>' is not assignable to type 'MaybePromise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined;...'.
Type 'Promise<{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: DocumentDataType; id: string; initialData: string; }; id: number; ... 31 more ...; documentMetaId: string; }>' is not assignable to type 'Promise<{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }>'.
Type '{ envelopeId: string; internalVersion: number; documentData: { envelopeItemId: string; data: string; type: $Enums.DocumentDataType; id: string; initialData: string; }; ... 32 more ...; documentMetaId: string; }' is not assignable to type '{ id: number; source: "DOCUMENT" | "TEMPLATE" | "TEMPLATE_DIRECT_LINK"; status: "DRAFT" | "PENDING" | "COMPLETED" | "REJECTED"; documentMeta: { id: string; language: string; message: string | null; ... 14 more ...; documentId?: number | undefined; }; ... 20 more ...; documentDataId?: string | undefined; }'.
Types of property 'fields' are incompatible.
Type '{ documentId: number; templateId: null; type: FieldType; id: number; fieldMeta: JsonValue; envelopeId: string; secondaryId: string; width: Decimal; height: Decimal; ... 6 more ...; inserted: boolean; }[]' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Type '{ documentId: number; templateId: null; type: $Enums.FieldType; id: number; fieldMeta: JsonValue | null; envelopeId: string; secondaryId: string; ... 8 more ...; inserted: boolean; }' is not assignable to type '{ type: "EMAIL" | "SIGNATURE" | "FREE_SIGNATURE" | "INITIALS" | "NAME" | "DATE" | "TEXT" | "NUMBER" | "RADIO" | "CHECKBOX" | "DROPDOWN"; id: number; fieldMeta: { type: "initials"; label?: string | undefined; ... 4 more ...; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null; ... 12 more ...; ...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 9 more ... | null'.
../../packages/ui/components/document/document-read-only-fields.tsx(181,29): error TS2322: Type 'DocumentField' is not assignable to type '{ inserted?: boolean | undefined; customText?: string | undefined; type: FieldType; fieldMeta?: { type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefi...'.
Types of property 'fieldMeta' are incompatible.
Type 'JsonValue' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 10 more ... | undefined'.
Type 'string' is not assignable to type '{ type: "initials"; label?: string | undefined; placeholder?: string | undefined; required?: boolean | undefined; readOnly?: boolean | undefined; fontSize?: number | undefined; textAlign?: "left" | ... 2 more ... | undefined; } | ... 10 more ... | undefined'.
../../packages/ui/components/document/envelope-recipient-field-tooltip.tsx(162,33): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
../../packages/ui/components/document/envelope-recipient-field-tooltip.tsx(169,32): error TS2339: Property 'readOnly' does not exist on type 'string | number | boolean | JsonObject | JsonArray'.
Property 'readOnly' does not exist on type 'string'.
npm error Lifecycle script `typecheck` failed with error:
npm error code 2
npm error path /Users/lucas/dev/documenso/apps/remix
npm error workspace @documenso/remix@2.0.14
npm error location /Users/lucas/dev/documenso/apps/remix
npm error command failed
npm error command sh -c react-router typegen && tsc
npm error Lifecycle script `build:app` failed with error:
npm error code 2
npm error path /Users/lucas/dev/documenso/apps/remix
npm error workspace @documenso/remix@2.0.14
npm error location /Users/lucas/dev/documenso/apps/remix
npm error command failed
npm error command sh -c npm run typecheck && cross-env NODE_ENV=production react-router build
npm error Lifecycle script `build` failed with error:
npm error code 2
npm error path /Users/lucas/dev/documenso/apps/remix
npm error workspace @documenso/remix@2.0.14
npm error location /Users/lucas/dev/documenso/apps/remix
npm error command failed
npm error command sh -c ./.bin/build.sh

View file

@ -0,0 +1,468 @@
import type { Page } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { OrganisationMemberRole, TeamMemberRole } from '@prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
import { generateDatabaseId } from '@documenso/lib/universal/id';
import { prisma } from '@documenso/prisma';
import { DocumentStatus } from '@documenso/prisma/client';
import {
seedCompletedDocument,
seedDocuments,
seedPendingDocument,
} from '@documenso/prisma/seed/documents';
import { seedOrganisationMembers } from '@documenso/prisma/seed/organisations';
import { seedTeam, seedTeamMember } from '@documenso/prisma/seed/teams';
import { seedUser } from '@documenso/prisma/seed/users';
import { apiSignin, apiSignout } from '../../fixtures/authentication';
const WEBAPP_BASE_URL = NEXT_PUBLIC_WEBAPP_URL();
test.describe.configure({
mode: 'parallel',
});
const trpcDocumentSearch = async (page: Page, query: string) => {
const inputParam = encodeURIComponent(JSON.stringify({ json: { query } }));
const url = `${WEBAPP_BASE_URL}/api/trpc/document.search?input=${inputParam}`;
const res = await page.context().request.get(url);
return {
res,
data: res.ok()
? // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
((await res.json()).result.data.json as Array<{
title: string;
path: string;
value: string;
}>)
: null,
};
};
// ─── Visibility ──────────────────────────────────────────────────────────────
test.describe('Document Search - Visibility', () => {
test('should respect team document visibility per role', async ({ page }) => {
const { user: owner, organisation, team } = await seedUser();
const [adminUser, managerUser, memberUser] = await seedOrganisationMembers({
organisationId: organisation.id,
members: [
{ organisationRole: OrganisationMemberRole.ADMIN },
{ organisationRole: OrganisationMemberRole.MEMBER },
{ organisationRole: OrganisationMemberRole.MEMBER },
],
});
const managerTeamGroup = await prisma.teamGroup.findFirstOrThrow({
where: { teamId: team.id, teamRole: TeamMemberRole.MANAGER },
include: { organisationGroup: true },
});
const managerOrganisationMember = await prisma.organisationMember.findFirstOrThrow({
where: { organisationId: organisation.id, userId: managerUser.id },
});
await prisma.organisationGroupMember.create({
data: {
id: generateDatabaseId('group_member'),
groupId: managerTeamGroup.organisationGroupId,
organisationMemberId: managerOrganisationMember.id,
},
});
await seedDocuments([
{
sender: owner,
teamId: team.id,
recipients: [],
type: DocumentStatus.COMPLETED,
documentOptions: {
visibility: 'EVERYONE',
title: 'Searchable Document for Everyone',
},
},
{
sender: owner,
teamId: team.id,
recipients: [],
type: DocumentStatus.COMPLETED,
documentOptions: {
visibility: 'MANAGER_AND_ABOVE',
title: 'Searchable Document for Managers',
},
},
{
sender: owner,
teamId: team.id,
recipients: [],
type: DocumentStatus.COMPLETED,
documentOptions: {
visibility: 'ADMIN',
title: 'Searchable Document for Admins',
},
},
]);
const testCases = [
{ user: adminUser, visibleDocs: 3 },
{ user: managerUser, visibleDocs: 2 },
{ user: memberUser, visibleDocs: 1 },
];
for (const { user, visibleDocs } of testCases) {
await apiSignin({ page, email: user.email });
const { data } = await trpcDocumentSearch(page, 'Searchable Document');
expect(data).not.toBeNull();
expect(data).toHaveLength(visibleDocs);
await apiSignout({ page });
}
});
test('should respect visibility when searching by recipient email', async ({ page }) => {
const { team, owner } = await seedTeam();
const adminUser = await seedTeamMember({ teamId: team.id, role: TeamMemberRole.ADMIN });
const memberUser = await seedTeamMember({ teamId: team.id, role: TeamMemberRole.MEMBER });
const { user: uniqueRecipient } = await seedUser();
await seedDocuments([
{
sender: owner,
recipients: [uniqueRecipient],
type: DocumentStatus.COMPLETED,
teamId: team.id,
documentOptions: {
visibility: 'ADMIN',
title: 'Admin Document for Unique Recipient',
},
},
]);
// Admin can find the ADMIN-visibility document by recipient email.
await apiSignin({ page, email: adminUser.email });
const { data: adminData } = await trpcDocumentSearch(page, uniqueRecipient.email);
expect(adminData).not.toBeNull();
expect(adminData).toHaveLength(1);
expect(adminData![0].title).toBe('Admin Document for Unique Recipient');
await apiSignout({ page });
// Member cannot find the ADMIN-visibility document by recipient email.
await apiSignin({ page, email: memberUser.email });
const { data: memberData } = await trpcDocumentSearch(page, uniqueRecipient.email);
expect(memberData).not.toBeNull();
expect(memberData).toHaveLength(0);
await apiSignout({ page });
});
});
// ─── Cross-Team Isolation ────────────────────────────────────────────────────
test.describe('Document Search - Cross-Team Isolation', () => {
test('should not reveal documents from other teams', async ({ page }) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const { team: teamB, owner: ownerB } = await seedTeam();
const memberA = await seedTeamMember({ teamId: teamA.id, role: TeamMemberRole.MEMBER });
await seedDocuments([
{
sender: ownerA,
teamId: teamA.id,
recipients: [],
type: DocumentStatus.COMPLETED,
documentOptions: {
visibility: 'EVERYONE',
title: 'Unique Team A Document',
},
},
{
sender: ownerB,
teamId: teamB.id,
recipients: [],
type: DocumentStatus.COMPLETED,
documentOptions: {
visibility: 'EVERYONE',
title: 'Unique Team B Document',
},
},
]);
await apiSignin({ page, email: memberA.email });
const { data } = await trpcDocumentSearch(page, 'Unique');
expect(data).not.toBeNull();
const titles = data!.map((d) => d.title);
expect(titles).toContain('Unique Team A Document');
expect(titles).not.toContain('Unique Team B Document');
await apiSignout({ page });
});
test('should not cross team boundaries when searching SQL wildcard "%"', async ({ page }) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const { team: teamB, owner: ownerB } = await seedTeam();
await seedDocuments([
{
sender: ownerA,
teamId: teamA.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: { title: 'Wildcard Doc A' },
},
]);
await seedDocuments([
{
sender: ownerB,
teamId: teamB.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: { title: 'Wildcard Doc B' },
},
]);
await apiSignin({ page, email: ownerA.email });
const { data } = await trpcDocumentSearch(page, '%');
expect(data).not.toBeNull();
expect(data!.map((d) => d.title)).not.toContain('Wildcard Doc B');
await apiSignout({ page });
});
test('should not cross team boundaries when searching SQL wildcard "_"', async ({ page }) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const { team: teamB, owner: ownerB } = await seedTeam();
await seedDocuments([
{
sender: ownerA,
teamId: teamA.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: { title: 'Underscore A' },
},
]);
await seedDocuments([
{
sender: ownerB,
teamId: teamB.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: { title: 'Underscore B' },
},
]);
await apiSignin({ page, email: ownerA.email });
const { data } = await trpcDocumentSearch(page, '_');
expect(data).not.toBeNull();
expect(data!.map((d) => d.title)).not.toContain('Underscore B');
await apiSignout({ page });
});
});
// ─── Recipient Search ────────────────────────────────────────────────────────
test.describe('Document Search - Recipient', () => {
test('should find documents where user is a recipient', async ({ page }) => {
const { team: senderTeam, owner: sender } = await seedTeam();
const { user: recipient } = await seedUser();
await seedPendingDocument(sender, senderTeam.id, [recipient], {
createDocumentOptions: { title: 'Recipient Search Test Doc' },
});
await apiSignin({ page, email: recipient.email });
const { data } = await trpcDocumentSearch(page, 'Recipient Search Test');
expect(data).not.toBeNull();
expect(data!.length).toBeGreaterThanOrEqual(1);
const result = data!.find((d) => d.title === 'Recipient Search Test Doc');
expect(result).toBeDefined();
expect(result!.path).toMatch(/^\/sign\/.+/);
await apiSignout({ page });
});
});
// ─── Token Masking ───────────────────────────────────────────────────────────
test.describe('Document Search - Token Masking', () => {
test('should not expose signing token in value field', async ({ page }) => {
const { team, owner } = await seedTeam();
const { user: recipient } = await seedUser();
const doc = await seedPendingDocument(owner, team.id, [recipient], {
createDocumentOptions: { title: 'Token Leakage Test Document' },
});
const recipientRecord = await prisma.recipient.findFirstOrThrow({
where: { envelopeId: doc.id, email: recipient.email },
select: { token: true },
});
const signingToken = recipientRecord.token;
// Owner should see the doc but not any signing token.
await apiSignin({ page, email: owner.email });
const { data } = await trpcDocumentSearch(page, 'Token Leakage Test');
expect(data).not.toBeNull();
expect(data!.length).toBeGreaterThanOrEqual(1);
const result = data!.find((d) => d.title === 'Token Leakage Test Document');
expect(result).toBeDefined();
expect(result!.value).not.toContain(signingToken);
expect(result!.path).not.toContain('/sign/');
await apiSignout({ page });
// Recipient should get their own /sign/ path but token still hidden from value.
await apiSignin({ page, email: recipient.email });
const { data: recipientData } = await trpcDocumentSearch(page, 'Token Leakage Test');
expect(recipientData).not.toBeNull();
expect(recipientData!.length).toBeGreaterThanOrEqual(1);
const recipientResult = recipientData!.find((d) => d.title === 'Token Leakage Test Document');
expect(recipientResult).toBeDefined();
expect(recipientResult!.path).toBe(`/sign/${signingToken}`);
expect(recipientResult!.value).not.toContain(signingToken);
await apiSignout({ page });
});
test('should not expose other recipients signing tokens to the owner', async ({ page }) => {
const { team, owner } = await seedTeam();
const { user: recipientA } = await seedUser();
const { user: recipientB } = await seedUser();
const doc = await seedPendingDocument(owner, team.id, [recipientA, recipientB], {
createDocumentOptions: { title: 'Multi Recipient Token Test' },
});
const recipients = await prisma.recipient.findMany({
where: { envelopeId: doc.id },
select: { token: true, email: true },
});
await apiSignin({ page, email: owner.email });
const { data } = await trpcDocumentSearch(page, 'Multi Recipient Token');
expect(data).not.toBeNull();
const result = data!.find((d) => d.title === 'Multi Recipient Token Test');
expect(result).toBeDefined();
for (const r of recipients) {
expect(result!.value).not.toContain(r.token);
expect(result!.path).not.toContain(r.token);
}
await apiSignout({ page });
});
});
// ─── Filtering ───────────────────────────────────────────────────────────────
test.describe('Document Search - Filtering', () => {
test('should exclude soft-deleted documents', async ({ page }) => {
const { team, owner } = await seedTeam();
await seedCompletedDocument(owner, team.id, [], {
createDocumentOptions: { title: 'Active Deletable Document' },
});
const deletedDoc = await seedCompletedDocument(owner, team.id, [], {
createDocumentOptions: { title: 'Deleted Deletable Document' },
});
await prisma.envelope.update({
where: { id: deletedDoc.id },
data: { deletedAt: new Date() },
});
await apiSignin({ page, email: owner.email });
const { data } = await trpcDocumentSearch(page, 'Deletable Document');
expect(data).not.toBeNull();
expect(data).toHaveLength(1);
expect(data![0].title).toBe('Active Deletable Document');
await apiSignout({ page });
});
test('should find documents by externalId', async ({ page }) => {
const { team, owner } = await seedTeam();
await seedDocuments([
{
sender: owner,
teamId: team.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: {
title: 'ExternalId Test Doc',
externalId: 'ext-unique-abc-123',
},
},
{
sender: owner,
teamId: team.id,
recipients: [],
type: DocumentStatus.DRAFT,
documentOptions: {
title: 'Other Test Doc',
externalId: 'ext-other-xyz',
},
},
]);
await apiSignin({ page, email: owner.email });
const { data } = await trpcDocumentSearch(page, 'ext-unique-abc');
expect(data).not.toBeNull();
expect(data).toHaveLength(1);
expect(data![0].title).toBe('ExternalId Test Doc');
await apiSignout({ page });
});
});
// ─── Authentication ──────────────────────────────────────────────────────────
test.describe('Document Search - Authentication', () => {
test('should reject unauthenticated requests', async ({ page }) => {
const { res } = await trpcDocumentSearch(page, 'anything');
expect(res.ok()).toBeFalsy();
expect(res.status()).toBe(401);
});
});

View file

@ -0,0 +1,259 @@
import type { Page } from '@playwright/test';
import { expect, test } from '@playwright/test';
import { OrganisationMemberRole, TeamMemberRole } from '@prisma/client';
import { NEXT_PUBLIC_WEBAPP_URL } from '@documenso/lib/constants/app';
import { generateDatabaseId } from '@documenso/lib/universal/id';
import { prisma } from '@documenso/prisma';
import { seedOrganisationMembers } from '@documenso/prisma/seed/organisations';
import { seedTeam, seedTeamMember } from '@documenso/prisma/seed/teams';
import { seedBlankTemplate } from '@documenso/prisma/seed/templates';
import { seedUser } from '@documenso/prisma/seed/users';
import { apiSignin, apiSignout } from '../../fixtures/authentication';
const WEBAPP_BASE_URL = NEXT_PUBLIC_WEBAPP_URL();
test.describe.configure({
mode: 'parallel',
});
const trpcTemplateSearch = async (page: Page, query: string) => {
const inputParam = encodeURIComponent(JSON.stringify({ json: { query } }));
const url = `${WEBAPP_BASE_URL}/api/trpc/template.search?input=${inputParam}`;
const res = await page.context().request.get(url);
return {
res,
data: res.ok()
? // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
((await res.json()).result.data.json as Array<{
title: string;
path: string;
value: string;
}>)
: null,
};
};
// ─── Visibility ──────────────────────────────────────────────────────────────
test.describe('Template Search - Visibility', () => {
test('should respect team template visibility per role', async ({ page }) => {
const { user: owner, organisation, team } = await seedUser();
const [adminUser, managerUser, memberUser] = await seedOrganisationMembers({
organisationId: organisation.id,
members: [
{ organisationRole: OrganisationMemberRole.ADMIN },
{ organisationRole: OrganisationMemberRole.MEMBER },
{ organisationRole: OrganisationMemberRole.MEMBER },
],
});
const managerTeamGroup = await prisma.teamGroup.findFirstOrThrow({
where: { teamId: team.id, teamRole: TeamMemberRole.MANAGER },
include: { organisationGroup: true },
});
const managerOrganisationMember = await prisma.organisationMember.findFirstOrThrow({
where: { organisationId: organisation.id, userId: managerUser.id },
});
await prisma.organisationGroupMember.create({
data: {
id: generateDatabaseId('group_member'),
groupId: managerTeamGroup.organisationGroupId,
organisationMemberId: managerOrganisationMember.id,
},
});
await seedBlankTemplate(owner, team.id, {
createTemplateOptions: {
visibility: 'EVERYONE',
title: 'Searchable Template for Everyone',
},
});
await seedBlankTemplate(owner, team.id, {
createTemplateOptions: {
visibility: 'MANAGER_AND_ABOVE',
title: 'Searchable Template for Managers',
},
});
await seedBlankTemplate(owner, team.id, {
createTemplateOptions: {
visibility: 'ADMIN',
title: 'Searchable Template for Admins',
},
});
const testCases = [
{ user: adminUser, visibleTemplates: 3 },
{ user: managerUser, visibleTemplates: 2 },
{ user: memberUser, visibleTemplates: 1 },
];
for (const { user, visibleTemplates } of testCases) {
await apiSignin({ page, email: user.email });
const { data } = await trpcTemplateSearch(page, 'Searchable Template');
expect(data).not.toBeNull();
expect(data).toHaveLength(visibleTemplates);
await apiSignout({ page });
}
});
});
// ─── Cross-Team Isolation ────────────────────────────────────────────────────
test.describe('Template Search - Cross-Team Isolation', () => {
test('should not reveal templates from other teams', async ({ page }) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const { team: teamB, owner: ownerB } = await seedTeam();
const memberA = await seedTeamMember({ teamId: teamA.id, role: TeamMemberRole.MEMBER });
await seedBlankTemplate(ownerA, teamA.id, {
createTemplateOptions: {
visibility: 'EVERYONE',
title: 'Unique Team A Template',
},
});
await seedBlankTemplate(ownerB, teamB.id, {
createTemplateOptions: {
visibility: 'EVERYONE',
title: 'Unique Team B Template',
},
});
await apiSignin({ page, email: memberA.email });
const { data } = await trpcTemplateSearch(page, 'Unique');
expect(data).not.toBeNull();
const titles = data!.map((d) => d.title);
expect(titles).toContain('Unique Team A Template');
expect(titles).not.toContain('Unique Team B Template');
await apiSignout({ page });
});
test('should not cross team boundaries when searching SQL wildcard "%"', async ({ page }) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const { team: teamB, owner: ownerB } = await seedTeam();
await seedBlankTemplate(ownerA, teamA.id, {
createTemplateOptions: { title: 'Wildcard Tpl A' },
});
await seedBlankTemplate(ownerB, teamB.id, {
createTemplateOptions: { title: 'Wildcard Tpl B' },
});
await apiSignin({ page, email: ownerA.email });
const { data } = await trpcTemplateSearch(page, '%');
expect(data).not.toBeNull();
expect(data!.map((d) => d.title)).not.toContain('Wildcard Tpl B');
await apiSignout({ page });
});
});
// ─── Recipient Email Search ──────────────────────────────────────────────────
test.describe('Template Search - Recipient Email', () => {
test('should find templates by recipient email within team but not cross-team', async ({
page,
}) => {
const { team: teamA, owner: ownerA } = await seedTeam();
const adminUserA = await seedTeamMember({ teamId: teamA.id, role: TeamMemberRole.ADMIN });
const { team: teamB, owner: ownerB } = await seedTeam();
const { user: uniqueRecipient } = await seedUser();
const template = await seedBlankTemplate(ownerA, teamA.id, {
createTemplateOptions: { title: 'Template with Unique Recipient' },
});
await prisma.recipient.create({
data: {
email: uniqueRecipient.email,
name: uniqueRecipient.name ?? '',
token: Math.random().toString().slice(2, 7),
envelopeId: template.id,
},
});
// Team admin can find the template by recipient email.
await apiSignin({ page, email: adminUserA.email });
const { data: adminData } = await trpcTemplateSearch(page, uniqueRecipient.email);
expect(adminData).not.toBeNull();
expect(adminData).toHaveLength(1);
expect(adminData![0].title).toBe('Template with Unique Recipient');
await apiSignout({ page });
// Owner of a different team cannot find it.
await apiSignin({ page, email: ownerB.email });
const { data: otherTeamData } = await trpcTemplateSearch(page, uniqueRecipient.email);
expect(otherTeamData).not.toBeNull();
expect(otherTeamData).toHaveLength(0);
await apiSignout({ page });
});
});
// ─── Filtering ───────────────────────────────────────────────────────────────
test.describe('Template Search - Filtering', () => {
test('should exclude soft-deleted templates', async ({ page }) => {
const { team, owner } = await seedTeam();
await seedBlankTemplate(owner, team.id, {
createTemplateOptions: { title: 'Active Findable Template' },
});
const deletedTemplate = await seedBlankTemplate(owner, team.id, {
createTemplateOptions: { title: 'Deleted Findable Template' },
});
await prisma.envelope.update({
where: { id: deletedTemplate.id },
data: { deletedAt: new Date() },
});
await apiSignin({ page, email: owner.email });
const { data } = await trpcTemplateSearch(page, 'Findable Template');
expect(data).not.toBeNull();
expect(data).toHaveLength(1);
expect(data![0].title).toBe('Active Findable Template');
await apiSignout({ page });
});
});
// ─── Authentication ──────────────────────────────────────────────────────────
test.describe('Template Search - Authentication', () => {
test('should reject unauthenticated requests', async ({ page }) => {
const { res } = await trpcTemplateSearch(page, 'anything');
expect(res.ok()).toBeFalsy();
expect(res.status()).toBe(401);
});
});

View file

@ -44,7 +44,7 @@ test('[COMMAND_MENU]: should be able to search by recipient', async ({ page }) =
await apiSignin({
page,
email: recipient.email,
email: user.email,
});
await page.keyboard.press('Meta+K');

View file

@ -1,16 +1,12 @@
import { DocumentStatus, EnvelopeType } from '@prisma/client';
import type { Envelope, Recipient, User } from '@prisma/client';
import { DocumentVisibility, TeamMemberRole } from '@prisma/client';
import type { Prisma } from '@prisma/client';
import { DocumentStatus, DocumentVisibility, EnvelopeType, TeamMemberRole } from '@prisma/client';
import { match } from 'ts-pattern';
import {
buildTeamWhereQuery,
formatDocumentsPath,
getHighestTeamRoleInGroup,
} from '@documenso/lib/utils/teams';
import { formatDocumentsPath, getHighestTeamRoleInGroup } from '@documenso/lib/utils/teams';
import { prisma } from '@documenso/prisma';
import { mapSecondaryIdToDocumentId } from '../../utils/envelope';
import { getUserTeamGroups } from '../team/get-user-team-groups';
export type SearchDocumentsWithKeywordOptions = {
query: string;
@ -23,105 +19,83 @@ export const searchDocumentsWithKeyword = async ({
userId,
limit = 20,
}: SearchDocumentsWithKeywordOptions) => {
const user = await prisma.user.findFirstOrThrow({
where: {
id: userId,
if (!query.trim()) {
return [];
}
const [user, teamGroupsByTeamId] = await Promise.all([
prisma.user.findFirstOrThrow({
where: {
id: userId,
},
}),
getUserTeamGroups({ userId }),
]);
const teamIds = [...teamGroupsByTeamId.keys()];
const filters: Prisma.EnvelopeWhereInput[] = [
// Documents owned by the user matching title, externalId, or recipient email.
{
userId,
deletedAt: null,
OR: [
{ title: { contains: query, mode: 'insensitive' } },
{ externalId: { contains: query, mode: 'insensitive' } },
{
recipients: {
some: { email: { contains: query, mode: 'insensitive' } },
},
},
],
},
});
// Documents where the user is a recipient (completed or pending).
{
status: { in: [DocumentStatus.COMPLETED, DocumentStatus.PENDING] },
recipients: { some: { email: user.email } },
title: { contains: query, mode: 'insensitive' },
deletedAt: null,
},
];
// Team documents the user has access to.
if (teamIds.length > 0) {
filters.push({
teamId: { in: teamIds },
deletedAt: null,
OR: [
{ title: { contains: query, mode: 'insensitive' } },
{ externalId: { contains: query, mode: 'insensitive' } },
{
recipients: {
some: { email: { contains: query, mode: 'insensitive' } },
},
},
],
});
}
const envelopes = await prisma.envelope.findMany({
where: {
type: EnvelopeType.DOCUMENT,
OR: [
{
title: {
contains: query,
mode: 'insensitive',
},
userId: userId,
deletedAt: null,
},
{
externalId: {
contains: query,
mode: 'insensitive',
},
userId: userId,
deletedAt: null,
},
{
recipients: {
some: {
email: {
contains: query,
mode: 'insensitive',
},
},
},
userId: userId,
deletedAt: null,
},
{
status: DocumentStatus.COMPLETED,
recipients: {
some: {
email: user.email,
},
},
title: {
contains: query,
mode: 'insensitive',
},
},
{
status: DocumentStatus.PENDING,
recipients: {
some: {
email: user.email,
},
},
title: {
contains: query,
mode: 'insensitive',
},
deletedAt: null,
},
{
title: {
contains: query,
mode: 'insensitive',
},
team: buildTeamWhereQuery({ teamId: undefined, userId }),
deletedAt: null,
},
{
externalId: {
contains: query,
mode: 'insensitive',
},
team: buildTeamWhereQuery({ teamId: undefined, userId }),
deletedAt: null,
},
],
OR: filters,
},
include: {
recipients: true,
select: {
id: true,
userId: true,
teamId: true,
title: true,
secondaryId: true,
visibility: true,
recipients: {
select: {
email: true,
token: true,
},
},
team: {
select: {
url: true,
teamGroups: {
where: {
organisationGroup: {
organisationGroupMembers: {
some: {
organisationMember: {
userId,
},
},
},
},
},
},
},
},
},
@ -129,29 +103,24 @@ export const searchDocumentsWithKeyword = async ({
orderBy: {
createdAt: 'desc',
},
take: limit,
// Over-fetch to compensate for post-query visibility filtering on team documents.
take: limit * 3,
});
const isOwner = (envelope: Envelope, user: User) => envelope.userId === user.id;
const getSigningLink = (recipients: Recipient[], user: User) =>
`/sign/${recipients.find((r) => r.email === user.email)?.token}`;
const maskedDocuments = envelopes
const results = envelopes
.filter((envelope) => {
if (!envelope.teamId || isOwner(envelope, user)) {
if (!envelope.teamId || envelope.userId === user.id) {
return true;
}
const teamMemberRole = getHighestTeamRoleInGroup(
envelope.team.teamGroups.filter((tg) => tg.teamId === envelope.teamId),
);
const teamGroups = teamGroupsByTeamId.get(envelope.teamId) ?? [];
const teamMemberRole = getHighestTeamRoleInGroup(teamGroups);
if (!teamMemberRole) {
return false;
}
const canAccessDocument = match([envelope.visibility, teamMemberRole])
return match([envelope.visibility, teamMemberRole])
.with([DocumentVisibility.EVERYONE, TeamMemberRole.ADMIN], () => true)
.with([DocumentVisibility.EVERYONE, TeamMemberRole.MANAGER], () => true)
.with([DocumentVisibility.EVERYONE, TeamMemberRole.MEMBER], () => true)
@ -159,34 +128,29 @@ export const searchDocumentsWithKeyword = async ({
.with([DocumentVisibility.MANAGER_AND_ABOVE, TeamMemberRole.MANAGER], () => true)
.with([DocumentVisibility.ADMIN, TeamMemberRole.ADMIN], () => true)
.otherwise(() => false);
return canAccessDocument;
})
.slice(0, limit)
.map((envelope) => {
const { recipients, ...documentWithoutRecipient } = envelope;
let documentPath;
const legacyDocumentId = mapSecondaryIdToDocumentId(envelope.secondaryId);
if (isOwner(envelope, user)) {
documentPath = `${formatDocumentsPath(envelope.team.url)}/${legacyDocumentId}`;
} else if (envelope.teamId && envelope.team.teamGroups.length > 0) {
documentPath = `${formatDocumentsPath(envelope.team.url)}/${legacyDocumentId}`;
let path: string;
if (
envelope.userId === user.id ||
(envelope.teamId && teamGroupsByTeamId.has(envelope.teamId))
) {
path = `${formatDocumentsPath(envelope.team.url)}/${legacyDocumentId}`;
} else {
documentPath = getSigningLink(recipients, user);
const signingToken = envelope.recipients.find((r) => r.email === user.email)?.token;
path = `/sign/${signingToken}`;
}
return {
...documentWithoutRecipient,
team: {
id: envelope.teamId,
url: envelope.team.url,
},
path: documentPath,
title: envelope.title,
path,
value: [envelope.id, envelope.title, ...envelope.recipients.map((r) => r.email)].join(' '),
};
});
return maskedDocuments;
return results;
};

View file

@ -0,0 +1,46 @@
import type { TeamGroup } from '@prisma/client';
import { prisma } from '@documenso/prisma';
export type GetUserTeamIdsOptions = {
userId: number;
};
/**
* Pre-resolve all team groups a user has access to via their organisation group memberships,
* keyed by team ID.
*
* This is significantly cheaper than joining team groups inline in a Prisma `findMany`
* because it avoids deep EXISTS subqueries and redundant LEFT JOINs per row.
*/
export const getUserTeamGroups = async ({
userId,
}: GetUserTeamIdsOptions): Promise<Map<number, TeamGroup[]>> => {
const teamGroups = await prisma.teamGroup.findMany({
where: {
organisationGroup: {
organisationGroupMembers: {
some: {
organisationMember: {
userId,
},
},
},
},
},
});
const map = new Map<number, TeamGroup[]>();
for (const tg of teamGroups) {
const existing = map.get(tg.teamId);
if (existing) {
existing.push(tg);
} else {
map.set(tg.teamId, [tg]);
}
}
return map;
};

View file

@ -0,0 +1,135 @@
import type { Prisma } from '@prisma/client';
import { DocumentVisibility, EnvelopeType, TeamMemberRole } from '@prisma/client';
import { match } from 'ts-pattern';
import { formatTemplatesPath, getHighestTeamRoleInGroup } from '@documenso/lib/utils/teams';
import { prisma } from '@documenso/prisma';
import { mapSecondaryIdToTemplateId } from '../../utils/envelope';
import { getUserTeamGroups } from '../team/get-user-team-groups';
export type SearchTemplatesWithKeywordOptions = {
query: string;
userId: number;
limit?: number;
};
export const searchTemplatesWithKeyword = async ({
query,
userId,
limit = 20,
}: SearchTemplatesWithKeywordOptions) => {
if (!query.trim()) {
return [];
}
const [user, teamGroupsByTeamId] = await Promise.all([
prisma.user.findFirstOrThrow({
where: {
id: userId,
},
}),
getUserTeamGroups({ userId }),
]);
const teamIds = [...teamGroupsByTeamId.keys()];
const filters: Prisma.EnvelopeWhereInput[] = [
// Templates owned by the user matching title or recipient email.
{
userId,
deletedAt: null,
OR: [
{ title: { contains: query, mode: 'insensitive' } },
{
recipients: {
some: { email: { contains: query, mode: 'insensitive' } },
},
},
],
},
];
// Team templates the user has access to.
if (teamIds.length > 0) {
filters.push({
teamId: { in: teamIds },
deletedAt: null,
OR: [
{ title: { contains: query, mode: 'insensitive' } },
{
recipients: {
some: { email: { contains: query, mode: 'insensitive' } },
},
},
],
});
}
const envelopes = await prisma.envelope.findMany({
where: {
type: EnvelopeType.TEMPLATE,
OR: filters,
},
select: {
id: true,
userId: true,
teamId: true,
title: true,
secondaryId: true,
visibility: true,
recipients: {
select: {
email: true,
},
},
team: {
select: {
url: true,
},
},
},
distinct: ['id'],
orderBy: {
createdAt: 'desc',
},
// Over-fetch to compensate for post-query visibility filtering on team templates.
take: limit * 3,
});
const results = envelopes
.filter((envelope) => {
if (!envelope.teamId || envelope.userId === user.id) {
return true;
}
const teamGroups = teamGroupsByTeamId.get(envelope.teamId) ?? [];
const teamMemberRole = getHighestTeamRoleInGroup(teamGroups);
if (!teamMemberRole) {
return false;
}
return match([envelope.visibility, teamMemberRole])
.with([DocumentVisibility.EVERYONE, TeamMemberRole.ADMIN], () => true)
.with([DocumentVisibility.EVERYONE, TeamMemberRole.MANAGER], () => true)
.with([DocumentVisibility.EVERYONE, TeamMemberRole.MEMBER], () => true)
.with([DocumentVisibility.MANAGER_AND_ABOVE, TeamMemberRole.ADMIN], () => true)
.with([DocumentVisibility.MANAGER_AND_ABOVE, TeamMemberRole.MANAGER], () => true)
.with([DocumentVisibility.ADMIN, TeamMemberRole.ADMIN], () => true)
.otherwise(() => false);
})
.slice(0, limit)
.map((envelope) => {
const legacyTemplateId = mapSecondaryIdToTemplateId(envelope.secondaryId);
const path = `${formatTemplatesPath(envelope.team.url)}/${legacyTemplateId}`;
return {
title: envelope.title,
path,
value: [envelope.id, envelope.title, ...envelope.recipients.map((r) => r.email)].join(' '),
};
});
return results;
};

View file

@ -0,0 +1,77 @@
import { nanoid } from 'nanoid';
import { prisma } from '..';
import { DocumentStatus } from '../client';
import { seedBlankDocument } from './documents';
import { seedUser } from './users';
const MEDIUM_ACCOUNT_EMAIL = 'medium-account@documenso.com';
const DOCUMENT_COUNT = 1000;
const STATUSES = [DocumentStatus.DRAFT, DocumentStatus.PENDING, DocumentStatus.COMPLETED];
export const seedDatabase = async () => {
const existingUser = await prisma.user.findFirst({
where: {
email: MEDIUM_ACCOUNT_EMAIL,
},
});
if (existingUser) {
return;
}
console.log(`[SEEDING]: Creating medium account with ${DOCUMENT_COUNT} documents...`);
const { user, team } = await seedUser({
name: 'Medium Account',
email: MEDIUM_ACCOUNT_EMAIL,
});
const recipientEmails = Array.from({ length: 20 }, (_, i) => `recipient-${i}@test.documenso.com`);
for (let i = 0; i < DOCUMENT_COUNT; i++) {
const status = STATUSES[i % STATUSES.length];
const document = await seedBlankDocument(user, team.id, {
key: `medium-${i}`,
createDocumentOptions: {
title: `[MEDIUM] Document ${i} - ${status}`,
status,
},
});
// Add 1-3 recipients per document.
const recipientCount = (i % 3) + 1;
for (let r = 0; r < recipientCount; r++) {
await prisma.recipient.create({
data: {
email: recipientEmails[(i + r) % recipientEmails.length],
name: `Recipient ${r}`,
token: nanoid(),
envelopeId: document.id,
},
});
}
// Also create some documents where the medium user is a recipient (not owner).
// Every 5th document, create an extra doc owned by a "ghost" sender with medium user as recipient.
if (i % 5 === 0) {
await prisma.recipient.create({
data: {
email: MEDIUM_ACCOUNT_EMAIL,
name: 'Medium Account',
token: nanoid(),
envelopeId: document.id,
},
});
}
if (i % 100 === 0) {
console.log(`[SEEDING]: Created ${i}/${DOCUMENT_COUNT} documents...`);
}
}
console.log(`[SEEDING]: Medium account seeded with ${DOCUMENT_COUNT} documents.`);
};

View file

@ -1,7 +1,7 @@
import { z } from 'zod';
export const ZSearchDocumentRequestSchema = z.object({
query: z.string(),
query: z.string().trim().min(1).max(1024),
});
export const ZSearchDocumentResponseSchema = z

View file

@ -55,6 +55,7 @@ import {
ZUpdateTemplateRequestSchema,
ZUpdateTemplateResponseSchema,
} from './schema';
import { searchTemplateRoute } from './search-template';
export const templateRouter = router({
/**
@ -160,6 +161,8 @@ export const templateRouter = router({
*/
getMany: getTemplatesByIdsRoute,
search: searchTemplateRoute,
/**
* Wait until RR7 so we can passthrough documents.
*

View file

@ -0,0 +1,21 @@
import { searchTemplatesWithKeyword } from '@documenso/lib/server-only/template/search-templates-with-keyword';
import { authenticatedProcedure } from '../trpc';
import {
ZSearchTemplateRequestSchema,
ZSearchTemplateResponseSchema,
} from './search-template.types';
export const searchTemplateRoute = authenticatedProcedure
.input(ZSearchTemplateRequestSchema)
.output(ZSearchTemplateResponseSchema)
.query(async ({ input, ctx }) => {
const { query } = input;
const templates = await searchTemplatesWithKeyword({
query,
userId: ctx.user.id,
});
return templates;
});

View file

@ -0,0 +1,16 @@
import { z } from 'zod';
export const ZSearchTemplateRequestSchema = z.object({
query: z.string().trim().min(1).max(1024),
});
export const ZSearchTemplateResponseSchema = z
.object({
title: z.string(),
path: z.string(),
value: z.string(),
})
.array();
export type TSearchTemplateRequest = z.infer<typeof ZSearchTemplateRequestSchema>;
export type TSearchTemplateResponse = z.infer<typeof ZSearchTemplateResponseSchema>;

View file

@ -7,7 +7,7 @@ import type { TrpcContext } from '../server/context';
// Parameters<NonNullable<Parameters<typeof trpcServer>[0]['onError']>>[0], // :-)
export const handleTrpcRouterError = (
{ error, ctx }: Pick<ErrorHandlerOptions<TrpcContext>, 'error' | 'path' | 'ctx'>,
{ error, ctx, path }: Pick<ErrorHandlerOptions<TrpcContext>, 'error' | 'path' | 'ctx'>,
_source: 'trpc' | 'apiV1' | 'apiV2',
) => {
const appError = AppError.parseError(error.cause || error);
@ -26,6 +26,7 @@ export const handleTrpcRouterError = (
const errorLogger = (ctx?.logger || logger).child({
status: 'error',
appError: AppError.toJSON(appError),
path,
});
// Only fully log the error on certain conditions since some errors are expected.