3263 modify timeline messagingservice to allow the frontend to get multiple participants in a thread (#3611)
* wip * wip * add pagination * wip * wip * wip * update resolver * wip * wip * endpoint is working but there is still work to do * merge main * wip * subject is now first subject * number of messages is working * improving query * fix bug * fix bug * added parameter * pagination introduced a bug * pagination is working * fix type * improve typing * improve typing * fix bug * add displayName * display displayName in the frontend * move entities * fix * generate metadata * add avatarUrl * modify after comments on PR * updates * remove email mocks * remove console log * move files * remove mock * use constant * use constant * use fragments * remove console.log * generate * changes made * update DTO * generate
This commit is contained in:
@ -402,12 +402,16 @@ export type QueryFindWorkspaceFromInviteHashArgs = {
|
||||
|
||||
|
||||
export type QueryGetTimelineThreadsFromCompanyIdArgs = {
|
||||
companyId: Scalars['String'];
|
||||
companyId: Scalars['ID'];
|
||||
page: Scalars['Int'];
|
||||
pageSize: Scalars['Int'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryGetTimelineThreadsFromPersonIdArgs = {
|
||||
personId: Scalars['String'];
|
||||
page: Scalars['Int'];
|
||||
pageSize: Scalars['Int'];
|
||||
personId: Scalars['ID'];
|
||||
};
|
||||
|
||||
|
||||
@ -491,15 +495,28 @@ export type Telemetry = {
|
||||
|
||||
export type TimelineThread = {
|
||||
__typename?: 'TimelineThread';
|
||||
body: Scalars['String'];
|
||||
firstParticipant: TimelineThreadParticipant;
|
||||
id: Scalars['ID'];
|
||||
lastMessageBody: Scalars['String'];
|
||||
lastMessageReceivedAt: Scalars['DateTime'];
|
||||
lastTwoParticipants: Array<TimelineThreadParticipant>;
|
||||
numberOfMessagesInThread: Scalars['Float'];
|
||||
participantCount: Scalars['Float'];
|
||||
read: Scalars['Boolean'];
|
||||
receivedAt: Scalars['DateTime'];
|
||||
senderName: Scalars['String'];
|
||||
senderPictureUrl: Scalars['String'];
|
||||
subject: Scalars['String'];
|
||||
};
|
||||
|
||||
export type TimelineThreadParticipant = {
|
||||
__typename?: 'TimelineThreadParticipant';
|
||||
avatarUrl: Scalars['String'];
|
||||
displayName: Scalars['String'];
|
||||
firstName: Scalars['String'];
|
||||
handle: Scalars['String'];
|
||||
lastName: Scalars['String'];
|
||||
personId?: Maybe<Scalars['ID']>;
|
||||
workspaceMemberId?: Maybe<Scalars['ID']>;
|
||||
};
|
||||
|
||||
export type TransientToken = {
|
||||
__typename?: 'TransientToken';
|
||||
transientToken: AuthToken;
|
||||
@ -694,19 +711,27 @@ export type RelationEdge = {
|
||||
node: Relation;
|
||||
};
|
||||
|
||||
export type ParticipantFragmentFragment = { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
|
||||
|
||||
export type TimelineThreadFragmentFragment = { __typename?: 'TimelineThread', id: string, read: boolean, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
|
||||
|
||||
export type GetTimelineThreadsFromCompanyIdQueryVariables = Exact<{
|
||||
companyId: Scalars['String'];
|
||||
companyId: Scalars['ID'];
|
||||
page: Scalars['Int'];
|
||||
pageSize: Scalars['Int'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetTimelineThreadsFromCompanyIdQuery = { __typename?: 'Query', getTimelineThreadsFromCompanyId: Array<{ __typename?: 'TimelineThread', body: string, numberOfMessagesInThread: number, read: boolean, receivedAt: string, senderName: string, senderPictureUrl: string, subject: string }> };
|
||||
export type GetTimelineThreadsFromCompanyIdQuery = { __typename?: 'Query', getTimelineThreadsFromCompanyId: Array<{ __typename?: 'TimelineThread', id: string, read: boolean, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> };
|
||||
|
||||
export type GetTimelineThreadsFromPersonIdQueryVariables = Exact<{
|
||||
personId: Scalars['String'];
|
||||
personId: Scalars['ID'];
|
||||
page: Scalars['Int'];
|
||||
pageSize: Scalars['Int'];
|
||||
}>;
|
||||
|
||||
|
||||
export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: Array<{ __typename?: 'TimelineThread', body: string, numberOfMessagesInThread: number, read: boolean, receivedAt: string, senderName: string, senderPictureUrl: string, subject: string }> };
|
||||
export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: Array<{ __typename?: 'TimelineThread', id: string, read: boolean, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> };
|
||||
|
||||
export type CreateEventMutationVariables = Exact<{
|
||||
type: Scalars['String'];
|
||||
@ -859,6 +884,34 @@ export type GetWorkspaceFromInviteHashQueryVariables = Exact<{
|
||||
|
||||
export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, allowImpersonation: boolean } };
|
||||
|
||||
export const ParticipantFragmentFragmentDoc = gql`
|
||||
fragment ParticipantFragment on TimelineThreadParticipant {
|
||||
personId
|
||||
workspaceMemberId
|
||||
firstName
|
||||
lastName
|
||||
displayName
|
||||
avatarUrl
|
||||
handle
|
||||
}
|
||||
`;
|
||||
export const TimelineThreadFragmentFragmentDoc = gql`
|
||||
fragment TimelineThreadFragment on TimelineThread {
|
||||
id
|
||||
read
|
||||
firstParticipant {
|
||||
...ParticipantFragment
|
||||
}
|
||||
lastTwoParticipants {
|
||||
...ParticipantFragment
|
||||
}
|
||||
lastMessageReceivedAt
|
||||
lastMessageBody
|
||||
subject
|
||||
numberOfMessagesInThread
|
||||
participantCount
|
||||
}
|
||||
${ParticipantFragmentFragmentDoc}`;
|
||||
export const AuthTokenFragmentFragmentDoc = gql`
|
||||
fragment AuthTokenFragment on AuthToken {
|
||||
token
|
||||
@ -911,18 +964,16 @@ export const UserQueryFragmentFragmentDoc = gql`
|
||||
}
|
||||
`;
|
||||
export const GetTimelineThreadsFromCompanyIdDocument = gql`
|
||||
query GetTimelineThreadsFromCompanyId($companyId: String!) {
|
||||
getTimelineThreadsFromCompanyId(companyId: $companyId) {
|
||||
body
|
||||
numberOfMessagesInThread
|
||||
read
|
||||
receivedAt
|
||||
senderName
|
||||
senderPictureUrl
|
||||
subject
|
||||
query GetTimelineThreadsFromCompanyId($companyId: ID!, $page: Int!, $pageSize: Int!) {
|
||||
getTimelineThreadsFromCompanyId(
|
||||
companyId: $companyId
|
||||
page: $page
|
||||
pageSize: $pageSize
|
||||
) {
|
||||
...TimelineThreadFragment
|
||||
}
|
||||
}
|
||||
`;
|
||||
${TimelineThreadFragmentFragmentDoc}`;
|
||||
|
||||
/**
|
||||
* __useGetTimelineThreadsFromCompanyIdQuery__
|
||||
@ -937,6 +988,8 @@ export const GetTimelineThreadsFromCompanyIdDocument = gql`
|
||||
* const { data, loading, error } = useGetTimelineThreadsFromCompanyIdQuery({
|
||||
* variables: {
|
||||
* companyId: // value for 'companyId'
|
||||
* page: // value for 'page'
|
||||
* pageSize: // value for 'pageSize'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
@ -952,18 +1005,16 @@ export type GetTimelineThreadsFromCompanyIdQueryHookResult = ReturnType<typeof u
|
||||
export type GetTimelineThreadsFromCompanyIdLazyQueryHookResult = ReturnType<typeof useGetTimelineThreadsFromCompanyIdLazyQuery>;
|
||||
export type GetTimelineThreadsFromCompanyIdQueryResult = Apollo.QueryResult<GetTimelineThreadsFromCompanyIdQuery, GetTimelineThreadsFromCompanyIdQueryVariables>;
|
||||
export const GetTimelineThreadsFromPersonIdDocument = gql`
|
||||
query GetTimelineThreadsFromPersonId($personId: String!) {
|
||||
getTimelineThreadsFromPersonId(personId: $personId) {
|
||||
body
|
||||
numberOfMessagesInThread
|
||||
read
|
||||
receivedAt
|
||||
senderName
|
||||
senderPictureUrl
|
||||
subject
|
||||
query GetTimelineThreadsFromPersonId($personId: ID!, $page: Int!, $pageSize: Int!) {
|
||||
getTimelineThreadsFromPersonId(
|
||||
personId: $personId
|
||||
page: $page
|
||||
pageSize: $pageSize
|
||||
) {
|
||||
...TimelineThreadFragment
|
||||
}
|
||||
}
|
||||
`;
|
||||
${TimelineThreadFragmentFragmentDoc}`;
|
||||
|
||||
/**
|
||||
* __useGetTimelineThreadsFromPersonIdQuery__
|
||||
@ -978,6 +1029,8 @@ export const GetTimelineThreadsFromPersonIdDocument = gql`
|
||||
* const { data, loading, error } = useGetTimelineThreadsFromPersonIdQuery({
|
||||
* variables: {
|
||||
* personId: // value for 'personId'
|
||||
* page: // value for 'page'
|
||||
* pageSize: // value for 'pageSize'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user