mirror of
https://github.com/documenso/documenso.git
synced 2025-11-21 20:21:38 +10:00
wip: what if user ids were strings instead of numbers
This commit is contained in:
@ -6,7 +6,7 @@ import { TeamMemberInviteStatus } from '@documenso/prisma/client';
|
||||
import { jobs } from '../../jobs/client';
|
||||
|
||||
export type AcceptTeamInvitationOptions = {
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId: number;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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';
|
||||
};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -16,7 +16,7 @@ export type CreateTeamOptions = {
|
||||
/**
|
||||
* ID of the user creating the Team.
|
||||
*/
|
||||
userId: number;
|
||||
userId: string;
|
||||
|
||||
/**
|
||||
* Name of the team to display.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type DeclineTeamInvitationOptions = {
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId: number;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type DeleteTeamPendingOptions = {
|
||||
userId: number;
|
||||
userId: string;
|
||||
pendingTeamId: number;
|
||||
};
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ export const getTeamById = async ({
|
||||
};
|
||||
|
||||
export type GetTeamByUrlOptions = {
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamUrl: string;
|
||||
};
|
||||
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
export type UpdatePublicProfileOptions = {
|
||||
userId: number;
|
||||
userId: string;
|
||||
teamId: number;
|
||||
data: {
|
||||
bio?: string;
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user