* feat: invitation link schema and apis * feat: add invitation link * feat: member status: active, leave, forbidden * fix: expires show hours and minutes * feat: invalid invitation link hint * fix: typo * chore: fix typo & i18n * fix * pref: fe * feat: add ttl index for 30-day-clean-up
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import { PermissionValueType } from '../../permission/type';
|
|
import { TeamMemberRoleEnum } from './constant';
|
|
import { LafAccountType, TeamMemberSchema, ThirdPartyAccountType } from './type';
|
|
|
|
export type AuthTeamRoleProps = {
|
|
teamId: string;
|
|
tmbId: string;
|
|
role?: `${TeamMemberRoleEnum}`;
|
|
};
|
|
export type CreateTeamProps = {
|
|
name: string;
|
|
avatar?: string;
|
|
memberName?: string;
|
|
memberAvatar?: string;
|
|
notificationAccount?: string;
|
|
};
|
|
export type UpdateTeamProps = Omit<ThirdPartyAccountType, 'externalWorkflowVariable'> & {
|
|
name?: string;
|
|
avatar?: string;
|
|
teamDomain?: string;
|
|
externalWorkflowVariable?: { key: string; value: string };
|
|
};
|
|
|
|
/* ------------- member ----------- */
|
|
export type DelMemberProps = {
|
|
tmbId: string;
|
|
};
|
|
export type UpdateTeamMemberProps = {
|
|
teamId: string;
|
|
memberId: string;
|
|
role?: TeamMemberSchema['role'];
|
|
status?: TeamMemberSchema['status'];
|
|
};
|
|
export type InviteMemberProps = {
|
|
teamId: string;
|
|
usernames: string[];
|
|
};
|
|
export type UpdateInviteProps = {
|
|
tmbId: string;
|
|
status: TeamMemberSchema['status'];
|
|
};
|
|
|
|
export type InviteMemberResponse = Record<
|
|
'invite' | 'inValid' | 'inTeam',
|
|
{ username: string; userId: string }[]
|
|
>;
|