4643 create a pre hook for calendar events (#4666)
* copy message pre hook * add CalendarQueryHookModule to workspace-pre-query-hook.module * use CalendarChannelVisibility enum * add calendarEvent to workspace-pre-query-hook.config * fix pre-hook * fix findOne prehook in config * rename fragments * fix import * update findOne prehook and create can-access-calendar-event.provider * replace provider with service * fix type * renaming * remove unnecessary eslint skip --------- Co-authored-by: Weiko <corentin@twenty.com>
This commit is contained in:
@ -860,6 +860,7 @@ export type Object = {
|
||||
imageIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
||||
isActive: Scalars['Boolean'];
|
||||
isCustom: Scalars['Boolean'];
|
||||
isRemote: Scalars['Boolean'];
|
||||
isSystem: Scalars['Boolean'];
|
||||
labelIdentifierFieldMetadataId?: Maybe<Scalars['String']>;
|
||||
labelPlural: Scalars['String'];
|
||||
@ -905,9 +906,9 @@ export type RelationEdge = {
|
||||
node: Relation;
|
||||
};
|
||||
|
||||
export type AttendeeFragmentFragment = { __typename?: 'TimelineCalendarEventAttendee', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
|
||||
export type TimelineCalendarEventAttendeeFragmentFragment = { __typename?: 'TimelineCalendarEventAttendee', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string };
|
||||
|
||||
export type CalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, attendees: Array<{ __typename?: 'TimelineCalendarEventAttendee', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
|
||||
export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, attendees: Array<{ __typename?: 'TimelineCalendarEventAttendee', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> };
|
||||
|
||||
export type TimelineCalendarEventsWithTotalFragmentFragment = { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: string, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: TimelineCalendarEventVisibility, attendees: Array<{ __typename?: 'TimelineCalendarEventAttendee', personId?: string | null, workspaceMemberId?: string | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> };
|
||||
|
||||
@ -1154,8 +1155,8 @@ export type GetWorkspaceFromInviteHashQueryVariables = Exact<{
|
||||
|
||||
export type GetWorkspaceFromInviteHashQuery = { __typename?: 'Query', findWorkspaceFromInviteHash: { __typename?: 'Workspace', id: string, displayName?: string | null, logo?: string | null, allowImpersonation: boolean } };
|
||||
|
||||
export const AttendeeFragmentFragmentDoc = gql`
|
||||
fragment AttendeeFragment on TimelineCalendarEventAttendee {
|
||||
export const TimelineCalendarEventAttendeeFragmentFragmentDoc = gql`
|
||||
fragment TimelineCalendarEventAttendeeFragment on TimelineCalendarEventAttendee {
|
||||
personId
|
||||
workspaceMemberId
|
||||
firstName
|
||||
@ -1165,8 +1166,8 @@ export const AttendeeFragmentFragmentDoc = gql`
|
||||
handle
|
||||
}
|
||||
`;
|
||||
export const CalendarEventFragmentFragmentDoc = gql`
|
||||
fragment CalendarEventFragment on TimelineCalendarEvent {
|
||||
export const TimelineCalendarEventFragmentFragmentDoc = gql`
|
||||
fragment TimelineCalendarEventFragment on TimelineCalendarEvent {
|
||||
id
|
||||
title
|
||||
description
|
||||
@ -1176,18 +1177,18 @@ export const CalendarEventFragmentFragmentDoc = gql`
|
||||
isFullDay
|
||||
visibility
|
||||
attendees {
|
||||
...AttendeeFragment
|
||||
...TimelineCalendarEventAttendeeFragment
|
||||
}
|
||||
}
|
||||
${AttendeeFragmentFragmentDoc}`;
|
||||
${TimelineCalendarEventAttendeeFragmentFragmentDoc}`;
|
||||
export const TimelineCalendarEventsWithTotalFragmentFragmentDoc = gql`
|
||||
fragment TimelineCalendarEventsWithTotalFragment on TimelineCalendarEventsWithTotal {
|
||||
totalNumberOfCalendarEvents
|
||||
timelineCalendarEvents {
|
||||
...CalendarEventFragment
|
||||
...TimelineCalendarEventFragment
|
||||
}
|
||||
}
|
||||
${CalendarEventFragmentFragmentDoc}`;
|
||||
${TimelineCalendarEventFragmentFragmentDoc}`;
|
||||
export const ParticipantFragmentFragmentDoc = gql`
|
||||
fragment ParticipantFragment on TimelineThreadParticipant {
|
||||
personId
|
||||
|
||||
Reference in New Issue
Block a user