5623 add an inviteteam onboarding step (#5769)

## Changes
- add a new invite Team onboarding step
- update currentUser.state to currentUser.onboardingStep

## Edge cases
We will never display invite team onboarding step 
- if number of workspaceMember > 1
- if a workspaceMember as been deleted

## Important changes
Update typeorm package version to 0.3.20 because we needed a fix on
`indexPredicates` pushed in 0.3.20 version
(https://github.com/typeorm/typeorm/issues/10191)

## Result
<img width="844" alt="image"
src="https://github.com/twentyhq/twenty/assets/29927851/0dab54cf-7c66-4c64-b0c9-b0973889a148">



https://github.com/twentyhq/twenty/assets/29927851/13268d0a-cfa7-42a4-84c6-9e1fbbe48912
This commit is contained in:
martmull
2024-06-12 21:13:18 +02:00
committed by GitHub
parent 2fdd2f4949
commit 3986824017
60 changed files with 1009 additions and 372 deletions

View File

@ -994,8 +994,6 @@ export type CalendarChannel = {
syncCursor?: Maybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: Maybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: Maybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: Maybe<Scalars['DateTime']>;
/** Visibility */
@ -1040,8 +1038,6 @@ export type CalendarChannelCreateInput = {
syncCursor?: InputMaybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: InputMaybe<Scalars['DateTime']>;
/** Visibility */
@ -1176,8 +1172,6 @@ export type CalendarChannelFilterInput = {
syncCursor?: InputMaybe<StringFilter>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<FloatFilter>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<DateFilter>;
/** Update date */
updatedAt?: InputMaybe<DateFilter>;
/** Visibility */
@ -1202,8 +1196,6 @@ export type CalendarChannelOrderByInput = {
syncCursor?: InputMaybe<OrderByDirection>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<OrderByDirection>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<OrderByDirection>;
/** Update date */
updatedAt?: InputMaybe<OrderByDirection>;
/** Visibility */
@ -1228,8 +1220,6 @@ export type CalendarChannelUpdateInput = {
syncCursor?: InputMaybe<Scalars['String']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Update date */
updatedAt?: InputMaybe<Scalars['DateTime']>;
/** Visibility */
@ -2640,20 +2630,18 @@ export type MessageChannel = {
isSyncEnabled?: Maybe<Scalars['Boolean']>;
/** Messages from the channel. */
messageChannelMessageAssociations?: Maybe<MessageChannelMessageAssociationConnection>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: Maybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: Maybe<Scalars['String']>;
/** Sync stage */
syncStage?: Maybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: Maybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: Maybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: Maybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: Maybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: Maybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: Maybe<Scalars['DateTime']>;
/** Channel Type */
type?: Maybe<MessageChannelTypeEnum>;
/** Update date */
@ -2696,20 +2684,18 @@ export type MessageChannelCreateInput = {
isContactAutoCreationEnabled?: InputMaybe<Scalars['Boolean']>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<Scalars['Boolean']>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: InputMaybe<Scalars['String']>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: InputMaybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnum>;
/** Update date */
@ -2740,21 +2726,19 @@ export type MessageChannelFilterInput = {
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<BooleanFilter>;
not?: InputMaybe<MessageChannelFilterInput>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<DateFilter>;
or?: InputMaybe<Array<InputMaybe<MessageChannelFilterInput>>>;
/** Last sync cursor */
syncCursor?: InputMaybe<StringFilter>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnumFilter>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<DateFilter>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnumFilter>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnumFilter>;
/** Last sync date */
syncedAt?: InputMaybe<DateFilter>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<FloatFilter>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<DateFilter>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnumFilter>;
/** Update date */
@ -2900,20 +2884,18 @@ export type MessageChannelOrderByInput = {
isContactAutoCreationEnabled?: InputMaybe<OrderByDirection>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<OrderByDirection>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<OrderByDirection>;
/** Last sync cursor */
syncCursor?: InputMaybe<OrderByDirection>;
/** Sync stage */
syncStage?: InputMaybe<OrderByDirection>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<OrderByDirection>;
/** Sync status */
syncStatus?: InputMaybe<OrderByDirection>;
/** Sync sub status */
syncSubStatus?: InputMaybe<OrderByDirection>;
/** Last sync date */
syncedAt?: InputMaybe<OrderByDirection>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<OrderByDirection>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<OrderByDirection>;
/** Channel Type */
type?: InputMaybe<OrderByDirection>;
/** Update date */
@ -2922,6 +2904,29 @@ export type MessageChannelOrderByInput = {
visibility?: InputMaybe<OrderByDirection>;
};
/** Sync stage */
export enum MessageChannelSyncStageEnum {
/** Failed */
Failed = 'FAILED',
/** Full messages list fetch pending */
FullMessageListFetchPending = 'FULL_MESSAGE_LIST_FETCH_PENDING',
/** Messages import ongoing */
MessagesImportOngoing = 'MESSAGES_IMPORT_ONGOING',
/** Messages import pending */
MessagesImportPending = 'MESSAGES_IMPORT_PENDING',
/** Messages list fetch ongoing */
MessageListFetchOngoing = 'MESSAGE_LIST_FETCH_ONGOING',
/** Partial messages list fetch pending */
PartialMessageListFetchPending = 'PARTIAL_MESSAGE_LIST_FETCH_PENDING'
}
export type MessageChannelSyncStageEnumFilter = {
eq?: InputMaybe<MessageChannelSyncStageEnum>;
in?: InputMaybe<Array<InputMaybe<MessageChannelSyncStageEnum>>>;
is?: InputMaybe<FilterIs>;
neq?: InputMaybe<MessageChannelSyncStageEnum>;
};
/** Sync status */
export enum MessageChannelSyncStatusEnum {
/** Completed */
@ -2949,29 +2954,6 @@ export type MessageChannelSyncStatusEnumFilter = {
neq?: InputMaybe<MessageChannelSyncStatusEnum>;
};
/** Sync sub status */
export enum MessageChannelSyncSubStatusEnum {
/** Failed */
Failed = 'FAILED',
/** Full messages list fetch pending */
FullMessageListFetchPending = 'FULL_MESSAGE_LIST_FETCH_PENDING',
/** Messages import ongoing */
MessagesImportOngoing = 'MESSAGES_IMPORT_ONGOING',
/** Messages import pending */
MessagesImportPending = 'MESSAGES_IMPORT_PENDING',
/** Messages list fetch ongoing */
MessageListFetchOngoing = 'MESSAGE_LIST_FETCH_ONGOING',
/** Partial messages list fetch pending */
PartialMessageListFetchPending = 'PARTIAL_MESSAGE_LIST_FETCH_PENDING'
}
export type MessageChannelSyncSubStatusEnumFilter = {
eq?: InputMaybe<MessageChannelSyncSubStatusEnum>;
in?: InputMaybe<Array<InputMaybe<MessageChannelSyncSubStatusEnum>>>;
is?: InputMaybe<FilterIs>;
neq?: InputMaybe<MessageChannelSyncSubStatusEnum>;
};
/** Channel Type */
export enum MessageChannelTypeEnum {
/** Email */
@ -3001,20 +2983,18 @@ export type MessageChannelUpdateInput = {
isContactAutoCreationEnabled?: InputMaybe<Scalars['Boolean']>;
/** Is Sync Enabled */
isSyncEnabled?: InputMaybe<Scalars['Boolean']>;
/** Ongoing sync started at */
ongoingSyncStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Last sync cursor */
syncCursor?: InputMaybe<Scalars['String']>;
/** Sync stage */
syncStage?: InputMaybe<MessageChannelSyncStageEnum>;
/** Sync stage started at */
syncStageStartedAt?: InputMaybe<Scalars['DateTime']>;
/** Sync status */
syncStatus?: InputMaybe<MessageChannelSyncStatusEnum>;
/** Sync sub status */
syncSubStatus?: InputMaybe<MessageChannelSyncSubStatusEnum>;
/** Last sync date */
syncedAt?: InputMaybe<Scalars['DateTime']>;
/** Throttle Failure Count */
throttleFailureCount?: InputMaybe<Scalars['Float']>;
/** Throttle Pause Until */
throttlePauseUntil?: InputMaybe<Scalars['DateTime']>;
/** Channel Type */
type?: InputMaybe<MessageChannelTypeEnum>;
/** Update date */
@ -3572,8 +3552,9 @@ export type Mutation = {
generateTransientToken: TransientToken;
impersonate: Verify;
renewToken: AuthTokens;
sendInviteLink: SendInviteLink;
signUp: LoginToken;
skipSyncEmailOnboardingStep: SkipSyncEmailOnboardingStep;
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
track: Analytics;
updateActivities?: Maybe<Array<Activity>>;
updateActivity?: Maybe<Activity>;
@ -4411,6 +4392,11 @@ export type MutationRenewTokenArgs = {
};
export type MutationSendInviteLinkArgs = {
emails: Array<Scalars['String']>;
};
export type MutationSignUpArgs = {
captchaToken?: InputMaybe<Scalars['String']>;
email: Scalars['String'];
@ -4817,6 +4803,17 @@ export type ObjectFieldsConnection = {
pageInfo: PageInfo;
};
/** Onboarding step */
export enum OnboardingStep {
InviteTeam = 'INVITE_TEAM',
SyncEmail = 'SYNC_EMAIL'
}
export type OnboardingStepSuccess = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};
/** An opportunity */
export type Opportunity = {
/** Activities tied to the opportunity */
@ -6186,6 +6183,11 @@ export enum RemoteTableStatus {
Synced = 'SYNCED'
}
export type SendInviteLink = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};
export type Sentry = {
dsn?: Maybe<Scalars['String']>;
environment?: Maybe<Scalars['String']>;
@ -6196,11 +6198,6 @@ export type SessionEntity = {
url?: Maybe<Scalars['String']>;
};
export type SkipSyncEmailOnboardingStep = {
/** Boolean that confirms query was dispatched */
success: Scalars['Boolean'];
};
/** Sort Directions */
export enum SortDirection {
Asc = 'ASC',
@ -6537,12 +6534,12 @@ export type User = {
firstName: Scalars['String'];
id: Scalars['UUID'];
lastName: Scalars['String'];
onboardingStep?: Maybe<OnboardingStep>;
passwordHash?: Maybe<Scalars['String']>;
/** @deprecated field migrated into the AppTokens Table ref: https://github.com/twentyhq/twenty/issues/5021 */
passwordResetToken?: Maybe<Scalars['String']>;
/** @deprecated field migrated into the AppTokens Table ref: https://github.com/twentyhq/twenty/issues/5021 */
passwordResetTokenExpiresAt?: Maybe<Scalars['DateTime']>;
state: UserState;
supportUserHash?: Maybe<Scalars['String']>;
updatedAt: Scalars['DateTime'];
workspaceMember?: Maybe<WorkspaceMember>;
@ -6564,10 +6561,6 @@ export type UserMappingOptionsUser = {
user?: Maybe<Scalars['String']>;
};
export type UserState = {
skipSyncEmailOnboardingStep?: Maybe<Scalars['Boolean']>;
};
export type UserWorkspace = {
createdAt: Scalars['DateTime'];
deletedAt?: Maybe<Scalars['DateTime']>;