diff --git a/packages/twenty-front/codegen-metadata.cjs b/packages/twenty-front/codegen-metadata.cjs index f8319ee92d5..74d33bc7eb3 100644 --- a/packages/twenty-front/codegen-metadata.cjs +++ b/packages/twenty-front/codegen-metadata.cjs @@ -21,7 +21,6 @@ module.exports = { './src/modules/logic-functions/graphql/**/*.{ts,tsx}', './src/modules/databases/graphql/**/*.{ts,tsx}', - './src/modules/workflow/**/graphql/**/*.{ts,tsx}', './src/modules/analytics/graphql/**/*.{ts,tsx}', './src/modules/object-metadata/graphql/**/*.{ts,tsx}', './src/modules/navigation-menu-item/graphql/**/*.{ts,tsx}', @@ -32,6 +31,9 @@ module.exports = { './src/modules/page-layout/widgets/**/graphql/**/*.{ts,tsx}', + './src/modules/dashboards/graphql/**/*.{ts,tsx}', + './src/modules/page-layout/graphql/**/*.{ts,tsx}', + './src/modules/marketplace/graphql/**/*.{ts,tsx}', '!./src/**/*.test.{ts,tsx}', '!./src/**/*.stories.{ts,tsx}', '!./src/**/__mocks__/*.ts', diff --git a/packages/twenty-front/codegen.cjs b/packages/twenty-front/codegen.cjs index c2c3c930c85..d3704546adf 100644 --- a/packages/twenty-front/codegen.cjs +++ b/packages/twenty-front/codegen.cjs @@ -5,23 +5,11 @@ module.exports = { (process.env.REACT_APP_SERVER_BASE_URL ?? 'http://localhost:3000') + '/graphql', documents: [ - './src/modules/activities/graphql/**/*.{ts,tsx}', - './src/modules/companies/graphql/**/*.{ts,tsx}', - './src/modules/people/graphql/**/*.{ts,tsx}', - './src/modules/opportunities/graphql/**/*.{ts,tsx}', - + './src/modules/workflow/**/graphql/**/*.{ts,tsx}', + './src/modules/activities/emails/graphql/**/*.{ts,tsx}', + './src/modules/activities/calendar/graphql/**/*.{ts,tsx}', './src/modules/search/graphql/**/*.{ts,tsx}', - './src/modules/views/graphql/**/*.{ts,tsx}', - './src/modules/favorites/graphql/**/*.{ts,tsx}', - './src/modules/spreadsheet-import/graphql/**/*.{ts,tsx}', './src/modules/command-menu/graphql/**/*.{ts,tsx}', - './src/modules/marketplace/graphql/**/*.{ts,tsx}', - - './src/modules/prefetch/graphql/**/*.{ts,tsx}', - './src/modules/subscription/graphql/**/*.{ts,tsx}', - - './src/modules/dashboards/graphql/**/*.{ts,tsx}', - './src/modules/page-layout/graphql/**/*.{ts,tsx}', '!./src/**/*.test.{ts,tsx}', '!./src/**/*.stories.{ts,tsx}', diff --git a/packages/twenty-front/src/generated-metadata/graphql.ts b/packages/twenty-front/src/generated-metadata/graphql.ts index 639af1c4625..e4713b586a5 100644 --- a/packages/twenty-front/src/generated-metadata/graphql.ts +++ b/packages/twenty-front/src/generated-metadata/graphql.ts @@ -5989,6 +5989,24 @@ export type FindManyCommandMenuItemsQueryVariables = Exact<{ [key: string]: neve export type FindManyCommandMenuItemsQuery = { __typename?: 'Query', commandMenuItems: Array<{ __typename?: 'CommandMenuItem', id: string, workflowVersionId?: string | null, frontComponentId?: string | null, label: string, icon?: string | null, isPinned: boolean, availabilityType: CommandMenuItemAvailabilityType, availabilityObjectMetadataId?: string | null, frontComponent?: { __typename?: 'FrontComponent', id: string, name: string } | null }> }; +export type PageLayoutFragmentFragment = { __typename?: 'PageLayout', id: string, name: string, objectMetadataId?: string | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: string | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: string, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: string, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null }; + +export type PageLayoutTabFragmentFragment = { __typename?: 'PageLayoutTab', id: string, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: string, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }; + +export type DuplicateDashboardMutationVariables = Exact<{ + id: Scalars['UUID']; +}>; + + +export type DuplicateDashboardMutation = { __typename?: 'Mutation', duplicateDashboard: { __typename?: 'DuplicatedDashboard', id: string, title?: string | null, pageLayoutId?: string | null, position: number, createdAt: string, updatedAt: string } }; + +export type FindOnePageLayoutQueryVariables = Exact<{ + id: Scalars['String']; +}>; + + +export type FindOnePageLayoutQuery = { __typename?: 'Query', getPageLayout?: { __typename?: 'PageLayout', id: string, name: string, objectMetadataId?: string | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: string | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: string, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: string, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null } | null }; + export type CreateFileMutationVariables = Exact<{ file: Scalars['Upload']; }>; @@ -6032,6 +6050,11 @@ export type GetLogicFunctionSourceCodeQueryVariables = Exact<{ export type GetLogicFunctionSourceCodeQuery = { __typename?: 'Query', getLogicFunctionSourceCode?: any | null }; +export type FindManyMarketplaceAppsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type FindManyMarketplaceAppsQuery = { __typename?: 'Query', findManyMarketplaceApps: Array<{ __typename?: 'MarketplaceApp', id: string, name: string, description: string, icon: string, version: string, author: string, category: string, logo?: string | null, screenshots: Array, aboutDescription: string, providers: Array, websiteUrl?: string | null, termsUrl?: string | null }> }; + export type NavigationMenuItemFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string }; export type NavigationMenuItemQueryFieldsFragment = { __typename?: 'NavigationMenuItem', id: string, userWorkspaceId?: string | null, targetRecordId?: string | null, targetObjectMetadataId?: string | null, viewId?: string | null, folderId?: string | null, name?: string | null, link?: string | null, position: number, applicationId?: string | null, createdAt: string, updatedAt: string, targetRecordIdentifier?: { __typename?: 'RecordIdentifier', id: string, labelIdentifier: string, imageIdentifier?: string | null } | null }; @@ -6130,6 +6153,21 @@ export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string] export type SkipSyncEmailOnboardingStepMutation = { __typename?: 'Mutation', skipSyncEmailOnboardingStep: { __typename?: 'OnboardingStepSuccess', success: boolean } }; +export type PageLayoutWidgetFragmentFragment = { __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }; + +export type UpdatePageLayoutWithTabsAndWidgetsMutationVariables = Exact<{ + id: Scalars['String']; + input: UpdatePageLayoutWithTabsInput; +}>; + + +export type UpdatePageLayoutWithTabsAndWidgetsMutation = { __typename?: 'Mutation', updatePageLayoutWithTabsAndWidgets: { __typename?: 'PageLayout', id: string, name: string, type: PageLayoutType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, tabs?: Array<{ __typename?: 'PageLayoutTab', id: string, title: string, position: number, pageLayoutId: string, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null } }; + +export type FindAllRecordPageLayoutsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type FindAllRecordPageLayoutsQuery = { __typename?: 'Query', getPageLayouts: Array<{ __typename?: 'PageLayout', id: string, name: string, objectMetadataId?: string | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: string | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: string, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: string, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: string, title: string, type: WidgetType, objectMetadataId?: string | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: string, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: string, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: string } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: string, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: string | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: string, aggregateFieldMetadataId: string, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null }> }; + export type BarChartDataQueryVariables = Exact<{ input: BarChartDataInput; }>; @@ -6925,127 +6963,6 @@ export type FindOneCoreViewSortQueryVariables = Exact<{ export type FindOneCoreViewSortQuery = { __typename?: 'Query', getCoreViewSort?: { __typename?: 'CoreViewSort', id: string, fieldMetadataId: string, direction: ViewSortDirection, viewId: string } | null }; -export type WorkflowDiffFragmentFragment = { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null }; - -export type ActivateWorkflowVersionMutationVariables = Exact<{ - workflowVersionId: Scalars['UUID']; -}>; - - -export type ActivateWorkflowVersionMutation = { __typename?: 'Mutation', activateWorkflowVersion: boolean }; - -export type ComputeStepOutputSchemaMutationVariables = Exact<{ - input: ComputeStepOutputSchemaInput; -}>; - - -export type ComputeStepOutputSchemaMutation = { __typename?: 'Mutation', computeStepOutputSchema: any }; - -export type CreateDraftFromWorkflowVersionMutationVariables = Exact<{ - input: CreateDraftFromWorkflowVersionInput; -}>; - - -export type CreateDraftFromWorkflowVersionMutation = { __typename?: 'Mutation', createDraftFromWorkflowVersion: { __typename?: 'WorkflowVersionDTO', id: string, name: string, status: string, trigger?: any | null, steps?: any | null, createdAt: string, updatedAt: string } }; - -export type CreateWorkflowVersionEdgeMutationVariables = Exact<{ - input: CreateWorkflowVersionEdgeInput; -}>; - - -export type CreateWorkflowVersionEdgeMutation = { __typename?: 'Mutation', createWorkflowVersionEdge: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; - -export type CreateWorkflowVersionStepMutationVariables = Exact<{ - input: CreateWorkflowVersionStepInput; -}>; - - -export type CreateWorkflowVersionStepMutation = { __typename?: 'Mutation', createWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; - -export type DeactivateWorkflowVersionMutationVariables = Exact<{ - workflowVersionId: Scalars['UUID']; -}>; - - -export type DeactivateWorkflowVersionMutation = { __typename?: 'Mutation', deactivateWorkflowVersion: boolean }; - -export type DeleteWorkflowVersionEdgeMutationVariables = Exact<{ - input: CreateWorkflowVersionEdgeInput; -}>; - - -export type DeleteWorkflowVersionEdgeMutation = { __typename?: 'Mutation', deleteWorkflowVersionEdge: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; - -export type DeleteWorkflowVersionStepMutationVariables = Exact<{ - input: DeleteWorkflowVersionStepInput; -}>; - - -export type DeleteWorkflowVersionStepMutation = { __typename?: 'Mutation', deleteWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; - -export type DuplicateWorkflowMutationVariables = Exact<{ - input: DuplicateWorkflowInput; -}>; - - -export type DuplicateWorkflowMutation = { __typename?: 'Mutation', duplicateWorkflow: { __typename?: 'WorkflowVersionDTO', id: string, name: string, status: string, trigger?: any | null, steps?: any | null, createdAt: string, updatedAt: string, workflowId: string } }; - -export type DuplicateWorkflowVersionStepMutationVariables = Exact<{ - input: DuplicateWorkflowVersionStepInput; -}>; - - -export type DuplicateWorkflowVersionStepMutation = { __typename?: 'Mutation', duplicateWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; - -export type RunWorkflowVersionMutationVariables = Exact<{ - input: RunWorkflowVersionInput; -}>; - - -export type RunWorkflowVersionMutation = { __typename?: 'Mutation', runWorkflowVersion: { __typename?: 'RunWorkflowVersionOutput', workflowRunId: string } }; - -export type StopWorkflowRunMutationVariables = Exact<{ - workflowRunId: Scalars['UUID']; -}>; - - -export type StopWorkflowRunMutation = { __typename?: 'Mutation', stopWorkflowRun: { __typename: 'WorkflowRun', id: string, status: WorkflowRunStatusEnum } }; - -export type UpdateWorkflowRunStepMutationVariables = Exact<{ - input: UpdateWorkflowRunStepInput; -}>; - - -export type UpdateWorkflowRunStepMutation = { __typename?: 'Mutation', updateWorkflowRunStep: { __typename?: 'WorkflowAction', id: string, name: string, type: WorkflowActionType, settings: any, valid: boolean, nextStepIds?: Array | null, position?: { __typename?: 'WorkflowStepPosition', x: number, y: number } | null } }; - -export type UpdateWorkflowVersionStepMutationVariables = Exact<{ - input: UpdateWorkflowVersionStepInput; -}>; - - -export type UpdateWorkflowVersionStepMutation = { __typename?: 'Mutation', updateWorkflowVersionStep: { __typename?: 'WorkflowAction', id: string, name: string, type: WorkflowActionType, settings: any, valid: boolean, nextStepIds?: Array | null, position?: { __typename?: 'WorkflowStepPosition', x: number, y: number } | null } }; - -export type SubmitFormStepMutationVariables = Exact<{ - input: SubmitFormStepInput; -}>; - - -export type SubmitFormStepMutation = { __typename?: 'Mutation', submitFormStep: boolean }; - -export type TestHttpRequestMutationVariables = Exact<{ - input: TestHttpRequestInput; -}>; - - -export type TestHttpRequestMutation = { __typename?: 'Mutation', testHttpRequest: { __typename?: 'TestHttpRequestOutput', success: boolean, message: string, result?: any | null, error?: any | null, status?: number | null, statusText?: string | null, headers?: any | null } }; - -export type UpdateWorkflowVersionPositionsMutationVariables = Exact<{ - input: UpdateWorkflowVersionPositionsInput; -}>; - - -export type UpdateWorkflowVersionPositionsMutation = { __typename?: 'Mutation', updateWorkflowVersionPositions: boolean }; - export type DeleteWorkspaceInvitationMutationVariables = Exact<{ appTokenId: Scalars['String']; }>; @@ -7370,6 +7287,230 @@ export const CommandMenuItemFieldsFragmentDoc = gql` availabilityObjectMetadataId } `; +export const PageLayoutWidgetFragmentFragmentDoc = gql` + fragment PageLayoutWidgetFragment on PageLayoutWidget { + id + title + type + objectMetadataId + createdAt + updatedAt + deletedAt + gridPosition { + column + columnSpan + row + rowSpan + } + position { + ... on PageLayoutWidgetGridPosition { + layoutMode + row + column + rowSpan + columnSpan + } + ... on PageLayoutWidgetVerticalListPosition { + layoutMode + index + } + ... on PageLayoutWidgetCanvasPosition { + layoutMode + } + } + configuration { + ... on BarChartConfiguration { + configurationType + aggregateFieldMetadataId + aggregateOperation + primaryAxisGroupByFieldMetadataId + primaryAxisGroupBySubFieldName + primaryAxisDateGranularity + primaryAxisOrderBy + primaryAxisManualSortOrder + secondaryAxisGroupByFieldMetadataId + secondaryAxisGroupBySubFieldName + secondaryAxisGroupByDateGranularity + secondaryAxisOrderBy + secondaryAxisManualSortOrder + omitNullValues + axisNameDisplay + displayDataLabel + displayLegend + rangeMin + rangeMax + color + description + filter + groupMode + layout + isCumulative + timezone + firstDayOfTheWeek + } + ... on LineChartConfiguration { + configurationType + aggregateFieldMetadataId + aggregateOperation + primaryAxisGroupByFieldMetadataId + primaryAxisGroupBySubFieldName + primaryAxisDateGranularity + primaryAxisOrderBy + primaryAxisManualSortOrder + secondaryAxisGroupByFieldMetadataId + secondaryAxisGroupBySubFieldName + secondaryAxisGroupByDateGranularity + secondaryAxisOrderBy + secondaryAxisManualSortOrder + omitNullValues + axisNameDisplay + displayDataLabel + displayLegend + rangeMin + rangeMax + color + description + filter + isStacked + isCumulative + timezone + firstDayOfTheWeek + } + ... on PieChartConfiguration { + configurationType + groupByFieldMetadataId + aggregateFieldMetadataId + aggregateOperation + groupBySubFieldName + dateGranularity + orderBy + manualSortOrder + displayDataLabel + showCenterMetric + displayLegend + hideEmptyCategory + color + description + filter + timezone + firstDayOfTheWeek + } + ... on AggregateChartConfiguration { + configurationType + aggregateFieldMetadataId + aggregateOperation + label + displayDataLabel + format + description + filter + prefix + suffix + timezone + firstDayOfTheWeek + ratioAggregateConfig { + fieldMetadataId + optionValue + } + } + ... on GaugeChartConfiguration { + configurationType + aggregateFieldMetadataId + aggregateOperation + displayDataLabel + color + description + filter + timezone + firstDayOfTheWeek + } + ... on IframeConfiguration { + configurationType + url + } + ... on StandaloneRichTextConfiguration { + configurationType + body { + blocknote + markdown + } + } + ... on CalendarConfiguration { + configurationType + } + ... on EmailsConfiguration { + configurationType + } + ... on FieldConfiguration { + configurationType + } + ... on FieldRichTextConfiguration { + configurationType + } + ... on FieldsConfiguration { + configurationType + } + ... on FilesConfiguration { + configurationType + } + ... on NotesConfiguration { + configurationType + } + ... on TasksConfiguration { + configurationType + } + ... on TimelineConfiguration { + configurationType + } + ... on ViewConfiguration { + configurationType + } + ... on WorkflowConfiguration { + configurationType + } + ... on WorkflowRunConfiguration { + configurationType + } + ... on WorkflowVersionConfiguration { + configurationType + } + ... on FrontComponentConfiguration { + configurationType + frontComponentId + } + } + pageLayoutTabId +} + `; +export const PageLayoutTabFragmentFragmentDoc = gql` + fragment PageLayoutTabFragment on PageLayoutTab { + id + title + icon + position + layoutMode + widgets { + ...PageLayoutWidgetFragment + } + pageLayoutId + createdAt + updatedAt +} + ${PageLayoutWidgetFragmentFragmentDoc}`; +export const PageLayoutFragmentFragmentDoc = gql` + fragment PageLayoutFragment on PageLayout { + id + name + objectMetadataId + type + defaultTabToFocusOnMobileAndSidePanelId + createdAt + updatedAt + tabs { + ...PageLayoutTabFragment + } +} + ${PageLayoutTabFragmentFragmentDoc}`; export const NavigationMenuItemFieldsFragmentDoc = gql` fragment NavigationMenuItemFields on NavigationMenuItem { id @@ -7828,12 +7969,6 @@ ${ViewFilterFragmentFragmentDoc} ${ViewFilterGroupFragmentFragmentDoc} ${ViewSortFragmentFragmentDoc} ${ViewGroupFragmentFragmentDoc}`; -export const WorkflowDiffFragmentFragmentDoc = gql` - fragment WorkflowDiffFragment on WorkflowVersionStepChanges { - triggerDiff - stepsDiff -} - `; export const ActivateSkillDocument = gql` mutation ActivateSkill($id: UUID!) { activateSkill(id: $id) { @@ -10288,6 +10423,79 @@ export function useFindManyCommandMenuItemsLazyQuery(baseOptions?: Apollo.LazyQu export type FindManyCommandMenuItemsQueryHookResult = ReturnType; export type FindManyCommandMenuItemsLazyQueryHookResult = ReturnType; export type FindManyCommandMenuItemsQueryResult = Apollo.QueryResult; +export const DuplicateDashboardDocument = gql` + mutation DuplicateDashboard($id: UUID!) { + duplicateDashboard(id: $id) { + id + title + pageLayoutId + position + createdAt + updatedAt + } +} + `; +export type DuplicateDashboardMutationFn = Apollo.MutationFunction; + +/** + * __useDuplicateDashboardMutation__ + * + * To run a mutation, you first call `useDuplicateDashboardMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDuplicateDashboardMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [duplicateDashboardMutation, { data, loading, error }] = useDuplicateDashboardMutation({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useDuplicateDashboardMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DuplicateDashboardDocument, options); + } +export type DuplicateDashboardMutationHookResult = ReturnType; +export type DuplicateDashboardMutationResult = Apollo.MutationResult; +export type DuplicateDashboardMutationOptions = Apollo.BaseMutationOptions; +export const FindOnePageLayoutDocument = gql` + query FindOnePageLayout($id: String!) { + getPageLayout(id: $id) { + ...PageLayoutFragment + } +} + ${PageLayoutFragmentFragmentDoc}`; + +/** + * __useFindOnePageLayoutQuery__ + * + * To run a query within a React component, call `useFindOnePageLayoutQuery` and pass it any options that fit your needs. + * When your component renders, `useFindOnePageLayoutQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFindOnePageLayoutQuery({ + * variables: { + * id: // value for 'id' + * }, + * }); + */ +export function useFindOnePageLayoutQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindOnePageLayoutDocument, options); + } +export function useFindOnePageLayoutLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindOnePageLayoutDocument, options); + } +export type FindOnePageLayoutQueryHookResult = ReturnType; +export type FindOnePageLayoutLazyQueryHookResult = ReturnType; +export type FindOnePageLayoutQueryResult = Apollo.QueryResult; export const CreateFileDocument = gql` mutation CreateFile($file: Upload!) { createFile(file: $file) { @@ -10498,6 +10706,52 @@ export function useGetLogicFunctionSourceCodeLazyQuery(baseOptions?: Apollo.Lazy export type GetLogicFunctionSourceCodeQueryHookResult = ReturnType; export type GetLogicFunctionSourceCodeLazyQueryHookResult = ReturnType; export type GetLogicFunctionSourceCodeQueryResult = Apollo.QueryResult; +export const FindManyMarketplaceAppsDocument = gql` + query FindManyMarketplaceApps { + findManyMarketplaceApps { + id + name + description + icon + version + author + category + logo + screenshots + aboutDescription + providers + websiteUrl + termsUrl + } +} + `; + +/** + * __useFindManyMarketplaceAppsQuery__ + * + * To run a query within a React component, call `useFindManyMarketplaceAppsQuery` and pass it any options that fit your needs. + * When your component renders, `useFindManyMarketplaceAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFindManyMarketplaceAppsQuery({ + * variables: { + * }, + * }); + */ +export function useFindManyMarketplaceAppsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindManyMarketplaceAppsDocument, options); + } +export function useFindManyMarketplaceAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindManyMarketplaceAppsDocument, options); + } +export type FindManyMarketplaceAppsQueryHookResult = ReturnType; +export type FindManyMarketplaceAppsLazyQueryHookResult = ReturnType; +export type FindManyMarketplaceAppsQueryResult = Apollo.QueryResult; export const CreateNavigationMenuItemDocument = gql` mutation CreateNavigationMenuItem($input: CreateNavigationMenuItemInput!) { createNavigationMenuItem(input: $input) { @@ -11068,6 +11322,91 @@ export function useSkipSyncEmailOnboardingStepMutation(baseOptions?: Apollo.Muta export type SkipSyncEmailOnboardingStepMutationHookResult = ReturnType; export type SkipSyncEmailOnboardingStepMutationResult = Apollo.MutationResult; export type SkipSyncEmailOnboardingStepMutationOptions = Apollo.BaseMutationOptions; +export const UpdatePageLayoutWithTabsAndWidgetsDocument = gql` + mutation UpdatePageLayoutWithTabsAndWidgets($id: String!, $input: UpdatePageLayoutWithTabsInput!) { + updatePageLayoutWithTabsAndWidgets(id: $id, input: $input) { + id + name + type + objectMetadataId + createdAt + updatedAt + deletedAt + tabs { + id + title + position + pageLayoutId + widgets { + ...PageLayoutWidgetFragment + } + createdAt + updatedAt + } + } +} + ${PageLayoutWidgetFragmentFragmentDoc}`; +export type UpdatePageLayoutWithTabsAndWidgetsMutationFn = Apollo.MutationFunction; + +/** + * __useUpdatePageLayoutWithTabsAndWidgetsMutation__ + * + * To run a mutation, you first call `useUpdatePageLayoutWithTabsAndWidgetsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdatePageLayoutWithTabsAndWidgetsMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updatePageLayoutWithTabsAndWidgetsMutation, { data, loading, error }] = useUpdatePageLayoutWithTabsAndWidgetsMutation({ + * variables: { + * id: // value for 'id' + * input: // value for 'input' + * }, + * }); + */ +export function useUpdatePageLayoutWithTabsAndWidgetsMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdatePageLayoutWithTabsAndWidgetsDocument, options); + } +export type UpdatePageLayoutWithTabsAndWidgetsMutationHookResult = ReturnType; +export type UpdatePageLayoutWithTabsAndWidgetsMutationResult = Apollo.MutationResult; +export type UpdatePageLayoutWithTabsAndWidgetsMutationOptions = Apollo.BaseMutationOptions; +export const FindAllRecordPageLayoutsDocument = gql` + query FindAllRecordPageLayouts { + getPageLayouts(pageLayoutType: RECORD_PAGE) { + ...PageLayoutFragment + } +} + ${PageLayoutFragmentFragmentDoc}`; + +/** + * __useFindAllRecordPageLayoutsQuery__ + * + * To run a query within a React component, call `useFindAllRecordPageLayoutsQuery` and pass it any options that fit your needs. + * When your component renders, `useFindAllRecordPageLayoutsQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useFindAllRecordPageLayoutsQuery({ + * variables: { + * }, + * }); + */ +export function useFindAllRecordPageLayoutsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(FindAllRecordPageLayoutsDocument, options); + } +export function useFindAllRecordPageLayoutsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(FindAllRecordPageLayoutsDocument, options); + } +export type FindAllRecordPageLayoutsQueryHookResult = ReturnType; +export type FindAllRecordPageLayoutsLazyQueryHookResult = ReturnType; +export type FindAllRecordPageLayoutsQueryResult = Apollo.QueryResult; export const BarChartDataDocument = gql` query BarChartData($input: BarChartDataInput!) { barChartData(input: $input) { @@ -15018,596 +15357,6 @@ export function useFindOneCoreViewSortLazyQuery(baseOptions?: Apollo.LazyQueryHo export type FindOneCoreViewSortQueryHookResult = ReturnType; export type FindOneCoreViewSortLazyQueryHookResult = ReturnType; export type FindOneCoreViewSortQueryResult = Apollo.QueryResult; -export const ActivateWorkflowVersionDocument = gql` - mutation ActivateWorkflowVersion($workflowVersionId: UUID!) { - activateWorkflowVersion(workflowVersionId: $workflowVersionId) -} - `; -export type ActivateWorkflowVersionMutationFn = Apollo.MutationFunction; - -/** - * __useActivateWorkflowVersionMutation__ - * - * To run a mutation, you first call `useActivateWorkflowVersionMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useActivateWorkflowVersionMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [activateWorkflowVersionMutation, { data, loading, error }] = useActivateWorkflowVersionMutation({ - * variables: { - * workflowVersionId: // value for 'workflowVersionId' - * }, - * }); - */ -export function useActivateWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(ActivateWorkflowVersionDocument, options); - } -export type ActivateWorkflowVersionMutationHookResult = ReturnType; -export type ActivateWorkflowVersionMutationResult = Apollo.MutationResult; -export type ActivateWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; -export const ComputeStepOutputSchemaDocument = gql` - mutation ComputeStepOutputSchema($input: ComputeStepOutputSchemaInput!) { - computeStepOutputSchema(input: $input) -} - `; -export type ComputeStepOutputSchemaMutationFn = Apollo.MutationFunction; - -/** - * __useComputeStepOutputSchemaMutation__ - * - * To run a mutation, you first call `useComputeStepOutputSchemaMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useComputeStepOutputSchemaMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [computeStepOutputSchemaMutation, { data, loading, error }] = useComputeStepOutputSchemaMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useComputeStepOutputSchemaMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(ComputeStepOutputSchemaDocument, options); - } -export type ComputeStepOutputSchemaMutationHookResult = ReturnType; -export type ComputeStepOutputSchemaMutationResult = Apollo.MutationResult; -export type ComputeStepOutputSchemaMutationOptions = Apollo.BaseMutationOptions; -export const CreateDraftFromWorkflowVersionDocument = gql` - mutation CreateDraftFromWorkflowVersion($input: CreateDraftFromWorkflowVersionInput!) { - createDraftFromWorkflowVersion(input: $input) { - id - name - status - trigger - steps - createdAt - updatedAt - } -} - `; -export type CreateDraftFromWorkflowVersionMutationFn = Apollo.MutationFunction; - -/** - * __useCreateDraftFromWorkflowVersionMutation__ - * - * To run a mutation, you first call `useCreateDraftFromWorkflowVersionMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateDraftFromWorkflowVersionMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createDraftFromWorkflowVersionMutation, { data, loading, error }] = useCreateDraftFromWorkflowVersionMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateDraftFromWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateDraftFromWorkflowVersionDocument, options); - } -export type CreateDraftFromWorkflowVersionMutationHookResult = ReturnType; -export type CreateDraftFromWorkflowVersionMutationResult = Apollo.MutationResult; -export type CreateDraftFromWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; -export const CreateWorkflowVersionEdgeDocument = gql` - mutation CreateWorkflowVersionEdge($input: CreateWorkflowVersionEdgeInput!) { - createWorkflowVersionEdge(input: $input) { - ...WorkflowDiffFragment - } -} - ${WorkflowDiffFragmentFragmentDoc}`; -export type CreateWorkflowVersionEdgeMutationFn = Apollo.MutationFunction; - -/** - * __useCreateWorkflowVersionEdgeMutation__ - * - * To run a mutation, you first call `useCreateWorkflowVersionEdgeMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateWorkflowVersionEdgeMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createWorkflowVersionEdgeMutation, { data, loading, error }] = useCreateWorkflowVersionEdgeMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateWorkflowVersionEdgeMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateWorkflowVersionEdgeDocument, options); - } -export type CreateWorkflowVersionEdgeMutationHookResult = ReturnType; -export type CreateWorkflowVersionEdgeMutationResult = Apollo.MutationResult; -export type CreateWorkflowVersionEdgeMutationOptions = Apollo.BaseMutationOptions; -export const CreateWorkflowVersionStepDocument = gql` - mutation CreateWorkflowVersionStep($input: CreateWorkflowVersionStepInput!) { - createWorkflowVersionStep(input: $input) { - ...WorkflowDiffFragment - } -} - ${WorkflowDiffFragmentFragmentDoc}`; -export type CreateWorkflowVersionStepMutationFn = Apollo.MutationFunction; - -/** - * __useCreateWorkflowVersionStepMutation__ - * - * To run a mutation, you first call `useCreateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateWorkflowVersionStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createWorkflowVersionStepMutation, { data, loading, error }] = useCreateWorkflowVersionStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateWorkflowVersionStepDocument, options); - } -export type CreateWorkflowVersionStepMutationHookResult = ReturnType; -export type CreateWorkflowVersionStepMutationResult = Apollo.MutationResult; -export type CreateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; -export const DeactivateWorkflowVersionDocument = gql` - mutation DeactivateWorkflowVersion($workflowVersionId: UUID!) { - deactivateWorkflowVersion(workflowVersionId: $workflowVersionId) -} - `; -export type DeactivateWorkflowVersionMutationFn = Apollo.MutationFunction; - -/** - * __useDeactivateWorkflowVersionMutation__ - * - * To run a mutation, you first call `useDeactivateWorkflowVersionMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeactivateWorkflowVersionMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deactivateWorkflowVersionMutation, { data, loading, error }] = useDeactivateWorkflowVersionMutation({ - * variables: { - * workflowVersionId: // value for 'workflowVersionId' - * }, - * }); - */ -export function useDeactivateWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeactivateWorkflowVersionDocument, options); - } -export type DeactivateWorkflowVersionMutationHookResult = ReturnType; -export type DeactivateWorkflowVersionMutationResult = Apollo.MutationResult; -export type DeactivateWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; -export const DeleteWorkflowVersionEdgeDocument = gql` - mutation DeleteWorkflowVersionEdge($input: CreateWorkflowVersionEdgeInput!) { - deleteWorkflowVersionEdge(input: $input) { - ...WorkflowDiffFragment - } -} - ${WorkflowDiffFragmentFragmentDoc}`; -export type DeleteWorkflowVersionEdgeMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteWorkflowVersionEdgeMutation__ - * - * To run a mutation, you first call `useDeleteWorkflowVersionEdgeMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteWorkflowVersionEdgeMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteWorkflowVersionEdgeMutation, { data, loading, error }] = useDeleteWorkflowVersionEdgeMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDeleteWorkflowVersionEdgeMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteWorkflowVersionEdgeDocument, options); - } -export type DeleteWorkflowVersionEdgeMutationHookResult = ReturnType; -export type DeleteWorkflowVersionEdgeMutationResult = Apollo.MutationResult; -export type DeleteWorkflowVersionEdgeMutationOptions = Apollo.BaseMutationOptions; -export const DeleteWorkflowVersionStepDocument = gql` - mutation DeleteWorkflowVersionStep($input: DeleteWorkflowVersionStepInput!) { - deleteWorkflowVersionStep(input: $input) { - ...WorkflowDiffFragment - } -} - ${WorkflowDiffFragmentFragmentDoc}`; -export type DeleteWorkflowVersionStepMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteWorkflowVersionStepMutation__ - * - * To run a mutation, you first call `useDeleteWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteWorkflowVersionStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteWorkflowVersionStepMutation, { data, loading, error }] = useDeleteWorkflowVersionStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDeleteWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteWorkflowVersionStepDocument, options); - } -export type DeleteWorkflowVersionStepMutationHookResult = ReturnType; -export type DeleteWorkflowVersionStepMutationResult = Apollo.MutationResult; -export type DeleteWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; -export const DuplicateWorkflowDocument = gql` - mutation DuplicateWorkflow($input: DuplicateWorkflowInput!) { - duplicateWorkflow(input: $input) { - id - name - status - trigger - steps - createdAt - updatedAt - workflowId - } -} - `; -export type DuplicateWorkflowMutationFn = Apollo.MutationFunction; - -/** - * __useDuplicateWorkflowMutation__ - * - * To run a mutation, you first call `useDuplicateWorkflowMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDuplicateWorkflowMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [duplicateWorkflowMutation, { data, loading, error }] = useDuplicateWorkflowMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDuplicateWorkflowMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DuplicateWorkflowDocument, options); - } -export type DuplicateWorkflowMutationHookResult = ReturnType; -export type DuplicateWorkflowMutationResult = Apollo.MutationResult; -export type DuplicateWorkflowMutationOptions = Apollo.BaseMutationOptions; -export const DuplicateWorkflowVersionStepDocument = gql` - mutation DuplicateWorkflowVersionStep($input: DuplicateWorkflowVersionStepInput!) { - duplicateWorkflowVersionStep(input: $input) { - ...WorkflowDiffFragment - } -} - ${WorkflowDiffFragmentFragmentDoc}`; -export type DuplicateWorkflowVersionStepMutationFn = Apollo.MutationFunction; - -/** - * __useDuplicateWorkflowVersionStepMutation__ - * - * To run a mutation, you first call `useDuplicateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDuplicateWorkflowVersionStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [duplicateWorkflowVersionStepMutation, { data, loading, error }] = useDuplicateWorkflowVersionStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDuplicateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DuplicateWorkflowVersionStepDocument, options); - } -export type DuplicateWorkflowVersionStepMutationHookResult = ReturnType; -export type DuplicateWorkflowVersionStepMutationResult = Apollo.MutationResult; -export type DuplicateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; -export const RunWorkflowVersionDocument = gql` - mutation RunWorkflowVersion($input: RunWorkflowVersionInput!) { - runWorkflowVersion(input: $input) { - workflowRunId - } -} - `; -export type RunWorkflowVersionMutationFn = Apollo.MutationFunction; - -/** - * __useRunWorkflowVersionMutation__ - * - * To run a mutation, you first call `useRunWorkflowVersionMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useRunWorkflowVersionMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [runWorkflowVersionMutation, { data, loading, error }] = useRunWorkflowVersionMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useRunWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(RunWorkflowVersionDocument, options); - } -export type RunWorkflowVersionMutationHookResult = ReturnType; -export type RunWorkflowVersionMutationResult = Apollo.MutationResult; -export type RunWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; -export const StopWorkflowRunDocument = gql` - mutation StopWorkflowRun($workflowRunId: UUID!) { - stopWorkflowRun(workflowRunId: $workflowRunId) { - id - status - __typename - } -} - `; -export type StopWorkflowRunMutationFn = Apollo.MutationFunction; - -/** - * __useStopWorkflowRunMutation__ - * - * To run a mutation, you first call `useStopWorkflowRunMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useStopWorkflowRunMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [stopWorkflowRunMutation, { data, loading, error }] = useStopWorkflowRunMutation({ - * variables: { - * workflowRunId: // value for 'workflowRunId' - * }, - * }); - */ -export function useStopWorkflowRunMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(StopWorkflowRunDocument, options); - } -export type StopWorkflowRunMutationHookResult = ReturnType; -export type StopWorkflowRunMutationResult = Apollo.MutationResult; -export type StopWorkflowRunMutationOptions = Apollo.BaseMutationOptions; -export const UpdateWorkflowRunStepDocument = gql` - mutation UpdateWorkflowRunStep($input: UpdateWorkflowRunStepInput!) { - updateWorkflowRunStep(input: $input) { - id - name - type - settings - valid - nextStepIds - position { - x - y - } - } -} - `; -export type UpdateWorkflowRunStepMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateWorkflowRunStepMutation__ - * - * To run a mutation, you first call `useUpdateWorkflowRunStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateWorkflowRunStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateWorkflowRunStepMutation, { data, loading, error }] = useUpdateWorkflowRunStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateWorkflowRunStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateWorkflowRunStepDocument, options); - } -export type UpdateWorkflowRunStepMutationHookResult = ReturnType; -export type UpdateWorkflowRunStepMutationResult = Apollo.MutationResult; -export type UpdateWorkflowRunStepMutationOptions = Apollo.BaseMutationOptions; -export const UpdateWorkflowVersionStepDocument = gql` - mutation UpdateWorkflowVersionStep($input: UpdateWorkflowVersionStepInput!) { - updateWorkflowVersionStep(input: $input) { - id - name - type - settings - valid - nextStepIds - position { - x - y - } - } -} - `; -export type UpdateWorkflowVersionStepMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateWorkflowVersionStepMutation__ - * - * To run a mutation, you first call `useUpdateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateWorkflowVersionStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateWorkflowVersionStepMutation, { data, loading, error }] = useUpdateWorkflowVersionStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateWorkflowVersionStepDocument, options); - } -export type UpdateWorkflowVersionStepMutationHookResult = ReturnType; -export type UpdateWorkflowVersionStepMutationResult = Apollo.MutationResult; -export type UpdateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; -export const SubmitFormStepDocument = gql` - mutation SubmitFormStep($input: SubmitFormStepInput!) { - submitFormStep(input: $input) -} - `; -export type SubmitFormStepMutationFn = Apollo.MutationFunction; - -/** - * __useSubmitFormStepMutation__ - * - * To run a mutation, you first call `useSubmitFormStepMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useSubmitFormStepMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [submitFormStepMutation, { data, loading, error }] = useSubmitFormStepMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useSubmitFormStepMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(SubmitFormStepDocument, options); - } -export type SubmitFormStepMutationHookResult = ReturnType; -export type SubmitFormStepMutationResult = Apollo.MutationResult; -export type SubmitFormStepMutationOptions = Apollo.BaseMutationOptions; -export const TestHttpRequestDocument = gql` - mutation TestHttpRequest($input: TestHttpRequestInput!) { - testHttpRequest(input: $input) { - success - message - result - error - status - statusText - headers - } -} - `; -export type TestHttpRequestMutationFn = Apollo.MutationFunction; - -/** - * __useTestHttpRequestMutation__ - * - * To run a mutation, you first call `useTestHttpRequestMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useTestHttpRequestMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [testHttpRequestMutation, { data, loading, error }] = useTestHttpRequestMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useTestHttpRequestMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(TestHttpRequestDocument, options); - } -export type TestHttpRequestMutationHookResult = ReturnType; -export type TestHttpRequestMutationResult = Apollo.MutationResult; -export type TestHttpRequestMutationOptions = Apollo.BaseMutationOptions; -export const UpdateWorkflowVersionPositionsDocument = gql` - mutation UpdateWorkflowVersionPositions($input: UpdateWorkflowVersionPositionsInput!) { - updateWorkflowVersionPositions(input: $input) -} - `; -export type UpdateWorkflowVersionPositionsMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateWorkflowVersionPositionsMutation__ - * - * To run a mutation, you first call `useUpdateWorkflowVersionPositionsMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateWorkflowVersionPositionsMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateWorkflowVersionPositionsMutation, { data, loading, error }] = useUpdateWorkflowVersionPositionsMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateWorkflowVersionPositionsMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateWorkflowVersionPositionsDocument, options); - } -export type UpdateWorkflowVersionPositionsMutationHookResult = ReturnType; -export type UpdateWorkflowVersionPositionsMutationResult = Apollo.MutationResult; -export type UpdateWorkflowVersionPositionsMutationOptions = Apollo.BaseMutationOptions; export const DeleteWorkspaceInvitationDocument = gql` mutation DeleteWorkspaceInvitation($appTokenId: String!) { deleteWorkspaceInvitation(appTokenId: $appTokenId) diff --git a/packages/twenty-front/src/generated/graphql.ts b/packages/twenty-front/src/generated/graphql.ts index 973bf70e96c..87324e5cd32 100644 --- a/packages/twenty-front/src/generated/graphql.ts +++ b/packages/twenty-front/src/generated/graphql.ts @@ -1129,14 +1129,6 @@ export type CreateViewSortInput = { viewId: Scalars['UUID']; }; -export type CreateWebhookInput = { - description?: InputMaybe; - id?: InputMaybe; - operations: Array; - secret?: InputMaybe; - targetUrl: Scalars['String']; -}; - export type CreateWorkflowVersionEdgeInput = { /** Workflow version source step ID */ source: Scalars['String']; @@ -2104,7 +2096,6 @@ export type Mutation = { createPageLayoutWidget: PageLayoutWidget; createPublicDomain: PublicDomain; createSAMLIdentityProvider: SetupSsoOutput; - createWebhook: Webhook; createWorkflowVersionEdge: WorkflowVersionStepChanges; createWorkflowVersionStep: WorkflowVersionStepChanges; deactivateWorkflowVersion: Scalars['Boolean']; @@ -2132,7 +2123,6 @@ export type Mutation = { deleteTwoFactorAuthenticationMethod: DeleteTwoFactorAuthenticationMethodOutput; deleteUser: User; deleteUserFromWorkspace: UserWorkspace; - deleteWebhook: Webhook; deleteWorkflowVersionEdge: WorkflowVersionStepChanges; deleteWorkflowVersionStep: WorkflowVersionStepChanges; deleteWorkspaceInvitation: Scalars['String']; @@ -2215,7 +2205,6 @@ export type Mutation = { updatePageLayoutWithTabsAndWidgets: PageLayout; updatePasswordViaResetToken: InvalidatePasswordOutput; updateUserEmail: Scalars['Boolean']; - updateWebhook: Webhook; updateWorkflowRunStep: WorkflowAction; updateWorkflowVersionPositions: Scalars['Boolean']; updateWorkflowVersionStep: WorkflowAction; @@ -2444,11 +2433,6 @@ export type MutationCreateSamlIdentityProviderArgs = { }; -export type MutationCreateWebhookArgs = { - input: CreateWebhookInput; -}; - - export type MutationCreateWorkflowVersionEdgeArgs = { input: CreateWorkflowVersionEdgeInput; }; @@ -2575,11 +2559,6 @@ export type MutationDeleteUserFromWorkspaceArgs = { }; -export type MutationDeleteWebhookArgs = { - id: Scalars['UUID']; -}; - - export type MutationDeleteWorkflowVersionEdgeArgs = { input: CreateWorkflowVersionEdgeInput; }; @@ -2983,11 +2962,6 @@ export type MutationUpdateUserEmailArgs = { }; -export type MutationUpdateWebhookArgs = { - input: UpdateWebhookInput; -}; - - export type MutationUpdateWorkflowRunStepArgs = { input: UpdateWorkflowRunStepInput; }; @@ -3622,8 +3596,6 @@ export type Query = { search: SearchResultConnection; validatePasswordResetToken: ValidatePasswordResetTokenOutput; versionInfo: VersionInfo; - webhook?: Maybe; - webhooks: Array; }; @@ -3910,11 +3882,6 @@ export type QueryValidatePasswordResetTokenArgs = { passwordResetToken: Scalars['String']; }; - -export type QueryWebhookArgs = { - id: Scalars['UUID']; -}; - export type QueueJob = { __typename?: 'QueueJob'; attemptsMade: Scalars['Float']; @@ -4738,20 +4705,6 @@ export type UpdateViewSortInput = { viewId?: InputMaybe; }; -export type UpdateWebhookInput = { - /** The id of the webhook to update */ - id: Scalars['UUID']; - /** The webhook fields to update */ - update: UpdateWebhookInputUpdates; -}; - -export type UpdateWebhookInputUpdates = { - description?: InputMaybe; - operations?: InputMaybe>; - secret?: InputMaybe; - targetUrl?: InputMaybe; -}; - export type UpdateWorkflowRunStepInput = { /** Step to update in JSON format */ step: Scalars['JSON']; @@ -5325,6 +5278,72 @@ export type WorkspaceUrlsAndId = { workspaceUrls: WorkspaceUrls; }; +export type TimelineCalendarEventFragmentFragment = { __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; + +export type TimelineCalendarEventParticipantFragmentFragment = { __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; + +export type TimelineCalendarEventsWithTotalFragmentFragment = { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; + +export type GetTimelineCalendarEventsFromCompanyIdQueryVariables = Exact<{ + companyId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineCalendarEventsFromCompanyIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromCompanyId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + +export type GetTimelineCalendarEventsFromOpportunityIdQueryVariables = Exact<{ + opportunityId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineCalendarEventsFromOpportunityIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromOpportunityId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + +export type GetTimelineCalendarEventsFromPersonIdQueryVariables = Exact<{ + personId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineCalendarEventsFromPersonIdQuery = { __typename?: 'Query', getTimelineCalendarEventsFromPersonId: { __typename?: 'TimelineCalendarEventsWithTotal', totalNumberOfCalendarEvents: number, timelineCalendarEvents: Array<{ __typename?: 'TimelineCalendarEvent', id: any, title: string, description: string, location: string, startsAt: string, endsAt: string, isFullDay: boolean, visibility: CalendarChannelVisibility, participants: Array<{ __typename?: 'TimelineCalendarEventParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + +export type ParticipantFragmentFragment = { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }; + +export type TimelineThreadFragmentFragment = { __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }; + +export type TimelineThreadsWithTotalFragmentFragment = { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> }; + +export type GetTimelineThreadsFromCompanyIdQueryVariables = Exact<{ + companyId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineThreadsFromCompanyIdQuery = { __typename?: 'Query', getTimelineThreadsFromCompanyId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + +export type GetTimelineThreadsFromOpportunityIdQueryVariables = Exact<{ + opportunityId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineThreadsFromOpportunityIdQuery = { __typename?: 'Query', getTimelineThreadsFromOpportunityId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + +export type GetTimelineThreadsFromPersonIdQueryVariables = Exact<{ + personId: Scalars['UUID']; + page: Scalars['Int']; + pageSize: Scalars['Int']; +}>; + + +export type GetTimelineThreadsFromPersonIdQuery = { __typename?: 'Query', getTimelineThreadsFromPersonId: { __typename?: 'TimelineThreadsWithTotal', totalNumberOfThreads: number, timelineThreads: Array<{ __typename?: 'TimelineThread', id: any, read: boolean, visibility: MessageChannelVisibility, lastMessageReceivedAt: string, lastMessageBody: string, subject: string, numberOfMessagesInThread: number, participantCount: number, firstParticipant: { __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }, lastTwoParticipants: Array<{ __typename?: 'TimelineThreadParticipant', personId?: any | null, workspaceMemberId?: any | null, firstName: string, lastName: string, displayName: string, avatarUrl: string, handle: string }> }> } }; + export type SearchQueryVariables = Exact<{ searchInput: Scalars['String']; limit: Scalars['Int']; @@ -5337,653 +5356,450 @@ export type SearchQueryVariables = Exact<{ export type SearchQuery = { __typename?: 'Query', search: { __typename?: 'SearchResultConnection', edges: Array<{ __typename?: 'SearchResultEdge', cursor: string, node: { __typename?: 'SearchRecord', recordId: any, objectNameSingular: string, objectLabelSingular: string, label: string, imageUrl?: string | null, tsRankCD: number, tsRank: number } }>, pageInfo: { __typename?: 'SearchResultPageInfo', hasNextPage: boolean, endCursor?: string | null } } }; -export type PageLayoutFragmentFragment = { __typename?: 'PageLayout', id: any, name: string, objectMetadataId?: any | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: any | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: any, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: any, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null }; +export type WorkflowDiffFragmentFragment = { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null }; -export type PageLayoutTabFragmentFragment = { __typename?: 'PageLayoutTab', id: any, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: any, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }; - -export type DuplicateDashboardMutationVariables = Exact<{ - id: Scalars['UUID']; +export type ActivateWorkflowVersionMutationVariables = Exact<{ + workflowVersionId: Scalars['UUID']; }>; -export type DuplicateDashboardMutation = { __typename?: 'Mutation', duplicateDashboard: { __typename?: 'DuplicatedDashboard', id: any, title?: string | null, pageLayoutId?: any | null, position: number, createdAt: string, updatedAt: string } }; +export type ActivateWorkflowVersionMutation = { __typename?: 'Mutation', activateWorkflowVersion: boolean }; -export type FindOnePageLayoutQueryVariables = Exact<{ - id: Scalars['String']; +export type ComputeStepOutputSchemaMutationVariables = Exact<{ + input: ComputeStepOutputSchemaInput; }>; -export type FindOnePageLayoutQuery = { __typename?: 'Query', getPageLayout?: { __typename?: 'PageLayout', id: any, name: string, objectMetadataId?: any | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: any | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: any, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: any, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null } | null }; +export type ComputeStepOutputSchemaMutation = { __typename?: 'Mutation', computeStepOutputSchema: any }; -export type FindManyMarketplaceAppsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type FindManyMarketplaceAppsQuery = { __typename?: 'Query', findManyMarketplaceApps: Array<{ __typename?: 'MarketplaceApp', id: string, name: string, description: string, icon: string, version: string, author: string, category: string, logo?: string | null, screenshots: Array, aboutDescription: string, providers: Array, websiteUrl?: string | null, termsUrl?: string | null }> }; - -export type PageLayoutWidgetFragmentFragment = { __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }; - -export type UpdatePageLayoutWithTabsAndWidgetsMutationVariables = Exact<{ - id: Scalars['String']; - input: UpdatePageLayoutWithTabsInput; +export type CreateDraftFromWorkflowVersionMutationVariables = Exact<{ + input: CreateDraftFromWorkflowVersionInput; }>; -export type UpdatePageLayoutWithTabsAndWidgetsMutation = { __typename?: 'Mutation', updatePageLayoutWithTabsAndWidgets: { __typename?: 'PageLayout', id: any, name: string, type: PageLayoutType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, tabs?: Array<{ __typename?: 'PageLayoutTab', id: any, title: string, position: number, pageLayoutId: any, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null } }; +export type CreateDraftFromWorkflowVersionMutation = { __typename?: 'Mutation', createDraftFromWorkflowVersion: { __typename?: 'WorkflowVersionDTO', id: any, name: string, status: string, trigger?: any | null, steps?: any | null, createdAt: string, updatedAt: string } }; -export type FindAllRecordPageLayoutsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type FindAllRecordPageLayoutsQuery = { __typename?: 'Query', getPageLayouts: Array<{ __typename?: 'PageLayout', id: any, name: string, objectMetadataId?: any | null, type: PageLayoutType, defaultTabToFocusOnMobileAndSidePanelId?: any | null, createdAt: string, updatedAt: string, tabs?: Array<{ __typename?: 'PageLayoutTab', id: any, title: string, icon?: string | null, position: number, layoutMode?: PageLayoutTabLayoutMode | null, pageLayoutId: any, createdAt: string, updatedAt: string, widgets?: Array<{ __typename?: 'PageLayoutWidget', id: any, title: string, type: WidgetType, objectMetadataId?: any | null, createdAt: string, updatedAt: string, deletedAt?: string | null, pageLayoutTabId: any, gridPosition: { __typename?: 'GridPosition', column: number, columnSpan: number, row: number, rowSpan: number }, position?: { __typename?: 'PageLayoutWidgetCanvasPosition', layoutMode: PageLayoutTabLayoutMode } | { __typename?: 'PageLayoutWidgetGridPosition', layoutMode: PageLayoutTabLayoutMode, row: number, column: number, rowSpan: number, columnSpan: number } | { __typename?: 'PageLayoutWidgetVerticalListPosition', layoutMode: PageLayoutTabLayoutMode, index: number } | null, configuration: { __typename?: 'AggregateChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, label?: string | null, displayDataLabel?: boolean | null, format?: string | null, description?: string | null, filter?: any | null, prefix?: string | null, suffix?: string | null, timezone?: string | null, firstDayOfTheWeek?: number | null, ratioAggregateConfig?: { __typename?: 'RatioAggregateConfig', fieldMetadataId: any, optionValue: string } | null } | { __typename?: 'BarChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, groupMode?: BarChartGroupMode | null, layout: BarChartLayout, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'CalendarConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'EmailsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldRichTextConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FieldsConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FilesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'FrontComponentConfiguration', configurationType: WidgetConfigurationType, frontComponentId: any } | { __typename?: 'GaugeChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, displayDataLabel?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'IframeConfiguration', configurationType: WidgetConfigurationType, url?: string | null } | { __typename?: 'LineChartConfiguration', configurationType: WidgetConfigurationType, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, primaryAxisGroupByFieldMetadataId: any, primaryAxisGroupBySubFieldName?: string | null, primaryAxisDateGranularity?: ObjectRecordGroupByDateGranularity | null, primaryAxisOrderBy?: GraphOrderBy | null, primaryAxisManualSortOrder?: Array | null, secondaryAxisGroupByFieldMetadataId?: any | null, secondaryAxisGroupBySubFieldName?: string | null, secondaryAxisGroupByDateGranularity?: ObjectRecordGroupByDateGranularity | null, secondaryAxisOrderBy?: GraphOrderBy | null, secondaryAxisManualSortOrder?: Array | null, omitNullValues?: boolean | null, axisNameDisplay?: AxisNameDisplay | null, displayDataLabel?: boolean | null, displayLegend?: boolean | null, rangeMin?: number | null, rangeMax?: number | null, color?: string | null, description?: string | null, filter?: any | null, isStacked?: boolean | null, isCumulative?: boolean | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'NotesConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'PieChartConfiguration', configurationType: WidgetConfigurationType, groupByFieldMetadataId: any, aggregateFieldMetadataId: any, aggregateOperation: AggregateOperations, groupBySubFieldName?: string | null, dateGranularity?: ObjectRecordGroupByDateGranularity | null, orderBy?: GraphOrderBy | null, manualSortOrder?: Array | null, displayDataLabel?: boolean | null, showCenterMetric?: boolean | null, displayLegend?: boolean | null, hideEmptyCategory?: boolean | null, color?: string | null, description?: string | null, filter?: any | null, timezone?: string | null, firstDayOfTheWeek?: number | null } | { __typename?: 'StandaloneRichTextConfiguration', configurationType: WidgetConfigurationType, body: { __typename?: 'RichTextV2Body', blocknote?: string | null, markdown?: string | null } } | { __typename?: 'TasksConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'TimelineConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'ViewConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowRunConfiguration', configurationType: WidgetConfigurationType } | { __typename?: 'WorkflowVersionConfiguration', configurationType: WidgetConfigurationType } }> | null }> | null }> }; - -export type ViewFieldFragmentFragment = { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }; - -export type ViewFilterFragmentFragment = { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }; - -export type ViewFilterGroupFragmentFragment = { __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }; - -export type ViewFragmentFragment = { __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; - -export type ViewGroupFragmentFragment = { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }; - -export type ViewSortFragmentFragment = { __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }; - -export type CreateCoreViewMutationVariables = Exact<{ - input: CreateViewInput; +export type CreateWorkflowVersionEdgeMutationVariables = Exact<{ + input: CreateWorkflowVersionEdgeInput; }>; -export type CreateCoreViewMutation = { __typename?: 'Mutation', createCoreView: { __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> } }; +export type CreateWorkflowVersionEdgeMutation = { __typename?: 'Mutation', createWorkflowVersionEdge: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; -export type CreateCoreViewFieldMutationVariables = Exact<{ - input: CreateViewFieldInput; +export type CreateWorkflowVersionStepMutationVariables = Exact<{ + input: CreateWorkflowVersionStepInput; }>; -export type CreateCoreViewFieldMutation = { __typename?: 'Mutation', createCoreViewField: { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type CreateWorkflowVersionStepMutation = { __typename?: 'Mutation', createWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; -export type CreateCoreViewFilterMutationVariables = Exact<{ - input: CreateViewFilterInput; +export type DeactivateWorkflowVersionMutationVariables = Exact<{ + workflowVersionId: Scalars['UUID']; }>; -export type CreateCoreViewFilterMutation = { __typename?: 'Mutation', createCoreViewFilter: { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type DeactivateWorkflowVersionMutation = { __typename?: 'Mutation', deactivateWorkflowVersion: boolean }; -export type CreateCoreViewFilterGroupMutationVariables = Exact<{ - input: CreateViewFilterGroupInput; +export type DeleteWorkflowVersionEdgeMutationVariables = Exact<{ + input: CreateWorkflowVersionEdgeInput; }>; -export type CreateCoreViewFilterGroupMutation = { __typename?: 'Mutation', createCoreViewFilterGroup: { __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any } }; +export type DeleteWorkflowVersionEdgeMutation = { __typename?: 'Mutation', deleteWorkflowVersionEdge: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; -export type CreateCoreViewGroupMutationVariables = Exact<{ - input: CreateViewGroupInput; +export type DeleteWorkflowVersionStepMutationVariables = Exact<{ + input: DeleteWorkflowVersionStepInput; }>; -export type CreateCoreViewGroupMutation = { __typename?: 'Mutation', createCoreViewGroup: { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type DeleteWorkflowVersionStepMutation = { __typename?: 'Mutation', deleteWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; -export type CreateCoreViewSortMutationVariables = Exact<{ - input: CreateViewSortInput; +export type DuplicateWorkflowMutationVariables = Exact<{ + input: DuplicateWorkflowInput; }>; -export type CreateCoreViewSortMutation = { __typename?: 'Mutation', createCoreViewSort: { __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any } }; +export type DuplicateWorkflowMutation = { __typename?: 'Mutation', duplicateWorkflow: { __typename?: 'WorkflowVersionDTO', id: any, name: string, status: string, trigger?: any | null, steps?: any | null, createdAt: string, updatedAt: string, workflowId: any } }; -export type CreateManyCoreViewFieldsMutationVariables = Exact<{ - inputs: Array | CreateViewFieldInput; +export type DuplicateWorkflowVersionStepMutationVariables = Exact<{ + input: DuplicateWorkflowVersionStepInput; }>; -export type CreateManyCoreViewFieldsMutation = { __typename?: 'Mutation', createManyCoreViewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; +export type DuplicateWorkflowVersionStepMutation = { __typename?: 'Mutation', duplicateWorkflowVersionStep: { __typename?: 'WorkflowVersionStepChanges', triggerDiff?: any | null, stepsDiff?: any | null } }; -export type CreateManyCoreViewGroupsMutationVariables = Exact<{ - inputs: Array | CreateViewGroupInput; +export type RunWorkflowVersionMutationVariables = Exact<{ + input: RunWorkflowVersionInput; }>; -export type CreateManyCoreViewGroupsMutation = { __typename?: 'Mutation', createManyCoreViewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; +export type RunWorkflowVersionMutation = { __typename?: 'Mutation', runWorkflowVersion: { __typename?: 'RunWorkflowVersionOutput', workflowRunId: any } }; -export type DeleteCoreViewMutationVariables = Exact<{ - id: Scalars['String']; +export type StopWorkflowRunMutationVariables = Exact<{ + workflowRunId: Scalars['UUID']; }>; -export type DeleteCoreViewMutation = { __typename?: 'Mutation', deleteCoreView: boolean }; +export type StopWorkflowRunMutation = { __typename?: 'Mutation', stopWorkflowRun: { __typename: 'WorkflowRun', id: any, status: WorkflowRunStatusEnum } }; -export type DeleteCoreViewFieldMutationVariables = Exact<{ - input: DeleteViewFieldInput; +export type UpdateWorkflowRunStepMutationVariables = Exact<{ + input: UpdateWorkflowRunStepInput; }>; -export type DeleteCoreViewFieldMutation = { __typename?: 'Mutation', deleteCoreViewField: { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type UpdateWorkflowRunStepMutation = { __typename?: 'Mutation', updateWorkflowRunStep: { __typename?: 'WorkflowAction', id: any, name: string, type: WorkflowActionType, settings: any, valid: boolean, nextStepIds?: Array | null, position?: { __typename?: 'WorkflowStepPosition', x: number, y: number } | null } }; -export type DeleteCoreViewFilterMutationVariables = Exact<{ - input: DeleteViewFilterInput; +export type UpdateWorkflowVersionStepMutationVariables = Exact<{ + input: UpdateWorkflowVersionStepInput; }>; -export type DeleteCoreViewFilterMutation = { __typename?: 'Mutation', deleteCoreViewFilter: { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type UpdateWorkflowVersionStepMutation = { __typename?: 'Mutation', updateWorkflowVersionStep: { __typename?: 'WorkflowAction', id: any, name: string, type: WorkflowActionType, settings: any, valid: boolean, nextStepIds?: Array | null, position?: { __typename?: 'WorkflowStepPosition', x: number, y: number } | null } }; -export type DeleteCoreViewFilterGroupMutationVariables = Exact<{ - id: Scalars['String']; +export type SubmitFormStepMutationVariables = Exact<{ + input: SubmitFormStepInput; }>; -export type DeleteCoreViewFilterGroupMutation = { __typename?: 'Mutation', deleteCoreViewFilterGroup: boolean }; +export type SubmitFormStepMutation = { __typename?: 'Mutation', submitFormStep: boolean }; -export type DeleteCoreViewGroupMutationVariables = Exact<{ - input: DeleteViewGroupInput; +export type TestHttpRequestMutationVariables = Exact<{ + input: TestHttpRequestInput; }>; -export type DeleteCoreViewGroupMutation = { __typename?: 'Mutation', deleteCoreViewGroup: { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; +export type TestHttpRequestMutation = { __typename?: 'Mutation', testHttpRequest: { __typename?: 'TestHttpRequestOutput', success: boolean, message: string, result?: any | null, error?: any | null, status?: number | null, statusText?: string | null, headers?: any | null } }; -export type DeleteCoreViewSortMutationVariables = Exact<{ - id: Scalars['String']; +export type UpdateWorkflowVersionPositionsMutationVariables = Exact<{ + input: UpdateWorkflowVersionPositionsInput; }>; -export type DeleteCoreViewSortMutation = { __typename?: 'Mutation', deleteCoreViewSort: boolean }; - -export type DestroyCoreViewMutationVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type DestroyCoreViewMutation = { __typename?: 'Mutation', destroyCoreView: boolean }; - -export type DestroyCoreViewFieldMutationVariables = Exact<{ - input: DestroyViewFieldInput; -}>; - - -export type DestroyCoreViewFieldMutation = { __typename?: 'Mutation', destroyCoreViewField: { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type DestroyCoreViewFilterMutationVariables = Exact<{ - input: DestroyViewFilterInput; -}>; - - -export type DestroyCoreViewFilterMutation = { __typename?: 'Mutation', destroyCoreViewFilter: { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type DestroyCoreViewFilterGroupMutationVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type DestroyCoreViewFilterGroupMutation = { __typename?: 'Mutation', destroyCoreViewFilterGroup: boolean }; - -export type DestroyCoreViewGroupMutationVariables = Exact<{ - input: DestroyViewGroupInput; -}>; - - -export type DestroyCoreViewGroupMutation = { __typename?: 'Mutation', destroyCoreViewGroup: { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type DestroyCoreViewSortMutationVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type DestroyCoreViewSortMutation = { __typename?: 'Mutation', destroyCoreViewSort: boolean }; - -export type UpdateCoreViewMutationVariables = Exact<{ - id: Scalars['String']; - input: UpdateViewInput; -}>; - - -export type UpdateCoreViewMutation = { __typename?: 'Mutation', updateCoreView: { __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> } }; - -export type UpdateCoreViewFieldMutationVariables = Exact<{ - input: UpdateViewFieldInput; -}>; - - -export type UpdateCoreViewFieldMutation = { __typename?: 'Mutation', updateCoreViewField: { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type UpdateCoreViewFilterMutationVariables = Exact<{ - input: UpdateViewFilterInput; -}>; - - -export type UpdateCoreViewFilterMutation = { __typename?: 'Mutation', updateCoreViewFilter: { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type UpdateCoreViewFilterGroupMutationVariables = Exact<{ - id: Scalars['String']; - input: UpdateViewFilterGroupInput; -}>; - - -export type UpdateCoreViewFilterGroupMutation = { __typename?: 'Mutation', updateCoreViewFilterGroup: { __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any } }; - -export type UpdateCoreViewGroupMutationVariables = Exact<{ - input: UpdateViewGroupInput; -}>; - - -export type UpdateCoreViewGroupMutation = { __typename?: 'Mutation', updateCoreViewGroup: { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } }; - -export type UpdateCoreViewSortMutationVariables = Exact<{ - id: Scalars['String']; - input: UpdateViewSortInput; -}>; - - -export type UpdateCoreViewSortMutation = { __typename?: 'Mutation', updateCoreViewSort: { __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any } }; - -export type FindAllCoreViewsQueryVariables = Exact<{ [key: string]: never; }>; - - -export type FindAllCoreViewsQuery = { __typename?: 'Query', getCoreViews: Array<{ __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }> }; - -export type FindManyCoreViewFieldsQueryVariables = Exact<{ - viewId: Scalars['String']; -}>; - - -export type FindManyCoreViewFieldsQuery = { __typename?: 'Query', getCoreViewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; - -export type FindManyCoreViewFilterGroupsQueryVariables = Exact<{ - viewId?: InputMaybe; -}>; - - -export type FindManyCoreViewFilterGroupsQuery = { __typename?: 'Query', getCoreViewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }> }; - -export type FindManyCoreViewFiltersQueryVariables = Exact<{ - viewId?: InputMaybe; -}>; - - -export type FindManyCoreViewFiltersQuery = { __typename?: 'Query', getCoreViewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; - -export type FindManyCoreViewGroupsQueryVariables = Exact<{ - viewId?: InputMaybe; -}>; - - -export type FindManyCoreViewGroupsQuery = { __typename?: 'Query', getCoreViewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }; - -export type FindManyCoreViewSortsQueryVariables = Exact<{ - viewId?: InputMaybe; -}>; - - -export type FindManyCoreViewSortsQuery = { __typename?: 'Query', getCoreViewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }> }; - -export type FindManyCoreViewsQueryVariables = Exact<{ - objectMetadataId?: InputMaybe; -}>; - - -export type FindManyCoreViewsQuery = { __typename?: 'Query', getCoreViews: Array<{ __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> }> }; - -export type FindOneCoreViewQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewQuery = { __typename?: 'Query', getCoreView?: { __typename?: 'CoreView', id: any, name: string, objectMetadataId: any, type: ViewType, key?: ViewKey | null, icon: string, position: number, isCompact: boolean, openRecordIn: ViewOpenRecordIn, kanbanAggregateOperation?: AggregateOperations | null, kanbanAggregateOperationFieldMetadataId?: any | null, mainGroupByFieldMetadataId?: any | null, shouldHideEmptyGroups: boolean, anyFieldFilterValue?: string | null, calendarFieldMetadataId?: any | null, calendarLayout?: ViewCalendarLayout | null, visibility: ViewVisibility, createdByUserWorkspaceId?: any | null, viewFields: Array<{ __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilters: Array<{ __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }>, viewFilterGroups: Array<{ __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any }>, viewSorts: Array<{ __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any }>, viewGroups: Array<{ __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null }> } | null }; - -export type FindOneCoreViewFieldQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewFieldQuery = { __typename?: 'Query', getCoreViewField?: { __typename?: 'CoreViewField', id: any, fieldMetadataId: any, viewId: any, isVisible: boolean, position: number, size: number, aggregateOperation?: AggregateOperations | null, createdAt: string, updatedAt: string, deletedAt?: string | null } | null }; - -export type FindOneCoreViewFilterQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewFilterQuery = { __typename?: 'Query', getCoreViewFilter?: { __typename?: 'CoreViewFilter', id: any, fieldMetadataId: any, operand: ViewFilterOperand, value: any, viewFilterGroupId?: any | null, positionInViewFilterGroup?: number | null, subFieldName?: string | null, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } | null }; - -export type FindOneCoreViewFilterGroupQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewFilterGroupQuery = { __typename?: 'Query', getCoreViewFilterGroup?: { __typename?: 'CoreViewFilterGroup', id: any, parentViewFilterGroupId?: any | null, logicalOperator: ViewFilterGroupLogicalOperator, positionInViewFilterGroup?: number | null, viewId: any } | null }; - -export type FindOneCoreViewGroupQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewGroupQuery = { __typename?: 'Query', getCoreViewGroup?: { __typename?: 'CoreViewGroup', id: any, isVisible: boolean, fieldValue: string, position: number, viewId: any, createdAt: string, updatedAt: string, deletedAt?: string | null } | null }; - -export type FindOneCoreViewSortQueryVariables = Exact<{ - id: Scalars['String']; -}>; - - -export type FindOneCoreViewSortQuery = { __typename?: 'Query', getCoreViewSort?: { __typename?: 'CoreViewSort', id: any, fieldMetadataId: any, direction: ViewSortDirection, viewId: any } | null }; - -export const PageLayoutWidgetFragmentFragmentDoc = gql` - fragment PageLayoutWidgetFragment on PageLayoutWidget { +export type UpdateWorkflowVersionPositionsMutation = { __typename?: 'Mutation', updateWorkflowVersionPositions: boolean }; + +export const TimelineCalendarEventParticipantFragmentFragmentDoc = gql` + fragment TimelineCalendarEventParticipantFragment on TimelineCalendarEventParticipant { + personId + workspaceMemberId + firstName + lastName + displayName + avatarUrl + handle +} + `; +export const TimelineCalendarEventFragmentFragmentDoc = gql` + fragment TimelineCalendarEventFragment on TimelineCalendarEvent { id title - type - objectMetadataId - createdAt - updatedAt - deletedAt - gridPosition { - column - columnSpan - row - rowSpan - } - position { - ... on PageLayoutWidgetGridPosition { - layoutMode - row - column - rowSpan - columnSpan - } - ... on PageLayoutWidgetVerticalListPosition { - layoutMode - index - } - ... on PageLayoutWidgetCanvasPosition { - layoutMode - } - } - configuration { - ... on BarChartConfiguration { - configurationType - aggregateFieldMetadataId - aggregateOperation - primaryAxisGroupByFieldMetadataId - primaryAxisGroupBySubFieldName - primaryAxisDateGranularity - primaryAxisOrderBy - primaryAxisManualSortOrder - secondaryAxisGroupByFieldMetadataId - secondaryAxisGroupBySubFieldName - secondaryAxisGroupByDateGranularity - secondaryAxisOrderBy - secondaryAxisManualSortOrder - omitNullValues - axisNameDisplay - displayDataLabel - displayLegend - rangeMin - rangeMax - color - description - filter - groupMode - layout - isCumulative - timezone - firstDayOfTheWeek - } - ... on LineChartConfiguration { - configurationType - aggregateFieldMetadataId - aggregateOperation - primaryAxisGroupByFieldMetadataId - primaryAxisGroupBySubFieldName - primaryAxisDateGranularity - primaryAxisOrderBy - primaryAxisManualSortOrder - secondaryAxisGroupByFieldMetadataId - secondaryAxisGroupBySubFieldName - secondaryAxisGroupByDateGranularity - secondaryAxisOrderBy - secondaryAxisManualSortOrder - omitNullValues - axisNameDisplay - displayDataLabel - displayLegend - rangeMin - rangeMax - color - description - filter - isStacked - isCumulative - timezone - firstDayOfTheWeek - } - ... on PieChartConfiguration { - configurationType - groupByFieldMetadataId - aggregateFieldMetadataId - aggregateOperation - groupBySubFieldName - dateGranularity - orderBy - manualSortOrder - displayDataLabel - showCenterMetric - displayLegend - hideEmptyCategory - color - description - filter - timezone - firstDayOfTheWeek - } - ... on AggregateChartConfiguration { - configurationType - aggregateFieldMetadataId - aggregateOperation - label - displayDataLabel - format - description - filter - prefix - suffix - timezone - firstDayOfTheWeek - ratioAggregateConfig { - fieldMetadataId - optionValue - } - } - ... on GaugeChartConfiguration { - configurationType - aggregateFieldMetadataId - aggregateOperation - displayDataLabel - color - description - filter - timezone - firstDayOfTheWeek - } - ... on IframeConfiguration { - configurationType - url - } - ... on StandaloneRichTextConfiguration { - configurationType - body { - blocknote - markdown - } - } - ... on CalendarConfiguration { - configurationType - } - ... on EmailsConfiguration { - configurationType - } - ... on FieldConfiguration { - configurationType - } - ... on FieldRichTextConfiguration { - configurationType - } - ... on FieldsConfiguration { - configurationType - } - ... on FilesConfiguration { - configurationType - } - ... on NotesConfiguration { - configurationType - } - ... on TasksConfiguration { - configurationType - } - ... on TimelineConfiguration { - configurationType - } - ... on ViewConfiguration { - configurationType - } - ... on WorkflowConfiguration { - configurationType - } - ... on WorkflowRunConfiguration { - configurationType - } - ... on WorkflowVersionConfiguration { - configurationType - } - ... on FrontComponentConfiguration { - configurationType - frontComponentId - } - } - pageLayoutTabId -} - `; -export const PageLayoutTabFragmentFragmentDoc = gql` - fragment PageLayoutTabFragment on PageLayoutTab { - id - title - icon - position - layoutMode - widgets { - ...PageLayoutWidgetFragment - } - pageLayoutId - createdAt - updatedAt -} - ${PageLayoutWidgetFragmentFragmentDoc}`; -export const PageLayoutFragmentFragmentDoc = gql` - fragment PageLayoutFragment on PageLayout { - id - name - objectMetadataId - type - defaultTabToFocusOnMobileAndSidePanelId - createdAt - updatedAt - tabs { - ...PageLayoutTabFragment - } -} - ${PageLayoutTabFragmentFragmentDoc}`; -export const ViewFieldFragmentFragmentDoc = gql` - fragment ViewFieldFragment on CoreViewField { - id - fieldMetadataId - viewId - isVisible - position - size - aggregateOperation - createdAt - updatedAt - deletedAt -} - `; -export const ViewFilterFragmentFragmentDoc = gql` - fragment ViewFilterFragment on CoreViewFilter { - id - fieldMetadataId - operand - value - viewFilterGroupId - positionInViewFilterGroup - subFieldName - viewId - createdAt - updatedAt - deletedAt -} - `; -export const ViewFilterGroupFragmentFragmentDoc = gql` - fragment ViewFilterGroupFragment on CoreViewFilterGroup { - id - parentViewFilterGroupId - logicalOperator - positionInViewFilterGroup - viewId -} - `; -export const ViewSortFragmentFragmentDoc = gql` - fragment ViewSortFragment on CoreViewSort { - id - fieldMetadataId - direction - viewId -} - `; -export const ViewGroupFragmentFragmentDoc = gql` - fragment ViewGroupFragment on CoreViewGroup { - id - isVisible - fieldValue - position - viewId - createdAt - updatedAt - deletedAt -} - `; -export const ViewFragmentFragmentDoc = gql` - fragment ViewFragment on CoreView { - id - name - objectMetadataId - type - key - icon - position - isCompact - openRecordIn - kanbanAggregateOperation - kanbanAggregateOperationFieldMetadataId - mainGroupByFieldMetadataId - shouldHideEmptyGroups - anyFieldFilterValue - calendarFieldMetadataId - calendarLayout + description + location + startsAt + endsAt + isFullDay visibility - createdByUserWorkspaceId - viewFields { - ...ViewFieldFragment - } - viewFilters { - ...ViewFilterFragment - } - viewFilterGroups { - ...ViewFilterGroupFragment - } - viewSorts { - ...ViewSortFragment - } - viewGroups { - ...ViewGroupFragment + participants { + ...TimelineCalendarEventParticipantFragment } } - ${ViewFieldFragmentFragmentDoc} -${ViewFilterFragmentFragmentDoc} -${ViewFilterGroupFragmentFragmentDoc} -${ViewSortFragmentFragmentDoc} -${ViewGroupFragmentFragmentDoc}`; + ${TimelineCalendarEventParticipantFragmentFragmentDoc}`; +export const TimelineCalendarEventsWithTotalFragmentFragmentDoc = gql` + fragment TimelineCalendarEventsWithTotalFragment on TimelineCalendarEventsWithTotal { + totalNumberOfCalendarEvents + timelineCalendarEvents { + ...TimelineCalendarEventFragment + } +} + ${TimelineCalendarEventFragmentFragmentDoc}`; +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 + visibility + firstParticipant { + ...ParticipantFragment + } + lastTwoParticipants { + ...ParticipantFragment + } + lastMessageReceivedAt + lastMessageBody + subject + numberOfMessagesInThread + participantCount +} + ${ParticipantFragmentFragmentDoc}`; +export const TimelineThreadsWithTotalFragmentFragmentDoc = gql` + fragment TimelineThreadsWithTotalFragment on TimelineThreadsWithTotal { + totalNumberOfThreads + timelineThreads { + ...TimelineThreadFragment + } +} + ${TimelineThreadFragmentFragmentDoc}`; +export const WorkflowDiffFragmentFragmentDoc = gql` + fragment WorkflowDiffFragment on WorkflowVersionStepChanges { + triggerDiff + stepsDiff +} + `; +export const GetTimelineCalendarEventsFromCompanyIdDocument = gql` + query GetTimelineCalendarEventsFromCompanyId($companyId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineCalendarEventsFromCompanyId( + companyId: $companyId + page: $page + pageSize: $pageSize + ) { + ...TimelineCalendarEventsWithTotalFragment + } +} + ${TimelineCalendarEventsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineCalendarEventsFromCompanyIdQuery__ + * + * To run a query within a React component, call `useGetTimelineCalendarEventsFromCompanyIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineCalendarEventsFromCompanyIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineCalendarEventsFromCompanyIdQuery({ + * variables: { + * companyId: // value for 'companyId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineCalendarEventsFromCompanyIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineCalendarEventsFromCompanyIdDocument, options); + } +export function useGetTimelineCalendarEventsFromCompanyIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineCalendarEventsFromCompanyIdDocument, options); + } +export type GetTimelineCalendarEventsFromCompanyIdQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromCompanyIdLazyQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromCompanyIdQueryResult = Apollo.QueryResult; +export const GetTimelineCalendarEventsFromOpportunityIdDocument = gql` + query GetTimelineCalendarEventsFromOpportunityId($opportunityId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineCalendarEventsFromOpportunityId( + opportunityId: $opportunityId + page: $page + pageSize: $pageSize + ) { + ...TimelineCalendarEventsWithTotalFragment + } +} + ${TimelineCalendarEventsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineCalendarEventsFromOpportunityIdQuery__ + * + * To run a query within a React component, call `useGetTimelineCalendarEventsFromOpportunityIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineCalendarEventsFromOpportunityIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineCalendarEventsFromOpportunityIdQuery({ + * variables: { + * opportunityId: // value for 'opportunityId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineCalendarEventsFromOpportunityIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineCalendarEventsFromOpportunityIdDocument, options); + } +export function useGetTimelineCalendarEventsFromOpportunityIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineCalendarEventsFromOpportunityIdDocument, options); + } +export type GetTimelineCalendarEventsFromOpportunityIdQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromOpportunityIdLazyQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromOpportunityIdQueryResult = Apollo.QueryResult; +export const GetTimelineCalendarEventsFromPersonIdDocument = gql` + query GetTimelineCalendarEventsFromPersonId($personId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineCalendarEventsFromPersonId( + personId: $personId + page: $page + pageSize: $pageSize + ) { + ...TimelineCalendarEventsWithTotalFragment + } +} + ${TimelineCalendarEventsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineCalendarEventsFromPersonIdQuery__ + * + * To run a query within a React component, call `useGetTimelineCalendarEventsFromPersonIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineCalendarEventsFromPersonIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineCalendarEventsFromPersonIdQuery({ + * variables: { + * personId: // value for 'personId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineCalendarEventsFromPersonIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineCalendarEventsFromPersonIdDocument, options); + } +export function useGetTimelineCalendarEventsFromPersonIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineCalendarEventsFromPersonIdDocument, options); + } +export type GetTimelineCalendarEventsFromPersonIdQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromPersonIdLazyQueryHookResult = ReturnType; +export type GetTimelineCalendarEventsFromPersonIdQueryResult = Apollo.QueryResult; +export const GetTimelineThreadsFromCompanyIdDocument = gql` + query GetTimelineThreadsFromCompanyId($companyId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineThreadsFromCompanyId( + companyId: $companyId + page: $page + pageSize: $pageSize + ) { + ...TimelineThreadsWithTotalFragment + } +} + ${TimelineThreadsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineThreadsFromCompanyIdQuery__ + * + * To run a query within a React component, call `useGetTimelineThreadsFromCompanyIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineThreadsFromCompanyIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineThreadsFromCompanyIdQuery({ + * variables: { + * companyId: // value for 'companyId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineThreadsFromCompanyIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineThreadsFromCompanyIdDocument, options); + } +export function useGetTimelineThreadsFromCompanyIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineThreadsFromCompanyIdDocument, options); + } +export type GetTimelineThreadsFromCompanyIdQueryHookResult = ReturnType; +export type GetTimelineThreadsFromCompanyIdLazyQueryHookResult = ReturnType; +export type GetTimelineThreadsFromCompanyIdQueryResult = Apollo.QueryResult; +export const GetTimelineThreadsFromOpportunityIdDocument = gql` + query GetTimelineThreadsFromOpportunityId($opportunityId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineThreadsFromOpportunityId( + opportunityId: $opportunityId + page: $page + pageSize: $pageSize + ) { + ...TimelineThreadsWithTotalFragment + } +} + ${TimelineThreadsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineThreadsFromOpportunityIdQuery__ + * + * To run a query within a React component, call `useGetTimelineThreadsFromOpportunityIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineThreadsFromOpportunityIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineThreadsFromOpportunityIdQuery({ + * variables: { + * opportunityId: // value for 'opportunityId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineThreadsFromOpportunityIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineThreadsFromOpportunityIdDocument, options); + } +export function useGetTimelineThreadsFromOpportunityIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineThreadsFromOpportunityIdDocument, options); + } +export type GetTimelineThreadsFromOpportunityIdQueryHookResult = ReturnType; +export type GetTimelineThreadsFromOpportunityIdLazyQueryHookResult = ReturnType; +export type GetTimelineThreadsFromOpportunityIdQueryResult = Apollo.QueryResult; +export const GetTimelineThreadsFromPersonIdDocument = gql` + query GetTimelineThreadsFromPersonId($personId: UUID!, $page: Int!, $pageSize: Int!) { + getTimelineThreadsFromPersonId( + personId: $personId + page: $page + pageSize: $pageSize + ) { + ...TimelineThreadsWithTotalFragment + } +} + ${TimelineThreadsWithTotalFragmentFragmentDoc}`; + +/** + * __useGetTimelineThreadsFromPersonIdQuery__ + * + * To run a query within a React component, call `useGetTimelineThreadsFromPersonIdQuery` and pass it any options that fit your needs. + * When your component renders, `useGetTimelineThreadsFromPersonIdQuery` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTimelineThreadsFromPersonIdQuery({ + * variables: { + * personId: // value for 'personId' + * page: // value for 'page' + * pageSize: // value for 'pageSize' + * }, + * }); + */ +export function useGetTimelineThreadsFromPersonIdQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetTimelineThreadsFromPersonIdDocument, options); + } +export function useGetTimelineThreadsFromPersonIdLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetTimelineThreadsFromPersonIdDocument, options); + } +export type GetTimelineThreadsFromPersonIdQueryHookResult = ReturnType; +export type GetTimelineThreadsFromPersonIdLazyQueryHookResult = ReturnType; +export type GetTimelineThreadsFromPersonIdQueryResult = Apollo.QueryResult; export const SearchDocument = gql` query Search($searchInput: String!, $limit: Int!, $after: String, $excludedObjectNameSingulars: [String!], $includedObjectNameSingulars: [String!], $filter: ObjectRecordFilterInput) { search( @@ -6046,1510 +5862,593 @@ export function useSearchLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions; export type SearchLazyQueryHookResult = ReturnType; export type SearchQueryResult = Apollo.QueryResult; -export const DuplicateDashboardDocument = gql` - mutation DuplicateDashboard($id: UUID!) { - duplicateDashboard(id: $id) { - id - title - pageLayoutId - position - createdAt - updatedAt - } +export const ActivateWorkflowVersionDocument = gql` + mutation ActivateWorkflowVersion($workflowVersionId: UUID!) { + activateWorkflowVersion(workflowVersionId: $workflowVersionId) } `; -export type DuplicateDashboardMutationFn = Apollo.MutationFunction; +export type ActivateWorkflowVersionMutationFn = Apollo.MutationFunction; /** - * __useDuplicateDashboardMutation__ + * __useActivateWorkflowVersionMutation__ * - * To run a mutation, you first call `useDuplicateDashboardMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDuplicateDashboardMutation` returns a tuple that includes: + * To run a mutation, you first call `useActivateWorkflowVersionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useActivateWorkflowVersionMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [duplicateDashboardMutation, { data, loading, error }] = useDuplicateDashboardMutation({ + * const [activateWorkflowVersionMutation, { data, loading, error }] = useActivateWorkflowVersionMutation({ * variables: { - * id: // value for 'id' + * workflowVersionId: // value for 'workflowVersionId' * }, * }); */ -export function useDuplicateDashboardMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useActivateWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DuplicateDashboardDocument, options); + return Apollo.useMutation(ActivateWorkflowVersionDocument, options); } -export type DuplicateDashboardMutationHookResult = ReturnType; -export type DuplicateDashboardMutationResult = Apollo.MutationResult; -export type DuplicateDashboardMutationOptions = Apollo.BaseMutationOptions; -export const FindOnePageLayoutDocument = gql` - query FindOnePageLayout($id: String!) { - getPageLayout(id: $id) { - ...PageLayoutFragment - } +export type ActivateWorkflowVersionMutationHookResult = ReturnType; +export type ActivateWorkflowVersionMutationResult = Apollo.MutationResult; +export type ActivateWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; +export const ComputeStepOutputSchemaDocument = gql` + mutation ComputeStepOutputSchema($input: ComputeStepOutputSchemaInput!) { + computeStepOutputSchema(input: $input) } - ${PageLayoutFragmentFragmentDoc}`; + `; +export type ComputeStepOutputSchemaMutationFn = Apollo.MutationFunction; /** - * __useFindOnePageLayoutQuery__ + * __useComputeStepOutputSchemaMutation__ * - * To run a query within a React component, call `useFindOnePageLayoutQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOnePageLayoutQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useComputeStepOutputSchemaMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useComputeStepOutputSchemaMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useFindOnePageLayoutQuery({ + * const [computeStepOutputSchemaMutation, { data, loading, error }] = useComputeStepOutputSchemaMutation({ * variables: { - * id: // value for 'id' + * input: // value for 'input' * }, * }); */ -export function useFindOnePageLayoutQuery(baseOptions: Apollo.QueryHookOptions) { +export function useComputeStepOutputSchemaMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOnePageLayoutDocument, options); + return Apollo.useMutation(ComputeStepOutputSchemaDocument, options); } -export function useFindOnePageLayoutLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOnePageLayoutDocument, options); - } -export type FindOnePageLayoutQueryHookResult = ReturnType; -export type FindOnePageLayoutLazyQueryHookResult = ReturnType; -export type FindOnePageLayoutQueryResult = Apollo.QueryResult; -export const FindManyMarketplaceAppsDocument = gql` - query FindManyMarketplaceApps { - findManyMarketplaceApps { +export type ComputeStepOutputSchemaMutationHookResult = ReturnType; +export type ComputeStepOutputSchemaMutationResult = Apollo.MutationResult; +export type ComputeStepOutputSchemaMutationOptions = Apollo.BaseMutationOptions; +export const CreateDraftFromWorkflowVersionDocument = gql` + mutation CreateDraftFromWorkflowVersion($input: CreateDraftFromWorkflowVersionInput!) { + createDraftFromWorkflowVersion(input: $input) { id name - description - icon - version - author - category - logo - screenshots - aboutDescription - providers - websiteUrl - termsUrl + status + trigger + steps + createdAt + updatedAt } } `; +export type CreateDraftFromWorkflowVersionMutationFn = Apollo.MutationFunction; /** - * __useFindManyMarketplaceAppsQuery__ + * __useCreateDraftFromWorkflowVersionMutation__ * - * To run a query within a React component, call `useFindManyMarketplaceAppsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyMarketplaceAppsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. + * To run a mutation, you first call `useCreateDraftFromWorkflowVersionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateDraftFromWorkflowVersionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const { data, loading, error } = useFindManyMarketplaceAppsQuery({ + * const [createDraftFromWorkflowVersionMutation, { data, loading, error }] = useCreateDraftFromWorkflowVersionMutation({ * variables: { + * input: // value for 'input' * }, * }); */ -export function useFindManyMarketplaceAppsQuery(baseOptions?: Apollo.QueryHookOptions) { +export function useCreateDraftFromWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyMarketplaceAppsDocument, options); + return Apollo.useMutation(CreateDraftFromWorkflowVersionDocument, options); } -export function useFindManyMarketplaceAppsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyMarketplaceAppsDocument, options); - } -export type FindManyMarketplaceAppsQueryHookResult = ReturnType; -export type FindManyMarketplaceAppsLazyQueryHookResult = ReturnType; -export type FindManyMarketplaceAppsQueryResult = Apollo.QueryResult; -export const UpdatePageLayoutWithTabsAndWidgetsDocument = gql` - mutation UpdatePageLayoutWithTabsAndWidgets($id: String!, $input: UpdatePageLayoutWithTabsInput!) { - updatePageLayoutWithTabsAndWidgets(id: $id, input: $input) { +export type CreateDraftFromWorkflowVersionMutationHookResult = ReturnType; +export type CreateDraftFromWorkflowVersionMutationResult = Apollo.MutationResult; +export type CreateDraftFromWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; +export const CreateWorkflowVersionEdgeDocument = gql` + mutation CreateWorkflowVersionEdge($input: CreateWorkflowVersionEdgeInput!) { + createWorkflowVersionEdge(input: $input) { + ...WorkflowDiffFragment + } +} + ${WorkflowDiffFragmentFragmentDoc}`; +export type CreateWorkflowVersionEdgeMutationFn = Apollo.MutationFunction; + +/** + * __useCreateWorkflowVersionEdgeMutation__ + * + * To run a mutation, you first call `useCreateWorkflowVersionEdgeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateWorkflowVersionEdgeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createWorkflowVersionEdgeMutation, { data, loading, error }] = useCreateWorkflowVersionEdgeMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateWorkflowVersionEdgeMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateWorkflowVersionEdgeDocument, options); + } +export type CreateWorkflowVersionEdgeMutationHookResult = ReturnType; +export type CreateWorkflowVersionEdgeMutationResult = Apollo.MutationResult; +export type CreateWorkflowVersionEdgeMutationOptions = Apollo.BaseMutationOptions; +export const CreateWorkflowVersionStepDocument = gql` + mutation CreateWorkflowVersionStep($input: CreateWorkflowVersionStepInput!) { + createWorkflowVersionStep(input: $input) { + ...WorkflowDiffFragment + } +} + ${WorkflowDiffFragmentFragmentDoc}`; +export type CreateWorkflowVersionStepMutationFn = Apollo.MutationFunction; + +/** + * __useCreateWorkflowVersionStepMutation__ + * + * To run a mutation, you first call `useCreateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateWorkflowVersionStepMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createWorkflowVersionStepMutation, { data, loading, error }] = useCreateWorkflowVersionStepMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useCreateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateWorkflowVersionStepDocument, options); + } +export type CreateWorkflowVersionStepMutationHookResult = ReturnType; +export type CreateWorkflowVersionStepMutationResult = Apollo.MutationResult; +export type CreateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; +export const DeactivateWorkflowVersionDocument = gql` + mutation DeactivateWorkflowVersion($workflowVersionId: UUID!) { + deactivateWorkflowVersion(workflowVersionId: $workflowVersionId) +} + `; +export type DeactivateWorkflowVersionMutationFn = Apollo.MutationFunction; + +/** + * __useDeactivateWorkflowVersionMutation__ + * + * To run a mutation, you first call `useDeactivateWorkflowVersionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeactivateWorkflowVersionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deactivateWorkflowVersionMutation, { data, loading, error }] = useDeactivateWorkflowVersionMutation({ + * variables: { + * workflowVersionId: // value for 'workflowVersionId' + * }, + * }); + */ +export function useDeactivateWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeactivateWorkflowVersionDocument, options); + } +export type DeactivateWorkflowVersionMutationHookResult = ReturnType; +export type DeactivateWorkflowVersionMutationResult = Apollo.MutationResult; +export type DeactivateWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; +export const DeleteWorkflowVersionEdgeDocument = gql` + mutation DeleteWorkflowVersionEdge($input: CreateWorkflowVersionEdgeInput!) { + deleteWorkflowVersionEdge(input: $input) { + ...WorkflowDiffFragment + } +} + ${WorkflowDiffFragmentFragmentDoc}`; +export type DeleteWorkflowVersionEdgeMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteWorkflowVersionEdgeMutation__ + * + * To run a mutation, you first call `useDeleteWorkflowVersionEdgeMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteWorkflowVersionEdgeMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteWorkflowVersionEdgeMutation, { data, loading, error }] = useDeleteWorkflowVersionEdgeMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useDeleteWorkflowVersionEdgeMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteWorkflowVersionEdgeDocument, options); + } +export type DeleteWorkflowVersionEdgeMutationHookResult = ReturnType; +export type DeleteWorkflowVersionEdgeMutationResult = Apollo.MutationResult; +export type DeleteWorkflowVersionEdgeMutationOptions = Apollo.BaseMutationOptions; +export const DeleteWorkflowVersionStepDocument = gql` + mutation DeleteWorkflowVersionStep($input: DeleteWorkflowVersionStepInput!) { + deleteWorkflowVersionStep(input: $input) { + ...WorkflowDiffFragment + } +} + ${WorkflowDiffFragmentFragmentDoc}`; +export type DeleteWorkflowVersionStepMutationFn = Apollo.MutationFunction; + +/** + * __useDeleteWorkflowVersionStepMutation__ + * + * To run a mutation, you first call `useDeleteWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteWorkflowVersionStepMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteWorkflowVersionStepMutation, { data, loading, error }] = useDeleteWorkflowVersionStepMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useDeleteWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DeleteWorkflowVersionStepDocument, options); + } +export type DeleteWorkflowVersionStepMutationHookResult = ReturnType; +export type DeleteWorkflowVersionStepMutationResult = Apollo.MutationResult; +export type DeleteWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; +export const DuplicateWorkflowDocument = gql` + mutation DuplicateWorkflow($input: DuplicateWorkflowInput!) { + duplicateWorkflow(input: $input) { + id + name + status + trigger + steps + createdAt + updatedAt + workflowId + } +} + `; +export type DuplicateWorkflowMutationFn = Apollo.MutationFunction; + +/** + * __useDuplicateWorkflowMutation__ + * + * To run a mutation, you first call `useDuplicateWorkflowMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDuplicateWorkflowMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [duplicateWorkflowMutation, { data, loading, error }] = useDuplicateWorkflowMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useDuplicateWorkflowMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DuplicateWorkflowDocument, options); + } +export type DuplicateWorkflowMutationHookResult = ReturnType; +export type DuplicateWorkflowMutationResult = Apollo.MutationResult; +export type DuplicateWorkflowMutationOptions = Apollo.BaseMutationOptions; +export const DuplicateWorkflowVersionStepDocument = gql` + mutation DuplicateWorkflowVersionStep($input: DuplicateWorkflowVersionStepInput!) { + duplicateWorkflowVersionStep(input: $input) { + ...WorkflowDiffFragment + } +} + ${WorkflowDiffFragmentFragmentDoc}`; +export type DuplicateWorkflowVersionStepMutationFn = Apollo.MutationFunction; + +/** + * __useDuplicateWorkflowVersionStepMutation__ + * + * To run a mutation, you first call `useDuplicateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useDuplicateWorkflowVersionStepMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [duplicateWorkflowVersionStepMutation, { data, loading, error }] = useDuplicateWorkflowVersionStepMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useDuplicateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DuplicateWorkflowVersionStepDocument, options); + } +export type DuplicateWorkflowVersionStepMutationHookResult = ReturnType; +export type DuplicateWorkflowVersionStepMutationResult = Apollo.MutationResult; +export type DuplicateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; +export const RunWorkflowVersionDocument = gql` + mutation RunWorkflowVersion($input: RunWorkflowVersionInput!) { + runWorkflowVersion(input: $input) { + workflowRunId + } +} + `; +export type RunWorkflowVersionMutationFn = Apollo.MutationFunction; + +/** + * __useRunWorkflowVersionMutation__ + * + * To run a mutation, you first call `useRunWorkflowVersionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useRunWorkflowVersionMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [runWorkflowVersionMutation, { data, loading, error }] = useRunWorkflowVersionMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useRunWorkflowVersionMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(RunWorkflowVersionDocument, options); + } +export type RunWorkflowVersionMutationHookResult = ReturnType; +export type RunWorkflowVersionMutationResult = Apollo.MutationResult; +export type RunWorkflowVersionMutationOptions = Apollo.BaseMutationOptions; +export const StopWorkflowRunDocument = gql` + mutation StopWorkflowRun($workflowRunId: UUID!) { + stopWorkflowRun(workflowRunId: $workflowRunId) { + id + status + __typename + } +} + `; +export type StopWorkflowRunMutationFn = Apollo.MutationFunction; + +/** + * __useStopWorkflowRunMutation__ + * + * To run a mutation, you first call `useStopWorkflowRunMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useStopWorkflowRunMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [stopWorkflowRunMutation, { data, loading, error }] = useStopWorkflowRunMutation({ + * variables: { + * workflowRunId: // value for 'workflowRunId' + * }, + * }); + */ +export function useStopWorkflowRunMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(StopWorkflowRunDocument, options); + } +export type StopWorkflowRunMutationHookResult = ReturnType; +export type StopWorkflowRunMutationResult = Apollo.MutationResult; +export type StopWorkflowRunMutationOptions = Apollo.BaseMutationOptions; +export const UpdateWorkflowRunStepDocument = gql` + mutation UpdateWorkflowRunStep($input: UpdateWorkflowRunStepInput!) { + updateWorkflowRunStep(input: $input) { id name type - objectMetadataId - createdAt - updatedAt - deletedAt - tabs { - id - title - position - pageLayoutId - widgets { - ...PageLayoutWidgetFragment - } - createdAt - updatedAt + settings + valid + nextStepIds + position { + x + y } } } - ${PageLayoutWidgetFragmentFragmentDoc}`; -export type UpdatePageLayoutWithTabsAndWidgetsMutationFn = Apollo.MutationFunction; + `; +export type UpdateWorkflowRunStepMutationFn = Apollo.MutationFunction; /** - * __useUpdatePageLayoutWithTabsAndWidgetsMutation__ + * __useUpdateWorkflowRunStepMutation__ * - * To run a mutation, you first call `useUpdatePageLayoutWithTabsAndWidgetsMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdatePageLayoutWithTabsAndWidgetsMutation` returns a tuple that includes: + * To run a mutation, you first call `useUpdateWorkflowRunStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateWorkflowRunStepMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [updatePageLayoutWithTabsAndWidgetsMutation, { data, loading, error }] = useUpdatePageLayoutWithTabsAndWidgetsMutation({ - * variables: { - * id: // value for 'id' - * input: // value for 'input' - * }, - * }); - */ -export function useUpdatePageLayoutWithTabsAndWidgetsMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdatePageLayoutWithTabsAndWidgetsDocument, options); - } -export type UpdatePageLayoutWithTabsAndWidgetsMutationHookResult = ReturnType; -export type UpdatePageLayoutWithTabsAndWidgetsMutationResult = Apollo.MutationResult; -export type UpdatePageLayoutWithTabsAndWidgetsMutationOptions = Apollo.BaseMutationOptions; -export const FindAllRecordPageLayoutsDocument = gql` - query FindAllRecordPageLayouts { - getPageLayouts(pageLayoutType: RECORD_PAGE) { - ...PageLayoutFragment - } -} - ${PageLayoutFragmentFragmentDoc}`; - -/** - * __useFindAllRecordPageLayoutsQuery__ - * - * To run a query within a React component, call `useFindAllRecordPageLayoutsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindAllRecordPageLayoutsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindAllRecordPageLayoutsQuery({ - * variables: { - * }, - * }); - */ -export function useFindAllRecordPageLayoutsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindAllRecordPageLayoutsDocument, options); - } -export function useFindAllRecordPageLayoutsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindAllRecordPageLayoutsDocument, options); - } -export type FindAllRecordPageLayoutsQueryHookResult = ReturnType; -export type FindAllRecordPageLayoutsLazyQueryHookResult = ReturnType; -export type FindAllRecordPageLayoutsQueryResult = Apollo.QueryResult; -export const CreateCoreViewDocument = gql` - mutation CreateCoreView($input: CreateViewInput!) { - createCoreView(input: $input) { - ...ViewFragment - } -} - ${ViewFragmentFragmentDoc}`; -export type CreateCoreViewMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewMutation__ - * - * To run a mutation, you first call `useCreateCoreViewMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewMutation, { data, loading, error }] = useCreateCoreViewMutation({ + * const [updateWorkflowRunStepMutation, { data, loading, error }] = useUpdateWorkflowRunStepMutation({ * variables: { * input: // value for 'input' * }, * }); */ -export function useCreateCoreViewMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useUpdateWorkflowRunStepMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewDocument, options); + return Apollo.useMutation(UpdateWorkflowRunStepDocument, options); } -export type CreateCoreViewMutationHookResult = ReturnType; -export type CreateCoreViewMutationResult = Apollo.MutationResult; -export type CreateCoreViewMutationOptions = Apollo.BaseMutationOptions; -export const CreateCoreViewFieldDocument = gql` - mutation CreateCoreViewField($input: CreateViewFieldInput!) { - createCoreViewField(input: $input) { - ...ViewFieldFragment +export type UpdateWorkflowRunStepMutationHookResult = ReturnType; +export type UpdateWorkflowRunStepMutationResult = Apollo.MutationResult; +export type UpdateWorkflowRunStepMutationOptions = Apollo.BaseMutationOptions; +export const UpdateWorkflowVersionStepDocument = gql` + mutation UpdateWorkflowVersionStep($input: UpdateWorkflowVersionStepInput!) { + updateWorkflowVersionStep(input: $input) { + id + name + type + settings + valid + nextStepIds + position { + x + y + } } -} - ${ViewFieldFragmentFragmentDoc}`; -export type CreateCoreViewFieldMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewFieldMutation__ - * - * To run a mutation, you first call `useCreateCoreViewFieldMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewFieldMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewFieldMutation, { data, loading, error }] = useCreateCoreViewFieldMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCoreViewFieldMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewFieldDocument, options); - } -export type CreateCoreViewFieldMutationHookResult = ReturnType; -export type CreateCoreViewFieldMutationResult = Apollo.MutationResult; -export type CreateCoreViewFieldMutationOptions = Apollo.BaseMutationOptions; -export const CreateCoreViewFilterDocument = gql` - mutation CreateCoreViewFilter($input: CreateViewFilterInput!) { - createCoreViewFilter(input: $input) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; -export type CreateCoreViewFilterMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewFilterMutation__ - * - * To run a mutation, you first call `useCreateCoreViewFilterMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewFilterMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewFilterMutation, { data, loading, error }] = useCreateCoreViewFilterMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCoreViewFilterMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewFilterDocument, options); - } -export type CreateCoreViewFilterMutationHookResult = ReturnType; -export type CreateCoreViewFilterMutationResult = Apollo.MutationResult; -export type CreateCoreViewFilterMutationOptions = Apollo.BaseMutationOptions; -export const CreateCoreViewFilterGroupDocument = gql` - mutation CreateCoreViewFilterGroup($input: CreateViewFilterGroupInput!) { - createCoreViewFilterGroup(input: $input) { - ...ViewFilterGroupFragment - } -} - ${ViewFilterGroupFragmentFragmentDoc}`; -export type CreateCoreViewFilterGroupMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewFilterGroupMutation__ - * - * To run a mutation, you first call `useCreateCoreViewFilterGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewFilterGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewFilterGroupMutation, { data, loading, error }] = useCreateCoreViewFilterGroupMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCoreViewFilterGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewFilterGroupDocument, options); - } -export type CreateCoreViewFilterGroupMutationHookResult = ReturnType; -export type CreateCoreViewFilterGroupMutationResult = Apollo.MutationResult; -export type CreateCoreViewFilterGroupMutationOptions = Apollo.BaseMutationOptions; -export const CreateCoreViewGroupDocument = gql` - mutation CreateCoreViewGroup($input: CreateViewGroupInput!) { - createCoreViewGroup(input: $input) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; -export type CreateCoreViewGroupMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewGroupMutation__ - * - * To run a mutation, you first call `useCreateCoreViewGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewGroupMutation, { data, loading, error }] = useCreateCoreViewGroupMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCoreViewGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewGroupDocument, options); - } -export type CreateCoreViewGroupMutationHookResult = ReturnType; -export type CreateCoreViewGroupMutationResult = Apollo.MutationResult; -export type CreateCoreViewGroupMutationOptions = Apollo.BaseMutationOptions; -export const CreateCoreViewSortDocument = gql` - mutation CreateCoreViewSort($input: CreateViewSortInput!) { - createCoreViewSort(input: $input) { - ...ViewSortFragment - } -} - ${ViewSortFragmentFragmentDoc}`; -export type CreateCoreViewSortMutationFn = Apollo.MutationFunction; - -/** - * __useCreateCoreViewSortMutation__ - * - * To run a mutation, you first call `useCreateCoreViewSortMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCoreViewSortMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createCoreViewSortMutation, { data, loading, error }] = useCreateCoreViewSortMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCoreViewSortMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateCoreViewSortDocument, options); - } -export type CreateCoreViewSortMutationHookResult = ReturnType; -export type CreateCoreViewSortMutationResult = Apollo.MutationResult; -export type CreateCoreViewSortMutationOptions = Apollo.BaseMutationOptions; -export const CreateManyCoreViewFieldsDocument = gql` - mutation CreateManyCoreViewFields($inputs: [CreateViewFieldInput!]!) { - createManyCoreViewFields(inputs: $inputs) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; -export type CreateManyCoreViewFieldsMutationFn = Apollo.MutationFunction; - -/** - * __useCreateManyCoreViewFieldsMutation__ - * - * To run a mutation, you first call `useCreateManyCoreViewFieldsMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateManyCoreViewFieldsMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createManyCoreViewFieldsMutation, { data, loading, error }] = useCreateManyCoreViewFieldsMutation({ - * variables: { - * inputs: // value for 'inputs' - * }, - * }); - */ -export function useCreateManyCoreViewFieldsMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateManyCoreViewFieldsDocument, options); - } -export type CreateManyCoreViewFieldsMutationHookResult = ReturnType; -export type CreateManyCoreViewFieldsMutationResult = Apollo.MutationResult; -export type CreateManyCoreViewFieldsMutationOptions = Apollo.BaseMutationOptions; -export const CreateManyCoreViewGroupsDocument = gql` - mutation CreateManyCoreViewGroups($inputs: [CreateViewGroupInput!]!) { - createManyCoreViewGroups(inputs: $inputs) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; -export type CreateManyCoreViewGroupsMutationFn = Apollo.MutationFunction; - -/** - * __useCreateManyCoreViewGroupsMutation__ - * - * To run a mutation, you first call `useCreateManyCoreViewGroupsMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateManyCoreViewGroupsMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createManyCoreViewGroupsMutation, { data, loading, error }] = useCreateManyCoreViewGroupsMutation({ - * variables: { - * inputs: // value for 'inputs' - * }, - * }); - */ -export function useCreateManyCoreViewGroupsMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(CreateManyCoreViewGroupsDocument, options); - } -export type CreateManyCoreViewGroupsMutationHookResult = ReturnType; -export type CreateManyCoreViewGroupsMutationResult = Apollo.MutationResult; -export type CreateManyCoreViewGroupsMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewDocument = gql` - mutation DeleteCoreView($id: String!) { - deleteCoreView(id: $id) } `; -export type DeleteCoreViewMutationFn = Apollo.MutationFunction; +export type UpdateWorkflowVersionStepMutationFn = Apollo.MutationFunction; /** - * __useDeleteCoreViewMutation__ + * __useUpdateWorkflowVersionStepMutation__ * - * To run a mutation, you first call `useDeleteCoreViewMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewMutation` returns a tuple that includes: + * To run a mutation, you first call `useUpdateWorkflowVersionStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateWorkflowVersionStepMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [deleteCoreViewMutation, { data, loading, error }] = useDeleteCoreViewMutation({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useDeleteCoreViewMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewDocument, options); - } -export type DeleteCoreViewMutationHookResult = ReturnType; -export type DeleteCoreViewMutationResult = Apollo.MutationResult; -export type DeleteCoreViewMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewFieldDocument = gql` - mutation DeleteCoreViewField($input: DeleteViewFieldInput!) { - deleteCoreViewField(input: $input) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; -export type DeleteCoreViewFieldMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteCoreViewFieldMutation__ - * - * To run a mutation, you first call `useDeleteCoreViewFieldMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewFieldMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteCoreViewFieldMutation, { data, loading, error }] = useDeleteCoreViewFieldMutation({ + * const [updateWorkflowVersionStepMutation, { data, loading, error }] = useUpdateWorkflowVersionStepMutation({ * variables: { * input: // value for 'input' * }, * }); */ -export function useDeleteCoreViewFieldMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useUpdateWorkflowVersionStepMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewFieldDocument, options); + return Apollo.useMutation(UpdateWorkflowVersionStepDocument, options); } -export type DeleteCoreViewFieldMutationHookResult = ReturnType; -export type DeleteCoreViewFieldMutationResult = Apollo.MutationResult; -export type DeleteCoreViewFieldMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewFilterDocument = gql` - mutation DeleteCoreViewFilter($input: DeleteViewFilterInput!) { - deleteCoreViewFilter(input: $input) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; -export type DeleteCoreViewFilterMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteCoreViewFilterMutation__ - * - * To run a mutation, you first call `useDeleteCoreViewFilterMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewFilterMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteCoreViewFilterMutation, { data, loading, error }] = useDeleteCoreViewFilterMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDeleteCoreViewFilterMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewFilterDocument, options); - } -export type DeleteCoreViewFilterMutationHookResult = ReturnType; -export type DeleteCoreViewFilterMutationResult = Apollo.MutationResult; -export type DeleteCoreViewFilterMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewFilterGroupDocument = gql` - mutation DeleteCoreViewFilterGroup($id: String!) { - deleteCoreViewFilterGroup(id: $id) +export type UpdateWorkflowVersionStepMutationHookResult = ReturnType; +export type UpdateWorkflowVersionStepMutationResult = Apollo.MutationResult; +export type UpdateWorkflowVersionStepMutationOptions = Apollo.BaseMutationOptions; +export const SubmitFormStepDocument = gql` + mutation SubmitFormStep($input: SubmitFormStepInput!) { + submitFormStep(input: $input) } `; -export type DeleteCoreViewFilterGroupMutationFn = Apollo.MutationFunction; +export type SubmitFormStepMutationFn = Apollo.MutationFunction; /** - * __useDeleteCoreViewFilterGroupMutation__ + * __useSubmitFormStepMutation__ * - * To run a mutation, you first call `useDeleteCoreViewFilterGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewFilterGroupMutation` returns a tuple that includes: + * To run a mutation, you first call `useSubmitFormStepMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSubmitFormStepMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [deleteCoreViewFilterGroupMutation, { data, loading, error }] = useDeleteCoreViewFilterGroupMutation({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useDeleteCoreViewFilterGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewFilterGroupDocument, options); - } -export type DeleteCoreViewFilterGroupMutationHookResult = ReturnType; -export type DeleteCoreViewFilterGroupMutationResult = Apollo.MutationResult; -export type DeleteCoreViewFilterGroupMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewGroupDocument = gql` - mutation DeleteCoreViewGroup($input: DeleteViewGroupInput!) { - deleteCoreViewGroup(input: $input) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; -export type DeleteCoreViewGroupMutationFn = Apollo.MutationFunction; - -/** - * __useDeleteCoreViewGroupMutation__ - * - * To run a mutation, you first call `useDeleteCoreViewGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [deleteCoreViewGroupMutation, { data, loading, error }] = useDeleteCoreViewGroupMutation({ + * const [submitFormStepMutation, { data, loading, error }] = useSubmitFormStepMutation({ * variables: { * input: // value for 'input' * }, * }); */ -export function useDeleteCoreViewGroupMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useSubmitFormStepMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewGroupDocument, options); + return Apollo.useMutation(SubmitFormStepDocument, options); } -export type DeleteCoreViewGroupMutationHookResult = ReturnType; -export type DeleteCoreViewGroupMutationResult = Apollo.MutationResult; -export type DeleteCoreViewGroupMutationOptions = Apollo.BaseMutationOptions; -export const DeleteCoreViewSortDocument = gql` - mutation DeleteCoreViewSort($id: String!) { - deleteCoreViewSort(id: $id) +export type SubmitFormStepMutationHookResult = ReturnType; +export type SubmitFormStepMutationResult = Apollo.MutationResult; +export type SubmitFormStepMutationOptions = Apollo.BaseMutationOptions; +export const TestHttpRequestDocument = gql` + mutation TestHttpRequest($input: TestHttpRequestInput!) { + testHttpRequest(input: $input) { + success + message + result + error + status + statusText + headers + } } `; -export type DeleteCoreViewSortMutationFn = Apollo.MutationFunction; +export type TestHttpRequestMutationFn = Apollo.MutationFunction; /** - * __useDeleteCoreViewSortMutation__ + * __useTestHttpRequestMutation__ * - * To run a mutation, you first call `useDeleteCoreViewSortMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDeleteCoreViewSortMutation` returns a tuple that includes: + * To run a mutation, you first call `useTestHttpRequestMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useTestHttpRequestMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [deleteCoreViewSortMutation, { data, loading, error }] = useDeleteCoreViewSortMutation({ + * const [testHttpRequestMutation, { data, loading, error }] = useTestHttpRequestMutation({ * variables: { - * id: // value for 'id' + * input: // value for 'input' * }, * }); */ -export function useDeleteCoreViewSortMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useTestHttpRequestMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DeleteCoreViewSortDocument, options); + return Apollo.useMutation(TestHttpRequestDocument, options); } -export type DeleteCoreViewSortMutationHookResult = ReturnType; -export type DeleteCoreViewSortMutationResult = Apollo.MutationResult; -export type DeleteCoreViewSortMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewDocument = gql` - mutation DestroyCoreView($id: String!) { - destroyCoreView(id: $id) +export type TestHttpRequestMutationHookResult = ReturnType; +export type TestHttpRequestMutationResult = Apollo.MutationResult; +export type TestHttpRequestMutationOptions = Apollo.BaseMutationOptions; +export const UpdateWorkflowVersionPositionsDocument = gql` + mutation UpdateWorkflowVersionPositions($input: UpdateWorkflowVersionPositionsInput!) { + updateWorkflowVersionPositions(input: $input) } `; -export type DestroyCoreViewMutationFn = Apollo.MutationFunction; +export type UpdateWorkflowVersionPositionsMutationFn = Apollo.MutationFunction; /** - * __useDestroyCoreViewMutation__ + * __useUpdateWorkflowVersionPositionsMutation__ * - * To run a mutation, you first call `useDestroyCoreViewMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewMutation` returns a tuple that includes: + * To run a mutation, you first call `useUpdateWorkflowVersionPositionsMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateWorkflowVersionPositionsMutation` returns a tuple that includes: * - A mutate function that you can call at any time to execute the mutation * - An object with fields that represent the current status of the mutation's execution * * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; * * @example - * const [destroyCoreViewMutation, { data, loading, error }] = useDestroyCoreViewMutation({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useDestroyCoreViewMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewDocument, options); - } -export type DestroyCoreViewMutationHookResult = ReturnType; -export type DestroyCoreViewMutationResult = Apollo.MutationResult; -export type DestroyCoreViewMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewFieldDocument = gql` - mutation DestroyCoreViewField($input: DestroyViewFieldInput!) { - destroyCoreViewField(input: $input) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; -export type DestroyCoreViewFieldMutationFn = Apollo.MutationFunction; - -/** - * __useDestroyCoreViewFieldMutation__ - * - * To run a mutation, you first call `useDestroyCoreViewFieldMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewFieldMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [destroyCoreViewFieldMutation, { data, loading, error }] = useDestroyCoreViewFieldMutation({ + * const [updateWorkflowVersionPositionsMutation, { data, loading, error }] = useUpdateWorkflowVersionPositionsMutation({ * variables: { * input: // value for 'input' * }, * }); */ -export function useDestroyCoreViewFieldMutation(baseOptions?: Apollo.MutationHookOptions) { +export function useUpdateWorkflowVersionPositionsMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewFieldDocument, options); + return Apollo.useMutation(UpdateWorkflowVersionPositionsDocument, options); } -export type DestroyCoreViewFieldMutationHookResult = ReturnType; -export type DestroyCoreViewFieldMutationResult = Apollo.MutationResult; -export type DestroyCoreViewFieldMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewFilterDocument = gql` - mutation DestroyCoreViewFilter($input: DestroyViewFilterInput!) { - destroyCoreViewFilter(input: $input) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; -export type DestroyCoreViewFilterMutationFn = Apollo.MutationFunction; - -/** - * __useDestroyCoreViewFilterMutation__ - * - * To run a mutation, you first call `useDestroyCoreViewFilterMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewFilterMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [destroyCoreViewFilterMutation, { data, loading, error }] = useDestroyCoreViewFilterMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDestroyCoreViewFilterMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewFilterDocument, options); - } -export type DestroyCoreViewFilterMutationHookResult = ReturnType; -export type DestroyCoreViewFilterMutationResult = Apollo.MutationResult; -export type DestroyCoreViewFilterMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewFilterGroupDocument = gql` - mutation DestroyCoreViewFilterGroup($id: String!) { - destroyCoreViewFilterGroup(id: $id) -} - `; -export type DestroyCoreViewFilterGroupMutationFn = Apollo.MutationFunction; - -/** - * __useDestroyCoreViewFilterGroupMutation__ - * - * To run a mutation, you first call `useDestroyCoreViewFilterGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewFilterGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [destroyCoreViewFilterGroupMutation, { data, loading, error }] = useDestroyCoreViewFilterGroupMutation({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useDestroyCoreViewFilterGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewFilterGroupDocument, options); - } -export type DestroyCoreViewFilterGroupMutationHookResult = ReturnType; -export type DestroyCoreViewFilterGroupMutationResult = Apollo.MutationResult; -export type DestroyCoreViewFilterGroupMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewGroupDocument = gql` - mutation DestroyCoreViewGroup($input: DestroyViewGroupInput!) { - destroyCoreViewGroup(input: $input) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; -export type DestroyCoreViewGroupMutationFn = Apollo.MutationFunction; - -/** - * __useDestroyCoreViewGroupMutation__ - * - * To run a mutation, you first call `useDestroyCoreViewGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [destroyCoreViewGroupMutation, { data, loading, error }] = useDestroyCoreViewGroupMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useDestroyCoreViewGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewGroupDocument, options); - } -export type DestroyCoreViewGroupMutationHookResult = ReturnType; -export type DestroyCoreViewGroupMutationResult = Apollo.MutationResult; -export type DestroyCoreViewGroupMutationOptions = Apollo.BaseMutationOptions; -export const DestroyCoreViewSortDocument = gql` - mutation DestroyCoreViewSort($id: String!) { - destroyCoreViewSort(id: $id) -} - `; -export type DestroyCoreViewSortMutationFn = Apollo.MutationFunction; - -/** - * __useDestroyCoreViewSortMutation__ - * - * To run a mutation, you first call `useDestroyCoreViewSortMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useDestroyCoreViewSortMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [destroyCoreViewSortMutation, { data, loading, error }] = useDestroyCoreViewSortMutation({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useDestroyCoreViewSortMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(DestroyCoreViewSortDocument, options); - } -export type DestroyCoreViewSortMutationHookResult = ReturnType; -export type DestroyCoreViewSortMutationResult = Apollo.MutationResult; -export type DestroyCoreViewSortMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewDocument = gql` - mutation UpdateCoreView($id: String!, $input: UpdateViewInput!) { - updateCoreView(id: $id, input: $input) { - ...ViewFragment - } -} - ${ViewFragmentFragmentDoc}`; -export type UpdateCoreViewMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewMutation, { data, loading, error }] = useUpdateCoreViewMutation({ - * variables: { - * id: // value for 'id' - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewDocument, options); - } -export type UpdateCoreViewMutationHookResult = ReturnType; -export type UpdateCoreViewMutationResult = Apollo.MutationResult; -export type UpdateCoreViewMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewFieldDocument = gql` - mutation UpdateCoreViewField($input: UpdateViewFieldInput!) { - updateCoreViewField(input: $input) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; -export type UpdateCoreViewFieldMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewFieldMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewFieldMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewFieldMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewFieldMutation, { data, loading, error }] = useUpdateCoreViewFieldMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewFieldMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewFieldDocument, options); - } -export type UpdateCoreViewFieldMutationHookResult = ReturnType; -export type UpdateCoreViewFieldMutationResult = Apollo.MutationResult; -export type UpdateCoreViewFieldMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewFilterDocument = gql` - mutation UpdateCoreViewFilter($input: UpdateViewFilterInput!) { - updateCoreViewFilter(input: $input) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; -export type UpdateCoreViewFilterMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewFilterMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewFilterMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewFilterMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewFilterMutation, { data, loading, error }] = useUpdateCoreViewFilterMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewFilterMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewFilterDocument, options); - } -export type UpdateCoreViewFilterMutationHookResult = ReturnType; -export type UpdateCoreViewFilterMutationResult = Apollo.MutationResult; -export type UpdateCoreViewFilterMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewFilterGroupDocument = gql` - mutation UpdateCoreViewFilterGroup($id: String!, $input: UpdateViewFilterGroupInput!) { - updateCoreViewFilterGroup(id: $id, input: $input) { - ...ViewFilterGroupFragment - } -} - ${ViewFilterGroupFragmentFragmentDoc}`; -export type UpdateCoreViewFilterGroupMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewFilterGroupMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewFilterGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewFilterGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewFilterGroupMutation, { data, loading, error }] = useUpdateCoreViewFilterGroupMutation({ - * variables: { - * id: // value for 'id' - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewFilterGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewFilterGroupDocument, options); - } -export type UpdateCoreViewFilterGroupMutationHookResult = ReturnType; -export type UpdateCoreViewFilterGroupMutationResult = Apollo.MutationResult; -export type UpdateCoreViewFilterGroupMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewGroupDocument = gql` - mutation UpdateCoreViewGroup($input: UpdateViewGroupInput!) { - updateCoreViewGroup(input: $input) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; -export type UpdateCoreViewGroupMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewGroupMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewGroupMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewGroupMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewGroupMutation, { data, loading, error }] = useUpdateCoreViewGroupMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewGroupMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewGroupDocument, options); - } -export type UpdateCoreViewGroupMutationHookResult = ReturnType; -export type UpdateCoreViewGroupMutationResult = Apollo.MutationResult; -export type UpdateCoreViewGroupMutationOptions = Apollo.BaseMutationOptions; -export const UpdateCoreViewSortDocument = gql` - mutation UpdateCoreViewSort($id: String!, $input: UpdateViewSortInput!) { - updateCoreViewSort(id: $id, input: $input) { - ...ViewSortFragment - } -} - ${ViewSortFragmentFragmentDoc}`; -export type UpdateCoreViewSortMutationFn = Apollo.MutationFunction; - -/** - * __useUpdateCoreViewSortMutation__ - * - * To run a mutation, you first call `useUpdateCoreViewSortMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCoreViewSortMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [updateCoreViewSortMutation, { data, loading, error }] = useUpdateCoreViewSortMutation({ - * variables: { - * id: // value for 'id' - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCoreViewSortMutation(baseOptions?: Apollo.MutationHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation(UpdateCoreViewSortDocument, options); - } -export type UpdateCoreViewSortMutationHookResult = ReturnType; -export type UpdateCoreViewSortMutationResult = Apollo.MutationResult; -export type UpdateCoreViewSortMutationOptions = Apollo.BaseMutationOptions; -export const FindAllCoreViewsDocument = gql` - query FindAllCoreViews { - getCoreViews { - ...ViewFragment - } -} - ${ViewFragmentFragmentDoc}`; - -/** - * __useFindAllCoreViewsQuery__ - * - * To run a query within a React component, call `useFindAllCoreViewsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindAllCoreViewsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindAllCoreViewsQuery({ - * variables: { - * }, - * }); - */ -export function useFindAllCoreViewsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindAllCoreViewsDocument, options); - } -export function useFindAllCoreViewsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindAllCoreViewsDocument, options); - } -export type FindAllCoreViewsQueryHookResult = ReturnType; -export type FindAllCoreViewsLazyQueryHookResult = ReturnType; -export type FindAllCoreViewsQueryResult = Apollo.QueryResult; -export const FindManyCoreViewFieldsDocument = gql` - query FindManyCoreViewFields($viewId: String!) { - getCoreViewFields(viewId: $viewId) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewFieldsQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewFieldsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewFieldsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewFieldsQuery({ - * variables: { - * viewId: // value for 'viewId' - * }, - * }); - */ -export function useFindManyCoreViewFieldsQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewFieldsDocument, options); - } -export function useFindManyCoreViewFieldsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewFieldsDocument, options); - } -export type FindManyCoreViewFieldsQueryHookResult = ReturnType; -export type FindManyCoreViewFieldsLazyQueryHookResult = ReturnType; -export type FindManyCoreViewFieldsQueryResult = Apollo.QueryResult; -export const FindManyCoreViewFilterGroupsDocument = gql` - query FindManyCoreViewFilterGroups($viewId: String) { - getCoreViewFilterGroups(viewId: $viewId) { - ...ViewFilterGroupFragment - } -} - ${ViewFilterGroupFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewFilterGroupsQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewFilterGroupsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewFilterGroupsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewFilterGroupsQuery({ - * variables: { - * viewId: // value for 'viewId' - * }, - * }); - */ -export function useFindManyCoreViewFilterGroupsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewFilterGroupsDocument, options); - } -export function useFindManyCoreViewFilterGroupsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewFilterGroupsDocument, options); - } -export type FindManyCoreViewFilterGroupsQueryHookResult = ReturnType; -export type FindManyCoreViewFilterGroupsLazyQueryHookResult = ReturnType; -export type FindManyCoreViewFilterGroupsQueryResult = Apollo.QueryResult; -export const FindManyCoreViewFiltersDocument = gql` - query FindManyCoreViewFilters($viewId: String) { - getCoreViewFilters(viewId: $viewId) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewFiltersQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewFiltersQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewFiltersQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewFiltersQuery({ - * variables: { - * viewId: // value for 'viewId' - * }, - * }); - */ -export function useFindManyCoreViewFiltersQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewFiltersDocument, options); - } -export function useFindManyCoreViewFiltersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewFiltersDocument, options); - } -export type FindManyCoreViewFiltersQueryHookResult = ReturnType; -export type FindManyCoreViewFiltersLazyQueryHookResult = ReturnType; -export type FindManyCoreViewFiltersQueryResult = Apollo.QueryResult; -export const FindManyCoreViewGroupsDocument = gql` - query FindManyCoreViewGroups($viewId: String) { - getCoreViewGroups(viewId: $viewId) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewGroupsQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewGroupsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewGroupsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewGroupsQuery({ - * variables: { - * viewId: // value for 'viewId' - * }, - * }); - */ -export function useFindManyCoreViewGroupsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewGroupsDocument, options); - } -export function useFindManyCoreViewGroupsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewGroupsDocument, options); - } -export type FindManyCoreViewGroupsQueryHookResult = ReturnType; -export type FindManyCoreViewGroupsLazyQueryHookResult = ReturnType; -export type FindManyCoreViewGroupsQueryResult = Apollo.QueryResult; -export const FindManyCoreViewSortsDocument = gql` - query FindManyCoreViewSorts($viewId: String) { - getCoreViewSorts(viewId: $viewId) { - ...ViewSortFragment - } -} - ${ViewSortFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewSortsQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewSortsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewSortsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewSortsQuery({ - * variables: { - * viewId: // value for 'viewId' - * }, - * }); - */ -export function useFindManyCoreViewSortsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewSortsDocument, options); - } -export function useFindManyCoreViewSortsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewSortsDocument, options); - } -export type FindManyCoreViewSortsQueryHookResult = ReturnType; -export type FindManyCoreViewSortsLazyQueryHookResult = ReturnType; -export type FindManyCoreViewSortsQueryResult = Apollo.QueryResult; -export const FindManyCoreViewsDocument = gql` - query FindManyCoreViews($objectMetadataId: String) { - getCoreViews(objectMetadataId: $objectMetadataId) { - ...ViewFragment - } -} - ${ViewFragmentFragmentDoc}`; - -/** - * __useFindManyCoreViewsQuery__ - * - * To run a query within a React component, call `useFindManyCoreViewsQuery` and pass it any options that fit your needs. - * When your component renders, `useFindManyCoreViewsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindManyCoreViewsQuery({ - * variables: { - * objectMetadataId: // value for 'objectMetadataId' - * }, - * }); - */ -export function useFindManyCoreViewsQuery(baseOptions?: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindManyCoreViewsDocument, options); - } -export function useFindManyCoreViewsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindManyCoreViewsDocument, options); - } -export type FindManyCoreViewsQueryHookResult = ReturnType; -export type FindManyCoreViewsLazyQueryHookResult = ReturnType; -export type FindManyCoreViewsQueryResult = Apollo.QueryResult; -export const FindOneCoreViewDocument = gql` - query FindOneCoreView($id: String!) { - getCoreView(id: $id) { - ...ViewFragment - } -} - ${ViewFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewDocument, options); - } -export function useFindOneCoreViewLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewDocument, options); - } -export type FindOneCoreViewQueryHookResult = ReturnType; -export type FindOneCoreViewLazyQueryHookResult = ReturnType; -export type FindOneCoreViewQueryResult = Apollo.QueryResult; -export const FindOneCoreViewFieldDocument = gql` - query FindOneCoreViewField($id: String!) { - getCoreViewField(id: $id) { - ...ViewFieldFragment - } -} - ${ViewFieldFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewFieldQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewFieldQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewFieldQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewFieldQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewFieldQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewFieldDocument, options); - } -export function useFindOneCoreViewFieldLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewFieldDocument, options); - } -export type FindOneCoreViewFieldQueryHookResult = ReturnType; -export type FindOneCoreViewFieldLazyQueryHookResult = ReturnType; -export type FindOneCoreViewFieldQueryResult = Apollo.QueryResult; -export const FindOneCoreViewFilterDocument = gql` - query FindOneCoreViewFilter($id: String!) { - getCoreViewFilter(id: $id) { - ...ViewFilterFragment - } -} - ${ViewFilterFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewFilterQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewFilterQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewFilterQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewFilterQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewFilterQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewFilterDocument, options); - } -export function useFindOneCoreViewFilterLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewFilterDocument, options); - } -export type FindOneCoreViewFilterQueryHookResult = ReturnType; -export type FindOneCoreViewFilterLazyQueryHookResult = ReturnType; -export type FindOneCoreViewFilterQueryResult = Apollo.QueryResult; -export const FindOneCoreViewFilterGroupDocument = gql` - query FindOneCoreViewFilterGroup($id: String!) { - getCoreViewFilterGroup(id: $id) { - ...ViewFilterGroupFragment - } -} - ${ViewFilterGroupFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewFilterGroupQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewFilterGroupQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewFilterGroupQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewFilterGroupQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewFilterGroupQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewFilterGroupDocument, options); - } -export function useFindOneCoreViewFilterGroupLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewFilterGroupDocument, options); - } -export type FindOneCoreViewFilterGroupQueryHookResult = ReturnType; -export type FindOneCoreViewFilterGroupLazyQueryHookResult = ReturnType; -export type FindOneCoreViewFilterGroupQueryResult = Apollo.QueryResult; -export const FindOneCoreViewGroupDocument = gql` - query FindOneCoreViewGroup($id: String!) { - getCoreViewGroup(id: $id) { - ...ViewGroupFragment - } -} - ${ViewGroupFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewGroupQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewGroupQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewGroupQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewGroupQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewGroupQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewGroupDocument, options); - } -export function useFindOneCoreViewGroupLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewGroupDocument, options); - } -export type FindOneCoreViewGroupQueryHookResult = ReturnType; -export type FindOneCoreViewGroupLazyQueryHookResult = ReturnType; -export type FindOneCoreViewGroupQueryResult = Apollo.QueryResult; -export const FindOneCoreViewSortDocument = gql` - query FindOneCoreViewSort($id: String!) { - getCoreViewSort(id: $id) { - ...ViewSortFragment - } -} - ${ViewSortFragmentFragmentDoc}`; - -/** - * __useFindOneCoreViewSortQuery__ - * - * To run a query within a React component, call `useFindOneCoreViewSortQuery` and pass it any options that fit your needs. - * When your component renders, `useFindOneCoreViewSortQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFindOneCoreViewSortQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useFindOneCoreViewSortQuery(baseOptions: Apollo.QueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery(FindOneCoreViewSortDocument, options); - } -export function useFindOneCoreViewSortLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery(FindOneCoreViewSortDocument, options); - } -export type FindOneCoreViewSortQueryHookResult = ReturnType; -export type FindOneCoreViewSortLazyQueryHookResult = ReturnType; -export type FindOneCoreViewSortQueryResult = Apollo.QueryResult; \ No newline at end of file +export type UpdateWorkflowVersionPositionsMutationHookResult = ReturnType; +export type UpdateWorkflowVersionPositionsMutationResult = Apollo.MutationResult; +export type UpdateWorkflowVersionPositionsMutationOptions = Apollo.BaseMutationOptions; \ No newline at end of file diff --git a/packages/twenty-front/src/modules/accounts/types/ImapSmtpCaldavAccount.ts b/packages/twenty-front/src/modules/accounts/types/ImapSmtpCaldavAccount.ts index 1b80a8f8921..ebb5fe42fec 100644 --- a/packages/twenty-front/src/modules/accounts/types/ImapSmtpCaldavAccount.ts +++ b/packages/twenty-front/src/modules/accounts/types/ImapSmtpCaldavAccount.ts @@ -1,4 +1,4 @@ -import { type ConnectionParameters } from '~/generated/graphql'; +import { type ConnectionParameters } from '~/generated-metadata/graphql'; export type ImapSmtpCaldavAccount = { IMAP?: ConnectionParameters; diff --git a/packages/twenty-front/src/modules/activities/hooks/useCustomResolver.ts b/packages/twenty-front/src/modules/activities/hooks/useCustomResolver.ts index 91ea5a1643d..f7ae9ee8d37 100644 --- a/packages/twenty-front/src/modules/activities/hooks/useCustomResolver.ts +++ b/packages/twenty-front/src/modules/activities/hooks/useCustomResolver.ts @@ -7,6 +7,7 @@ import { import { useState } from 'react'; import { type ActivityTargetableObject } from '@/activities/types/ActivityTargetableEntity'; +import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { useSnackBar } from '@/ui/feedback/snack-bar-manager/hooks/useSnackBar'; @@ -37,6 +38,7 @@ export const useCustomResolver = < fetchMoreRecords: () => Promise; } => { const { enqueueErrorSnackBar } = useSnackBar(); + const apolloCoreClient = useApolloCoreClient(); const [page, setPage] = useState({ pageNumber: 1, @@ -62,6 +64,7 @@ export const useCustomResolver = < loading: firstQueryLoading, fetchMore, } = useQuery>(query, { + client: apolloCoreClient, variables: queryVariables, onError: (error) => { enqueueErrorSnackBar({ diff --git a/packages/twenty-front/src/modules/analytics/hooks/__tests__/useEventTracker.test.tsx b/packages/twenty-front/src/modules/analytics/hooks/__tests__/useEventTracker.test.tsx index ed41eb06dca..3746596474f 100644 --- a/packages/twenty-front/src/modules/analytics/hooks/__tests__/useEventTracker.test.tsx +++ b/packages/twenty-front/src/modules/analytics/hooks/__tests__/useEventTracker.test.tsx @@ -8,7 +8,7 @@ import { ANALYTICS_COOKIE_NAME, useEventTracker, } from '@/analytics/hooks/useEventTracker'; -import { AnalyticsType } from '~/generated/graphql'; +import { AnalyticsType } from '~/generated-metadata/graphql'; // Mock document.cookie Object.defineProperty(document, 'cookie', { diff --git a/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx b/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx index aed6a91dee4..ac878e0e934 100644 --- a/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx +++ b/packages/twenty-front/src/modules/app/effect-components/PageChangeEffect.tsx @@ -37,7 +37,7 @@ import { FocusComponentType } from '@/ui/utilities/focus/types/FocusComponentTyp import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue'; import { AppBasePath, AppPath } from 'twenty-shared/types'; import { isDefined } from 'twenty-shared/utils'; -import { AnalyticsType } from '~/generated/graphql'; +import { AnalyticsType } from '~/generated-metadata/graphql'; import { usePageChangeEffectNavigateLocation } from '~/hooks/usePageChangeEffectNavigateLocation'; import { useInitializeQueryParamState } from '~/modules/app/hooks/useInitializeQueryParamState'; import { isMatchingLocation } from '~/utils/isMatchingLocation'; diff --git a/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useCommandMenuUpdateNavigationMorphItemsByPage.test.tsx b/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useCommandMenuUpdateNavigationMorphItemsByPage.test.tsx new file mode 100644 index 00000000000..c75feaadddf --- /dev/null +++ b/packages/twenty-front/src/modules/command-menu/hooks/__tests__/useCommandMenuUpdateNavigationMorphItemsByPage.test.tsx @@ -0,0 +1,113 @@ +import { useCommandMenuUpdateNavigationMorphItemsByPage } from '@/command-menu/hooks/useCommandMenuUpdateNavigationMorphItemsByPage'; +import { commandMenuNavigationMorphItemsByPageState } from '@/command-menu/states/commandMenuNavigationMorphItemsByPageState'; +import { renderHook } from '@testing-library/react'; +import { act } from 'react'; +import { RecoilRoot, useRecoilValue } from 'recoil'; + +const pageId = 'merge-page-id'; +const objectMetadataId = 'company-metadata-id'; + +const Wrapper = ({ + children, + initialRecordIds, +}: { + children: React.ReactNode; + initialRecordIds: string[]; +}) => ( + { + set( + commandMenuNavigationMorphItemsByPageState, + new Map([ + [ + pageId, + initialRecordIds.map((recordId) => ({ + objectMetadataId, + recordId, + })), + ], + ]), + ); + }} + > + {children} + +); + +const renderHooks = (initialRecordIds: string[]) => + renderHook( + () => { + const { updateCommandMenuNavigationMorphItemsByPage } = + useCommandMenuUpdateNavigationMorphItemsByPage(); + const commandMenuNavigationMorphItemsByPage = useRecoilValue( + commandMenuNavigationMorphItemsByPageState, + ); + + return { + updateCommandMenuNavigationMorphItemsByPage, + commandMenuNavigationMorphItemsByPage, + }; + }, + { + wrapper: ({ children }) => ( + {children} + ), + }, + ); + +describe('useCommandMenuUpdateNavigationMorphItemsByPage', () => { + it('should replace existing items for a page instead of appending', async () => { + const { result } = renderHooks(['record-1', 'record-2']); + + await act(async () => { + await result.current.updateCommandMenuNavigationMorphItemsByPage({ + pageId, + objectMetadataId, + objectRecordIds: ['record-2', 'record-1'], + }); + }); + + expect( + result.current.commandMenuNavigationMorphItemsByPage.get(pageId), + ).toEqual([ + { + objectMetadataId, + recordId: 'record-2', + }, + { + objectMetadataId, + recordId: 'record-1', + }, + ]); + }); + + it('should keep only the latest payload when called twice for the same page', async () => { + const { result } = renderHooks([]); + + await act(async () => { + await result.current.updateCommandMenuNavigationMorphItemsByPage({ + pageId, + objectMetadataId, + objectRecordIds: ['record-1', 'record-2'], + }); + await result.current.updateCommandMenuNavigationMorphItemsByPage({ + pageId, + objectMetadataId, + objectRecordIds: ['record-2', 'record-1'], + }); + }); + + expect( + result.current.commandMenuNavigationMorphItemsByPage.get(pageId), + ).toEqual([ + { + objectMetadataId, + recordId: 'record-2', + }, + { + objectMetadataId, + recordId: 'record-1', + }, + ]); + }); +}); diff --git a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuUpdateNavigationMorphItemsByPage.tsx b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuUpdateNavigationMorphItemsByPage.tsx index bc1b248ea7f..faf0b0f226a 100644 --- a/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuUpdateNavigationMorphItemsByPage.tsx +++ b/packages/twenty-front/src/modules/command-menu/hooks/useCommandMenuUpdateNavigationMorphItemsByPage.tsx @@ -1,5 +1,4 @@ import { commandMenuNavigationMorphItemsByPageState } from '@/command-menu/states/commandMenuNavigationMorphItemsByPageState'; -import { isNonEmptyArray } from '@sniptt/guards'; import { useRecoilCallback } from 'recoil'; type UpdateNavigationMorphItemsByPageParams = { @@ -20,17 +19,10 @@ export const useCommandMenuUpdateNavigationMorphItemsByPage = () => { .getLoadable(commandMenuNavigationMorphItemsByPageState) .getValue(); - const currentMorphItemsForPage = currentMorphItems.get(pageId); - - const newMorphItems = [ - ...(isNonEmptyArray(currentMorphItemsForPage) - ? currentMorphItemsForPage - : []), - ...objectRecordIds.map((recordId) => ({ - objectMetadataId, - recordId, - })), - ]; + const newMorphItems = objectRecordIds.map((recordId) => ({ + objectMetadataId, + recordId, + })); const newMorphItemsMap = new Map(currentMorphItems); newMorphItemsMap.set(pageId, newMorphItems); diff --git a/packages/twenty-front/src/modules/page-layout/hooks/useUpdatePageLayoutWithTabsAndWidgets.ts b/packages/twenty-front/src/modules/page-layout/hooks/useUpdatePageLayoutWithTabsAndWidgets.ts index 47ec7550523..2124c9fdf93 100644 --- a/packages/twenty-front/src/modules/page-layout/hooks/useUpdatePageLayoutWithTabsAndWidgets.ts +++ b/packages/twenty-front/src/modules/page-layout/hooks/useUpdatePageLayoutWithTabsAndWidgets.ts @@ -1,7 +1,7 @@ import { type UpdatePageLayoutWithTabsInput, useUpdatePageLayoutWithTabsAndWidgetsMutation, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; import { useMetadataErrorHandler } from '@/metadata-error-handler/hooks/useMetadataErrorHandler'; import { type MetadataRequestResult } from '@/object-metadata/types/MetadataRequestResult.type'; diff --git a/packages/twenty-front/src/modules/page-layout/utils/convertPageLayoutDraftToUpdateInput.ts b/packages/twenty-front/src/modules/page-layout/utils/convertPageLayoutDraftToUpdateInput.ts index fb6991fd76b..fa0ba5581b3 100644 --- a/packages/twenty-front/src/modules/page-layout/utils/convertPageLayoutDraftToUpdateInput.ts +++ b/packages/twenty-front/src/modules/page-layout/utils/convertPageLayoutDraftToUpdateInput.ts @@ -1,5 +1,5 @@ import { type DraftPageLayout } from '@/page-layout/types/DraftPageLayout'; -import { type UpdatePageLayoutWithTabsInput } from '~/generated/graphql'; +import { type UpdatePageLayoutWithTabsInput } from '~/generated-metadata/graphql'; export const convertPageLayoutDraftToUpdateInput = ( pageLayoutDraft: DraftPageLayout, diff --git a/packages/twenty-front/src/modules/settings/accounts/validation-schemas/connectionImapSmtpCalDav.ts b/packages/twenty-front/src/modules/settings/accounts/validation-schemas/connectionImapSmtpCalDav.ts index f264851baa6..3fb9eee449b 100644 --- a/packages/twenty-front/src/modules/settings/accounts/validation-schemas/connectionImapSmtpCalDav.ts +++ b/packages/twenty-front/src/modules/settings/accounts/validation-schemas/connectionImapSmtpCalDav.ts @@ -1,6 +1,6 @@ import { ACCOUNT_PROTOCOLS } from '@/settings/accounts/constants/AccountProtocols'; import { z } from 'zod'; -import { type ConnectionParameters } from '~/generated/graphql'; +import { type ConnectionParameters } from '~/generated-metadata/graphql'; const connectionParameters = z .object({ diff --git a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdown.tsx b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdown.tsx index b618f775ad6..f58d847d4f4 100644 --- a/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdown.tsx +++ b/packages/twenty-front/src/modules/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdown.tsx @@ -1,6 +1,7 @@ import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { useObjectRecordSearchRecords } from '@/object-record/hooks/useObjectRecordSearchRecords'; import { SettingsRoleAssignmentWorkspaceMemberPickerDropdownContent } from '@/settings/roles/role-assignment/components/SettingsRoleAssignmentWorkspaceMemberPickerDropdownContent'; +import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPartialMembers'; import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent'; import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer'; import { DropdownMenuSearchInput } from '@/ui/layout/dropdown/components/DropdownMenuSearchInput'; @@ -8,7 +9,6 @@ import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownM import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth'; import { useLingui } from '@lingui/react/macro'; import { type ChangeEvent, useState } from 'react'; -import { type PartialWorkspaceMember } from '@/settings/roles/types/RoleWithPartialMembers'; type SettingsRoleAssignmentWorkspaceMemberPickerDropdownProps = { excludedWorkspaceMemberIds: string[]; diff --git a/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx b/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx index 12cced5ecea..63eb769ba5e 100644 --- a/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx +++ b/packages/twenty-front/src/modules/sse-db-event/components/SSEQuerySubscribeEffect.tsx @@ -1,4 +1,3 @@ -import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { ADD_QUERY_TO_EVENT_STREAM_MUTATION } from '@/sse-db-event/graphql/mutations/AddQueryToEventStreamMutation'; import { REMOVE_QUERY_FROM_EVENT_STREAM_MUTATION } from '@/sse-db-event/graphql/mutations/RemoveQueryFromEventStreamMutation'; import { activeQueryListenersState } from '@/sse-db-event/states/activeQueryListenersState'; @@ -18,22 +17,20 @@ import { useDebouncedCallback } from 'use-debounce'; import { type AddQuerySubscriptionInput, type RemoveQueryFromEventStreamInput, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const SSEQuerySubscribeEffect = () => { const sseEventStreamId = useRecoilValue(sseEventStreamIdState); - const apolloCoreClient = useApolloCoreClient(); - const [addQueryToEventStream] = useMutation< boolean, { input: AddQuerySubscriptionInput } - >(ADD_QUERY_TO_EVENT_STREAM_MUTATION, { client: apolloCoreClient }); + >(ADD_QUERY_TO_EVENT_STREAM_MUTATION); const [removeQueryFromEventStream] = useMutation< void, { input: RemoveQueryFromEventStreamInput } - >(REMOVE_QUERY_FROM_EVENT_STREAM_MUTATION, { client: apolloCoreClient }); + >(REMOVE_QUERY_FROM_EVENT_STREAM_MUTATION); const requiredQueryListeners = useRecoilValue(requiredQueryListenersState); const activeQueryListeners = useRecoilValue(activeQueryListenersState); diff --git a/packages/twenty-front/src/modules/sse-db-event/hooks/useOnDbEvent.ts b/packages/twenty-front/src/modules/sse-db-event/hooks/useOnDbEvent.ts index 34e08cbe3d8..aa904c27e01 100644 --- a/packages/twenty-front/src/modules/sse-db-event/hooks/useOnDbEvent.ts +++ b/packages/twenty-front/src/modules/sse-db-event/hooks/useOnDbEvent.ts @@ -4,7 +4,7 @@ import { useContext, useEffect } from 'react'; import { type Subscription, type SubscriptionOnDbEventArgs, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; type OnDbEventArgs = SubscriptionOnDbEventArgs & { skip?: boolean; diff --git a/packages/twenty-front/src/modules/users/components/MetadataProviderEffect.tsx b/packages/twenty-front/src/modules/users/components/MetadataProviderEffect.tsx index 494297aa131..ce5b915a88f 100644 --- a/packages/twenty-front/src/modules/users/components/MetadataProviderEffect.tsx +++ b/packages/twenty-front/src/modules/users/components/MetadataProviderEffect.tsx @@ -27,10 +27,10 @@ import { isDefined } from 'twenty-shared/utils'; import { type WorkspaceMember, useFindAllCoreViewsQuery, + useFindAllRecordPageLayoutsQuery, useGetCurrentUserQuery, useGetManyLogicFunctionsQuery, } from '~/generated-metadata/graphql'; -import { useFindAllRecordPageLayoutsQuery } from '~/generated/graphql'; import { dateLocaleState } from '~/localization/states/dateLocaleState'; import { dynamicActivate } from '~/utils/i18n/dynamicActivate'; import { isDeeplyEqual } from '~/utils/isDeeplyEqual'; diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIPersist.ts index a9a6f1eb602..6a00c8e94cc 100644 --- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIPersist.ts +++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIPersist.ts @@ -15,7 +15,7 @@ import { useCreateCoreViewMutation, useDestroyCoreViewMutation, ViewType, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const usePerformViewAPIPersist = () => { const [createCoreViewMutation] = useCreateCoreViewMutation(); diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIUpdate.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIUpdate.ts index 3d51b024394..79a0ae278bb 100644 --- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIUpdate.ts +++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewAPIUpdate.ts @@ -13,7 +13,7 @@ import { type CoreView, type UpdateCoreViewMutationVariables, useUpdateCoreViewMutation, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const usePerformViewAPIUpdate = () => { const [updateCoreViewMutation] = useUpdateCoreViewMutation(); diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts index 6932f6198c2..907b1f916e9 100644 --- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts +++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFieldAPIPersist.ts @@ -17,7 +17,7 @@ import { useDeleteCoreViewFieldMutation, useDestroyCoreViewFieldMutation, useUpdateCoreViewFieldMutation, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const usePerformViewFieldAPIPersist = () => { const { triggerViewFieldOptimisticEffect } = useTriggerViewFieldOptimisticEffect(); diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts index d7ea4734331..9193180cfde 100644 --- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts +++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewFilterAPIPersist.ts @@ -17,7 +17,7 @@ import { useDeleteCoreViewFilterMutation, useDestroyCoreViewFilterMutation, useUpdateCoreViewFilterMutation, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const usePerformViewFilterAPIPersist = () => { const { triggerViewFilterOptimisticEffect } = diff --git a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewGroupAPIPersist.ts b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewGroupAPIPersist.ts index 6d6437a95e3..13f61a3528b 100644 --- a/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewGroupAPIPersist.ts +++ b/packages/twenty-front/src/modules/views/hooks/internal/usePerformViewGroupAPIPersist.ts @@ -11,7 +11,7 @@ import { isDefined } from 'twenty-shared/utils'; import { type UpdateCoreViewGroupMutationVariables, useUpdateCoreViewGroupMutation, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; export const usePerformViewGroupAPIPersist = () => { const { triggerViewGroupOptimisticEffect } = diff --git a/packages/twenty-front/src/modules/views/hooks/useRefreshAllCoreViews.ts b/packages/twenty-front/src/modules/views/hooks/useRefreshAllCoreViews.ts index de7464c7e43..da5564a3d6b 100644 --- a/packages/twenty-front/src/modules/views/hooks/useRefreshAllCoreViews.ts +++ b/packages/twenty-front/src/modules/views/hooks/useRefreshAllCoreViews.ts @@ -3,7 +3,7 @@ import { coreViewsState } from '@/views/states/coreViewState'; import { type FetchPolicy, useApolloClient } from '@apollo/client'; import { useRecoilCallback } from 'recoil'; import { isDefined } from 'twenty-shared/utils'; -import { type FindAllCoreViewsQuery } from '~/generated/graphql'; +import { type FindAllCoreViewsQuery } from '~/generated-metadata/graphql'; import { isDeeplyEqual } from '~/utils/isDeeplyEqual'; export const useRefreshAllCoreViews = ( diff --git a/packages/twenty-front/src/modules/views/hooks/useRefreshCoreViewsByObjectMetadataId.ts b/packages/twenty-front/src/modules/views/hooks/useRefreshCoreViewsByObjectMetadataId.ts index 9c334fbe639..78cc4cbf3bc 100644 --- a/packages/twenty-front/src/modules/views/hooks/useRefreshCoreViewsByObjectMetadataId.ts +++ b/packages/twenty-front/src/modules/views/hooks/useRefreshCoreViewsByObjectMetadataId.ts @@ -12,7 +12,7 @@ import { mapViewFieldToRecordField } from '@/views/utils/mapViewFieldToRecordFie import { mapViewFiltersToFilters } from '@/views/utils/mapViewFiltersToFilters'; import { useRecoilCallback } from 'recoil'; import { isDefined, removePropertiesFromRecord } from 'twenty-shared/utils'; -import { useFindManyCoreViewsLazyQuery } from '~/generated/graphql'; +import { useFindManyCoreViewsLazyQuery } from '~/generated-metadata/graphql'; import { isDeeplyEqual } from '~/utils/isDeeplyEqual'; export const useRefreshCoreViewsByObjectMetadataId = () => { diff --git a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts index ced04f275a7..cf2a5bc5916 100644 --- a/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts +++ b/packages/twenty-front/src/modules/views/hooks/useSaveCurrentViewFields.ts @@ -9,7 +9,7 @@ import { type ViewField } from '@/views/types/ViewField'; import { type CreateViewFieldInput, type UpdateCoreViewFieldMutationVariables, -} from '~/generated/graphql'; +} from '~/generated-metadata/graphql'; import { isDeeplyEqual } from '~/utils/isDeeplyEqual'; import { isUndefinedOrNull } from '~/utils/isUndefinedOrNull'; diff --git a/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToCore.ts b/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToCore.ts index 54cc374a4b9..be55e0b9ac6 100644 --- a/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToCore.ts +++ b/packages/twenty-front/src/modules/views/utils/convertUpdateViewInputToCore.ts @@ -3,7 +3,7 @@ import { convertViewKeyToCore } from '@/views/utils/convertViewKeyToCore'; import { convertViewOpenRecordInToCore } from '@/views/utils/convertViewOpenRecordInToCore'; import { convertViewTypeToCore } from '@/views/utils/convertViewTypeToCore'; import { isDefined } from 'twenty-shared/utils'; -import { type UpdateViewInput } from '~/generated/graphql'; +import { type UpdateViewInput } from '~/generated-metadata/graphql'; export const convertUpdateViewInputToCore = ( view: Partial, diff --git a/packages/twenty-front/src/modules/workflow/hooks/useActivateWorkflowVersion.ts b/packages/twenty-front/src/modules/workflow/hooks/useActivateWorkflowVersion.ts index d92ef6972d1..355566b6a7a 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useActivateWorkflowVersion.ts +++ b/packages/twenty-front/src/modules/workflow/hooks/useActivateWorkflowVersion.ts @@ -19,7 +19,7 @@ import { isDefined } from 'twenty-shared/utils'; import { type ActivateWorkflowVersionMutation, type ActivateWorkflowVersionMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useActivateWorkflowVersion = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/hooks/useComputeStepOutputSchema.ts b/packages/twenty-front/src/modules/workflow/hooks/useComputeStepOutputSchema.ts index ba380aa33d6..92f864a655e 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useComputeStepOutputSchema.ts +++ b/packages/twenty-front/src/modules/workflow/hooks/useComputeStepOutputSchema.ts @@ -5,7 +5,7 @@ import { type ComputeStepOutputSchemaInput, type ComputeStepOutputSchemaMutation, type ComputeStepOutputSchemaMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useComputeStepOutputSchema = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/hooks/useCreateDraftFromWorkflowVersion.ts b/packages/twenty-front/src/modules/workflow/hooks/useCreateDraftFromWorkflowVersion.ts index 07cb99be552..accddc4e014 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useCreateDraftFromWorkflowVersion.ts +++ b/packages/twenty-front/src/modules/workflow/hooks/useCreateDraftFromWorkflowVersion.ts @@ -4,7 +4,7 @@ import { useFindManyRecordsQuery } from '@/object-record/hooks/useFindManyRecord import { type CreateDraftFromWorkflowVersionInput, useCreateDraftFromWorkflowVersionMutation, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useCreateDraftFromWorkflowVersion = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/hooks/useDeactivateWorkflowVersion.ts b/packages/twenty-front/src/modules/workflow/hooks/useDeactivateWorkflowVersion.ts index 2c29721ea36..f58f11d1848 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useDeactivateWorkflowVersion.ts +++ b/packages/twenty-front/src/modules/workflow/hooks/useDeactivateWorkflowVersion.ts @@ -19,7 +19,7 @@ import { isDefined } from 'twenty-shared/utils'; import { type DeactivateWorkflowVersionMutation, type DeactivateWorkflowVersionMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useDeactivateWorkflowVersion = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx b/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx index 24c5dc89ade..594e84f2344 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx +++ b/packages/twenty-front/src/modules/workflow/hooks/useRunWorkflowVersion.tsx @@ -24,7 +24,7 @@ import { v4 } from 'uuid'; import { type RunWorkflowVersionMutation, type RunWorkflowVersionMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useRunWorkflowVersion = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/hooks/useStopWorkflowRun.ts b/packages/twenty-front/src/modules/workflow/hooks/useStopWorkflowRun.ts index 5588a58dc6e..4548a37840c 100644 --- a/packages/twenty-front/src/modules/workflow/hooks/useStopWorkflowRun.ts +++ b/packages/twenty-front/src/modules/workflow/hooks/useStopWorkflowRun.ts @@ -2,7 +2,7 @@ import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular'; import { dispatchObjectRecordOperationBrowserEvent } from '@/object-record/utils/dispatchObjectRecordOperationBrowserEvent'; -import { useStopWorkflowRunMutation } from '~/generated-metadata/graphql'; +import { useStopWorkflowRunMutation } from '~/generated/graphql'; export const useStopWorkflowRun = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionEdge.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionEdge.ts index b38ec96b30c..c663edba88d 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionEdge.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionEdge.ts @@ -3,9 +3,9 @@ import { useMutation } from '@apollo/client'; import { type CreateWorkflowVersionEdgeMutation, type CreateWorkflowVersionEdgeMutationVariables, -} from '~/generated-metadata/graphql'; + type CreateWorkflowVersionEdgeInput, +} from '~/generated/graphql'; import { CREATE_WORKFLOW_VERSION_EDGE } from '@/workflow/graphql/mutations/createWorkflowVersionEdge'; -import { type CreateWorkflowVersionEdgeInput } from '~/generated/graphql'; import { useUpdateWorkflowVersionCache } from '@/workflow/workflow-steps/hooks/useUpdateWorkflowVersionCache'; export const useCreateWorkflowVersionEdge = () => { diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionStep.ts index 71c55c67503..7031095bc5c 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useCreateWorkflowVersionStep.ts @@ -5,7 +5,7 @@ import { type CreateWorkflowVersionStepInput, type CreateWorkflowVersionStepMutation, type CreateWorkflowVersionStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; import { useUpdateWorkflowVersionCache } from '@/workflow/workflow-steps/hooks/useUpdateWorkflowVersionCache'; import { flowComponentState } from '@/workflow/states/flowComponentState'; import { useSetRecoilComponentState } from '@/ui/utilities/state/component-state/hooks/useSetRecoilComponentState'; diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionEdge.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionEdge.ts index f51fd479896..d7f97d79309 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionEdge.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionEdge.ts @@ -1,11 +1,11 @@ import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { useMutation } from '@apollo/client'; -import { type CreateWorkflowVersionEdgeInput } from '~/generated/graphql'; -import { DELETE_WORKFLOW_VERSION_EDGE } from '@/workflow/graphql/mutations/deleteWorkflowVersionEdge'; import { + type CreateWorkflowVersionEdgeInput, type DeleteWorkflowVersionEdgeMutation, type DeleteWorkflowVersionEdgeMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; +import { DELETE_WORKFLOW_VERSION_EDGE } from '@/workflow/graphql/mutations/deleteWorkflowVersionEdge'; import { useUpdateWorkflowVersionCache } from '@/workflow/workflow-steps/hooks/useUpdateWorkflowVersionCache'; export const useDeleteWorkflowVersionEdge = () => { diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionStep.ts index 68c2d83193a..6f1de3b5271 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDeleteWorkflowVersionStep.ts @@ -8,7 +8,7 @@ import { type DeleteWorkflowVersionStepInput, type DeleteWorkflowVersionStepMutation, type DeleteWorkflowVersionStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useDeleteWorkflowVersionStep = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateWorkflowVersionStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateWorkflowVersionStep.ts index 03e4da30220..db9b1443895 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateWorkflowVersionStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useDuplicateWorkflowVersionStep.ts @@ -9,7 +9,7 @@ import { type DuplicateWorkflowVersionStepInput, type DuplicateWorkflowVersionStepMutation, type DuplicateWorkflowVersionStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useDuplicateWorkflowVersionStep = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowRunStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowRunStep.ts index 8046e2d3be2..0fe4935bbaa 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowRunStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowRunStep.ts @@ -13,7 +13,7 @@ import { type UpdateWorkflowRunStepInput, type UpdateWorkflowRunStepMutation, type UpdateWorkflowRunStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useUpdateWorkflowRunStep = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowVersionStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowVersionStep.ts index 3e15cb063fa..5ae3c72a409 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowVersionStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/hooks/useUpdateWorkflowVersionStep.ts @@ -16,7 +16,7 @@ import { type UpdateWorkflowVersionStepInput, type UpdateWorkflowVersionStepMutation, type UpdateWorkflowVersionStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useUpdateWorkflowVersionStep = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/hooks/useSubmitFormStep.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/hooks/useSubmitFormStep.ts index c16e06c4775..6ed6347a350 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/hooks/useSubmitFormStep.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/form-action/hooks/useSubmitFormStep.ts @@ -7,7 +7,7 @@ import { type SubmitFormStepInput, type SubmitFormStepMutation, type SubmitFormStepMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; export const useSubmitFormStep = () => { const apolloCoreClient = useApolloCoreClient(); diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/hooks/useTestHttpRequest.ts b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/hooks/useTestHttpRequest.ts index 14be5d0b862..eac8a4f5fa2 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/hooks/useTestHttpRequest.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/http-request-action/hooks/useTestHttpRequest.ts @@ -15,7 +15,7 @@ import { type TestHttpRequestInput, type TestHttpRequestMutation, type TestHttpRequestMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; const convertFlatVariablesToNestedContext = (flatVariables: { [variablePath: string]: any; diff --git a/packages/twenty-front/src/modules/workflow/workflow-version/hooks/useTidyUpWorkflowVersion.ts b/packages/twenty-front/src/modules/workflow/workflow-version/hooks/useTidyUpWorkflowVersion.ts index 01b7af07de2..b7fe79c94b4 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-version/hooks/useTidyUpWorkflowVersion.ts +++ b/packages/twenty-front/src/modules/workflow/workflow-version/hooks/useTidyUpWorkflowVersion.ts @@ -5,7 +5,7 @@ import { isDefined } from 'twenty-shared/utils'; import { type UpdateWorkflowVersionPositionsMutation, type UpdateWorkflowVersionPositionsMutationVariables, -} from '~/generated-metadata/graphql'; +} from '~/generated/graphql'; import { useApolloCoreClient } from '@/object-metadata/hooks/useApolloCoreClient'; import { useObjectMetadataItem } from '@/object-metadata/hooks/useObjectMetadataItem'; diff --git a/packages/twenty-front/src/pages/settings/applications/hooks/useMarketplaceApps.ts b/packages/twenty-front/src/pages/settings/applications/hooks/useMarketplaceApps.ts index 123dfbed5eb..118821a175e 100644 --- a/packages/twenty-front/src/pages/settings/applications/hooks/useMarketplaceApps.ts +++ b/packages/twenty-front/src/pages/settings/applications/hooks/useMarketplaceApps.ts @@ -1,4 +1,4 @@ -import { useFindManyMarketplaceAppsQuery } from '~/generated/graphql'; +import { useFindManyMarketplaceAppsQuery } from '~/generated-metadata/graphql'; import { type AvailableApplication } from '~/pages/settings/applications/types/availableApplication'; export const useMarketplaceApps = () => { diff --git a/packages/twenty-server/patches/@nestjs+graphql+12.1.1.patch b/packages/twenty-server/patches/@nestjs+graphql+12.1.1.patch index 47643c5b6fb..a5709204db4 100644 --- a/packages/twenty-server/patches/@nestjs+graphql+12.1.1.patch +++ b/packages/twenty-server/patches/@nestjs+graphql+12.1.1.patch @@ -1,3 +1,18 @@ +diff --git a/dist/interfaces/gql-module-options.interface.d.ts b/dist/interfaces/gql-module-options.interface.d.ts +index 1234567..abcdefg 100644 +--- a/dist/interfaces/gql-module-options.interface.d.ts ++++ b/dist/interfaces/gql-module-options.interface.d.ts +@@ -97,6 +97,10 @@ export interface GqlModuleOptions { + * Extra static metadata to be loaded into the specification + */ + metadata?: () => Promise>; ++ /** ++ * When set, only resolvers decorated with a matching scope will be included in this schema. ++ */ ++ resolverSchemaScope?: 'core' | 'metadata'; + } + export interface GqlOptionsFactory = GqlModuleOptions> { + createGqlOptions(): Promise> | Omit; diff --git a/dist/schema-builder/graphql-schema.factory.js b/dist/schema-builder/graphql-schema.factory.js index f349a6e..425815c 100644 --- a/dist/schema-builder/graphql-schema.factory.js @@ -39,3 +54,39 @@ index d5423f1..701a3b2 100644 generateInputTypeDefs(options) { const metadata = type_metadata_storage_1.TypeMetadataStorage.getInputTypesMetadata(); const inputTypeDefs = metadata.map((metadata) => this.inputTypeDefinitionFactory.create(metadata, options)); +diff --git a/dist/services/resolvers-explorer.service.js b/dist/services/resolvers-explorer.service.js +index 1234567..abcdefg 100644 +--- a/dist/services/resolvers-explorer.service.js ++++ b/dist/services/resolvers-explorer.service.js +@@ -43,6 +43,15 @@ let ResolversExplorerService = ResolversExplorerService_1 = class ResolversExplo + filterResolvers(gqlAdapter, wrapper, moduleRef) { + const { instance } = wrapper; + if (!instance) { + return undefined; + } ++ const resolverSchemaScope = this.gqlOptions.resolverSchemaScope; ++ if (resolverSchemaScope && wrapper.metatype) { ++ // Default to 'metadata' for unscoped resolvers (e.g. nestjs-query auto-generated CRUD) ++ // TODO: remove this fallback once nestjs-query is deprecated ++ const scope = Reflect.getMetadata('RESOLVER_SCHEMA_SCOPE', wrapper.metatype) || 'metadata'; ++ if (scope !== resolverSchemaScope) { ++ return undefined; ++ } ++ } + const prototype = Object.getPrototypeOf(instance); +@@ -147,5 +154,14 @@ let ResolversExplorerService = ResolversExplorerService_1 = class ResolversExplo + getAllCtors() { + const modules = this.getModules(this.modulesContainer, this.gqlOptions.include || []); + const resolvers = this.flatMap(modules, this.mapToCtor).filter(Boolean); +- return resolvers; ++ const resolverSchemaScope = this.gqlOptions.resolverSchemaScope; ++ if (resolverSchemaScope) { ++ return resolvers.filter((ctor) => { ++ // Default to 'metadata' for unscoped resolvers (e.g. nestjs-query auto-generated CRUD) ++ // TODO: remove this fallback once nestjs-query is deprecated ++ const scope = Reflect.getMetadata('RESOLVER_SCHEMA_SCOPE', ctor) || 'metadata'; ++ return scope === resolverSchemaScope; ++ }); ++ } ++ return resolvers; + } diff --git a/packages/twenty-server/patches/README.md b/packages/twenty-server/patches/README.md new file mode 100644 index 00000000000..5e124731574 --- /dev/null +++ b/packages/twenty-server/patches/README.md @@ -0,0 +1,28 @@ +# How to patch a dependency + +`yarn patch-commit -s` does not work in our monorepo. Use the workflow below instead. + +## New patch + +```bash +yarn patch +# Yarn prints a temp folder path — edit files there, then: +yarn patch-commit > packages/twenty-server/patches/.patch +yarn install --mode update-lockfile && yarn install +``` + +Reference the patch in `packages/twenty-server/package.json`: + +``` +"": "patch:@#./patches/.patch" +``` + +## Updating an existing patch + +```bash +yarn patch -u # extract with current patches applied (PATCHED) +yarn patch # extract clean original (CLEAN) +# Edit files in PATCHED, then copy them into CLEAN +yarn patch-commit > packages/twenty-server/patches/.patch +yarn install --mode update-lockfile && yarn install +``` diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/constants/resolver-schema-scope-key.constant.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/constants/resolver-schema-scope-key.constant.ts new file mode 100644 index 00000000000..65f29acf0ab --- /dev/null +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/constants/resolver-schema-scope-key.constant.ts @@ -0,0 +1 @@ +export const RESOLVER_SCHEMA_SCOPE_KEY = 'RESOLVER_SCHEMA_SCOPE'; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator.ts new file mode 100644 index 00000000000..2c21f67c84e --- /dev/null +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator.ts @@ -0,0 +1,11 @@ +import { applyDecorators, SetMetadata } from '@nestjs/common'; +import { Resolver } from '@nestjs/graphql'; + +import { RESOLVER_SCHEMA_SCOPE_KEY } from 'src/engine/api/graphql/graphql-config/constants/resolver-schema-scope-key.constant'; +import { type ResolverSchemaScope } from 'src/engine/api/graphql/graphql-config/types/resolver-schema-scope.type'; + +export const CoreResolver = (typeFunc?: () => unknown) => + applyDecorators( + typeFunc ? Resolver(typeFunc) : Resolver(), + SetMetadata(RESOLVER_SCHEMA_SCOPE_KEY, 'core' as ResolverSchemaScope), + ); diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator.ts new file mode 100644 index 00000000000..f0d3cfc2f35 --- /dev/null +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator.ts @@ -0,0 +1,11 @@ +import { applyDecorators, SetMetadata } from '@nestjs/common'; +import { Resolver } from '@nestjs/graphql'; + +import { RESOLVER_SCHEMA_SCOPE_KEY } from 'src/engine/api/graphql/graphql-config/constants/resolver-schema-scope-key.constant'; +import { type ResolverSchemaScope } from 'src/engine/api/graphql/graphql-config/types/resolver-schema-scope.type'; + +export const MetadataResolver = (typeFunc?: () => unknown) => + applyDecorators( + typeFunc ? Resolver(typeFunc) : Resolver(), + SetMetadata(RESOLVER_SCHEMA_SCOPE_KEY, 'metadata' as ResolverSchemaScope), + ); diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts index 67b3aec8ccf..b67f63dedf1 100644 --- a/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/graphql-config.service.ts @@ -19,17 +19,6 @@ import { isDefined } from 'twenty-shared/utils'; import { NodeEnvironment } from 'src/engine/core-modules/twenty-config/interfaces/node-environment.interface'; import { WorkspaceSchemaFactory } from 'src/engine/api/graphql/workspace-schema.factory'; -import { - ApiConfig, - Billing, - Captcha, - ClientAIModelConfig, - NativeModelCapabilities, - PublicFeatureFlag, - PublicFeatureFlagMetadata, - Sentry as SentryConfig, - Support, -} from 'src/engine/core-modules/client-config/client-config.entity'; import { CoreEngineModule } from 'src/engine/core-modules/core-engine.module'; import { ExceptionHandlerService } from 'src/engine/core-modules/exception-handler/exception-handler.service'; import { useSentryTracing } from 'src/engine/core-modules/exception-handler/hooks/use-sentry-tracing'; @@ -93,19 +82,8 @@ export class GraphQLConfigService const config: YogaDriverConfig = { autoSchemaFile: true, include: [CoreEngineModule], - buildSchemaOptions: { - orphanedTypes: [ - ApiConfig, - Billing, - Captcha, - ClientAIModelConfig, - NativeModelCapabilities, - PublicFeatureFlag, - PublicFeatureFlagMetadata, - SentryConfig, - Support, - ], - }, + resolverSchemaScope: 'core', + buildSchemaOptions: {}, conditionalSchema: async (context) => { const { workspace, user } = context.req; diff --git a/packages/twenty-server/src/engine/api/graphql/graphql-config/types/resolver-schema-scope.type.ts b/packages/twenty-server/src/engine/api/graphql/graphql-config/types/resolver-schema-scope.type.ts new file mode 100644 index 00000000000..2941619164a --- /dev/null +++ b/packages/twenty-server/src/engine/api/graphql/graphql-config/types/resolver-schema-scope.type.ts @@ -0,0 +1 @@ +export type ResolverSchemaScope = 'core' | 'metadata'; diff --git a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts index b00de708037..b5824bd6ab1 100644 --- a/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts +++ b/packages/twenty-server/src/engine/api/graphql/metadata.module-factory.ts @@ -27,6 +27,7 @@ export const metadataModuleFactory = async ( const config: YogaDriverConfig = { autoSchemaFile: true, include: [MetadataGraphQLApiModule], + resolverSchemaScope: 'metadata', renderGraphiQL() { return renderApolloPlayground({ path: 'metadata' }); }, diff --git a/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts b/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts index 2247d807a18..3f918734169 100644 --- a/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/admin-panel/admin-panel.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Int, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Int, Mutation, Query } from '@nestjs/graphql'; import GraphQLJSON from 'graphql-type-json'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -30,6 +30,7 @@ import { type MessageQueue } from 'src/engine/core-modules/message-queue/message import { type ConfigVariables } from 'src/engine/core-modules/twenty-config/config-variables'; import { ConfigVariableGraphqlApiExceptionFilter } from 'src/engine/core-modules/twenty-config/filters/config-variable-graphql-api-exception.filter'; import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AdminPanelGuard } from 'src/engine/guards/admin-panel-guard'; import { ServerLevelImpersonateGuard } from 'src/engine/guards/server-level-impersonate.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; @@ -40,7 +41,7 @@ import { AdminPanelHealthServiceDataDTO } from './dtos/admin-panel-health-servic import { QueueMetricsDataDTO } from './dtos/queue-metrics-data.dto'; @UsePipes(ResolverValidationPipe) -@Resolver() +@MetadataResolver() @UseFilters( AuthGraphqlApiExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/core-modules/api-key/api-key.resolver.ts b/packages/twenty-server/src/engine/core-modules/api-key/api-key.resolver.ts index 5b0df4e8bce..516e3363c8d 100644 --- a/packages/twenty-server/src/engine/core-modules/api-key/api-key.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/api-key/api-key.resolver.ts @@ -1,12 +1,5 @@ import { UseGuards } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import { type QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -24,6 +17,7 @@ import { import { apiKeyGraphqlApiExceptionHandler } from 'src/engine/core-modules/api-key/utils/api-key-graphql-api-exception-handler.util'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { RoleDTO } from 'src/engine/metadata-modules/role/dtos/role.dto'; @@ -31,7 +25,7 @@ import { RoleDTO } from 'src/engine/metadata-modules/role/dtos/role.dto'; import { ApiKeyRoleService } from './services/api-key-role.service'; import { ApiKeyService } from './services/api-key.service'; -@Resolver(() => ApiKeyEntity) +@MetadataResolver(() => ApiKeyEntity) @UseGuards( WorkspaceAuthGuard, SettingsPermissionGuard(PermissionFlagType.API_KEYS_AND_WEBHOOKS), diff --git a/packages/twenty-server/src/engine/core-modules/application/resolvers/application.resolver.ts b/packages/twenty-server/src/engine/core-modules/application/resolvers/application.resolver.ts index f2754d723fe..6053bbf638b 100644 --- a/packages/twenty-server/src/engine/core-modules/application/resolvers/application.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/application/resolvers/application.resolver.ts @@ -4,7 +4,7 @@ import { UseInterceptors, UsePipes, } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -31,6 +31,7 @@ import { FileDTO } from 'src/engine/core-modules/file/dtos/file.dto'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { RequireFeatureFlag } from 'src/engine/guards/feature-flag.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -45,7 +46,7 @@ import { CreateApplicationInput } from 'src/engine/core-modules/application/dtos SettingsPermissionGuard(PermissionFlagType.APPLICATIONS), ) @UsePipes(ResolverValidationPipe) -@Resolver() +@MetadataResolver() @UseInterceptors(WorkspaceMigrationGraphqlApiExceptionInterceptor) @UseFilters(ApplicationExceptionFilter) export class ApplicationResolver { diff --git a/packages/twenty-server/src/engine/core-modules/application/resolvers/marketplace.resolver.ts b/packages/twenty-server/src/engine/core-modules/application/resolvers/marketplace.resolver.ts index ef140b5033a..9b57c5659b6 100644 --- a/packages/twenty-server/src/engine/core-modules/application/resolvers/marketplace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/application/resolvers/marketplace.resolver.ts @@ -1,16 +1,17 @@ import { UseGuards } from '@nestjs/common'; -import { Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { MarketplaceAppDTO } from 'src/engine/core-modules/application/dtos/marketplace-app.dto'; import { MarketplaceService } from 'src/engine/core-modules/application/services/marketplace.service'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; -@Resolver() +@MetadataResolver() @UseGuards(UserAuthGuard, WorkspaceAuthGuard, NoPermissionGuard) export class MarketplaceResolver { constructor(private readonly marketplaceService: MarketplaceService) {} diff --git a/packages/twenty-server/src/engine/core-modules/applicationVariable/application-variable.resolver.ts b/packages/twenty-server/src/engine/core-modules/applicationVariable/application-variable.resolver.ts index 62d051ec67f..01f9b871405 100644 --- a/packages/twenty-server/src/engine/core-modules/applicationVariable/application-variable.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/applicationVariable/application-variable.resolver.ts @@ -1,11 +1,5 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, ResolveField } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -16,6 +10,7 @@ import { ApplicationVariableEntityDTO } from 'src/engine/core-modules/applicatio import { UpdateApplicationVariableEntityInput } from 'src/engine/core-modules/applicationVariable/dtos/update-application-variable.input'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -23,7 +18,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; WorkspaceAuthGuard, SettingsPermissionGuard(PermissionFlagType.APPLICATIONS), ) -@Resolver(() => ApplicationVariableEntityDTO) +@MetadataResolver(() => ApplicationVariableEntityDTO) @UseFilters(ApplicationVariableEntityExceptionFilter) export class ApplicationVariableEntityResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/approved-access-domain/approved-access-domain.resolver.ts b/packages/twenty-server/src/engine/core-modules/approved-access-domain/approved-access-domain.resolver.ts index 0e9e5654d63..526ac94b9a3 100644 --- a/packages/twenty-server/src/engine/core-modules/approved-access-domain/approved-access-domain.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/approved-access-domain/approved-access-domain.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -15,6 +15,7 @@ import { UserEntity } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { GlobalWorkspaceOrmManager } from 'src/engine/twenty-orm/global-workspace-datasource/global-workspace-orm.manager'; @@ -30,7 +31,7 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta ApprovedAccessDomainExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, ) -@Resolver() +@MetadataResolver() export class ApprovedAccessDomainResolver { constructor( private readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager, diff --git a/packages/twenty-server/src/engine/core-modules/audit/audit.resolver.ts b/packages/twenty-server/src/engine/core-modules/audit/audit.resolver.ts index 6b9271ac008..1d8d47fc63b 100644 --- a/packages/twenty-server/src/engine/core-modules/audit/audit.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/audit/audit.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { AuditExceptionFilter } from 'src/engine/core-modules/audit/audit-exception-filter'; import { @@ -12,6 +12,7 @@ import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/re import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { PublicEndpointGuard } from 'src/engine/guards/public-endpoint.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -24,7 +25,7 @@ import { } from './dtos/create-analytics.input'; import { AuditService } from './services/audit.service'; -@Resolver(() => Analytics) +@MetadataResolver(() => Analytics) @UsePipes(ResolverValidationPipe) @UseFilters(AuditExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter) export class AuditResolver { diff --git a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts index 21cc942a578..13104ac74bd 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/auth.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Context, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Context, Mutation, Query } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; import omit from 'lodash.omit'; @@ -70,6 +70,7 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthProvider } from 'src/engine/decorators/auth/auth-provider.decorator'; import { AuthUser } from 'src/engine/decorators/auth/auth-user.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { PublicEndpointGuard } from 'src/engine/guards/public-endpoint.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; @@ -91,7 +92,7 @@ import { WorkspaceInviteHashValidInput } from './dto/workspace-invite-hash.input import { AuthService } from './services/auth.service'; @UsePipes(ResolverValidationPipe) -@Resolver() +@MetadataResolver() @UseFilters( CaptchaGraphqlApiExceptionFilter, AuthGraphqlApiExceptionFilter, diff --git a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts index 160974fe36c..a96d5af31a4 100644 --- a/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/billing/billing.resolver.ts @@ -1,7 +1,7 @@ /* @license Enterprise */ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { WorkspaceActivationStatus } from 'twenty-shared/workspace'; @@ -46,8 +46,9 @@ import { } from 'src/engine/metadata-modules/permissions/permissions.exception'; import { PermissionsService } from 'src/engine/metadata-modules/permissions/permissions.service'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters( PermissionsGraphqlApiExceptionFilter, diff --git a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts index d1c782ad2c2..b572b1f331a 100644 --- a/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/calendar/timeline-calendar-event.resolver.ts @@ -1,5 +1,5 @@ import { UseGuards } from '@nestjs/common'; -import { Args, ArgsType, Field, Int, Query, Resolver } from '@nestjs/graphql'; +import { Args, ArgsType, Field, Int, Query } from '@nestjs/graphql'; import { Max } from 'class-validator'; @@ -9,6 +9,7 @@ import { TimelineCalendarEventsWithTotalDTO } from 'src/engine/core-modules/cale import { TimelineCalendarEventService } from 'src/engine/core-modules/calendar/timeline-calendar-event.service'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { AuthWorkspaceMemberId } from 'src/engine/decorators/auth/auth-workspace-member-id.decorator'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { CustomPermissionGuard } from 'src/engine/guards/custom-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -53,7 +54,7 @@ class GetTimelineCalendarEventsFromOpportunityIdArgs { } @UseGuards(WorkspaceAuthGuard, CustomPermissionGuard) -@Resolver(() => TimelineCalendarEventsWithTotalDTO) +@CoreResolver(() => TimelineCalendarEventsWithTotalDTO) export class TimelineCalendarEventResolver { constructor( private readonly timelineCalendarEventService: TimelineCalendarEventService, diff --git a/packages/twenty-server/src/engine/core-modules/core-engine.module.ts b/packages/twenty-server/src/engine/core-modules/core-engine.module.ts index 58a2278012d..8de9307d180 100644 --- a/packages/twenty-server/src/engine/core-modules/core-engine.module.ts +++ b/packages/twenty-server/src/engine/core-modules/core-engine.module.ts @@ -53,13 +53,11 @@ import { TelemetryModule } from 'src/engine/core-modules/telemetry/telemetry.mod import { TwentyConfigModule } from 'src/engine/core-modules/twenty-config/twenty-config.module'; import { TwentyConfigService } from 'src/engine/core-modules/twenty-config/twenty-config.service'; import { UserModule } from 'src/engine/core-modules/user/user.module'; -import { WebhookModule } from 'src/engine/metadata-modules/webhook/webhook.module'; import { WorkflowApiModule } from 'src/engine/core-modules/workflow/workflow-api.module'; import { WorkspaceInvitationModule } from 'src/engine/core-modules/workspace-invitation/workspace-invitation.module'; import { WorkspaceModule } from 'src/engine/core-modules/workspace/workspace.module'; import { AiBillingModule } from 'src/engine/metadata-modules/ai/ai-billing/ai-billing.module'; import { AiModelsModule } from 'src/engine/metadata-modules/ai/ai-models/ai-models.module'; -import { FlatPageLayoutTabModule } from 'src/engine/metadata-modules/flat-page-layout-tab/flat-page-layout-tab.module'; import { PageLayoutModule } from 'src/engine/metadata-modules/page-layout/page-layout.module'; import { RoleModule } from 'src/engine/metadata-modules/role/role.module'; import { RowLevelPermissionModule } from 'src/engine/metadata-modules/row-level-permission-predicate/row-level-permission.module'; @@ -154,13 +152,10 @@ import { FileModule } from './file/file.module'; }), SearchModule, ApiKeyModule, - WebhookModule, PageLayoutModule, - FlatPageLayoutTabModule, ImpersonationModule, TrashCleanupModule, DashboardModule, - RowLevelPermissionModule, EventLogsModule, ], exports: [ diff --git a/packages/twenty-server/src/engine/core-modules/email-verification/email-verification.resolver.ts b/packages/twenty-server/src/engine/core-modules/email-verification/email-verification.resolver.ts index 4fb27fbc04a..aeda0a4159a 100644 --- a/packages/twenty-server/src/engine/core-modules/email-verification/email-verification.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/email-verification/email-verification.resolver.ts @@ -1,7 +1,8 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Context, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Context, Mutation } from '@nestjs/graphql'; import { WorkspaceDomainsService } from 'src/engine/core-modules/domain/workspace-domains/services/workspace-domains.service'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ResendEmailVerificationTokenInput } from 'src/engine/core-modules/email-verification/dtos/resend-email-verification-token.input'; import { ResendEmailVerificationTokenOutput } from 'src/engine/core-modules/email-verification/dtos/resend-email-verification-token.output'; import { EmailVerificationExceptionFilter } from 'src/engine/core-modules/email-verification/email-verification-exception-filter.util'; @@ -12,7 +13,7 @@ import { I18nContext } from 'src/engine/core-modules/i18n/types/i18n-context.typ import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { PublicEndpointGuard } from 'src/engine/guards/public-endpoint.guard'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters( EmailVerificationExceptionFilter, diff --git a/packages/twenty-server/src/engine/core-modules/emailing-domain/emailing-domain.resolver.ts b/packages/twenty-server/src/engine/core-modules/emailing-domain/emailing-domain.resolver.ts index 4f496e87e01..3cce1f994a3 100644 --- a/packages/twenty-server/src/engine/core-modules/emailing-domain/emailing-domain.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/emailing-domain/emailing-domain.resolver.ts @@ -1,8 +1,9 @@ import { UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { EmailingDomainDriver } from 'src/engine/core-modules/emailing-domain/drivers/types/emailing-domain'; import { EmailingDomainDto } from 'src/engine/core-modules/emailing-domain/dtos/emailing-domain.dto'; import { EmailingDomainService } from 'src/engine/core-modules/emailing-domain/services/emailing-domain.service'; @@ -17,7 +18,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; SettingsPermissionGuard(PermissionFlagType.WORKSPACE), ) @UsePipes(ResolverValidationPipe) -@Resolver(() => EmailingDomainDto) +@MetadataResolver(() => EmailingDomainDto) export class EmailingDomainResolver { constructor(private readonly emailingDomainService: EmailingDomainService) {} diff --git a/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.resolver.ts b/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.resolver.ts index e22394f40f3..d28bf44d429 100644 --- a/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/event-logs/event-logs.resolver.ts @@ -1,10 +1,11 @@ /* @license Enterprise */ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter'; import { EnterpriseFeaturesEnabledGuard } from 'src/engine/core-modules/auth/guards/enterprise-features-enabled.guard'; import { EventLogsGraphqlApiExceptionFilter } from 'src/engine/core-modules/event-logs/filters/event-logs-graphql-api-exception.filter'; @@ -22,7 +23,7 @@ import { EventLogsService } from './event-logs.service'; import { EventLogQueryInput } from './dtos/event-log-query.input'; import { EventLogQueryResult } from './dtos/event-log-result.output'; -@Resolver() +@MetadataResolver() @UseFilters( ForbiddenExceptionGraphqlFilter, AuthGraphqlApiExceptionFilter, diff --git a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts index 7515ac47157..94346c1cdda 100644 --- a/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/file/file-upload/resolvers/file-upload.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -15,12 +15,13 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) -@Resolver() +@MetadataResolver() export class FileUploadResolver { constructor(private readonly fileUploadService: FileUploadService) {} diff --git a/packages/twenty-server/src/engine/core-modules/file/files-field/resolvers/files-field.resolver.ts b/packages/twenty-server/src/engine/core-modules/file/files-field/resolvers/files-field.resolver.ts index 7ef3420e193..ae1db0a2a36 100644 --- a/packages/twenty-server/src/engine/core-modules/file/files-field/resolvers/files-field.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/file/files-field/resolvers/files-field.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -14,12 +14,13 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) -@Resolver() +@MetadataResolver() export class FilesFieldResolver { constructor(private readonly filesFieldService: FilesFieldService) {} diff --git a/packages/twenty-server/src/engine/core-modules/file/resolvers/file.resolver.ts b/packages/twenty-server/src/engine/core-modules/file/resolvers/file.resolver.ts index 132f42c2e76..7174f01e22a 100644 --- a/packages/twenty-server/src/engine/core-modules/file/resolvers/file.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/file/resolvers/file.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -15,12 +15,13 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) -@Resolver() +@MetadataResolver() export class FileResolver { constructor(private readonly fileMetadataService: FileMetadataService) {} diff --git a/packages/twenty-server/src/engine/core-modules/geo-map/resolver/geo-map.resolver.ts b/packages/twenty-server/src/engine/core-modules/geo-map/resolver/geo-map.resolver.ts index 3b0823315b7..809c112be25 100644 --- a/packages/twenty-server/src/engine/core-modules/geo-map/resolver/geo-map.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/geo-map/resolver/geo-map.resolver.ts @@ -1,13 +1,14 @@ import { UseGuards } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { AutocompleteResultDTO } from 'src/engine/core-modules/geo-map/dtos/autocomplete-result.dto'; import { PlaceDetailsResultDTO } from 'src/engine/core-modules/geo-map/dtos/place-details-result.dto'; import { GeoMapService } from 'src/engine/core-modules/geo-map/services/geo-map.service'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; -@Resolver() +@MetadataResolver() @UseGuards(WorkspaceAuthGuard, NoPermissionGuard) export class GeoMapResolver { constructor(private readonly geoMapService: GeoMapService) {} diff --git a/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/imap-smtp-caldav-connection.resolver.ts b/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/imap-smtp-caldav-connection.resolver.ts index 12a335ad606..1c9f9b04743 100644 --- a/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/imap-smtp-caldav-connection.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/imap-smtp-caldav-connection/imap-smtp-caldav-connection.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { isDefined } from 'twenty-shared/utils'; @@ -18,9 +18,10 @@ import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorat import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ImapSmtpCalDavAPIService } from 'src/modules/connected-account/services/imap-smtp-caldav-apis.service'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters(AuthGraphqlApiExceptionFilter, PermissionsGraphqlApiExceptionFilter) @UseGuards(SettingsPermissionGuard(PermissionFlagType.WORKSPACE)) diff --git a/packages/twenty-server/src/engine/core-modules/impersonation/impersonation.resolver.ts b/packages/twenty-server/src/engine/core-modules/impersonation/impersonation.resolver.ts index 42ee1de9533..84a27bd5303 100644 --- a/packages/twenty-server/src/engine/core-modules/impersonation/impersonation.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/impersonation/impersonation.resolver.ts @@ -1,5 +1,5 @@ import { UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { ImpersonateInput } from 'src/engine/core-modules/admin-panel/dtos/impersonate.input'; import { ImpersonateOutput } from 'src/engine/core-modules/admin-panel/dtos/impersonate.output'; @@ -14,9 +14,10 @@ import { CustomPermissionGuard } from 'src/engine/guards/custom-permission.guard import { ImpersonatePermissionGuard } from 'src/engine/guards/impersonate-permission.guard'; import { NoImpersonationGuard } from 'src/engine/guards/no-impersonation.guard'; import { UserAuthGuard } from 'src/engine/guards/user-auth.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) export class ImpersonationResolver { constructor(private readonly impersonationService: ImpersonationService) {} diff --git a/packages/twenty-server/src/engine/core-modules/lab/lab.resolver.ts b/packages/twenty-server/src/engine/core-modules/lab/lab.resolver.ts index dd1947b0c53..7489915a53e 100644 --- a/packages/twenty-server/src/engine/core-modules/lab/lab.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/lab/lab.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -15,9 +15,10 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters( AuthGraphqlApiExceptionFilter, diff --git a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts index 76f26c738fe..a2d725fcaaa 100644 --- a/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/messaging/timeline-messaging.resolver.ts @@ -1,16 +1,9 @@ import { UseGuards } from '@nestjs/common'; -import { - Args, - ArgsType, - Field, - Int, - Mutation, - Query, - Resolver, -} from '@nestjs/graphql'; +import { Args, ArgsType, Field, Int, Mutation, Query } from '@nestjs/graphql'; import { Max } from 'class-validator'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { TIMELINE_THREADS_MAX_PAGE_SIZE } from 'src/engine/core-modules/messaging/constants/messaging.constants'; import { DismissReconnectAccountBannerInput } from 'src/engine/core-modules/messaging/dtos/dismiss-reconnect-account-banner.input'; @@ -66,7 +59,7 @@ class GetTimelineThreadsFromOpportunityIdArgs { } @UseGuards(WorkspaceAuthGuard, UserAuthGuard, CustomPermissionGuard) -@Resolver(() => TimelineThreadsWithTotalDTO) +@CoreResolver(() => TimelineThreadsWithTotalDTO) export class TimelineMessagingResolver { constructor( private readonly getMessagesFromPersonIdsService: GetMessagesService, diff --git a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts index 5adab87b53c..ad5ee48bfd5 100644 --- a/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/onboarding/onboarding.resolver.ts @@ -1,6 +1,7 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Mutation, Resolver } from '@nestjs/graphql'; +import { Mutation } from '@nestjs/graphql'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { OnboardingStepSuccessDTO } from 'src/engine/core-modules/onboarding/dtos/onboarding-step-success.dto'; @@ -16,7 +17,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @UseGuards(WorkspaceAuthGuard, UserAuthGuard) @UsePipes(ResolverValidationPipe) @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) -@Resolver() +@MetadataResolver() export class OnboardingResolver { constructor(private readonly onboardingService: OnboardingService) {} diff --git a/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts b/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts index 1dcf3a20461..ff3d4e9bee1 100644 --- a/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/postgres-credentials/postgres-credentials.resolver.ts @@ -1,8 +1,9 @@ import { UseGuards } from '@nestjs/common'; -import { Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { PostgresCredentialsDTO } from 'src/engine/core-modules/postgres-credentials/dtos/postgres-credentials.dto'; import { PostgresCredentialsService } from 'src/engine/core-modules/postgres-credentials/postgres-credentials.service'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -14,7 +15,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; WorkspaceAuthGuard, SettingsPermissionGuard(PermissionFlagType.DATA_MODEL), ) -@Resolver(() => PostgresCredentialsDTO) +@MetadataResolver(() => PostgresCredentialsDTO) export class PostgresCredentialsResolver { constructor( private readonly postgresCredentialsService: PostgresCredentialsService, diff --git a/packages/twenty-server/src/engine/core-modules/public-domain/public-domain.resolver.ts b/packages/twenty-server/src/engine/core-modules/public-domain/public-domain.resolver.ts index e34a9383aac..59c74b558be 100644 --- a/packages/twenty-server/src/engine/core-modules/public-domain/public-domain.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/public-domain/public-domain.resolver.ts @@ -1,11 +1,12 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; import { assertIsDefinedOrThrow } from 'twenty-shared/utils'; import { Repository } from 'typeorm'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { DomainValidRecords } from 'src/engine/core-modules/dns-manager/dtos/domain-valid-records'; import { DnsManagerService } from 'src/engine/core-modules/dns-manager/services/dns-manager.service'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; @@ -33,7 +34,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; PublicDomainExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, ) -@Resolver() +@MetadataResolver() export class PublicDomainResolver { constructor( @InjectRepository(PublicDomainEntity) diff --git a/packages/twenty-server/src/engine/core-modules/search/search.resolver.ts b/packages/twenty-server/src/engine/core-modules/search/search.resolver.ts index dda315f8db9..c64780604ec 100644 --- a/packages/twenty-server/src/engine/core-modules/search/search.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/search/search.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { ApiKeyEntity } from 'src/engine/core-modules/api-key/api-key.entity'; import { ApiKeyRoleService } from 'src/engine/core-modules/api-key/services/api-key-role.service'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; @@ -21,7 +22,7 @@ import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/metadat import { UserRoleService } from 'src/engine/metadata-modules/user-role/user-role.service'; import { type RolePermissionConfig } from 'src/engine/twenty-orm/types/role-permission-config'; -@Resolver() +@CoreResolver() @UseFilters(SearchApiExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter) @UsePipes(ResolverValidationPipe) @UseGuards(WorkspaceAuthGuard, CustomPermissionGuard) diff --git a/packages/twenty-server/src/engine/core-modules/sso/sso.resolver.ts b/packages/twenty-server/src/engine/core-modules/sso/sso.resolver.ts index d143b8fafff..56b6d7c81b4 100644 --- a/packages/twenty-server/src/engine/core-modules/sso/sso.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/sso/sso.resolver.ts @@ -1,10 +1,11 @@ /* @license Enterprise */ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { EnterpriseFeaturesEnabledGuard } from 'src/engine/core-modules/auth/guards/enterprise-features-enabled.guard'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; @@ -26,7 +27,7 @@ import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.g import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; -@Resolver() +@MetadataResolver() @UseFilters( PermissionsGraphqlApiExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/core-modules/tool-provider/resolvers/tool-index.resolver.ts b/packages/twenty-server/src/engine/core-modules/tool-provider/resolvers/tool-index.resolver.ts index 854ff0452e2..f4bed085b10 100644 --- a/packages/twenty-server/src/engine/core-modules/tool-provider/resolvers/tool-index.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/tool-provider/resolvers/tool-index.resolver.ts @@ -1,8 +1,9 @@ import { UseGuards } from '@nestjs/common'; -import { Field, ObjectType, Query, Resolver } from '@nestjs/graphql'; +import { Field, ObjectType, Query } from '@nestjs/graphql'; import graphqlTypeJson from 'graphql-type-json'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ToolRegistryService } from 'src/engine/core-modules/tool-provider/services/tool-registry.service'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -31,7 +32,7 @@ export class ToolIndexEntryDTO { inputSchema?: object; } -@Resolver() +@MetadataResolver() @UseGuards(WorkspaceAuthGuard) export class ToolIndexResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/two-factor-authentication/two-factor-authentication.resolver.ts b/packages/twenty-server/src/engine/core-modules/two-factor-authentication/two-factor-authentication.resolver.ts index eb87b6bcab8..7f1e5098dc3 100644 --- a/packages/twenty-server/src/engine/core-modules/two-factor-authentication/two-factor-authentication.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/two-factor-authentication/two-factor-authentication.resolver.ts @@ -1,10 +1,11 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; import { assertIsDefinedOrThrow, isDefined } from 'twenty-shared/utils'; import { Repository } from 'typeorm'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AuthException, AuthExceptionCode, @@ -34,7 +35,7 @@ import { VerifyTwoFactorAuthenticationMethodInput } from './dto/verify-two-facto import { VerifyTwoFactorAuthenticationMethodOutput } from './dto/verify-two-factor-authentication-method.output'; import { TwoFactorAuthenticationMethodEntity } from './entities/two-factor-authentication-method.entity'; -@Resolver() +@MetadataResolver() @UseFilters(AuthGraphqlApiExceptionFilter, PermissionsGraphqlApiExceptionFilter) export class TwoFactorAuthenticationResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts index 0baceca6b36..b5d956ad349 100644 --- a/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/user-workspace/user-workspace.resolver.ts @@ -1,11 +1,12 @@ import { UseGuards } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; import { FileFolder } from 'twenty-shared/types'; import type { FileUpload } from 'graphql-upload/processRequest.mjs'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SignedFileDTO } from 'src/engine/core-modules/file/file-upload/dtos/signed-file.dto'; import { FileUploadService } from 'src/engine/core-modules/file/file-upload/services/file-upload.service'; import { UploadProfilePicturePermissionGuard } from 'src/engine/core-modules/user-workspace/guards/upload-profile-picture-permission.guard'; @@ -14,7 +15,7 @@ import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorat import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; -@Resolver() +@MetadataResolver() export class UserWorkspaceResolver { constructor(private readonly fileUploadService: FileUploadService) {} diff --git a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts index bad9bacb0c1..0ba76040b8c 100644 --- a/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/user/user.resolver.ts @@ -1,12 +1,5 @@ import { BadRequestException, UseFilters, UseGuards } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; import crypto from 'crypto'; @@ -20,6 +13,7 @@ import { In, Repository } from 'typeorm'; import { SupportDriver } from 'src/engine/core-modules/twenty-config/interfaces/support.interface'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ApiKeyEntity } from 'src/engine/core-modules/api-key/api-key.entity'; import { AuthException, @@ -81,7 +75,7 @@ const getHMACKey = (email?: string, key?: string | null) => { return hmac.update(email).digest('hex'); }; -@Resolver(() => UserEntity) +@MetadataResolver(() => UserEntity) @UseFilters(PermissionsGraphqlApiExceptionFilter) export class UserResolver { constructor( diff --git a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-builder.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-builder.resolver.ts index 44bf55e9d36..58c5216ce2c 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-builder.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-builder.resolver.ts @@ -1,9 +1,10 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import graphqlTypeJson from 'graphql-type-json'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { ComputeStepOutputSchemaInput } from 'src/engine/core-modules/workflow/dtos/compute-step-output-schema-input.dto'; @@ -17,7 +18,7 @@ import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-module import { type OutputSchema } from 'src/modules/workflow/workflow-builder/workflow-schema/types/output-schema.type'; import { WorkflowSchemaWorkspaceService } from 'src/modules/workflow/workflow-builder/workflow-schema/workflow-schema.workspace-service'; -@Resolver() +@CoreResolver() @UseGuards( WorkspaceAuthGuard, UserAuthGuard, diff --git a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-trigger.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-trigger.resolver.ts index ece7ac691f9..1c5381478c5 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-trigger.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-trigger.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { buildCreatedByFromFullNameMetadata } from 'src/engine/core-modules/actor/utils/build-created-by-from-full-name-metadata.util'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; @@ -24,7 +25,7 @@ import { buildSystemAuthContext } from 'src/engine/twenty-orm/utils/build-system import { WorkflowTriggerWorkspaceService } from 'src/modules/workflow/workflow-trigger/workspace-services/workflow-trigger.workspace-service'; import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity'; -@Resolver() +@CoreResolver() @UseGuards( WorkspaceAuthGuard, UserAuthGuard, diff --git a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-edge.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-edge.resolver.ts index 2711f106e41..f381c534003 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-edge.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-edge.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { CreateWorkflowVersionEdgeInput } from 'src/engine/core-modules/workflow/dtos/create-workflow-version-edge-input.dto'; @@ -16,7 +17,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; import { WorkflowVersionEdgeWorkspaceService } from 'src/modules/workflow/workflow-builder/workflow-version-edge/workflow-version-edge.workspace-service'; -@Resolver() +@CoreResolver() @UsePipes(ResolverValidationPipe) @UseGuards( WorkspaceAuthGuard, diff --git a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-step.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-step.resolver.ts index 1c158293fdf..edef68c126a 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-step.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version-step.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; @@ -30,7 +31,7 @@ import { WorkflowActionType } from 'src/modules/workflow/workflow-executor/workf import { WorkflowRunWorkspaceService } from 'src/modules/workflow/workflow-runner/workflow-run/workflow-run.workspace-service'; import { WorkflowRunnerWorkspaceService } from 'src/modules/workflow/workflow-runner/workspace-services/workflow-runner.workspace-service'; -@Resolver() +@CoreResolver() @UsePipes(ResolverValidationPipe) @UseGuards( WorkspaceAuthGuard, diff --git a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version.resolver.ts b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version.resolver.ts index ecb5ce99b24..6841b259851 100644 --- a/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workflow/resolvers/workflow-version.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { CoreResolver } from 'src/engine/api/graphql/graphql-config/decorators/core-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { CreateDraftFromWorkflowVersionInput } from 'src/engine/core-modules/workflow/dtos/create-draft-from-workflow-version-input.dto'; @@ -17,7 +18,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; import { WorkflowVersionWorkspaceService } from 'src/modules/workflow/workflow-builder/workflow-version/workflow-version.workspace-service'; -@Resolver() +@CoreResolver() @UsePipes(ResolverValidationPipe) @UseGuards( WorkspaceAuthGuard, diff --git a/packages/twenty-server/src/engine/core-modules/workspace-invitation/workspace-invitation.resolver.ts b/packages/twenty-server/src/engine/core-modules/workspace-invitation/workspace-invitation.resolver.ts index 2c22934528f..8c5b0f23521 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace-invitation/workspace-invitation.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace-invitation/workspace-invitation.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; @@ -31,7 +32,7 @@ import { SendInvitationsInput } from './dtos/send-invitations.input'; PermissionsGraphqlApiExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, ) -@Resolver() +@MetadataResolver() export class WorkspaceInvitationResolver { constructor( private readonly globalWorkspaceOrmManager: GlobalWorkspaceOrmManager, diff --git a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts index ecfc0e8c3a3..5c1c3a2df66 100644 --- a/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts +++ b/packages/twenty-server/src/engine/core-modules/workspace/workspace.resolver.ts @@ -5,14 +5,7 @@ import { UsePipes, createParamDecorator, } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import assert from 'assert'; @@ -78,6 +71,7 @@ import { RoleService } from 'src/engine/metadata-modules/role/role.service'; import { fromRoleEntityToRoleDto } from 'src/engine/metadata-modules/role/utils/fromRoleEntityToRoleDto.util'; import { ViewDTO } from 'src/engine/metadata-modules/view/dtos/view.dto'; import { ViewService } from 'src/engine/metadata-modules/view/services/view.service'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { getRequest } from 'src/utils/extract-request'; import { streamToBuffer } from 'src/utils/stream-to-buffer'; const OriginHeader = createParamDecorator( @@ -88,7 +82,7 @@ const OriginHeader = createParamDecorator( }, ); -@Resolver(() => WorkspaceEntity) +@MetadataResolver(() => WorkspaceEntity) @UsePipes(ResolverValidationPipe) @UseFilters( PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-monitor/resolvers/agent-turn.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-monitor/resolvers/agent-turn.resolver.ts index 9146e4d23d2..21509b833f0 100644 --- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-monitor/resolvers/agent-turn.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent-monitor/resolvers/agent-turn.resolver.ts @@ -1,5 +1,5 @@ import { Logger, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { InjectRepository } from '@nestjs/typeorm'; import { msg } from '@lingui/core/macro'; @@ -14,6 +14,7 @@ import { MessageQueueService } from 'src/engine/core-modules/message-queue/servi import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { AgentTurnDTO } from 'src/engine/metadata-modules/ai/ai-agent-execution/dtos/agent-turn.dto'; @@ -24,7 +25,7 @@ import { AgentTurnGraderService } from 'src/engine/metadata-modules/ai/ai-agent- import { AgentChatThreadEntity } from 'src/engine/metadata-modules/ai/ai-chat/entities/agent-chat-thread.entity'; @UseGuards(WorkspaceAuthGuard, SettingsPermissionGuard(PermissionFlagType.AI)) -@Resolver() +@MetadataResolver() export class AgentTurnResolver { private readonly logger = new Logger(AgentTurnResolver.name); diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent/agent.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent/agent.resolver.ts index b2afeb2194f..0d4abbb022f 100644 --- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent/agent.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-agent/agent.resolver.ts @@ -1,11 +1,12 @@ import { UseGuards, UseInterceptors } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { FeatureFlagGuard, RequireFeatureFlag, @@ -32,7 +33,7 @@ import { AgentGraphqlApiExceptionInterceptor } from './interceptors/agent-graphq WorkspaceMigrationGraphqlApiExceptionInterceptor, AgentGraphqlApiExceptionInterceptor, ) -@Resolver() +@MetadataResolver() export class AgentResolver { constructor(private readonly agentService: AgentService) {} diff --git a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts index 5c058f0f6ee..c12aeaf1d4d 100644 --- a/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/ai/ai-chat/resolvers/agent-chat.resolver.ts @@ -6,7 +6,6 @@ import { Parent, Query, ResolveField, - Resolver, } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -17,6 +16,7 @@ import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/featu import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { FeatureFlagGuard, RequireFeatureFlag, @@ -35,7 +35,7 @@ import { SystemPromptBuilderService } from 'src/engine/metadata-modules/ai/ai-ch FeatureFlagGuard, SettingsPermissionGuard(PermissionFlagType.AI), ) -@Resolver(() => AgentChatThreadDTO) +@MetadataResolver(() => AgentChatThreadDTO) export class AgentChatResolver { constructor( private readonly agentChatService: AgentChatService, diff --git a/packages/twenty-server/src/engine/metadata-modules/command-menu-item/command-menu-item.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/command-menu-item/command-menu-item.resolver.ts index 4c508c9108f..7149a2095a0 100644 --- a/packages/twenty-server/src/engine/metadata-modules/command-menu-item/command-menu-item.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/command-menu-item/command-menu-item.resolver.ts @@ -1,12 +1,5 @@ import { UseGuards, UseInterceptors } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; @@ -14,6 +7,7 @@ import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/ import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { FeatureFlagGuard, RequireFeatureFlag, @@ -34,7 +28,7 @@ import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/wor WorkspaceMigrationGraphqlApiExceptionInterceptor, CommandMenuItemGraphqlApiExceptionInterceptor, ) -@Resolver(() => CommandMenuItemDTO) +@MetadataResolver(() => CommandMenuItemDTO) export class CommandMenuItemResolver { constructor( private readonly commandMenuItemService: CommandMenuItemService, diff --git a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts index 2a94e095153..059cca64a98 100644 --- a/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts @@ -1,12 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { - Args, - Context, - Mutation, - Parent, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Context, Mutation, Parent, ResolveField } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -19,6 +12,7 @@ import { I18nContext } from 'src/engine/core-modules/i18n/types/i18n-context.typ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { type IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateOneFieldMetadataInput } from 'src/engine/metadata-modules/field-metadata/dtos/create-field.input'; @@ -33,7 +27,7 @@ import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-module @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) -@Resolver(() => FieldMetadataDTO) +@MetadataResolver(() => FieldMetadataDTO) @UseFilters( PermissionsGraphqlApiExceptionFilter, PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/metadata-modules/front-component/front-component.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/front-component/front-component.resolver.ts index 59baff19d00..fb16c1bd027 100644 --- a/packages/twenty-server/src/engine/metadata-modules/front-component/front-component.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/front-component/front-component.resolver.ts @@ -1,11 +1,12 @@ import { UseGuards, UseInterceptors } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -22,7 +23,7 @@ import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/wor WorkspaceMigrationGraphqlApiExceptionInterceptor, FrontComponentGraphqlApiExceptionInterceptor, ) -@Resolver(() => FrontComponentDTO) +@MetadataResolver(() => FrontComponentDTO) export class FrontComponentResolver { constructor(private readonly frontComponentService: FrontComponentService) {} diff --git a/packages/twenty-server/src/engine/metadata-modules/index-metadata/index-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/index-metadata/index-metadata.resolver.ts index 73dc4888e9e..fc1f5de2bf8 100644 --- a/packages/twenty-server/src/engine/metadata-modules/index-metadata/index-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/index-metadata/index-metadata.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Context, Parent, ResolveField, Resolver } from '@nestjs/graphql'; +import { Context, Parent, ResolveField } from '@nestjs/graphql'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; @@ -8,6 +8,7 @@ import { type I18nContext } from 'src/engine/core-modules/i18n/types/i18n-contex import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { type IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { IndexFieldMetadataDTO } from 'src/engine/metadata-modules/index-metadata/dtos/index-field-metadata.dto'; import { IndexMetadataDTO } from 'src/engine/metadata-modules/index-metadata/dtos/index-metadata.dto'; @@ -15,7 +16,7 @@ import { objectMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-mo import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; @UseGuards(WorkspaceAuthGuard) -@Resolver(() => IndexMetadataDTO) +@MetadataResolver(() => IndexMetadataDTO) @UsePipes(ResolverValidationPipe) @UseFilters( PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.resolver.ts index 77515bd341a..9a8de3fe412 100644 --- a/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/logic-function/logic-function.resolver.ts @@ -1,5 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver, Subscription } from '@nestjs/graphql'; +import { Args, Mutation, Query, Subscription } from '@nestjs/graphql'; import graphqlTypeJson from 'graphql-type-json'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -9,6 +9,7 @@ import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { FeatureFlagGuard } from 'src/engine/guards/feature-flag.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -30,7 +31,7 @@ import { SubscriptionService } from 'src/engine/subscriptions/subscription.servi FeatureFlagGuard, SettingsPermissionGuard(PermissionFlagType.WORKFLOWS), ) -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters(PreventNestToAutoLogGraphqlErrorsFilter) export class LogicFunctionResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/navigation-menu-item/navigation-menu-item.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/navigation-menu-item/navigation-menu-item.resolver.ts index d8d28a5ad35..a5cd3a24ac8 100644 --- a/packages/twenty-server/src/engine/metadata-modules/navigation-menu-item/navigation-menu-item.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/navigation-menu-item/navigation-menu-item.resolver.ts @@ -6,7 +6,6 @@ import { Parent, Query, ResolveField, - Resolver, } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; @@ -19,6 +18,7 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { AuthApiKey } from 'src/engine/decorators/auth/auth-api-key.decorator'; import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateNavigationMenuItemInput } from 'src/engine/metadata-modules/navigation-menu-item/dtos/create-navigation-menu-item.input'; @@ -34,7 +34,7 @@ import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/wor WorkspaceMigrationGraphqlApiExceptionInterceptor, NavigationMenuItemGraphqlApiExceptionInterceptor, ) -@Resolver(() => NavigationMenuItemDTO) +@MetadataResolver(() => NavigationMenuItemDTO) export class NavigationMenuItemResolver { constructor( private readonly navigationMenuItemService: NavigationMenuItemService, diff --git a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts index 89d17606235..45de9d36674 100644 --- a/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts @@ -1,12 +1,5 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { - Args, - Context, - Mutation, - Parent, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Context, Mutation, Parent, ResolveField } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -17,6 +10,7 @@ import { I18nContext } from 'src/engine/core-modules/i18n/types/i18n-context.typ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { type IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { FieldMetadataDTO } from 'src/engine/metadata-modules/field-metadata/dtos/field-metadata.dto'; @@ -32,7 +26,7 @@ import { resolveObjectMetadataStandardOverride } from 'src/engine/metadata-modul import { PermissionsGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/permissions/utils/permissions-graphql-api-exception.filter'; @UseGuards(WorkspaceAuthGuard) -@Resolver(() => ObjectMetadataDTO) +@MetadataResolver(() => ObjectMetadataDTO) @UsePipes(ResolverValidationPipe) @UseFilters( PreventNestToAutoLogGraphqlErrorsFilter, diff --git a/packages/twenty-server/src/engine/metadata-modules/page-layout-tab/resolvers/page-layout-tab.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/page-layout-tab/resolvers/page-layout-tab.resolver.ts index d0310ce7035..0c00263baa5 100644 --- a/packages/twenty-server/src/engine/metadata-modules/page-layout-tab/resolvers/page-layout-tab.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/page-layout-tab/resolvers/page-layout-tab.resolver.ts @@ -4,13 +4,14 @@ import { UseInterceptors, UsePipes, } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -21,7 +22,7 @@ import { PageLayoutTabService } from 'src/engine/metadata-modules/page-layout-ta import { PageLayoutGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/page-layout/utils/page-layout-graphql-api-exception.filter'; import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/workspace-manager/workspace-migration/interceptors/workspace-migration-graphql-api-exception.interceptor'; -@Resolver(() => PageLayoutTabDTO) +@MetadataResolver(() => PageLayoutTabDTO) @UseInterceptors(WorkspaceMigrationGraphqlApiExceptionInterceptor) @UseFilters(PageLayoutGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) diff --git a/packages/twenty-server/src/engine/metadata-modules/page-layout-widget/resolvers/page-layout-widget.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/page-layout-widget/resolvers/page-layout-widget.resolver.ts index dfcb6561a6f..b7ef7421bce 100644 --- a/packages/twenty-server/src/engine/metadata-modules/page-layout-widget/resolvers/page-layout-widget.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/page-layout-widget/resolvers/page-layout-widget.resolver.ts @@ -4,20 +4,14 @@ import { UseInterceptors, UsePipes, } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -29,7 +23,7 @@ import { PageLayoutWidgetService } from 'src/engine/metadata-modules/page-layout import { PageLayoutGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/page-layout/utils/page-layout-graphql-api-exception.filter'; import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/workspace-manager/workspace-migration/interceptors/workspace-migration-graphql-api-exception.interceptor'; -@Resolver(() => PageLayoutWidgetDTO) +@MetadataResolver(() => PageLayoutWidgetDTO) @UseInterceptors(WorkspaceMigrationGraphqlApiExceptionInterceptor) @UseFilters(PageLayoutGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) diff --git a/packages/twenty-server/src/engine/metadata-modules/page-layout/resolvers/page-layout.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/page-layout/resolvers/page-layout.resolver.ts index 43a3ed6feec..37170c0d690 100644 --- a/packages/twenty-server/src/engine/metadata-modules/page-layout/resolvers/page-layout.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/page-layout/resolvers/page-layout.resolver.ts @@ -4,13 +4,14 @@ import { UseInterceptors, UsePipes, } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -24,7 +25,7 @@ import { PageLayoutService } from 'src/engine/metadata-modules/page-layout/servi import { PageLayoutGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/page-layout/utils/page-layout-graphql-api-exception.filter'; import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/workspace-manager/workspace-migration/interceptors/workspace-migration-graphql-api-exception.interceptor'; -@Resolver(() => PageLayoutDTO) +@MetadataResolver(() => PageLayoutDTO) @UseInterceptors(WorkspaceMigrationGraphqlApiExceptionInterceptor) @UseFilters(PageLayoutGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) diff --git a/packages/twenty-server/src/engine/metadata-modules/role/role.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/role/role.resolver.ts index dd15213fc5d..c805b2384bc 100644 --- a/packages/twenty-server/src/engine/metadata-modules/role/role.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/role/role.resolver.ts @@ -4,14 +4,7 @@ import { UseInterceptors, UsePipes, } from '@nestjs/common'; -import { - Args, - Mutation, - Parent, - Query, - ResolveField, - Resolver, -} from '@nestjs/graphql'; +import { Args, Mutation, Parent, Query, ResolveField } from '@nestjs/graphql'; import { msg } from '@lingui/core/macro'; import { PermissionFlagType } from 'twenty-shared/constants'; @@ -27,6 +20,7 @@ import { UserWorkspaceService } from 'src/engine/core-modules/user-workspace/use import { WorkspaceMemberDTO } from 'src/engine/core-modules/user/dtos/workspace-member.dto'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspaceMemberId } from 'src/engine/decorators/auth/auth-workspace-member-id.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; import { RequireFeatureFlag } from 'src/engine/guards/feature-flag.guard'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; @@ -73,7 +67,7 @@ import { WorkspaceCacheService } from 'src/engine/workspace-cache/services/works import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/workspace-manager/workspace-migration/interceptors/workspace-migration-graphql-api-exception.interceptor'; import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/standard-objects/workspace-member.workspace-entity'; -@Resolver(() => RoleDTO) +@MetadataResolver(() => RoleDTO) @UsePipes(ResolverValidationPipe) @UseGuards( WorkspaceAuthGuard, diff --git a/packages/twenty-server/src/engine/metadata-modules/skill/skill.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/skill/skill.resolver.ts index 9ed1e3612c4..dc8117fb61b 100644 --- a/packages/twenty-server/src/engine/metadata-modules/skill/skill.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/skill/skill.resolver.ts @@ -1,11 +1,12 @@ import { UseGuards, UseInterceptors } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateSkillInput } from 'src/engine/metadata-modules/skill/dtos/create-skill.input'; @@ -20,7 +21,7 @@ import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/wor WorkspaceMigrationGraphqlApiExceptionInterceptor, SkillGraphqlApiExceptionInterceptor, ) -@Resolver(() => SkillDTO) +@MetadataResolver(() => SkillDTO) export class SkillResolver { constructor(private readonly skillService: SkillService) {} diff --git a/packages/twenty-server/src/engine/metadata-modules/view-field/resolvers/view-field.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view-field/resolvers/view-field.resolver.ts index 2e14be5a6a6..a54f5244ee7 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view-field/resolvers/view-field.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view-field/resolvers/view-field.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateViewFieldInput } from 'src/engine/metadata-modules/view-field/dtos/inputs/create-view-field.input'; @@ -18,7 +19,7 @@ import { DestroyViewFieldPermissionGuard } from 'src/engine/metadata-modules/vie import { UpdateViewFieldPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/update-view-field-permission.guard'; import { ViewGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception.filter'; -@Resolver(() => ViewFieldDTO) +@MetadataResolver(() => ViewFieldDTO) @UseFilters(ViewGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewFieldResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/view-filter-group/resolvers/view-filter-group.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view-filter-group/resolvers/view-filter-group.resolver.ts index 60726b9c7af..7e08cf6ba5d 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view-filter-group/resolvers/view-filter-group.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view-filter-group/resolvers/view-filter-group.resolver.ts @@ -1,10 +1,11 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateViewFilterGroupInput } from 'src/engine/metadata-modules/view-filter-group/dtos/inputs/create-view-filter-group.input'; @@ -17,7 +18,7 @@ import { DestroyViewFilterGroupPermissionGuard } from 'src/engine/metadata-modul import { UpdateViewFilterGroupPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/update-view-filter-group-permission.guard'; import { ViewGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception.filter'; -@Resolver(() => ViewFilterGroupDTO) +@MetadataResolver(() => ViewFilterGroupDTO) @UseFilters(ViewGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewFilterGroupResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/view-filter/resolvers/view-filter.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view-filter/resolvers/view-filter.resolver.ts index 5ea7bbdb5af..66516ce488d 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view-filter/resolvers/view-filter.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view-filter/resolvers/view-filter.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateViewFilterInput } from 'src/engine/metadata-modules/view-filter/dtos/inputs/create-view-filter.input'; @@ -17,7 +18,7 @@ import { DestroyViewFilterPermissionGuard } from 'src/engine/metadata-modules/vi import { UpdateViewFilterPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/update-view-filter-permission.guard'; import { ViewGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception.filter'; -@Resolver(() => ViewFilterDTO) +@MetadataResolver(() => ViewFilterDTO) @UseFilters(ViewGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewFilterResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/view-group/resolvers/view-group.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view-group/resolvers/view-group.resolver.ts index 26c9c164fc7..4f612bfab14 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view-group/resolvers/view-group.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view-group/resolvers/view-group.resolver.ts @@ -1,8 +1,9 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateViewGroupInput } from 'src/engine/metadata-modules/view-group/dtos/inputs/create-view-group.input'; @@ -17,7 +18,7 @@ import { DeleteViewGroupPermissionGuard } from 'src/engine/metadata-modules/view import { DestroyViewGroupPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/destroy-view-group-permission.guard'; import { UpdateViewGroupPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/update-view-group-permission.guard'; -@Resolver(() => ViewGroupDTO) +@MetadataResolver(() => ViewGroupDTO) @UseFilters(ViewGroupGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewGroupResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/view-sort/resolvers/view-sort.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view-sort/resolvers/view-sort.resolver.ts index efe6c7858b0..b9cd5379984 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view-sort/resolvers/view-sort.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view-sort/resolvers/view-sort.resolver.ts @@ -1,10 +1,11 @@ import { UseFilters, UseGuards } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateViewSortPermissionGuard } from 'src/engine/metadata-modules/view-permissions/guards/create-view-sort-permission.guard'; @@ -17,7 +18,7 @@ import { ViewSortDTO } from 'src/engine/metadata-modules/view-sort/dtos/view-sor import { ViewSortService } from 'src/engine/metadata-modules/view-sort/services/view-sort.service'; import { ViewGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception.filter'; -@Resolver(() => ViewSortDTO) +@MetadataResolver(() => ViewSortDTO) @UseFilters(ViewGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewSortResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/view/resolvers/view.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/view/resolvers/view.resolver.ts index b76efc4b105..0083dae79ab 100644 --- a/packages/twenty-server/src/engine/metadata-modules/view/resolvers/view.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/view/resolvers/view.resolver.ts @@ -6,7 +6,6 @@ import { Parent, Query, ResolveField, - Resolver, } from '@nestjs/graphql'; import { isArray } from '@sniptt/guards'; @@ -18,6 +17,7 @@ import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.ent import { type IDataloaders } from 'src/engine/dataloaders/dataloader.interface'; import { AuthUserWorkspaceId } from 'src/engine/decorators/auth/auth-user-workspace-id.decorator'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { CustomPermissionGuard } from 'src/engine/guards/custom-permission.guard'; import { NoPermissionGuard } from 'src/engine/guards/no-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; @@ -44,7 +44,7 @@ import { ViewVisibility } from 'src/engine/metadata-modules/view/enums/view-visi import { ViewService } from 'src/engine/metadata-modules/view/services/view.service'; import { ViewGraphqlApiExceptionFilter } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception.filter'; -@Resolver(() => ViewDTO) +@MetadataResolver(() => ViewDTO) @UseFilters(ViewGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) export class ViewResolver { diff --git a/packages/twenty-server/src/engine/metadata-modules/webhook/webhook.resolver.ts b/packages/twenty-server/src/engine/metadata-modules/webhook/webhook.resolver.ts index 1fe5bc10b59..72132e7b688 100644 --- a/packages/twenty-server/src/engine/metadata-modules/webhook/webhook.resolver.ts +++ b/packages/twenty-server/src/engine/metadata-modules/webhook/webhook.resolver.ts @@ -1,11 +1,12 @@ import { UseGuards, UseInterceptors } from '@nestjs/common'; -import { Args, Mutation, Query, Resolver } from '@nestjs/graphql'; +import { Args, Mutation, Query } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; import { AuthWorkspace } from 'src/engine/decorators/auth/auth-workspace.decorator'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { SettingsPermissionGuard } from 'src/engine/guards/settings-permission.guard'; import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { CreateWebhookInput } from 'src/engine/metadata-modules/webhook/dtos/create-webhook.input'; @@ -20,7 +21,7 @@ import { WorkspaceMigrationGraphqlApiExceptionInterceptor } from 'src/engine/wor WorkspaceMigrationGraphqlApiExceptionInterceptor, WebhookGraphqlApiExceptionInterceptor, ) -@Resolver(() => WebhookDTO) +@MetadataResolver(() => WebhookDTO) export class WebhookResolver { constructor(private readonly webhookService: WebhookService) {} diff --git a/packages/twenty-server/src/engine/workspace-event-emitter/workspace-event-emitter.resolver.ts b/packages/twenty-server/src/engine/workspace-event-emitter/workspace-event-emitter.resolver.ts index 1a7b3d26ddd..dda6a5e314b 100644 --- a/packages/twenty-server/src/engine/workspace-event-emitter/workspace-event-emitter.resolver.ts +++ b/packages/twenty-server/src/engine/workspace-event-emitter/workspace-event-emitter.resolver.ts @@ -1,9 +1,10 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver, Subscription } from '@nestjs/graphql'; +import { Args, Mutation, Subscription } from '@nestjs/graphql'; import { isDefined } from 'twenty-shared/utils'; import { type ApiKeyEntity } from 'src/engine/core-modules/api-key/api-key.entity'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { PreventNestToAutoLogGraphqlErrorsFilter } from 'src/engine/core-modules/graphql/filters/prevent-nest-to-auto-log-graphql-errors.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; @@ -36,7 +37,7 @@ import { WorkspaceEventEmitterExceptionFilter } from 'src/engine/workspace-event import { eventStreamIdToChannelId } from './utils/get-channel-id-from-event-stream-id'; -@Resolver() +@MetadataResolver() @UseGuards(WorkspaceAuthGuard, UserAuthGuard, NoPermissionGuard) @UsePipes(ResolverValidationPipe) @UseFilters( diff --git a/packages/twenty-server/src/modules/connected-account/channel-sync/channel-sync.resolver.ts b/packages/twenty-server/src/modules/connected-account/channel-sync/channel-sync.resolver.ts index a2711f47146..fc5b3c5aee0 100644 --- a/packages/twenty-server/src/modules/connected-account/channel-sync/channel-sync.resolver.ts +++ b/packages/twenty-server/src/modules/connected-account/channel-sync/channel-sync.resolver.ts @@ -1,9 +1,10 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { PermissionFlagType } from 'twenty-shared/constants'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AuthGraphqlApiExceptionFilter } from 'src/engine/core-modules/auth/filters/auth-graphql-api-exception.filter'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -13,7 +14,7 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard'; import { ChannelSyncSuccessDTO } from 'src/modules/connected-account/channel-sync/dtos/channel-sync-success.dto'; import { ChannelSyncService } from 'src/modules/connected-account/channel-sync/services/channel-sync.service'; -@Resolver() +@MetadataResolver() @UsePipes(ResolverValidationPipe) @UseFilters(AuthGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) diff --git a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/bar-chart-data.resolver.ts b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/bar-chart-data.resolver.ts index b523cc8aa30..d1b60cffee4 100644 --- a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/bar-chart-data.resolver.ts +++ b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/bar-chart-data.resolver.ts @@ -1,7 +1,8 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -16,7 +17,7 @@ import { BarChartDataOutputDTO } from 'src/modules/dashboard/chart-data/dtos/out import { ChartDataGraphqlApiExceptionFilter } from 'src/modules/dashboard/chart-data/filters/chart-data-graphql-api-exception.filter'; import { BarChartDataService } from 'src/modules/dashboard/chart-data/services/bar-chart-data.service'; -@Resolver() +@MetadataResolver() @UseFilters(ChartDataGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) diff --git a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/line-chart-data.resolver.ts b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/line-chart-data.resolver.ts index 55554f1b45d..0afebf50d08 100644 --- a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/line-chart-data.resolver.ts +++ b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/line-chart-data.resolver.ts @@ -1,7 +1,8 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -16,7 +17,7 @@ import { LineChartDataOutputDTO } from 'src/modules/dashboard/chart-data/dtos/ou import { ChartDataGraphqlApiExceptionFilter } from 'src/modules/dashboard/chart-data/filters/chart-data-graphql-api-exception.filter'; import { LineChartDataService } from 'src/modules/dashboard/chart-data/services/line-chart-data.service'; -@Resolver() +@MetadataResolver() @UseFilters(ChartDataGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) diff --git a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/pie-chart-data.resolver.ts b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/pie-chart-data.resolver.ts index d93e2fa4eac..6921741533b 100644 --- a/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/pie-chart-data.resolver.ts +++ b/packages/twenty-server/src/modules/dashboard/chart-data/resolvers/pie-chart-data.resolver.ts @@ -1,7 +1,8 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Query, Resolver } from '@nestjs/graphql'; +import { Args, Query } from '@nestjs/graphql'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -16,7 +17,7 @@ import { PieChartDataOutputDTO } from 'src/modules/dashboard/chart-data/dtos/out import { ChartDataGraphqlApiExceptionFilter } from 'src/modules/dashboard/chart-data/filters/chart-data-graphql-api-exception.filter'; import { PieChartDataService } from 'src/modules/dashboard/chart-data/services/pie-chart-data.service'; -@Resolver() +@MetadataResolver() @UseFilters(ChartDataGraphqlApiExceptionFilter) @UseGuards(WorkspaceAuthGuard) @UsePipes(ResolverValidationPipe) diff --git a/packages/twenty-server/src/modules/dashboard/resolvers/dashboard.resolver.ts b/packages/twenty-server/src/modules/dashboard/resolvers/dashboard.resolver.ts index 12058a93d70..7a217fb31c7 100644 --- a/packages/twenty-server/src/modules/dashboard/resolvers/dashboard.resolver.ts +++ b/packages/twenty-server/src/modules/dashboard/resolvers/dashboard.resolver.ts @@ -1,7 +1,8 @@ import { UseFilters, UseGuards, UsePipes } from '@nestjs/common'; -import { Args, Mutation, Resolver } from '@nestjs/graphql'; +import { Args, Mutation } from '@nestjs/graphql'; import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars'; +import { MetadataResolver } from 'src/engine/api/graphql/graphql-config/decorators/metadata-resolver.decorator'; import { AuthContext } from 'src/engine/core-modules/auth/types/auth-context.type'; import { ResolverValidationPipe } from 'src/engine/core-modules/graphql/pipes/resolver-validation.pipe'; import { UserEntity } from 'src/engine/core-modules/user/user.entity'; @@ -17,7 +18,7 @@ import { DuplicatedDashboardDTO } from 'src/modules/dashboard/dtos/duplicated-da import { DashboardDuplicationService } from 'src/modules/dashboard/services/dashboard-duplication.service'; import { DashboardGraphqlApiExceptionFilter } from 'src/modules/dashboard/utils/dashboard-graphql-api-exception.filter'; -@Resolver() +@MetadataResolver() @UseFilters( DashboardGraphqlApiExceptionFilter, PageLayoutGraphqlApiExceptionFilter, diff --git a/packages/twenty-server/test/integration/audit/suites/clickHouse-workspace-event-registration.integration-spec.ts b/packages/twenty-server/test/integration/audit/suites/clickHouse-workspace-event-registration.integration-spec.ts index 4e5c583898d..fae8e9d321a 100644 --- a/packages/twenty-server/test/integration/audit/suites/clickHouse-workspace-event-registration.integration-spec.ts +++ b/packages/twenty-server/test/integration/audit/suites/clickHouse-workspace-event-registration.integration-spec.ts @@ -44,7 +44,7 @@ describe('ClickHouse Event Registration (integration)', () => { }; const response = await request(`http://localhost:${APP_PORT}`) - .post('/graphql') + .post('/metadata') .send({ query: mutation, variables, diff --git a/packages/twenty-server/test/integration/graphql/suites/auth.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/auth.integration-spec.ts index 34c8f0cefef..331637aeca7 100644 --- a/packages/twenty-server/test/integration/graphql/suites/auth.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/auth.integration-spec.ts @@ -34,7 +34,7 @@ describe('AuthResolve (integration)', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Origin', ORIGIN.toString()) .send(queryData) .expect(200) @@ -68,7 +68,7 @@ describe('AuthResolve (integration)', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Origin', ORIGIN.toString()) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/event-logs/event-logs.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/event-logs/event-logs.integration-spec.ts index ac097854304..751e01b994c 100644 --- a/packages/twenty-server/test/integration/graphql/suites/event-logs/event-logs.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/event-logs/event-logs.integration-spec.ts @@ -118,7 +118,7 @@ describe('Event Logs (integration)', () => { token = APPLE_JANE_ADMIN_ACCESS_TOKEN, ) => { return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${token}`) .send({ query: ` @@ -498,7 +498,7 @@ describe('Event Logs (integration)', () => { }); it('should deny access without authentication', async () => { - const response = await client.post('/graphql').send({ + const response = await client.post('/metadata').send({ query: ` query EventLogs($input: EventLogQueryInput!) { eventLogs(input: $input) { diff --git a/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-download.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-download.integration-spec.ts index 24d6a9b9624..d036558a1f2 100644 --- a/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-download.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-download.integration-spec.ts @@ -1,12 +1,13 @@ import gql from 'graphql-tag'; import request from 'supertest'; -import { makeGraphqlAPIRequestWithFileUpload } from 'test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util'; import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { uploadFilesFieldFileMutation } from 'test/integration/graphql/utils/upload-files-field-file-mutation.util'; import { createOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/create-one-field-metadata.util'; import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; import { deleteOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util'; import { updateOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util'; +import { makeMetadataAPIRequestWithFileUpload } from 'test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { FieldMetadataType } from 'twenty-shared/types'; const deleteFileMutation = gql` @@ -50,7 +51,7 @@ type UploadedFile = { }; const deleteFile = async (fileId: string): Promise => { - await makeGraphqlAPIRequest({ + await makeMetadataAPIRequest({ query: deleteFileMutation, variables: { fileId }, }); @@ -66,7 +67,7 @@ describe('files-field.controller - GET /files-field/:id', () => { content: string, contentType: string, ): Promise => { - const response = await makeGraphqlAPIRequestWithFileUpload( + const response = await makeMetadataAPIRequestWithFileUpload( { query: uploadFilesFieldFileMutation, variables: { file: null, fieldMetadataId: createdFieldMetadataId }, diff --git a/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-sync.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-sync.integration-spec.ts index 63f87eda4b6..eb25b1136e7 100644 --- a/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-sync.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/files-field/files-field-sync.integration-spec.ts @@ -1,11 +1,12 @@ import gql from 'graphql-tag'; -import { makeGraphqlAPIRequestWithFileUpload } from 'test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util'; import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { uploadFilesFieldFileMutation } from 'test/integration/graphql/utils/upload-files-field-file-mutation.util'; import { createOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/create-one-field-metadata.util'; import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; import { deleteOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util'; import { updateOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util'; +import { makeMetadataAPIRequestWithFileUpload } from 'test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { FieldMetadataType } from 'twenty-shared/types'; const deleteFileMutation = gql` @@ -66,7 +67,7 @@ type UploadedFile = { }; const deleteFile = async (fileId: string): Promise => { - await makeGraphqlAPIRequest({ + await makeMetadataAPIRequest({ query: deleteFileMutation, variables: { fileId }, }); @@ -82,7 +83,7 @@ describe('fileFieldSync - FILES field <> files sync', () => { content: string, contentType: string, ): Promise => { - const response = await makeGraphqlAPIRequestWithFileUpload( + const response = await makeMetadataAPIRequestWithFileUpload( { query: uploadFilesFieldFileMutation, variables: { file: null, fieldMetadataId: createdFieldMetadataId }, diff --git a/packages/twenty-server/test/integration/graphql/suites/files-field/upload-files-field-file.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/files-field/upload-files-field-file.integration-spec.ts index e69ba651b6c..a5e83c30ee4 100644 --- a/packages/twenty-server/test/integration/graphql/suites/files-field/upload-files-field-file.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/files-field/upload-files-field-file.integration-spec.ts @@ -1,11 +1,11 @@ import gql from 'graphql-tag'; -import { makeGraphqlAPIRequestWithFileUpload } from 'test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { uploadFilesFieldFileMutation } from 'test/integration/graphql/utils/upload-files-field-file-mutation.util'; import { createOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/create-one-field-metadata.util'; import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; import { deleteOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util'; import { updateOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util'; +import { makeMetadataAPIRequestWithFileUpload } from 'test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { FieldMetadataType, FileFolder } from 'twenty-shared/types'; const deleteFileMutation = gql` @@ -76,7 +76,7 @@ describe('uploadFilesFieldFile', () => { afterAll(async () => { if (uploadedFileId) { - await makeGraphqlAPIRequest({ + await makeMetadataAPIRequest({ query: deleteFileMutation, variables: { fileId: uploadedFileId }, }); @@ -103,7 +103,7 @@ describe('uploadFilesFieldFile', () => { const testFileName = 'test-file.txt'; const testMimeType = 'text/plain'; - const response = await makeGraphqlAPIRequestWithFileUpload( + const response = await makeMetadataAPIRequestWithFileUpload( { query: uploadFilesFieldFileMutation, variables: { diff --git a/packages/twenty-server/test/integration/graphql/suites/group-by-resolver.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/group-by-resolver.integration-spec.ts index ffefcd0f315..4fa2dea5a39 100644 --- a/packages/twenty-server/test/integration/graphql/suites/group-by-resolver.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/group-by-resolver.integration-spec.ts @@ -12,6 +12,7 @@ import { groupByOperationFactory } from 'test/integration/graphql/utils/group-by import { makeGraphqlAPIRequestWithMemberRole } from 'test/integration/graphql/utils/make-graphql-api-request-with-member-role.util'; import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { updateWorkspaceMemberRole } from 'test/integration/graphql/utils/update-workspace-member-role.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { deleteOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/delete-one-field-metadata.util'; import { updateOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/update-one-field-metadata.util'; import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; @@ -874,7 +875,7 @@ describe('group-by resolver (integration)', () => { viewId = createViewData.createCoreView.id; // create a filter group and a filter for the view - const viewFilterGroupResponse = await makeGraphqlAPIRequest( + const viewFilterGroupResponse = await makeMetadataAPIRequest( createViewFilterGroupOperationFactory({ data: { viewId, @@ -1673,7 +1674,7 @@ describe('group-by resolver (integration)', () => { }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -1726,7 +1727,7 @@ describe('group-by resolver (integration)', () => { }; const createRoleResponse = - await makeGraphqlAPIRequest(createRoleOperation); + await makeMetadataAPIRequest(createRoleOperation); customRoleId = createRoleResponse.body.data.createOneRole.id; @@ -1769,7 +1770,7 @@ describe('group-by resolver (integration)', () => { }, }; - await makeGraphqlAPIRequest(upsertObjectPermissionsOperation); + await makeMetadataAPIRequest(upsertObjectPermissionsOperation); // Assign the custom role to a workspace member await updateWorkspaceMemberRole({ @@ -1839,7 +1840,7 @@ describe('group-by resolver (integration)', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreMemberRoleQuery); diff --git a/packages/twenty-server/test/integration/graphql/suites/inputs-validation/utils/setup-test-objects-with-all-field-types.util.ts b/packages/twenty-server/test/integration/graphql/suites/inputs-validation/utils/setup-test-objects-with-all-field-types.util.ts index 5c01ba6dd88..4c779f5fadc 100644 --- a/packages/twenty-server/test/integration/graphql/suites/inputs-validation/utils/setup-test-objects-with-all-field-types.util.ts +++ b/packages/twenty-server/test/integration/graphql/suites/inputs-validation/utils/setup-test-objects-with-all-field-types.util.ts @@ -1,10 +1,10 @@ import { getFieldMetadataCreationInputs } from 'test/integration/graphql/suites/inputs-validation/utils/get-field-metadata-creation-inputs.util'; import { createManyOperationFactory } from 'test/integration/graphql/utils/create-many-operation-factory.util'; -import { makeGraphqlAPIRequestWithFileUpload } from 'test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util'; import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { uploadFilesFieldFileMutation } from 'test/integration/graphql/utils/upload-files-field-file-mutation.util'; import { createOneFieldMetadata } from 'test/integration/metadata/suites/field-metadata/utils/create-one-field-metadata.util'; import { createOneObjectMetadata } from 'test/integration/metadata/suites/object-metadata/utils/create-one-object-metadata.util'; +import { makeMetadataAPIRequestWithFileUpload } from 'test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util'; import { FieldMetadataType, RelationType } from 'twenty-shared/types'; import { computeMorphRelationFieldName } from 'twenty-shared/utils'; import { v4 } from 'uuid'; @@ -119,7 +119,7 @@ export const setupTestObjectsWithAllFieldTypes = async ( const testFileName = 'Document.pdf'; const testMimeType = 'application/pdf'; - const uploadResponse = await makeGraphqlAPIRequestWithFileUpload( + const uploadResponse = await makeMetadataAPIRequestWithFileUpload( { query: uploadFilesFieldFileMutation, variables: { file: null, fieldMetadataId: filesFieldMetadataId }, diff --git a/packages/twenty-server/test/integration/graphql/suites/object-generated/index-metadatas.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-generated/index-metadatas.integration-spec.ts index 521ade015ce..80a321853bf 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-generated/index-metadatas.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-generated/index-metadatas.integration-spec.ts @@ -26,7 +26,7 @@ describe('indexMetadatasResolver (e2e)', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/object-generated/logic-functions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-generated/logic-functions.integration-spec.ts index 4a694e191f3..e65505af42c 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-generated/logic-functions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-generated/logic-functions.integration-spec.ts @@ -20,7 +20,7 @@ describe('logicFunctionsResolver (e2e)', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/object-generated/objects.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-generated/objects.integration-spec.ts index c68cd9a4225..c762582c360 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-generated/objects.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-generated/objects.integration-spec.ts @@ -33,7 +33,7 @@ describe('objectsResolver (e2e)', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -53,7 +53,6 @@ describe('objectsResolver (e2e)', () => { const objects = edges[0].node; expect(objects).toHaveProperty('id'); - expect(objects).toHaveProperty('dataSourceId'); expect(objects).toHaveProperty('nameSingular'); expect(objects).toHaveProperty('namePlural'); expect(objects).toHaveProperty('labelSingular'); diff --git a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/read-permissions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/read-permissions.integration-spec.ts index 92cff950902..d51dee61ba7 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/read-permissions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/read-permissions.integration-spec.ts @@ -146,7 +146,7 @@ describe('Field permissions restrictions', () => { `, }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -245,7 +245,7 @@ describe('Field permissions restrictions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreMemberRoleQuery); }); diff --git a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/update-permissions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/update-permissions.integration-spec.ts index 917d3af2239..02c6f65bee2 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/update-permissions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/fields-permissions/update-permissions.integration-spec.ts @@ -92,7 +92,7 @@ describe('Field update permissions restrictions', () => { `, }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -183,7 +183,7 @@ describe('Field update permissions restrictions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreMemberRoleQuery); }); diff --git a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/granular-object-records-permissions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/granular-object-records-permissions.integration-spec.ts index d855ed8487c..c91a8019818 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/granular-object-records-permissions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/granular-object-records-permissions.integration-spec.ts @@ -30,7 +30,7 @@ describe('granularObjectRecordsPermissions', () => { }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -54,7 +54,7 @@ describe('granularObjectRecordsPermissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreMemberRoleQuery); }); diff --git a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/permissions-on-relations.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/permissions-on-relations.integration-spec.ts index a97f0a6c580..14666fa25cc 100644 --- a/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/permissions-on-relations.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/object-records-permissions/permissions-on-relations.integration-spec.ts @@ -36,7 +36,7 @@ describe('permissionsOnRelations', () => { }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -90,7 +90,7 @@ describe('permissionsOnRelations', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreMemberRoleQuery); }); diff --git a/packages/twenty-server/test/integration/graphql/suites/role/object-permissions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/role/object-permissions.integration-spec.ts index d49f7068fb3..e94ada66f77 100644 --- a/packages/twenty-server/test/integration/graphql/suites/role/object-permissions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/role/object-permissions.integration-spec.ts @@ -2,7 +2,6 @@ import gql from 'graphql-tag'; import { default as request } from 'supertest'; import { createRoleOperation } from 'test/integration/graphql/utils/create-custom-role-operation-factory.util'; import { deleteRole } from 'test/integration/graphql/utils/delete-one-role.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { createUpsertObjectPermissionsOperation } from 'test/integration/graphql/utils/upsert-object-permission-operation-factory.util'; import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; @@ -62,7 +61,7 @@ describe('Object Permissions Validation', () => { canDestroyAllObjectRecords: true, }); - const response = await makeGraphqlAPIRequest(roleOperation); + const response = await makeMetadataAPIRequest(roleOperation); customRoleId = response.body.data.createOneRole.id; }); @@ -86,7 +85,7 @@ describe('Object Permissions Validation', () => { }, ]); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.errors).toBeUndefined(); expect(response.body.data.upsertObjectPermissions).toHaveLength(1); @@ -110,7 +109,7 @@ describe('Object Permissions Validation', () => { }, ]); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.errors).toBeUndefined(); expect(response.body.data.upsertObjectPermissions).toHaveLength(1); @@ -144,7 +143,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -175,7 +174,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -206,7 +205,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -238,7 +237,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -278,7 +277,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.errors).toBeUndefined(); expect(response.body.data.upsertObjectPermissions).toHaveLength(2); @@ -310,7 +309,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -339,7 +338,9 @@ describe('Object Permissions Validation', () => { canDestroyAllObjectRecords: false, }); - const response = await makeGraphqlAPIRequest(roleWithoutPermissionsQuery); + const response = await makeMetadataAPIRequest( + roleWithoutPermissionsQuery, + ); roleWithoutPermissions = response.body.data.createOneRole.id; }); @@ -362,7 +363,7 @@ describe('Object Permissions Validation', () => { ['objectMetadataId', 'canReadObjectRecords'], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.data).toBeNull(); expect(response.body.errors).toBeDefined(); @@ -386,7 +387,7 @@ describe('Object Permissions Validation', () => { ], ); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); expect(response.body.errors).toBeUndefined(); expect(response.body.data.upsertObjectPermissions).toHaveLength(1); diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/api-key-webhooks.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/api-key-webhooks.integration-spec.ts index 45fed8f6262..84db0d1a531 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/api-key-webhooks.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/api-key-webhooks.integration-spec.ts @@ -19,7 +19,7 @@ describe('api key and webhooks permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/granular-settings-permissions.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/granular-settings-permissions.integration-spec.ts index c5ea8050b9c..953a0ce1d05 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/granular-settings-permissions.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/granular-settings-permissions.integration-spec.ts @@ -50,7 +50,7 @@ describe('Granular settings permissions', () => { }; const createRoleResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(createRoleQuery); @@ -73,7 +73,7 @@ describe('Granular settings permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(upsertSettingPermissionsQuery); @@ -101,7 +101,7 @@ describe('Granular settings permissions', () => { const deleteRoleQuery = deleteOneRoleOperationFactory(customRoleId); await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(deleteRoleQuery); @@ -168,7 +168,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(updateWorkspaceQuery); @@ -194,7 +194,7 @@ describe('Granular settings permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(restoreWorkspaceQuery); }); @@ -258,7 +258,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(createRoleQuery); @@ -284,7 +284,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(inviteWorkspaceMemberQuery); @@ -310,7 +310,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(createApiKeyQuery); @@ -376,7 +376,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(upsertSecurityPermissionQuery); @@ -428,7 +428,7 @@ describe('Granular settings permissions', () => { }; const response = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(upsertReducedPermissionsQuery); diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/roles.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/roles.integration-spec.ts index 0c611b69666..e7ee2b07da3 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/roles.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/roles.integration-spec.ts @@ -18,7 +18,7 @@ async function assertPermissionDeniedForMemberWithMemberRole({ query: { query: string }; }) { await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -49,7 +49,7 @@ describe('roles permissions', () => { }; const resp = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query); @@ -84,7 +84,7 @@ describe('roles permissions', () => { }; const resp = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query); @@ -196,7 +196,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -224,7 +224,7 @@ describe('roles permissions', () => { }; const resp = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesQuery); @@ -250,7 +250,7 @@ describe('roles permissions', () => { // Act and assert await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(updateRoleQuery) .expect(200) @@ -274,7 +274,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(rollbackRoleUpdateQuery) .expect(200) @@ -316,7 +316,7 @@ describe('roles permissions', () => { }; const result = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -331,7 +331,7 @@ describe('roles permissions', () => { const deleteOneRoleQuery = deleteOneRoleOperationFactory(createdRoleId); await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(deleteOneRoleQuery); }); @@ -352,7 +352,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .then((res) => { @@ -366,7 +366,7 @@ describe('roles permissions', () => { ); await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(deleteOneRoleQuery); }); @@ -399,7 +399,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -483,7 +483,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -508,7 +508,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -581,7 +581,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -605,7 +605,7 @@ describe('roles permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/security.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/security.integration-spec.ts index 7315eb44963..e362291eebb 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/security.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/security.integration-spec.ts @@ -1,6 +1,6 @@ import { gql } from 'graphql-tag'; import request from 'supertest'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { ErrorCode } from 'src/engine/core-modules/graphql/utils/graphql-errors.util'; import { PermissionsExceptionMessage } from 'src/engine/metadata-modules/permissions/permissions.exception'; @@ -27,7 +27,7 @@ describe('Security permissions', () => { } `; - const response = await makeGraphqlAPIRequest({ query }); + const response = await makeMetadataAPIRequest({ query }); originalWorkspaceState = response.body.data.currentWorkspace; }); @@ -50,7 +50,7 @@ describe('Security permissions', () => { } `; - await makeGraphqlAPIRequest({ query: restoreQuery }); + await makeMetadataAPIRequest({ query: restoreQuery }); }); describe('security permissions', () => { @@ -68,7 +68,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -97,7 +97,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -128,7 +128,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -157,7 +157,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -188,7 +188,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -217,7 +217,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -247,7 +247,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -276,7 +276,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -309,7 +309,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -339,7 +339,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -368,7 +368,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -399,7 +399,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -428,7 +428,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -459,7 +459,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -488,7 +488,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -519,7 +519,7 @@ describe('Security permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -548,7 +548,7 @@ describe('Security permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace-invitation.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace-invitation.integration-spec.ts index 41d39223014..4a743ac2612 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace-invitation.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace-invitation.integration-spec.ts @@ -18,7 +18,7 @@ describe('workspace invitation permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -44,7 +44,7 @@ describe('workspace invitation permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -71,7 +71,7 @@ describe('workspace invitation permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -95,7 +95,7 @@ describe('workspace invitation permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace.integration-spec.ts index 62415da2e81..b3229f365fb 100644 --- a/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/settings-permissions/workspace.integration-spec.ts @@ -1,6 +1,6 @@ import gql from 'graphql-tag'; import request from 'supertest'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { BillingPlanKey } from 'src/engine/core-modules/billing/enums/billing-plan-key.enum'; import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; @@ -28,7 +28,7 @@ describe('workspace permissions', () => { } `; - const response = await makeGraphqlAPIRequest({ query }); + const response = await makeMetadataAPIRequest({ query }); originalWorkspaceState = response.body.data.currentWorkspace; }); @@ -51,7 +51,7 @@ describe('workspace permissions', () => { } `; - await makeGraphqlAPIRequest({ query: restoreQuery }); + await makeMetadataAPIRequest({ query: restoreQuery }); }); describe('workspace permissions', () => { @@ -69,7 +69,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -99,7 +99,7 @@ describe('workspace permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -128,7 +128,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -159,7 +159,7 @@ describe('workspace permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -188,7 +188,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -219,7 +219,7 @@ describe('workspace permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -248,7 +248,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -279,7 +279,7 @@ describe('workspace permissions', () => { }; return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -308,7 +308,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -345,7 +345,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -378,7 +378,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -424,7 +424,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) @@ -465,7 +465,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(queryData) .expect((res) => { @@ -498,7 +498,7 @@ describe('workspace permissions', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(queryData) .expect(200) diff --git a/packages/twenty-server/test/integration/graphql/suites/user.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/user.integration-spec.ts index 0ec6cbab4f4..a59dbc9e806 100644 --- a/packages/twenty-server/test/integration/graphql/suites/user.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/user.integration-spec.ts @@ -20,7 +20,7 @@ describe('deleteUser', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(query) .expect((res) => { @@ -45,7 +45,7 @@ describe('deleteUser', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JONY_MEMBER_ACCESS_TOKEN}`) .send(query) .expect(200) @@ -74,7 +74,7 @@ describe('deleteUser', () => { }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(enablePublicInviteLinkMutation) .expect(200) @@ -92,7 +92,7 @@ describe('deleteUser', () => { password: 'Password123!', }); - const signUpResponse = await client.post('/graphql').send(signUpMutation); + const signUpResponse = await client.post('/metadata').send(signUpMutation); expect(signUpResponse.status).toBe(200); expect(signUpResponse.body.errors).toBeUndefined(); @@ -141,7 +141,7 @@ describe('deleteUser', () => { }; const deleteResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(deleteUserFromWorkspaceMutation); @@ -169,7 +169,7 @@ describe('deleteUser', () => { }; const rolesResponse = await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(getRolesWithMembersQuery); diff --git a/packages/twenty-server/test/integration/graphql/suites/view/view-filter-group-resolver.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/view/view-filter-group-resolver.integration-spec.ts index 99efb3cc73e..309d740977d 100644 --- a/packages/twenty-server/test/integration/graphql/suites/view/view-filter-group-resolver.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/view/view-filter-group-resolver.integration-spec.ts @@ -7,7 +7,7 @@ import { assertGraphQLErrorResponse, assertGraphQLSuccessfulResponse, } from 'test/integration/graphql/utils/graphql-test-assertions.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { updateViewFilterGroupOperationFactory } from 'test/integration/graphql/utils/update-view-filter-group-operation-factory.util'; import { createViewFilterGroupData, @@ -90,7 +90,7 @@ describe('View Filter Group Resolver', () => { viewFilterGroupId: filterGroupId, }); - await makeGraphqlAPIRequest(destroyOperation); + await makeMetadataAPIRequest(destroyOperation); } createdViewFilterGroup = []; @@ -105,7 +105,7 @@ describe('View Filter Group Resolver', () => { const operation = findViewFilterGroupsOperationFactory({ viewId: testViewId, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.getCoreViewFilterGroups).toEqual([]); @@ -119,14 +119,14 @@ describe('View Filter Group Resolver', () => { data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const createdFilterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(createdFilterGroupId); const getOperation = findViewFilterGroupsOperationFactory(); - const response = await makeGraphqlAPIRequest(getOperation); + const response = await makeMetadataAPIRequest(getOperation); assertGraphQLSuccessfulResponse(response); @@ -149,7 +149,7 @@ describe('View Filter Group Resolver', () => { data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const createdFilterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; @@ -158,7 +158,7 @@ describe('View Filter Group Resolver', () => { const getOperation = findViewFilterGroupsOperationFactory({ viewId: testViewId, }); - const response = await makeGraphqlAPIRequest(getOperation); + const response = await makeMetadataAPIRequest(getOperation); assertGraphQLSuccessfulResponse(response); @@ -180,7 +180,7 @@ describe('View Filter Group Resolver', () => { const parentOperation = createViewFilterGroupOperationFactory({ data: parentData, }); - const parentResponse = await makeGraphqlAPIRequest(parentOperation); + const parentResponse = await makeMetadataAPIRequest(parentOperation); const parentId = parentResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(parentId); @@ -193,7 +193,7 @@ describe('View Filter Group Resolver', () => { data: childData, }); - const childResponse = await makeGraphqlAPIRequest(childOperation); + const childResponse = await makeMetadataAPIRequest(childOperation); const childId = childResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(childId); @@ -201,7 +201,7 @@ describe('View Filter Group Resolver', () => { const getOperation = findViewFilterGroupsOperationFactory({ viewId: testViewId, }); - const response = await makeGraphqlAPIRequest(getOperation); + const response = await makeMetadataAPIRequest(getOperation); assertGraphQLSuccessfulResponse(response); @@ -232,7 +232,7 @@ describe('View Filter Group Resolver', () => { const operation = findViewFilterGroupOperationFactory({ viewFilterGroupId: TEST_NOT_EXISTING_VIEW_FILTER_GROUP_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.getCoreViewFilterGroup).toBeNull(); @@ -245,7 +245,7 @@ describe('View Filter Group Resolver', () => { const createOperation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const filterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; @@ -254,7 +254,7 @@ describe('View Filter Group Resolver', () => { const getOperation = findViewFilterGroupOperationFactory({ viewFilterGroupId: filterGroupId, }); - const response = await makeGraphqlAPIRequest(getOperation); + const response = await makeMetadataAPIRequest(getOperation); assertGraphQLSuccessfulResponse(response); assertViewFilterGroupStructure( @@ -276,7 +276,7 @@ describe('View Filter Group Resolver', () => { const operation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); @@ -299,7 +299,7 @@ describe('View Filter Group Resolver', () => { const operation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); @@ -321,7 +321,7 @@ describe('View Filter Group Resolver', () => { const operation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); @@ -343,7 +343,7 @@ describe('View Filter Group Resolver', () => { const parentOperation = createViewFilterGroupOperationFactory({ data: parentData, }); - const parentResponse = await makeGraphqlAPIRequest(parentOperation); + const parentResponse = await makeMetadataAPIRequest(parentOperation); const parentId = parentResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(parentId); @@ -355,7 +355,7 @@ describe('View Filter Group Resolver', () => { const childOperation = createViewFilterGroupOperationFactory({ data: childData, }); - const childResponse = await makeGraphqlAPIRequest(childOperation); + const childResponse = await makeMetadataAPIRequest(childOperation); assertGraphQLSuccessfulResponse(childResponse); @@ -380,7 +380,7 @@ describe('View Filter Group Resolver', () => { const createOperation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const filterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; @@ -393,7 +393,7 @@ describe('View Filter Group Resolver', () => { viewFilterGroupId: filterGroupId, data: updateInput, }); - const response = await makeGraphqlAPIRequest(updateOperation); + const response = await makeMetadataAPIRequest(updateOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.updateCoreViewFilterGroup).toMatchObject({ @@ -409,7 +409,7 @@ describe('View Filter Group Resolver', () => { const parentOperation = createViewFilterGroupOperationFactory({ data: parentData, }); - const parentResponse = await makeGraphqlAPIRequest(parentOperation); + const parentResponse = await makeMetadataAPIRequest(parentOperation); const parentId = parentResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(parentId); @@ -420,7 +420,7 @@ describe('View Filter Group Resolver', () => { const childOperation = createViewFilterGroupOperationFactory({ data: childData, }); - const childResponse = await makeGraphqlAPIRequest(childOperation); + const childResponse = await makeMetadataAPIRequest(childOperation); const childId = childResponse.body.data.createCoreViewFilterGroup.id; createdViewFilterGroup.push(childId); @@ -432,7 +432,7 @@ describe('View Filter Group Resolver', () => { viewFilterGroupId: childId, data: updateInput, }); - const response = await makeGraphqlAPIRequest(updateOperation); + const response = await makeMetadataAPIRequest(updateOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.updateCoreViewFilterGroup).toMatchObject({ @@ -449,7 +449,7 @@ describe('View Filter Group Resolver', () => { viewFilterGroupId: TEST_NOT_EXISTING_VIEW_FILTER_GROUP_ID, data: updateInput, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, @@ -469,7 +469,7 @@ describe('View Filter Group Resolver', () => { const createOperation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const filterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; @@ -478,7 +478,7 @@ describe('View Filter Group Resolver', () => { const deleteOperation = deleteViewFilterGroupOperationFactory({ viewFilterGroupId: filterGroupId, }); - const response = await makeGraphqlAPIRequest(deleteOperation); + const response = await makeMetadataAPIRequest(deleteOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.deleteCoreViewFilterGroup).toBe(true); @@ -486,7 +486,7 @@ describe('View Filter Group Resolver', () => { const getOperation = findViewFilterGroupOperationFactory({ viewFilterGroupId: filterGroupId, }); - const getResponse = await makeGraphqlAPIRequest(getOperation); + const getResponse = await makeMetadataAPIRequest(getOperation); expect(getResponse.body.data.getCoreViewFilterGroup).toBeNull(); }); @@ -495,7 +495,7 @@ describe('View Filter Group Resolver', () => { const operation = deleteViewFilterGroupOperationFactory({ viewFilterGroupId: TEST_NOT_EXISTING_VIEW_FILTER_GROUP_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, @@ -515,7 +515,7 @@ describe('View Filter Group Resolver', () => { const createOperation = createViewFilterGroupOperationFactory({ data: filterGroupData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const filterGroupId = createResponse.body.data.createCoreViewFilterGroup.id; @@ -524,7 +524,7 @@ describe('View Filter Group Resolver', () => { const destroyOperation = destroyViewFilterGroupOperationFactory({ viewFilterGroupId: filterGroupId, }); - const response = await makeGraphqlAPIRequest(destroyOperation); + const response = await makeMetadataAPIRequest(destroyOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.destroyCoreViewFilterGroup).toBe(true); @@ -534,7 +534,7 @@ describe('View Filter Group Resolver', () => { const operation = destroyViewFilterGroupOperationFactory({ viewFilterGroupId: TEST_NOT_EXISTING_VIEW_FILTER_GROUP_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, diff --git a/packages/twenty-server/test/integration/graphql/suites/view/view-sort-resolver.integration-spec.ts b/packages/twenty-server/test/integration/graphql/suites/view/view-sort-resolver.integration-spec.ts index 0c0249776c7..04b03882cd2 100644 --- a/packages/twenty-server/test/integration/graphql/suites/view/view-sort-resolver.integration-spec.ts +++ b/packages/twenty-server/test/integration/graphql/suites/view/view-sort-resolver.integration-spec.ts @@ -6,7 +6,7 @@ import { assertGraphQLErrorResponse, assertGraphQLSuccessfulResponse, } from 'test/integration/graphql/utils/graphql-test-assertions.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { updateViewSortOperationFactory } from 'test/integration/graphql/utils/update-view-sort-operation-factory.util'; import { createViewSortData, @@ -106,7 +106,7 @@ describe('View Sort Resolver', () => { describe('getCoreViewSorts', () => { it('should return empty array when no view sorts exist', async () => { const operation = findViewSortsOperationFactory({ viewId: testViewId }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.getCoreViewSorts).toEqual([]); @@ -121,12 +121,12 @@ describe('View Sort Resolver', () => { data: sortData, }); - await makeGraphqlAPIRequest(createOperation); + await makeMetadataAPIRequest(createOperation); const getOperation = findViewSortsOperationFactory({ viewId: testViewId, }); - const response = await makeGraphqlAPIRequest(getOperation); + const response = await makeMetadataAPIRequest(getOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.getCoreViewSorts).toHaveLength(1); @@ -146,7 +146,7 @@ describe('View Sort Resolver', () => { }); const operation = createViewSortOperationFactory({ data: sortData }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); assertViewSortStructure(response.body.data.createCoreViewSort, { @@ -163,7 +163,7 @@ describe('View Sort Resolver', () => { }); const operation = createViewSortOperationFactory({ data: sortData }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLSuccessfulResponse(response); assertViewSortStructure(response.body.data.createCoreViewSort, { @@ -183,7 +183,7 @@ describe('View Sort Resolver', () => { const createOperation = createViewSortOperationFactory({ data: sortData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const viewSort = createResponse.body.data.createCoreViewSort; const updateInput = updateViewSortData({ @@ -193,7 +193,7 @@ describe('View Sort Resolver', () => { viewSortId: viewSort.id, data: updateInput, }); - const response = await makeGraphqlAPIRequest(updateOperation); + const response = await makeMetadataAPIRequest(updateOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.updateCoreViewSort).toMatchObject({ @@ -206,7 +206,7 @@ describe('View Sort Resolver', () => { const operation = updateViewSortOperationFactory({ viewSortId: TEST_NOT_EXISTING_VIEW_SORT_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, @@ -227,13 +227,13 @@ describe('View Sort Resolver', () => { const createOperation = createViewSortOperationFactory({ data: sortData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const viewSort = createResponse.body.data.createCoreViewSort; const deleteOperation = deleteViewSortOperationFactory({ viewSortId: viewSort.id, }); - const response = await makeGraphqlAPIRequest(deleteOperation); + const response = await makeMetadataAPIRequest(deleteOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.deleteCoreViewSort).toBe(true); @@ -243,7 +243,7 @@ describe('View Sort Resolver', () => { const operation = deleteViewSortOperationFactory({ viewSortId: TEST_NOT_EXISTING_VIEW_SORT_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, @@ -264,13 +264,13 @@ describe('View Sort Resolver', () => { const createOperation = createViewSortOperationFactory({ data: sortData, }); - const createResponse = await makeGraphqlAPIRequest(createOperation); + const createResponse = await makeMetadataAPIRequest(createOperation); const viewSort = createResponse.body.data.createCoreViewSort; const destroyOperation = destroyViewSortOperationFactory({ viewSortId: viewSort.id, }); - const response = await makeGraphqlAPIRequest(destroyOperation); + const response = await makeMetadataAPIRequest(destroyOperation); assertGraphQLSuccessfulResponse(response); expect(response.body.data.destroyCoreViewSort).toBe(true); @@ -280,7 +280,7 @@ describe('View Sort Resolver', () => { const operation = destroyViewSortOperationFactory({ viewSortId: TEST_NOT_EXISTING_VIEW_SORT_ID, }); - const response = await makeGraphqlAPIRequest(operation); + const response = await makeMetadataAPIRequest(operation); assertGraphQLErrorResponse( response, diff --git a/packages/twenty-server/test/integration/graphql/utils/activate-workspace.util.ts b/packages/twenty-server/test/integration/graphql/utils/activate-workspace.util.ts index 0b70adc8464..4f0e2ce7a28 100644 --- a/packages/twenty-server/test/integration/graphql/utils/activate-workspace.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/activate-workspace.util.ts @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity'; @@ -32,7 +32,7 @@ export const activateWorkspace = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: mutation, variables: { diff --git a/packages/twenty-server/test/integration/graphql/utils/create-custom-role-with-object-permissions.util.ts b/packages/twenty-server/test/integration/graphql/utils/create-custom-role-with-object-permissions.util.ts index b8617472f0d..1f95166d56d 100644 --- a/packages/twenty-server/test/integration/graphql/utils/create-custom-role-with-object-permissions.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/create-custom-role-with-object-permissions.util.ts @@ -1,5 +1,4 @@ import gql from 'graphql-tag'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; export const createCustomRoleWithObjectPermissions = async (options: { @@ -31,7 +30,7 @@ export const createCustomRoleWithObjectPermissions = async (options: { `, }; - const response = await makeGraphqlAPIRequest(createRoleOperation); + const response = await makeMetadataAPIRequest(createRoleOperation); expect(response.body.errors).toBeUndefined(); expect(response.body.data.createOneRole).toBeDefined(); @@ -141,7 +140,7 @@ export const createCustomRoleWithObjectPermissions = async (options: { }, }; - await makeGraphqlAPIRequest(upsertObjectPermissionsOperation); + await makeMetadataAPIRequest(upsertObjectPermissionsOperation); } return { diff --git a/packages/twenty-server/test/integration/graphql/utils/delete-one-role.util.ts b/packages/twenty-server/test/integration/graphql/utils/delete-one-role.util.ts index 25b14621d79..6556d0ba0d6 100644 --- a/packages/twenty-server/test/integration/graphql/utils/delete-one-role.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/delete-one-role.util.ts @@ -4,7 +4,7 @@ export const deleteRole = async (client: any, roleId: string) => { const deleteRoleQuery = deleteOneRoleOperationFactory(roleId); await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(deleteRoleQuery); }; diff --git a/packages/twenty-server/test/integration/graphql/utils/delete-user.util.ts b/packages/twenty-server/test/integration/graphql/utils/delete-user.util.ts index 876bebf7e5f..b2a400a64e4 100644 --- a/packages/twenty-server/test/integration/graphql/utils/delete-user.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/delete-user.util.ts @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type UserEntity } from 'src/engine/core-modules/user/user.entity'; @@ -29,7 +29,7 @@ export const deleteUser = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: mutation, variables: {}, diff --git a/packages/twenty-server/test/integration/graphql/utils/find-many-applications.util.ts b/packages/twenty-server/test/integration/graphql/utils/find-many-applications.util.ts index eddb2c55c4c..fd2501a8ad5 100644 --- a/packages/twenty-server/test/integration/graphql/utils/find-many-applications.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/find-many-applications.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; @@ -26,7 +26,7 @@ export const findManyApplications = async ({ }): CommonResponseBody<{ findManyApplications: ApplicationDTO[]; }> => { - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: gql` query FindManyApplications { diff --git a/packages/twenty-server/test/integration/graphql/utils/get-auth-tokens-from-login-token.util.ts b/packages/twenty-server/test/integration/graphql/utils/get-auth-tokens-from-login-token.util.ts index 8449a08e61a..05f984e8257 100644 --- a/packages/twenty-server/test/integration/graphql/utils/get-auth-tokens-from-login-token.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/get-auth-tokens-from-login-token.util.ts @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type AuthTokens } from 'src/engine/core-modules/auth/dto/auth-tokens.dto'; @@ -39,7 +39,7 @@ export const getAuthTokensFromLoginToken = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: mutation, variables: { diff --git a/packages/twenty-server/test/integration/graphql/utils/get-current-user.util.ts b/packages/twenty-server/test/integration/graphql/utils/get-current-user.util.ts index b014138438f..b95fca3dcb6 100644 --- a/packages/twenty-server/test/integration/graphql/utils/get-current-user.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/get-current-user.util.ts @@ -1,5 +1,5 @@ import gql from 'graphql-tag'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; @@ -49,7 +49,7 @@ export const getCurrentUser = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query, variables: {}, diff --git a/packages/twenty-server/test/integration/graphql/utils/sign-up-in-new-workspace.util.ts b/packages/twenty-server/test/integration/graphql/utils/sign-up-in-new-workspace.util.ts index 32c3d535310..34c34a63493 100644 --- a/packages/twenty-server/test/integration/graphql/utils/sign-up-in-new-workspace.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/sign-up-in-new-workspace.util.ts @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type SignUpOutput } from 'src/engine/core-modules/auth/dto/sign-up.output'; @@ -35,7 +35,7 @@ export const signUpInNewWorkspace = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: mutation, variables: {}, diff --git a/packages/twenty-server/test/integration/graphql/utils/sign-up.util.ts b/packages/twenty-server/test/integration/graphql/utils/sign-up.util.ts index fb019579262..917769acb84 100644 --- a/packages/twenty-server/test/integration/graphql/utils/sign-up.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/sign-up.util.ts @@ -2,7 +2,7 @@ import gql from 'graphql-tag'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type AvailableWorkspacesAndAccessTokensOutput } from 'src/engine/core-modules/auth/dto/available-workspaces-and-access-tokens.output'; import { type UserCredentialsInput } from 'src/engine/core-modules/auth/dto/user-credentials.input'; @@ -59,7 +59,7 @@ export const signUp = async ({ } `; - const response = await makeGraphqlAPIRequest( + const response = await makeMetadataAPIRequest( { query: mutation, variables: { diff --git a/packages/twenty-server/test/integration/graphql/utils/update-workspace-member-role.util.ts b/packages/twenty-server/test/integration/graphql/utils/update-workspace-member-role.util.ts index c12a517168f..1101c14d4c3 100644 --- a/packages/twenty-server/test/integration/graphql/utils/update-workspace-member-role.util.ts +++ b/packages/twenty-server/test/integration/graphql/utils/update-workspace-member-role.util.ts @@ -25,7 +25,7 @@ export const updateWorkspaceMemberRole = async ({ }; await client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send(updateMemberRoleQuery); }; diff --git a/packages/twenty-server/test/integration/metadata/suites/application/utils/install-application.util.ts b/packages/twenty-server/test/integration/metadata/suites/application/utils/install-application.util.ts index ee9bf566ad0..314643d2fd3 100644 --- a/packages/twenty-server/test/integration/metadata/suites/application/utils/install-application.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/application/utils/install-application.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type InstallApplicationFactoryInput, installApplicationQueryFactory, @@ -20,7 +20,7 @@ export const installApplication = async ({ }> => { const graphqlOperation = installApplicationQueryFactory({ input }); - const response = await makeGraphqlAPIRequest(graphqlOperation, token); + const response = await makeMetadataAPIRequest(graphqlOperation, token); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/metadata/suites/dashboard/utils/duplicate-one-dashboard.util.ts b/packages/twenty-server/test/integration/metadata/suites/dashboard/utils/duplicate-one-dashboard.util.ts index f7b19782267..e5218113d0d 100644 --- a/packages/twenty-server/test/integration/metadata/suites/dashboard/utils/duplicate-one-dashboard.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/dashboard/utils/duplicate-one-dashboard.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type CommonResponseBody } from 'test/integration/metadata/types/common-response-body.type'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; @@ -28,7 +28,7 @@ export const duplicateOneDashboard = async ({ gqlFields, }); - const response = await makeGraphqlAPIRequest(graphqlOperation, token); + const response = await makeMetadataAPIRequest(graphqlOperation, token); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/metadata/suites/field-metadata/utils/delete-one-field-metadata.util.ts b/packages/twenty-server/test/integration/metadata/suites/field-metadata/utils/delete-one-field-metadata.util.ts index 8ebad2248b9..bd934ace6ac 100644 --- a/packages/twenty-server/test/integration/metadata/suites/field-metadata/utils/delete-one-field-metadata.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/field-metadata/utils/delete-one-field-metadata.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type DeleteOneFieldFactoryInput, deleteOneFieldMetadataQueryFactory, @@ -17,7 +17,7 @@ export const deleteOneFieldMetadata = async ({ gqlFields, }); - const response = await makeGraphqlAPIRequest(graphqlOperation); + const response = await makeMetadataAPIRequest(graphqlOperation); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util.ts b/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util.ts index 5daeec4c497..85a15039b51 100644 --- a/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/delete-one-object-metadata.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type DeleteOneObjectFactoryInput, deleteOneObjectMetadataQueryFactory, @@ -17,7 +17,7 @@ export const deleteOneObjectMetadata = async ({ gqlFields, }); - const response = await makeGraphqlAPIRequest(graphqlOperation); + const response = await makeMetadataAPIRequest(graphqlOperation); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util.ts b/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util.ts index 08dae47bbf4..fb11689cfd6 100644 --- a/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/object-metadata/utils/update-one-object-metadata.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type UpdateOneObjectFactoryInput, updateOneObjectMetadataQueryFactory, @@ -22,7 +22,7 @@ export const updateOneObjectMetadata = async ({ gqlFields, }); - const response = await makeGraphqlAPIRequest(graphqlOperation); + const response = await makeMetadataAPIRequest(graphqlOperation); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/metadata/suites/role/utils/update-one-role.util.ts b/packages/twenty-server/test/integration/metadata/suites/role/utils/update-one-role.util.ts index 45329bf2c68..22befbfd4bf 100644 --- a/packages/twenty-server/test/integration/metadata/suites/role/utils/update-one-role.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/role/utils/update-one-role.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { type UpdateOneRoleFactoryInput, updateOneRoleQueryFactory, @@ -22,7 +22,7 @@ export const updateOneRole = async ({ gqlFields, }); - const response = await makeGraphqlAPIRequest(graphqlOperation); + const response = await makeMetadataAPIRequest(graphqlOperation); if (expectToFail === true) { warnIfNoErrorButExpectedToFail({ diff --git a/packages/twenty-server/test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util.ts b/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util.ts similarity index 90% rename from packages/twenty-server/test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util.ts rename to packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util.ts index 7b87298d089..ae9e3cfb304 100644 --- a/packages/twenty-server/test/integration/graphql/utils/make-graphql-api-request-with-file-upload.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request-with-file-upload.util.ts @@ -14,14 +14,14 @@ type FileAttachment = { contentType: string; }; -export const makeGraphqlAPIRequestWithFileUpload = ( +export const makeMetadataAPIRequestWithFileUpload = ( graphqlOperation: FileUploadOperation, fileAttachment: FileAttachment, token: string | undefined = APPLE_JANE_ADMIN_ACCESS_TOKEN, ) => { const client = request(`http://localhost:${APP_PORT}`); - const clientInstance = client.post('/graphql'); + const clientInstance = client.post('/metadata'); if (isDefined(token)) { clientInstance.set('Authorization', `Bearer ${token}`); diff --git a/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request.util.ts b/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request.util.ts index b60d8d5ba79..9741608bba7 100644 --- a/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/utils/make-metadata-api-request.util.ts @@ -1,5 +1,6 @@ import { type ASTNode, print } from 'graphql'; import request from 'supertest'; +import { isDefined } from 'twenty-shared/utils'; type GraphqlOperation = { query: ASTNode; @@ -8,15 +9,18 @@ type GraphqlOperation = { export const makeMetadataAPIRequest = ( graphqlOperation: GraphqlOperation, - token: string = APPLE_JANE_ADMIN_ACCESS_TOKEN, + token: string | undefined = APPLE_JANE_ADMIN_ACCESS_TOKEN, ) => { const client = request(`http://localhost:${APP_PORT}`); - return client - .post('/metadata') - .set('Authorization', `Bearer ${token}`) - .send({ - query: print(graphqlOperation.query), - variables: graphqlOperation.variables || {}, - }); + const clientInstance = client.post('/metadata'); + + if (isDefined(token)) { + clientInstance.set('Authorization', `Bearer ${token}`); + } + + return clientInstance.send({ + query: print(graphqlOperation.query), + variables: graphqlOperation.variables || {}, + }); }; diff --git a/packages/twenty-server/test/integration/metadata/suites/utils/update-feature-flag.util.ts b/packages/twenty-server/test/integration/metadata/suites/utils/update-feature-flag.util.ts index c698ea7e9e2..9a5f46f1968 100644 --- a/packages/twenty-server/test/integration/metadata/suites/utils/update-feature-flag.util.ts +++ b/packages/twenty-server/test/integration/metadata/suites/utils/update-feature-flag.util.ts @@ -1,4 +1,4 @@ -import { makeGraphqlAPIRequest } from 'test/integration/graphql/utils/make-graphql-api-request.util'; +import { makeMetadataAPIRequest } from 'test/integration/metadata/suites/utils/make-metadata-api-request.util'; import { updateFeatureFlagFactory } from 'test/integration/graphql/utils/update-feature-flag-factory.util'; import { warnIfErrorButNotExpectedToFail } from 'test/integration/metadata/utils/warn-if-error-but-not-expected-to-fail.util'; import { warnIfNoErrorButExpectedToFail } from 'test/integration/metadata/utils/warn-if-no-error-but-expected-to-fail.util'; @@ -23,7 +23,7 @@ export const updateFeatureFlag = async ({ value, ); - const response = await makeGraphqlAPIRequest(enablePermissionsQuery); + const response = await makeMetadataAPIRequest(enablePermissionsQuery); if (expectToFail === false) { warnIfErrorButNotExpectedToFail({ diff --git a/packages/twenty-server/test/integration/twenty-config/utils/make-admin-panel-api-request.util.ts b/packages/twenty-server/test/integration/twenty-config/utils/make-admin-panel-api-request.util.ts index 4a28e92fdb5..1183b965b58 100644 --- a/packages/twenty-server/test/integration/twenty-config/utils/make-admin-panel-api-request.util.ts +++ b/packages/twenty-server/test/integration/twenty-config/utils/make-admin-panel-api-request.util.ts @@ -14,7 +14,7 @@ export const makeAdminPanelAPIRequest = ( const client = request(`http://localhost:${APP_PORT}`); return client - .post('/graphql') + .post('/metadata') .set('Authorization', `Bearer ${APPLE_JANE_ADMIN_ACCESS_TOKEN}`) .send({ query: print(graphqlOperation.query), diff --git a/packages/twenty-server/test/integration/twenty-config/utils/make-unauthenticated-api-request.util.ts b/packages/twenty-server/test/integration/twenty-config/utils/make-unauthenticated-api-request.util.ts index 14a89d8f85d..f52b397202a 100644 --- a/packages/twenty-server/test/integration/twenty-config/utils/make-unauthenticated-api-request.util.ts +++ b/packages/twenty-server/test/integration/twenty-config/utils/make-unauthenticated-api-request.util.ts @@ -4,7 +4,7 @@ export const makeUnauthenticatedAPIRequest = async (query: string) => { const client = request(`http://localhost:${APP_PORT}`); return client - .post('/graphql') + .post('/metadata') .send({ query, }) diff --git a/yarn.lock b/yarn.lock index 6fa1fd60979..f384c08df46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11353,7 +11353,7 @@ __metadata: "@nestjs/graphql@patch:@nestjs/graphql@12.1.1#./patches/@nestjs+graphql+12.1.1.patch::locator=twenty-server%40workspace%3Apackages%2Ftwenty-server": version: 12.1.1 - resolution: "@nestjs/graphql@patch:@nestjs/graphql@npm%3A12.1.1#./patches/@nestjs+graphql+12.1.1.patch::version=12.1.1&hash=214dda&locator=twenty-server%40workspace%3Apackages%2Ftwenty-server" + resolution: "@nestjs/graphql@patch:@nestjs/graphql@npm%3A12.1.1#./patches/@nestjs+graphql+12.1.1.patch::version=12.1.1&hash=234fda&locator=twenty-server%40workspace%3Apackages%2Ftwenty-server" dependencies: "@graphql-tools/merge": "npm:9.0.1" "@graphql-tools/schema": "npm:10.0.2" @@ -11387,7 +11387,7 @@ __metadata: optional: true ts-morph: optional: true - checksum: 10c0/eabde73e30747ea5d6ee33912516def4c87bc14adfb51ec7e9a037faa1d5c5446211774f6765686da778b17e37d72485d561c51f6e70a86562415b0f590f20d1 + checksum: 10c0/f17193b0e2a324a1de74813d66eb3473d359f7779b30cf92b9ed5a3f9fb557612306a3ebbbe8f48481a3e95930785207a1b51bf0fdb698c8b83a608112380af9 languageName: node linkType: hard