wip: what if user ids were strings instead of numbers

This commit is contained in:
Mythie
2025-01-03 16:23:35 +11:00
parent 18ca0cf3d6
commit b685190b1a
134 changed files with 775 additions and 246 deletions

View File

@ -6,7 +6,7 @@ import { TeamMemberInviteStatus } from '@documenso/prisma/client';
import { jobs } from '../../jobs/client';
export type AcceptTeamInvitationOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -4,7 +4,7 @@ import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '@documenso/lib/constants/teams
import { prisma } from '@documenso/prisma';
export type CreateTeamBillingPortalOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -5,7 +5,7 @@ import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
import { prisma } from '@documenso/prisma';
export type CreateTeamPendingCheckoutSession = {
userId: number;
userId: string;
pendingTeamId: number;
interval: 'monthly' | 'yearly';
};

View File

@ -19,7 +19,7 @@ import { renderEmailWithI18N } from '../../utils/render-email-with-i18n';
import { teamGlobalSettingsToBranding } from '../../utils/team-global-settings-to-branding';
export type CreateTeamEmailVerificationOptions = {
userId: number;
userId: string;
teamId: number;
data: {
email: string;

View File

@ -20,7 +20,7 @@ import { renderEmailWithI18N } from '../../utils/render-email-with-i18n';
import { teamGlobalSettingsToBranding } from '../../utils/team-global-settings-to-branding';
export type CreateTeamMemberInvitesOptions = {
userId: number;
userId: string;
userName: string;
teamId: number;
invitations: TCreateTeamMemberInvitesMutationSchema['invitations'];

View File

@ -16,7 +16,7 @@ export type CreateTeamOptions = {
/**
* ID of the user creating the Team.
*/
userId: number;
userId: string;
/**
* Name of the team to display.

View File

@ -1,7 +1,7 @@
import { prisma } from '@documenso/prisma';
export type DeclineTeamInvitationOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -2,7 +2,7 @@ import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '@documenso/lib/constants/teams
import { prisma } from '@documenso/prisma';
export type DeleteTeamEmailVerificationOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -14,7 +14,7 @@ import { renderEmailWithI18N } from '../../utils/render-email-with-i18n';
import { teamGlobalSettingsToBranding } from '../../utils/team-global-settings-to-branding';
export type DeleteTeamEmailOptions = {
userId: number;
userId: string;
userEmail: string;
teamId: number;
};

View File

@ -6,7 +6,7 @@ export type DeleteTeamMemberInvitationsOptions = {
/**
* The ID of the user who is initiating this action.
*/
userId: number;
userId: string;
/**
* The ID of the team to remove members from.

View File

@ -9,7 +9,7 @@ export type DeleteTeamMembersOptions = {
/**
* The ID of the user who is initiating this action.
*/
userId: number;
userId: string;
/**
* The ID of the team to remove members from.

View File

@ -1,7 +1,7 @@
import { prisma } from '@documenso/prisma';
export type DeleteTeamPendingOptions = {
userId: number;
userId: string;
pendingTeamId: number;
};

View File

@ -6,7 +6,7 @@ export type DeleteTeamTransferRequestOptions = {
/**
* The ID of the user deleting the transfer.
*/
userId: number;
userId: string;
/**
* The ID of the team whose team transfer request should be deleted.

View File

@ -17,7 +17,7 @@ import { renderEmailWithI18N } from '../../utils/render-email-with-i18n';
import { teamGlobalSettingsToBranding } from '../../utils/team-global-settings-to-branding';
export type DeleteTeamOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -4,7 +4,7 @@ import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
import { prisma } from '@documenso/prisma';
export interface FindTeamInvoicesOptions {
userId: number;
userId: string;
teamId: number;
}

View File

@ -10,7 +10,7 @@ import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '../../constants/teams';
import { type FindResultResponse, ZFindResultResponse } from '../../types/search-params';
export interface FindTeamMemberInvitesOptions {
userId: number;
userId: string;
teamId: number;
query?: string;
page?: number;

View File

@ -10,7 +10,7 @@ import type { FindResultResponse } from '../../types/search-params';
import { ZFindResultResponse } from '../../types/search-params';
export interface FindTeamMembersOptions {
userId: number;
userId: string;
teamId: number;
query?: string;
page?: number;

View File

@ -8,7 +8,7 @@ import { TeamPendingSchema } from '@documenso/prisma/generated/zod';
import { type FindResultResponse, ZFindResultResponse } from '../../types/search-params';
export interface FindTeamsPendingOptions {
userId: number;
userId: string;
query?: string;
page?: number;
perPage?: number;

View File

@ -5,7 +5,7 @@ import { Prisma } from '@documenso/prisma/client';
import type { FindResultResponse } from '../../types/search-params';
export interface FindTeamsOptions {
userId: number;
userId: string;
query?: string;
page?: number;
perPage?: number;

View File

@ -4,7 +4,7 @@ import { prisma } from '@documenso/prisma';
import { TeamMemberSchema, UserSchema } from '@documenso/prisma/generated/zod';
export type GetTeamMembersOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -5,7 +5,7 @@ import { AppError, AppErrorCode } from '../../errors/app-error';
import { updateTeamPublicProfile } from './update-team-public-profile';
export type GetTeamPublicProfileOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -70,7 +70,7 @@ export const getTeamById = async ({
};
export type GetTeamByUrlOptions = {
userId: number;
userId: string;
teamUrl: string;
};

View File

@ -4,7 +4,7 @@ import { prisma } from '@documenso/prisma';
import { TeamMemberSchema, TeamSchema } from '@documenso/prisma/generated/zod';
export type GetTeamsOptions = {
userId: number;
userId: string;
};
export const ZGetTeamsResponseSchema = TeamSchema.extend({

View File

@ -8,7 +8,7 @@ export type LeaveTeamOptions = {
/**
* The ID of the user who is leaving the team.
*/
userId: number;
userId: string;
/**
* The ID of the team the user is leaving.

View File

@ -16,7 +16,7 @@ export type RequestTeamOwnershipTransferOptions = {
/**
* The ID of the user initiating the transfer.
*/
userId: number;
userId: string;
/**
* The name of the user initiating the transfer.
@ -31,7 +31,7 @@ export type RequestTeamOwnershipTransferOptions = {
/**
* The user ID of the new owner.
*/
newOwnerUserId: number;
newOwneruserId: string;
/**
* Whether to clear any current payment methods attached to the team.

View File

@ -6,7 +6,7 @@ import { prisma } from '@documenso/prisma';
import { sendTeamEmailVerificationEmail } from './create-team-email-verification';
export type ResendTeamMemberInvitationOptions = {
userId: number;
userId: string;
teamId: number;
};

View File

@ -8,7 +8,7 @@ export type ResendTeamMemberInvitationOptions = {
/**
* The ID of the user who is initiating this action.
*/
userId: number;
userId: string;
/**
* The name of the user who is initiating this action.

View File

@ -5,7 +5,7 @@ import { TeamMemberRole } from '@documenso/prisma/client';
import { TeamGlobalSettingsSchema } from '@documenso/prisma/generated/zod';
export type UpdateTeamBrandingSettingsOptions = {
userId: number;
userId: string;
teamId: number;
settings: {

View File

@ -8,7 +8,7 @@ import { TeamGlobalSettingsSchema } from '@documenso/prisma/generated/zod';
import type { SupportedLanguageCodes } from '../../constants/i18n';
export type UpdateTeamDocumentSettingsOptions = {
userId: number;
userId: string;
teamId: number;
settings: {

View File

@ -3,7 +3,7 @@ import { prisma } from '@documenso/prisma';
import { TEAM_MEMBER_ROLE_PERMISSIONS_MAP } from '../../constants/teams';
export type UpdateTeamEmailOptions = {
userId: number;
userId: string;
teamId: number;
data: {
name: string;

View File

@ -5,7 +5,7 @@ import { prisma } from '@documenso/prisma';
import type { TeamMemberRole } from '@documenso/prisma/client';
export type UpdateTeamMemberOptions = {
userId: number;
userId: string;
teamId: number;
teamMemberId: number;
data: {

View File

@ -1,7 +1,7 @@
import { prisma } from '@documenso/prisma';
export type UpdatePublicProfileOptions = {
userId: number;
userId: string;
teamId: number;
data: {
bio?: string;

View File

@ -6,7 +6,7 @@ import { prisma } from '@documenso/prisma';
import { Prisma } from '@documenso/prisma/client';
export type UpdateTeamOptions = {
userId: number;
userId: string;
teamId: number;
data: {
name?: string;