From 35d6b99f0d626ca337e60bff5e95dfea10a33f2d Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Thu, 7 Aug 2025 20:14:05 +0100 Subject: [PATCH 1/3] fix(fe): replace nested loops in filter components --- .../components/viewer/compare-changes/ObjectGroup.vue | 3 ++- .../components/viewer/explorer/StringFilterItem.vue | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/frontend-2/components/viewer/compare-changes/ObjectGroup.vue b/packages/frontend-2/components/viewer/compare-changes/ObjectGroup.vue index 3ac25076a..152606314 100644 --- a/packages/frontend-2/components/viewer/compare-changes/ObjectGroup.vue +++ b/packages/frontend-2/components/viewer/compare-changes/ObjectGroup.vue @@ -46,7 +46,8 @@ const color = computed(() => { const isSelected = computed(() => { const selObjsIds = selectedObjects.value.map((o) => o.id as string) - return selObjsIds.some((id: string) => props.objectIds.includes(id)) + const objectIdsSet = new Set(props.objectIds) + return selObjsIds.some((id: string) => objectIdsSet.has(id)) }) const objectCount = computed(() => { diff --git a/packages/frontend-2/components/viewer/explorer/StringFilterItem.vue b/packages/frontend-2/components/viewer/explorer/StringFilterItem.vue index ed403e827..2b9053b35 100644 --- a/packages/frontend-2/components/viewer/explorer/StringFilterItem.vue +++ b/packages/frontend-2/components/viewer/explorer/StringFilterItem.vue @@ -101,8 +101,10 @@ const isSelected = computed(() => hasIntersection(objectIds.value, props.item.id const availableTargetIds = computed(() => { let targets = props.item.ids - if (isolatedObjectIds.value.length) - targets = props.item.ids.filter((id) => isolatedObjectIds.value.includes(id)) + if (isolatedObjectIds.value.length) { + const isolatedSet = new Set(isolatedObjectIds.value) + targets = props.item.ids.filter((id) => isolatedSet.has(id)) + } return targets }) @@ -121,7 +123,8 @@ const isHidden = computed(() => { const isIsolated = computed(() => { if (!isolatedObjectIds.value.length) return true const ids = props.item.ids - return isolatedObjectIds.value.some((id) => ids.includes(id)) + const isolatedSet = new Set(isolatedObjectIds.value) + return ids.some((id) => isolatedSet.has(id)) }) const color = computed(() => { From f87edcb50f5ed1e7b89ce16c4310f6686bfd4902 Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Fri, 8 Aug 2025 13:27:15 +0300 Subject: [PATCH 2/3] feat: saved view update dialog (#5196) * view update BE foundation * WIP update service call * a bunch of tests * WIP edit view dialog * fix for auto submit * frontend works --- .../components/form/select/SavedViewGroup.vue | 116 ++++++ .../components/form/select/SeatType.vue | 1 - .../viewer/saved-views/panel/View.vue | 53 ++- .../saved-views/panel/view/EditDialog.vue | 169 ++++++++ .../lib/common/generated/gql/gql.ts | 36 +- .../lib/common/generated/gql/graphql.ts | 77 +++- .../frontend-2/lib/common/helpers/graphql.ts | 73 +++- .../composables/savedViews/management.ts | 205 ++++++---- .../lib/viewer/helpers/savedViews/cache.ts | 138 +++++++ packages/frontend-2/utils/globals.ts | 2 + .../assets/viewer/typedefs/savedViews.graphql | 37 ++ .../modules/core/graph/generated/graphql.ts | 41 ++ packages/server/modules/core/loaders.ts | 18 +- .../viewer/domain/operations/savedViews.ts | 36 +- .../modules/viewer/errors/savedViews.ts | 6 + .../viewer/graph/resolvers/savedViews.ts | 61 ++- .../modules/viewer/helpers/savedViews.ts | 9 +- .../repositories/dataLoaders/savedViews.ts | 32 ++ .../modules/viewer/repositories/savedViews.ts | 20 +- .../viewer/services/savedViewsManagement.ts | 266 ++++++++++-- .../modules/viewer/tests/helpers/graphql.ts | 14 + .../integration/savedViewsCrud.graph.spec.ts | 379 ++++++++++++++++-- packages/shared/src/viewer/helpers/route.ts | 16 +- .../src/components/form/RadioGroup.vue | 37 +- .../src/helpers/common/components.ts | 10 + packages/ui-components/src/lib.ts | 2 + 26 files changed, 1620 insertions(+), 234 deletions(-) create mode 100644 packages/frontend-2/components/form/select/SavedViewGroup.vue create mode 100644 packages/frontend-2/components/viewer/saved-views/panel/view/EditDialog.vue create mode 100644 packages/frontend-2/lib/viewer/helpers/savedViews/cache.ts create mode 100644 packages/server/modules/viewer/repositories/dataLoaders/savedViews.ts diff --git a/packages/frontend-2/components/form/select/SavedViewGroup.vue b/packages/frontend-2/components/form/select/SavedViewGroup.vue new file mode 100644 index 000000000..3b797fe29 --- /dev/null +++ b/packages/frontend-2/components/form/select/SavedViewGroup.vue @@ -0,0 +1,116 @@ + + diff --git a/packages/frontend-2/components/form/select/SeatType.vue b/packages/frontend-2/components/form/select/SeatType.vue index c6d778e37..fbde185c7 100644 --- a/packages/frontend-2/components/form/select/SeatType.vue +++ b/packages/frontend-2/components/form/select/SeatType.vue @@ -1,5 +1,4 @@ diff --git a/packages/frontend-2/lib/common/generated/gql/gql.ts b/packages/frontend-2/lib/common/generated/gql/gql.ts index 9d4d783f2..a9e56fa7f 100644 --- a/packages/frontend-2/lib/common/generated/gql/gql.ts +++ b/packages/frontend-2/lib/common/generated/gql/gql.ts @@ -44,6 +44,8 @@ type Documents = { "\n query DashboardSidebar {\n activeUser {\n id\n activeWorkspace {\n id\n role\n }\n }\n }\n": typeof types.DashboardSidebarDocument, "\n fragment FormSelectModels_Model on Model {\n id\n name\n }\n": typeof types.FormSelectModels_ModelFragmentDoc, "\n fragment FormSelectProjects_Project on Project {\n id\n name\n }\n": typeof types.FormSelectProjects_ProjectFragmentDoc, + "\n fragment FormSelectSavedViewGroup_SavedViewGroup on SavedViewGroup {\n id\n title\n isUngroupedViewsGroup\n }\n": typeof types.FormSelectSavedViewGroup_SavedViewGroupFragmentDoc, + "\n query FormSelectSavedViewGroup_SavedViewGroups(\n $projectId: String!\n $input: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n savedViewGroups(input: $input) {\n items {\n id\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n totalCount\n cursor\n }\n }\n }\n": typeof types.FormSelectSavedViewGroup_SavedViewGroupsDocument, "\n fragment FormUsersSelectItem on LimitedUser {\n id\n name\n avatar\n }\n": typeof types.FormUsersSelectItemFragmentDoc, "\n fragment HeaderWorkspaceSwitcherWorkspaceListItem_Workspace on Workspace {\n id\n name\n logo\n role\n slug\n creationState {\n completed\n }\n plan {\n name\n }\n }\n": typeof types.HeaderWorkspaceSwitcherWorkspaceListItem_WorkspaceFragmentDoc, "\n fragment WorkspaceSwitcherActiveWorkspace_LimitedWorkspace on LimitedWorkspace {\n id\n name\n logo\n slug\n role\n }\n": typeof types.WorkspaceSwitcherActiveWorkspace_LimitedWorkspaceFragmentDoc, @@ -166,9 +168,10 @@ type Documents = { "\n fragment ViewerResourcesPersonalLimitAlert_Project on Project {\n id\n ...WorkspaceMoveProject_Project\n }\n": typeof types.ViewerResourcesPersonalLimitAlert_ProjectFragmentDoc, "\n fragment ViewerResourcesWorkspaceLimitAlert_Workspace on Workspace {\n id\n slug\n }\n": typeof types.ViewerResourcesWorkspaceLimitAlert_WorkspaceFragmentDoc, "\n fragment ViewerSavedViewsPanel_Project on Project {\n id\n permissions {\n canCreateSavedView {\n ...FullPermissionCheckResult\n }\n }\n }\n": typeof types.ViewerSavedViewsPanel_ProjectFragmentDoc, - "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n }\n": typeof types.ViewerSavedViewsPanelView_SavedViewFragmentDoc, + "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n ...ViewerSavedViewsPanelViewEditDialog_SavedView\n }\n": typeof types.ViewerSavedViewsPanelView_SavedViewFragmentDoc, "\n fragment ViewerSavedViewsPanelViews_Project on Project {\n id\n savedViewGroups(input: $savedViewGroupsInput) {\n totalCount\n cursor\n items {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n": typeof types.ViewerSavedViewsPanelViews_ProjectFragmentDoc, "\n query ViewerSavedViewsPanelViews_Groups(\n $projectId: String!\n $savedViewGroupsInput: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n ...ViewerSavedViewsPanelViews_Project\n }\n }\n": typeof types.ViewerSavedViewsPanelViews_GroupsDocument, + "\n fragment ViewerSavedViewsPanelViewEditDialog_SavedView on SavedView {\n id\n name\n description\n visibility\n group {\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n ...UseUpdateSavedView_SavedView\n }\n": typeof types.ViewerSavedViewsPanelViewEditDialog_SavedViewFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroup_SavedViewGroup on SavedViewGroup {\n id\n isUngroupedViewsGroup\n ...ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup\n }\n": typeof types.ViewerSavedViewsPanelViewsGroup_SavedViewGroupFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroup_SavedViewGroup_Paginated on SavedViewGroup {\n id\n views(input: $savedViewsInput) {\n cursor\n totalCount\n items {\n id\n ...ViewerSavedViewsPanelView_SavedView\n }\n }\n }\n": typeof types.ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup on SavedViewGroup {\n id\n title\n }\n": typeof types.ViewerSavedViewsPanelViewsGroupInner_SavedViewGroupFragmentDoc, @@ -412,6 +415,8 @@ type Documents = { "\n mutation CreateSavedView($input: CreateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n createView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n": typeof types.CreateSavedViewDocument, "\n mutation DeleteSavedView($input: DeleteSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n deleteView(input: $input)\n }\n }\n }\n": typeof types.DeleteSavedViewDocument, "\n fragment UseDeleteSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n": typeof types.UseDeleteSavedView_SavedViewFragmentDoc, + "\n mutation UpdateSavedView($input: UpdateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n updateView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n": typeof types.UpdateSavedViewDocument, + "\n fragment UseUpdateSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n": typeof types.UseUpdateSavedView_SavedViewFragmentDoc, "\n fragment UseViewerSavedViewSetup_SavedView on SavedView {\n id\n viewerState\n }\n": typeof types.UseViewerSavedViewSetup_SavedViewFragmentDoc, "\n fragment ViewerCommentThread on Comment {\n ...ViewerCommentsListItem\n ...ViewerCommentBubblesData\n ...ViewerCommentsReplyItem\n ...ViewerCommentThreadData\n }\n": typeof types.ViewerCommentThreadFragmentDoc, "\n fragment ViewerCommentsReplyItem on Comment {\n id\n archived\n rawText\n text {\n doc\n }\n author {\n ...LimitedUserAvatar\n }\n createdAt\n ...ThreadCommentAttachment\n }\n": typeof types.ViewerCommentsReplyItemFragmentDoc, @@ -540,6 +545,8 @@ const documents: Documents = { "\n query DashboardSidebar {\n activeUser {\n id\n activeWorkspace {\n id\n role\n }\n }\n }\n": types.DashboardSidebarDocument, "\n fragment FormSelectModels_Model on Model {\n id\n name\n }\n": types.FormSelectModels_ModelFragmentDoc, "\n fragment FormSelectProjects_Project on Project {\n id\n name\n }\n": types.FormSelectProjects_ProjectFragmentDoc, + "\n fragment FormSelectSavedViewGroup_SavedViewGroup on SavedViewGroup {\n id\n title\n isUngroupedViewsGroup\n }\n": types.FormSelectSavedViewGroup_SavedViewGroupFragmentDoc, + "\n query FormSelectSavedViewGroup_SavedViewGroups(\n $projectId: String!\n $input: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n savedViewGroups(input: $input) {\n items {\n id\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n totalCount\n cursor\n }\n }\n }\n": types.FormSelectSavedViewGroup_SavedViewGroupsDocument, "\n fragment FormUsersSelectItem on LimitedUser {\n id\n name\n avatar\n }\n": types.FormUsersSelectItemFragmentDoc, "\n fragment HeaderWorkspaceSwitcherWorkspaceListItem_Workspace on Workspace {\n id\n name\n logo\n role\n slug\n creationState {\n completed\n }\n plan {\n name\n }\n }\n": types.HeaderWorkspaceSwitcherWorkspaceListItem_WorkspaceFragmentDoc, "\n fragment WorkspaceSwitcherActiveWorkspace_LimitedWorkspace on LimitedWorkspace {\n id\n name\n logo\n slug\n role\n }\n": types.WorkspaceSwitcherActiveWorkspace_LimitedWorkspaceFragmentDoc, @@ -662,9 +669,10 @@ const documents: Documents = { "\n fragment ViewerResourcesPersonalLimitAlert_Project on Project {\n id\n ...WorkspaceMoveProject_Project\n }\n": types.ViewerResourcesPersonalLimitAlert_ProjectFragmentDoc, "\n fragment ViewerResourcesWorkspaceLimitAlert_Workspace on Workspace {\n id\n slug\n }\n": types.ViewerResourcesWorkspaceLimitAlert_WorkspaceFragmentDoc, "\n fragment ViewerSavedViewsPanel_Project on Project {\n id\n permissions {\n canCreateSavedView {\n ...FullPermissionCheckResult\n }\n }\n }\n": types.ViewerSavedViewsPanel_ProjectFragmentDoc, - "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n }\n": types.ViewerSavedViewsPanelView_SavedViewFragmentDoc, + "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n ...ViewerSavedViewsPanelViewEditDialog_SavedView\n }\n": types.ViewerSavedViewsPanelView_SavedViewFragmentDoc, "\n fragment ViewerSavedViewsPanelViews_Project on Project {\n id\n savedViewGroups(input: $savedViewGroupsInput) {\n totalCount\n cursor\n items {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n": types.ViewerSavedViewsPanelViews_ProjectFragmentDoc, "\n query ViewerSavedViewsPanelViews_Groups(\n $projectId: String!\n $savedViewGroupsInput: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n ...ViewerSavedViewsPanelViews_Project\n }\n }\n": types.ViewerSavedViewsPanelViews_GroupsDocument, + "\n fragment ViewerSavedViewsPanelViewEditDialog_SavedView on SavedView {\n id\n name\n description\n visibility\n group {\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n ...UseUpdateSavedView_SavedView\n }\n": types.ViewerSavedViewsPanelViewEditDialog_SavedViewFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroup_SavedViewGroup on SavedViewGroup {\n id\n isUngroupedViewsGroup\n ...ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup\n }\n": types.ViewerSavedViewsPanelViewsGroup_SavedViewGroupFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroup_SavedViewGroup_Paginated on SavedViewGroup {\n id\n views(input: $savedViewsInput) {\n cursor\n totalCount\n items {\n id\n ...ViewerSavedViewsPanelView_SavedView\n }\n }\n }\n": types.ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragmentDoc, "\n fragment ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup on SavedViewGroup {\n id\n title\n }\n": types.ViewerSavedViewsPanelViewsGroupInner_SavedViewGroupFragmentDoc, @@ -908,6 +916,8 @@ const documents: Documents = { "\n mutation CreateSavedView($input: CreateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n createView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n": types.CreateSavedViewDocument, "\n mutation DeleteSavedView($input: DeleteSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n deleteView(input: $input)\n }\n }\n }\n": types.DeleteSavedViewDocument, "\n fragment UseDeleteSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n": types.UseDeleteSavedView_SavedViewFragmentDoc, + "\n mutation UpdateSavedView($input: UpdateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n updateView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n": types.UpdateSavedViewDocument, + "\n fragment UseUpdateSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n": types.UseUpdateSavedView_SavedViewFragmentDoc, "\n fragment UseViewerSavedViewSetup_SavedView on SavedView {\n id\n viewerState\n }\n": types.UseViewerSavedViewSetup_SavedViewFragmentDoc, "\n fragment ViewerCommentThread on Comment {\n ...ViewerCommentsListItem\n ...ViewerCommentBubblesData\n ...ViewerCommentsReplyItem\n ...ViewerCommentThreadData\n }\n": types.ViewerCommentThreadFragmentDoc, "\n fragment ViewerCommentsReplyItem on Comment {\n id\n archived\n rawText\n text {\n doc\n }\n author {\n ...LimitedUserAvatar\n }\n createdAt\n ...ThreadCommentAttachment\n }\n": types.ViewerCommentsReplyItemFragmentDoc, @@ -1140,6 +1150,14 @@ export function graphql(source: "\n fragment FormSelectModels_Model on Model {\ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql(source: "\n fragment FormSelectProjects_Project on Project {\n id\n name\n }\n"): (typeof documents)["\n fragment FormSelectProjects_Project on Project {\n id\n name\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment FormSelectSavedViewGroup_SavedViewGroup on SavedViewGroup {\n id\n title\n isUngroupedViewsGroup\n }\n"): (typeof documents)["\n fragment FormSelectSavedViewGroup_SavedViewGroup on SavedViewGroup {\n id\n title\n isUngroupedViewsGroup\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query FormSelectSavedViewGroup_SavedViewGroups(\n $projectId: String!\n $input: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n savedViewGroups(input: $input) {\n items {\n id\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n totalCount\n cursor\n }\n }\n }\n"): (typeof documents)["\n query FormSelectSavedViewGroup_SavedViewGroups(\n $projectId: String!\n $input: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n savedViewGroups(input: $input) {\n items {\n id\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n totalCount\n cursor\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1631,7 +1649,7 @@ export function graphql(source: "\n fragment ViewerSavedViewsPanel_Project on P /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n }\n"): (typeof documents)["\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n }\n"]; +export function graphql(source: "\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n ...ViewerSavedViewsPanelViewEditDialog_SavedView\n }\n"): (typeof documents)["\n fragment ViewerSavedViewsPanelView_SavedView on SavedView {\n id\n name\n description\n screenshot\n author {\n id\n name\n }\n updatedAt\n permissions {\n canUpdate {\n ...FullPermissionCheckResult\n }\n }\n ...UseDeleteSavedView_SavedView\n ...ViewerSavedViewsPanelViewEditDialog_SavedView\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1640,6 +1658,10 @@ export function graphql(source: "\n fragment ViewerSavedViewsPanelViews_Project * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql(source: "\n query ViewerSavedViewsPanelViews_Groups(\n $projectId: String!\n $savedViewGroupsInput: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n ...ViewerSavedViewsPanelViews_Project\n }\n }\n"): (typeof documents)["\n query ViewerSavedViewsPanelViews_Groups(\n $projectId: String!\n $savedViewGroupsInput: SavedViewGroupsInput!\n ) {\n project(id: $projectId) {\n id\n ...ViewerSavedViewsPanelViews_Project\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment ViewerSavedViewsPanelViewEditDialog_SavedView on SavedView {\n id\n name\n description\n visibility\n group {\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n ...UseUpdateSavedView_SavedView\n }\n"): (typeof documents)["\n fragment ViewerSavedViewsPanelViewEditDialog_SavedView on SavedView {\n id\n name\n description\n visibility\n group {\n ...FormSelectSavedViewGroup_SavedViewGroup\n }\n ...UseUpdateSavedView_SavedView\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -2612,6 +2634,14 @@ export function graphql(source: "\n mutation DeleteSavedView($input: DeleteSave * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ export function graphql(source: "\n fragment UseDeleteSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n"): (typeof documents)["\n fragment UseDeleteSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation UpdateSavedView($input: UpdateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n updateView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation UpdateSavedView($input: UpdateSavedViewInput!) {\n projectMutations {\n savedViewMutations {\n updateView(input: $input) {\n id\n ...ViewerSavedViewsPanelView_SavedView\n group {\n id\n ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup\n }\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment UseUpdateSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n"): (typeof documents)["\n fragment UseUpdateSavedView_SavedView on SavedView {\n id\n projectId\n group {\n id\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/packages/frontend-2/lib/common/generated/gql/graphql.ts b/packages/frontend-2/lib/common/generated/gql/graphql.ts index 40d2188b5..c0af30812 100644 --- a/packages/frontend-2/lib/common/generated/gql/graphql.ts +++ b/packages/frontend-2/lib/common/generated/gql/graphql.ts @@ -3490,6 +3490,7 @@ export type SavedViewMutations = { createGroup: SavedViewGroup; createView: SavedView; deleteView: Scalars['Boolean']['output']; + updateView: SavedView; }; @@ -3507,6 +3508,11 @@ export type SavedViewMutationsDeleteViewArgs = { input: DeleteSavedViewInput; }; + +export type SavedViewMutationsUpdateViewArgs = { + input: UpdateSavedViewInput; +}; + export type SavedViewPermissionChecks = { __typename?: 'SavedViewPermissionChecks'; canUpdate: PermissionCheckResult; @@ -4330,6 +4336,30 @@ export type UpdateModelInput = { projectId: Scalars['ID']['input']; }; +export type UpdateSavedViewInput = { + description?: InputMaybe; + /** New group id, if grouping necessary */ + groupId?: InputMaybe; + id: Scalars['ID']['input']; + /** Optionally also set this as the home/default view for the target model */ + isHomeView?: InputMaybe; + /** New name for the view */ + name?: InputMaybe; + projectId: Scalars['ID']['input']; + /** New resource targets, if necessary. Must be set together w/ viewerState & screenshot. */ + resourceIdString?: InputMaybe; + /** Encoded screenshot of the view. */ + screenshot?: InputMaybe; + /** + * SerializedViewerState. If omitted, comment won't render (correctly) inside the + * viewer, but will still be retrievable through the API. + * Must be set together w/ resourceIdString & screenshot. + */ + viewerState?: InputMaybe; + /** Optionally change visibility of the view */ + visibility?: InputMaybe; +}; + export type UpdateServerRegionInput = { description?: InputMaybe; key: Scalars['String']['input']; @@ -5746,6 +5776,16 @@ export type FormSelectModels_ModelFragment = { __typename?: 'Model', id: string, export type FormSelectProjects_ProjectFragment = { __typename?: 'Project', id: string, name: string }; +export type FormSelectSavedViewGroup_SavedViewGroupFragment = { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean }; + +export type FormSelectSavedViewGroup_SavedViewGroupsQueryVariables = Exact<{ + projectId: Scalars['String']['input']; + input: SavedViewGroupsInput; +}>; + + +export type FormSelectSavedViewGroup_SavedViewGroupsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, savedViewGroups: { __typename?: 'SavedViewGroupCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean }> } } }; + export type FormUsersSelectItemFragment = { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null }; export type HeaderWorkspaceSwitcherWorkspaceListItem_WorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, logo?: string | null, role?: string | null, slug: string, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean } | null, plan?: { __typename?: 'WorkspacePlan', name: WorkspacePlans } | null }; @@ -6027,7 +6067,7 @@ export type ViewerResourcesWorkspaceLimitAlert_WorkspaceFragment = { __typename? export type ViewerSavedViewsPanel_ProjectFragment = { __typename?: 'Project', id: string, permissions: { __typename?: 'ProjectPermissionChecks', canCreateSavedView: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } }; -export type ViewerSavedViewsPanelView_SavedViewFragment = { __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string } }; +export type ViewerSavedViewsPanelView_SavedViewFragment = { __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } }; export type ViewerSavedViewsPanelViews_ProjectFragment = { __typename?: 'Project', id: string, savedViewGroups: { __typename?: 'SavedViewGroupCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'SavedViewGroup', id: string, isUngroupedViewsGroup: boolean, title: string }> } }; @@ -6039,13 +6079,15 @@ export type ViewerSavedViewsPanelViews_GroupsQueryVariables = Exact<{ export type ViewerSavedViewsPanelViews_GroupsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, savedViewGroups: { __typename?: 'SavedViewGroupCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'SavedViewGroup', id: string, isUngroupedViewsGroup: boolean, title: string }> } } }; +export type ViewerSavedViewsPanelViewEditDialog_SavedViewFragment = { __typename?: 'SavedView', id: string, name: string, description?: string | null, visibility: SavedViewVisibility, projectId: string, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } }; + export type ViewerSavedViewsPanelViewsGroup_SavedViewGroupFragment = { __typename?: 'SavedViewGroup', id: string, isUngroupedViewsGroup: boolean, title: string }; -export type ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragment = { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string } }> } }; +export type ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragment = { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } }> } }; export type ViewerSavedViewsPanelViewsGroupInner_SavedViewGroupFragment = { __typename?: 'SavedViewGroup', id: string, title: string }; -export type ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_PaginatedFragment = { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string } }> } }; +export type ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_PaginatedFragment = { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } }> } }; export type ViewerSavedViewsPanelViewsGroupInner_ViewsQueryVariables = Exact<{ projectId: Scalars['String']['input']; @@ -6054,7 +6096,7 @@ export type ViewerSavedViewsPanelViewsGroupInner_ViewsQueryVariables = Exact<{ }>; -export type ViewerSavedViewsPanelViewsGroupInner_ViewsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, savedViewGroup: { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string } }> } } } }; +export type ViewerSavedViewsPanelViewsGroupInner_ViewsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, savedViewGroup: { __typename?: 'SavedViewGroup', id: string, views: { __typename?: 'SavedViewCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } }, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } }> } } } }; export type WorkspaceAddProjectMenu_WorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, slug: string, role?: string | null, plan?: { __typename?: 'WorkspacePlan', name: WorkspacePlans } | null, permissions: { __typename?: 'WorkspacePermissionChecks', canCreateProject: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null }, canMoveProjectToWorkspace: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } }; @@ -7426,7 +7468,7 @@ export type CreateSavedViewMutationVariables = Exact<{ }>; -export type CreateSavedViewMutation = { __typename?: 'Mutation', projectMutations: { __typename?: 'ProjectMutations', savedViewMutations: { __typename?: 'SavedViewMutations', createView: { __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, group: { __typename?: 'SavedViewGroup', id: string, isUngroupedViewsGroup: boolean, title: string }, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } } } } }; +export type CreateSavedViewMutation = { __typename?: 'Mutation', projectMutations: { __typename?: 'ProjectMutations', savedViewMutations: { __typename?: 'SavedViewMutations', createView: { __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean }, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } } } } }; export type DeleteSavedViewMutationVariables = Exact<{ input: DeleteSavedViewInput; @@ -7437,6 +7479,15 @@ export type DeleteSavedViewMutation = { __typename?: 'Mutation', projectMutation export type UseDeleteSavedView_SavedViewFragment = { __typename?: 'SavedView', id: string, projectId: string, group: { __typename?: 'SavedViewGroup', id: string } }; +export type UpdateSavedViewMutationVariables = Exact<{ + input: UpdateSavedViewInput; +}>; + + +export type UpdateSavedViewMutation = { __typename?: 'Mutation', projectMutations: { __typename?: 'ProjectMutations', savedViewMutations: { __typename?: 'SavedViewMutations', updateView: { __typename?: 'SavedView', id: string, name: string, description?: string | null, screenshot: string, updatedAt: string, projectId: string, visibility: SavedViewVisibility, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean }, author?: { __typename?: 'LimitedUser', id: string, name: string } | null, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } } } } }; + +export type UseUpdateSavedView_SavedViewFragment = { __typename?: 'SavedView', id: string, projectId: string, group: { __typename?: 'SavedViewGroup', id: string } }; + export type UseViewerSavedViewSetup_SavedViewFragment = { __typename?: 'SavedView', id: string, viewerState: {} }; export type ViewerCommentThreadFragment = { __typename?: 'Comment', id: string, rawText?: string | null, archived: boolean, createdAt: string, viewedAt?: string | null, viewerState?: {} | null, author: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string }, replies: { __typename?: 'CommentCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Comment', id: string, archived: boolean, rawText?: string | null, createdAt: string, text?: { __typename?: 'SmartTextEditorValue', doc?: {} | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, fileType: string, fileSize?: number | null }> | null } | null, author: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }, replyAuthors: { __typename?: 'CommentReplyAuthorCollection', totalCount: number, items: Array<{ __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null }> }, resources: Array<{ __typename?: 'ResourceIdentifier', resourceId: string, resourceType: ResourceType }>, text?: { __typename?: 'SmartTextEditorValue', doc?: {} | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, fileType: string, fileSize?: number | null }> | null } | null, permissions: { __typename?: 'CommentPermissionChecks', canArchive: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: {} | null, errorMessage?: string | null } } }; @@ -8137,9 +8188,12 @@ export const ViewerSavedViewsPanelViewsGroupInner_SavedViewGroupFragmentDoc = {" export const ViewerSavedViewsPanelViewsGroup_SavedViewGroupFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]} as unknown as DocumentNode; export const ViewerSavedViewsPanelViews_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViews_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewGroupsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}}]} as unknown as DocumentNode; export const UseDeleteSavedView_SavedViewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const ViewerSavedViewsPanelView_SavedViewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}}]}}]} as unknown as DocumentNode; -export const ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_PaginatedFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}}]}}]} as unknown as DocumentNode; +export const FormSelectSavedViewGroup_SavedViewGroupFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}}]} as unknown as DocumentNode; +export const UseUpdateSavedView_SavedViewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; +export const ViewerSavedViewsPanelViewEditDialog_SavedViewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; +export const ViewerSavedViewsPanelView_SavedViewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}}]} as unknown as DocumentNode; +export const ViewerSavedViewsPanelViewsGroup_SavedViewGroup_PaginatedFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}}]} as unknown as DocumentNode; +export const ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_PaginatedFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}}]} as unknown as DocumentNode; export const WorkspaceSidebarMembers_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSidebarMembers_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogSharedSelectUsers_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"defaultSeatType"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspacesPlan_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"paymentMethod"}},{"kind":"Field","name":{"kind":"Name","value":"usage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectCount"}},{"kind":"Field","name":{"kind":"Name","value":"modelCount"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assigned"}},{"kind":"Field","name":{"kind":"Name","value":"available"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assigned"}},{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingInterval"}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingCycleEnd"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"defaultSeatType"}},{"kind":"Field","name":{"kind":"Name","value":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogSharedSelectUsers_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspacesPlan_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]} as unknown as DocumentNode; export const UseCanMoveProjectIntoWorkspace_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseCanMoveProjectIntoWorkspace_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canMoveProjectToWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}}]} as unknown as DocumentNode; export const WorkspaceMoveProject_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMoveProject_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canCreateProject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}},{"kind":"Field","name":{"kind":"Name","value":"canMoveProjectToWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseCanMoveProjectIntoWorkspace_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseCanMoveProjectIntoWorkspace_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canMoveProjectToWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}}]} as unknown as DocumentNode; @@ -8235,6 +8289,7 @@ export const SettingsWorkspacesSecurity_WorkspaceFragmentDoc = {"kind":"Document export const AuthRegisterPanelWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AuthRegisterPanelWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AuthWorkspaceInviteHeader_PendingWorkspaceCollaborator"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AuthWorkspaceInviteHeader_PendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}}]} as unknown as DocumentNode; export const AutomationCreateDialogFunctionsSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AutomationCreateDialogFunctionsSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionsFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"defaultValue":{"kind":"NullValue"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"automateFunctions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"20"}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsFunctionsCard_AutomateFunction"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isFeatured"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"repo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"owner"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateAutomationCreateDialogFunctionParametersStep_AutomateFunction"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"releases"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunction"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsFunctionsCard_AutomateFunction"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialogFunctionParametersStep_AutomateFunction"}}]}}]} as unknown as DocumentNode; export const DashboardSidebarDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"DashboardSidebar"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activeWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]}}]} as unknown as DocumentNode; +export const FormSelectSavedViewGroup_SavedViewGroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroupsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}}]} as unknown as DocumentNode; export const InviteDialogProjectRowProjectCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"InviteDialogProjectRowProjectCollaborators"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"InvitableCollaboratorsFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"invitableCollaborators"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteProjectItem_WorkspaceCollaborator"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteProjectItem_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"seatType"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; export const ProjectPageCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectPageCollaborators"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceTeamFilter"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProject_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageCollaborators_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canInvite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersTableHeader_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageCollaborators_WorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspacesPlan_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"paymentMethod"}},{"kind":"Field","name":{"kind":"Name","value":"usage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectCount"}},{"kind":"Field","name":{"kind":"Name","value":"modelCount"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assigned"}},{"kind":"Field","name":{"kind":"Name","value":"available"}}]}},{"kind":"Field","name":{"kind":"Name","value":"viewers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assigned"}},{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingInterval"}},{"kind":"Field","name":{"kind":"Name","value":"currentBillingCycleEnd"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProjectRow_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProject_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspacesPlan_Workspace"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectRow_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseCanInviteToProject_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canInvite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseCanMoveProjectIntoWorkspace_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canMoveToWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMoveProject_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canMoveToWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseCanMoveProjectIntoWorkspace_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectInviteAdd_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProject_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseCanInviteToProject_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMoveProject_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogSharedSelectUsers_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"defaultSeatType"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"defaultSeatType"}},{"kind":"Field","name":{"kind":"Name","value":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogSharedSelectUsers_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspacesPlan_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"seatType"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceRole"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageCollaborators_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectInviteAdd_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesMembersTableHeader_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canInvite"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageCollaborators_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]}}]} as unknown as DocumentNode; export const InvitableCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"InvitableCollaborators"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"InvitableCollaboratorsFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invitableCollaborators"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceRole"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}]}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; @@ -8242,7 +8297,7 @@ export const GetModelUploadsDocument = {"kind":"Document","definitions":[{"kind" export const ProjectPageSettingsGeneralDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectPageSettingsGeneral"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockProjectInfo_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockAccess_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockDiscussions_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockLeave_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockDelete_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsDeleteDialog_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"versions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"0"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canDelete"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockProjectInfo_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockAccess_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockDiscussions_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdateAllowPublicComments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockLeave_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canLeave"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsGeneralBlockDelete_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsDeleteDialog_Project"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"seatType"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceRole"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}}]}}]} as unknown as DocumentNode; export const WorkspaceAvailableEditorSeatsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceAvailableEditorSeats"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceBySlug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"editors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"available"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const ViewerSavedViewsPanelViews_GroupsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ViewerSavedViewsPanelViews_Groups"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"savedViewGroupsInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroupsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViews_Project"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViews_Project"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedViewGroups"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewGroupsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"}}]}}]}}]}}]} as unknown as DocumentNode; -export const ViewerSavedViewsPanelViewsGroupInner_ViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_Views"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"groupId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroupViewsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedViewGroup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"groupId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}}]} as unknown as DocumentNode; +export const ViewerSavedViewsPanelViewsGroupInner_ViewsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_Views"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"groupId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroupViewsInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedViewGroup"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"groupId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup_Paginated"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"views"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"savedViewsInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}}]}}]}}]}}]} as unknown as DocumentNode; export const CreateAccSyncItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateAccSyncItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAccSyncItemInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accSyncItemMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"accFileLineageUrn"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}}]}}]} as unknown as DocumentNode; export const DeleteAccSyncItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteAccSyncItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteAccSyncItemInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accSyncItemMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"delete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]} as unknown as DocumentNode; export const UpdateAccSyncItemDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAccSyncItem"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAccSyncItemInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"accSyncItemMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"update"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}}]}}]}}]} as unknown as DocumentNode; @@ -8416,8 +8471,9 @@ export const VerifyEmailDocument = {"kind":"Document","definitions":[{"kind":"Op export const SetActiveWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetActiveWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setActiveWorkspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}},{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSwitcherActiveWorkspace_LimitedWorkspace"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSwitcherActiveWorkspace_LimitedWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedWorkspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; export const UserEmailsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserEmails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}}]}}]} as unknown as DocumentNode; export const UserActiveWorkspaceSlugDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserActiveWorkspaceSlug"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"activeWorkspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}}]} as unknown as DocumentNode; -export const CreateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}}]} as unknown as DocumentNode; +export const CreateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}}]} as unknown as DocumentNode; export const DeleteSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]}}]} as unknown as DocumentNode; +export const UpdateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormSelectSavedViewGroup_SavedViewGroup"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseUpdateSavedView_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelView_SavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseDeleteSavedView_SavedView"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewEditDialog_SavedView"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroup_SavedViewGroup"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedViewGroup"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerSavedViewsPanelViewsGroupInner_SavedViewGroup"}}]}}]} as unknown as DocumentNode; export const BroadcastViewerUserActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BroadcastViewerUserActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"resourceIdString"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"message"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ViewerUserActivityMessageInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"broadcastViewerUserActivity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"projectId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}},{"kind":"Argument","name":{"kind":"Name","value":"resourceIdString"},"value":{"kind":"Variable","name":{"kind":"Name","value":"resourceIdString"}}},{"kind":"Argument","name":{"kind":"Name","value":"message"},"value":{"kind":"Variable","name":{"kind":"Name","value":"message"}}}]}]}}]} as unknown as DocumentNode; export const MarkCommentViewedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"MarkCommentViewed"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"MarkCommentViewedInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commentMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"markViewed"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]} as unknown as DocumentNode; export const CreateCommentThreadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCommentThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateCommentInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commentMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ThreadCommentAttachment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"attachments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileSize"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerCommentsReplyItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"archived"}},{"kind":"Field","name":{"kind":"Name","value":"rawText"}},{"kind":"Field","name":{"kind":"Name","value":"text"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"doc"}}]}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ThreadCommentAttachment"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FormUsersSelectItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LimitedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerCommentsListItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"rawText"}},{"kind":"Field","name":{"kind":"Name","value":"archived"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"replies"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentsReplyItem"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"replyAuthors"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormUsersSelectItem"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"resources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resourceId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceType"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerCommentBubblesData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewerState"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullPermissionCheckResult"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PermissionCheckResult"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}},{"kind":"Field","name":{"kind":"Name","value":"errorMessage"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerCommentThreadData"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canArchive"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullPermissionCheckResult"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ViewerCommentThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Comment"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentsListItem"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentBubblesData"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentsReplyItem"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ViewerCommentThreadData"}}]}}]} as unknown as DocumentNode; @@ -9638,6 +9694,7 @@ export type SavedViewMutationsFieldArgs = { createGroup: SavedViewMutationsCreateGroupArgs, createView: SavedViewMutationsCreateViewArgs, deleteView: SavedViewMutationsDeleteViewArgs, + updateView: SavedViewMutationsUpdateViewArgs, } export type SavedViewPermissionChecksFieldArgs = { canUpdate: {}, diff --git a/packages/frontend-2/lib/common/helpers/graphql.ts b/packages/frontend-2/lib/common/helpers/graphql.ts index 8c5e8051c..5e2b59291 100644 --- a/packages/frontend-2/lib/common/helpers/graphql.ts +++ b/packages/frontend-2/lib/common/helpers/graphql.ts @@ -649,6 +649,10 @@ export const modifyObjectField = < * Build a reference object for a specific object in the cache */ ref: typeof getObjectReference + /** + * Parse a reference object to get its type and id separately + */ + fromRef: typeof parseObjectReference } }) => | Optional> @@ -744,7 +748,8 @@ export const modifyObjectField = < get: getIfExists, evict, readField, - ref: getObjectReference + ref: getObjectReference, + fromRef: parseObjectReference } }) }, @@ -752,6 +757,72 @@ export const modifyObjectField = < ) } +/** + * Iterate over object field versions (same field can have different arg versions). If you also + * want to make updates, use modifyObjectField instead. + */ +export const iterateObjectField = < + Type extends keyof AllObjectTypes, + Field extends keyof AllObjectTypes[Type] +>( + cache: ApolloCache, + key: ApolloCacheObjectKey, + fieldName: Field, + predicate: (params: { + fieldName: string + variables: Field extends keyof AllObjectFieldArgTypes[Type] + ? AllObjectFieldArgTypes[Type][Field] + : never + /** + * Value found in the cache. Read-only and should not be mutated directly. Use the + * createUpdatedValue() helper to build a new value with updated fields. + */ + value: ReadonlyDeep> + helpers: { + /** + * Get value from specific path, only if it exists in the cache value + */ + get: > & string>( + path: Path + ) => Optional, Path>> + /** + * Read field data from a Reference object + */ + readField: < + ReadFieldType extends keyof AllObjectTypes, + ReadFieldName extends keyof AllObjectTypes[ReadFieldType] & string + >( + ref: CacheObjectReference, + fieldName: ReadFieldName + ) => Optional + /** + * Build a reference object for a specific object in the cache + */ + ref: typeof getObjectReference + /** + * Parse a reference object to get its type and id separately + */ + fromRef: typeof parseObjectReference + } + }) => void, + options?: Partial<{ + debug: boolean + }> +) => { + modifyObjectField( + cache, + key, + fieldName, + (params) => { + predicate(params) + }, + { + ...(options || {}), + autoEvictFiltered: false // no mutations here + } + ) +} + export const hasErrorWith = (params: { errors: readonly GraphQLFormattedError[] | undefined codes?: Array diff --git a/packages/frontend-2/lib/viewer/composables/savedViews/management.ts b/packages/frontend-2/lib/viewer/composables/savedViews/management.ts index e4ec3d800..849083d9d 100644 --- a/packages/frontend-2/lib/viewer/composables/savedViews/management.ts +++ b/packages/frontend-2/lib/viewer/composables/savedViews/management.ts @@ -2,11 +2,16 @@ import { useMutation } from '@vue/apollo-composable' import { graphql } from '~/lib/common/generated/gql' import type { CreateSavedViewInput, - UseDeleteSavedView_SavedViewFragment + UpdateSavedViewInput, + UseDeleteSavedView_SavedViewFragment, + UseUpdateSavedView_SavedViewFragment } from '~/lib/common/generated/gql/graphql' -import { parseObjectReference } from '~/lib/common/helpers/graphql' import { useStateSerialization } from '~/lib/viewer/composables/serialization' import { useInjectedViewerState } from '~/lib/viewer/composables/setup' +import { + onGroupViewRemovalCacheUpdates, + onNewGroupViewCacheUpdates +} from '~/lib/viewer/helpers/savedViews/cache' const createSavedViewMutation = graphql(` mutation CreateSavedView($input: CreateSavedViewInput!) { @@ -62,38 +67,11 @@ export const useCreateSavedView = () => { const viewId = res.id const groupId = res.group.id - // Project.savedViewGroups + 1, if it is a new group - modifyObjectField( - cache, - getCacheId('Project', projectId.value), - 'savedViewGroups', - ({ helpers: { createUpdatedValue, ref, readField }, value }) => { - const isNewGroup = !value?.items?.some( - (group) => readField(group, 'id') === groupId - ) - if (!isNewGroup) return - - return createUpdatedValue(({ update }) => { - update('totalCount', (count) => count + 1) - update('items', (items) => [...items, ref('SavedViewGroup', groupId)]) - }) - }, - { autoEvictFiltered: true } - ) - - // SavedViewGroup.views + 1 - modifyObjectField( - cache, - getCacheId('SavedViewGroup', groupId), - 'views', - ({ helpers: { createUpdatedValue, ref } }) => { - return createUpdatedValue(({ update }) => { - update('totalCount', (count) => count + 1) - update('items', (items) => [ref('SavedView', viewId), ...items]) - }) - }, - { autoEvictFiltered: true } - ) + onNewGroupViewCacheUpdates(cache, { + viewId, + groupId, + projectId: projectId.value + }) } } ).catch(convertThrowIntoFetchResult) @@ -101,7 +79,7 @@ export const useCreateSavedView = () => { const res = result?.data?.projectMutations.savedViewMutations.createView if (res?.id) { triggerNotification({ - title: 'Saved View Created', + title: 'Saved view created', type: ToastNotificationType.Success }) } else { @@ -140,12 +118,13 @@ graphql(` export const useDeleteSavedView = () => { const { mutate } = useMutation(deleteSavedViewMutation) const { triggerNotification } = useGlobalToast() + const { isLoggedIn } = useActiveUser() return async (params: { view: UseDeleteSavedView_SavedViewFragment }) => { const { id, projectId } = params.view const groupId = params.view.group.id - if (!id || !projectId) { + if (!id || !projectId || !isLoggedIn.value) { return } @@ -157,64 +136,28 @@ export const useDeleteSavedView = () => { } }, { - update: (cache) => { + update: (cache, res) => { + if (!res.data?.projectMutations.savedViewMutations.deleteView) return + + onGroupViewRemovalCacheUpdates(cache, { + viewId: id, + groupId, + projectId + }) + // Remove the view from the cache cache.evict({ id: getCacheId('SavedView', id) }) - - // Check if default/ungrouped group - const isDefaultGroup = groupId.startsWith('default-') - - // If default group and its now empty - remove it as it doesn't exist otherwise - let shouldEvict - if (isDefaultGroup) { - let viewsRemain = false - modifyObjectField( - cache, - getCacheId('SavedViewGroup', groupId), - 'views', - ({ value }) => { - const otherItems = value?.items?.filter( - (item) => item.__ref !== getCacheId('SavedView', id) - ) - - if (otherItems?.length) { - viewsRemain = true - } - } - ) - - if (!viewsRemain) { - shouldEvict = true - } - } - - // Remove default group, if its empty - if (shouldEvict) { - cache.evict({ id: getCacheId('SavedViewGroup', groupId) }) - } else { - // Remove view from view lists (in groups) - // SavedViewGroup.views - modifyObjectField( - cache, - getCacheId('SavedViewGroup', groupId), - 'views', - ({ helpers: { createUpdatedValue } }) => { - return createUpdatedValue(({ update }) => { - update('totalCount', (count) => count - 1) - update('items', (items) => - items.filter((item) => parseObjectReference(item).id !== id) - ) - }) - }, - { autoEvictFiltered: true } - ) - } } } ).catch(convertThrowIntoFetchResult) const res = result?.data?.projectMutations.savedViewMutations.deleteView - if (!res) { + if (res) { + triggerNotification({ + title: 'View deleted', + type: ToastNotificationType.Success + }) + } else { const err = getFirstGqlErrorMessage(result?.errors) triggerNotification({ title: "Couldn't delete saved view", @@ -226,3 +169,91 @@ export const useDeleteSavedView = () => { return res } } + +const updateSavedViewMutation = graphql(` + mutation UpdateSavedView($input: UpdateSavedViewInput!) { + projectMutations { + savedViewMutations { + updateView(input: $input) { + id + ...ViewerSavedViewsPanelView_SavedView + group { + id + ...ViewerSavedViewsPanelViewsGroup_SavedViewGroup + } + } + } + } + } +`) + +graphql(` + fragment UseUpdateSavedView_SavedView on SavedView { + id + projectId + group { + id + } + } +`) + +export const useUpdateSavedView = () => { + const { mutate } = useMutation(updateSavedViewMutation) + const { triggerNotification } = useGlobalToast() + const { isLoggedIn } = useActiveUser() + + return async (params: { + view: UseUpdateSavedView_SavedViewFragment + input: UpdateSavedViewInput + }) => { + if (!isLoggedIn.value) return + const { input } = params + + const oldGroupId = params.view.group.id + + const result = await mutate( + { input }, + { + update: (cache, res) => { + const update = res.data?.projectMutations.savedViewMutations.updateView + if (!update) return + + const newGroupId = update.group.id + const groupChanged = oldGroupId !== newGroupId + if (groupChanged) { + // Clean up old group + onGroupViewRemovalCacheUpdates(cache, { + viewId: params.view.id, + groupId: oldGroupId, + projectId: params.view.projectId + }) + + // Update new group + onNewGroupViewCacheUpdates(cache, { + viewId: update.id, + groupId: newGroupId, + projectId: params.view.projectId + }) + } + } + } + ).catch(convertThrowIntoFetchResult) + + const res = result?.data?.projectMutations.savedViewMutations.updateView + if (res?.id) { + triggerNotification({ + title: 'View updated', + type: ToastNotificationType.Success + }) + } else { + const err = getFirstGqlErrorMessage(result?.errors) + triggerNotification({ + title: "Couldn't update saved view", + description: err, + type: ToastNotificationType.Danger + }) + } + + return res + } +} diff --git a/packages/frontend-2/lib/viewer/helpers/savedViews/cache.ts b/packages/frontend-2/lib/viewer/helpers/savedViews/cache.ts new file mode 100644 index 000000000..e6ef5dc00 --- /dev/null +++ b/packages/frontend-2/lib/viewer/helpers/savedViews/cache.ts @@ -0,0 +1,138 @@ +import type { ApolloCache } from '@apollo/client/cache' + +/** + * Cache mutations for when a group gets a new view: + * - If new group, Project.savedViewGroups + 1 + * - SavedViewGroup.views + 1 + */ +export const onNewGroupViewCacheUpdates = ( + cache: ApolloCache, + params: { + /** + * The ID of the view being added + */ + viewId: string + /** + * The ID of the group the view is being added to + */ + groupId: string + projectId: string + } +) => { + const { viewId, groupId, projectId } = params + + // Project.savedViewGroups + 1, if it is a new group + modifyObjectField( + cache, + getCacheId('Project', projectId), + 'savedViewGroups', + ({ helpers: { createUpdatedValue, ref, fromRef }, value }) => { + const isNewGroup = !value?.items?.some((group) => fromRef(group).id === groupId) + if (!isNewGroup) return + + return createUpdatedValue(({ update }) => { + update('totalCount', (count) => count + 1) + update('items', (items) => [...items, ref('SavedViewGroup', groupId)]) + }) + }, + { autoEvictFiltered: true } + ) + + // SavedViewGroup.views + 1 + modifyObjectField( + cache, + getCacheId('SavedViewGroup', groupId), + 'views', + ({ helpers: { createUpdatedValue, ref } }) => { + return createUpdatedValue(({ update }) => { + update('totalCount', (count) => count + 1) + update('items', (items) => [ref('SavedView', viewId), ...items]) + }) + }, + { autoEvictFiltered: true } + ) +} + +/** + * Cache mutations for when a view is removed from a group: + * - If default group and it is now empty, remove it entirely - evict and remove from Project.savedViewGroups + * - Otherwise just: SavedViewGroup.views - 1 + */ +export const onGroupViewRemovalCacheUpdates = ( + cache: ApolloCache, + params: { + /** + * The ID of the view being removed + */ + viewId: string + /** + * The ID of the group the view is being removed from + */ + groupId: string + projectId: string + } +) => { + const { viewId: id, groupId, projectId } = params + + // Check if default/ungrouped group + const isDefaultGroup = groupId.startsWith('default-') + + // If default group and its now empty - remove it as it doesn't exist otherwise + let shouldEvict + if (isDefaultGroup) { + let viewsRemain = false + iterateObjectField( + cache, + getCacheId('SavedViewGroup', groupId), + 'views', + ({ value, helpers: { fromRef } }) => { + const otherItems = value?.items?.filter((item) => fromRef(item).id !== id) + + if (otherItems?.length) { + viewsRemain = true + } + } + ) + + if (!viewsRemain) { + shouldEvict = true + } + } + + // Remove default group, if its empty + if (shouldEvict) { + // Project.savedViewGroups - 1 + modifyObjectField( + cache, + getCacheId('Project', projectId), + 'savedViewGroups', + ({ helpers: { createUpdatedValue, fromRef } }) => { + return createUpdatedValue(({ update }) => { + update('totalCount', (count) => count - 1) + update('items', (items) => + items.filter((item) => fromRef(item).id !== groupId) + ) + }) + }, + { autoEvictFiltered: true } + ) + + // Evict entirely + cache.evict({ id: getCacheId('SavedViewGroup', groupId) }) + } else { + // Remove view from view lists (in groups) + // SavedViewGroup.views - 1 + modifyObjectField( + cache, + getCacheId('SavedViewGroup', groupId), + 'views', + ({ helpers: { createUpdatedValue, fromRef } }) => { + return createUpdatedValue(({ update }) => { + update('totalCount', (count) => count - 1) + update('items', (items) => items.filter((item) => fromRef(item).id !== id)) + }) + }, + { autoEvictFiltered: true } + ) + } +} diff --git a/packages/frontend-2/utils/globals.ts b/packages/frontend-2/utils/globals.ts index 052ae295a..69c864cda 100644 --- a/packages/frontend-2/utils/globals.ts +++ b/packages/frontend-2/utils/globals.ts @@ -6,6 +6,7 @@ import { convertThrowIntoFetchResult, getCacheId, getFirstErrorMessage as getFirstGqlErrorMessage, + iterateObjectField, modifyObjectField, ROOT_MUTATION, ROOT_QUERY, @@ -32,6 +33,7 @@ export { convertThrowIntoFetchResult, getFirstGqlErrorMessage, modifyObjectField, + iterateObjectField, getCacheId, checkIfIsInPlaceNavigation, ROOT_QUERY, diff --git a/packages/server/assets/viewer/typedefs/savedViews.graphql b/packages/server/assets/viewer/typedefs/savedViews.graphql index 960deef42..90b103688 100644 --- a/packages/server/assets/viewer/typedefs/savedViews.graphql +++ b/packages/server/assets/viewer/typedefs/savedViews.graphql @@ -170,10 +170,47 @@ input DeleteSavedViewInput { projectId: ID! } +input UpdateSavedViewInput { + id: ID! + projectId: ID! + """ + New resource targets, if necessary. Must be set together w/ viewerState & screenshot. + """ + resourceIdString: String + """ + New group id, if grouping necessary + """ + groupId: String + """ + New name for the view + """ + name: String + description: String + """ + SerializedViewerState. If omitted, comment won't render (correctly) inside the + viewer, but will still be retrievable through the API. + Must be set together w/ resourceIdString & screenshot. + """ + viewerState: JSONObject + """ + Encoded screenshot of the view. + """ + screenshot: String + """ + Optionally also set this as the home/default view for the target model + """ + isHomeView: Boolean + """ + Optionally change visibility of the view + """ + visibility: SavedViewVisibility +} + type SavedViewMutations { createGroup(input: CreateSavedViewGroupInput!): SavedViewGroup! createView(input: CreateSavedViewInput!): SavedView! deleteView(input: DeleteSavedViewInput!): Boolean! + updateView(input: UpdateSavedViewInput!): SavedView! } extend type ProjectMutations { diff --git a/packages/server/modules/core/graph/generated/graphql.ts b/packages/server/modules/core/graph/generated/graphql.ts index a10af8207..3f23989bb 100644 --- a/packages/server/modules/core/graph/generated/graphql.ts +++ b/packages/server/modules/core/graph/generated/graphql.ts @@ -3516,6 +3516,7 @@ export type SavedViewMutations = { createGroup: SavedViewGroup; createView: SavedView; deleteView: Scalars['Boolean']['output']; + updateView: SavedView; }; @@ -3533,6 +3534,11 @@ export type SavedViewMutationsDeleteViewArgs = { input: DeleteSavedViewInput; }; + +export type SavedViewMutationsUpdateViewArgs = { + input: UpdateSavedViewInput; +}; + export type SavedViewPermissionChecks = { __typename?: 'SavedViewPermissionChecks'; canUpdate: PermissionCheckResult; @@ -4356,6 +4362,30 @@ export type UpdateModelInput = { projectId: Scalars['ID']['input']; }; +export type UpdateSavedViewInput = { + description?: InputMaybe; + /** New group id, if grouping necessary */ + groupId?: InputMaybe; + id: Scalars['ID']['input']; + /** Optionally also set this as the home/default view for the target model */ + isHomeView?: InputMaybe; + /** New name for the view */ + name?: InputMaybe; + projectId: Scalars['ID']['input']; + /** New resource targets, if necessary. Must be set together w/ viewerState & screenshot. */ + resourceIdString?: InputMaybe; + /** Encoded screenshot of the view. */ + screenshot?: InputMaybe; + /** + * SerializedViewerState. If omitted, comment won't render (correctly) inside the + * viewer, but will still be retrievable through the API. + * Must be set together w/ resourceIdString & screenshot. + */ + viewerState?: InputMaybe; + /** Optionally change visibility of the view */ + visibility?: InputMaybe; +}; + export type UpdateServerRegionInput = { description?: InputMaybe; key: Scalars['String']['input']; @@ -6043,6 +6073,7 @@ export type ResolversTypes = { UpdateAccSyncItemInput: UpdateAccSyncItemInput; UpdateAutomateFunctionInput: UpdateAutomateFunctionInput; UpdateModelInput: UpdateModelInput; + UpdateSavedViewInput: UpdateSavedViewInput; UpdateServerRegionInput: UpdateServerRegionInput; UpdateVersionInput: UpdateVersionInput; UpgradePlanInput: UpgradePlanInput; @@ -6394,6 +6425,7 @@ export type ResolversParentTypes = { UpdateAccSyncItemInput: UpdateAccSyncItemInput; UpdateAutomateFunctionInput: UpdateAutomateFunctionInput; UpdateModelInput: UpdateModelInput; + UpdateSavedViewInput: UpdateSavedViewInput; UpdateServerRegionInput: UpdateServerRegionInput; UpdateVersionInput: UpdateVersionInput; UpgradePlanInput: UpgradePlanInput; @@ -7718,6 +7750,7 @@ export type SavedViewMutationsResolvers>; createView?: Resolver>; deleteView?: Resolver>; + updateView?: Resolver>; __isTypeOf?: IsTypeOfResolverFn; }; @@ -9059,6 +9092,13 @@ export type CanUpdateSavedViewQueryVariables = Exact<{ export type CanUpdateSavedViewQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, savedView: { __typename?: 'SavedView', id: string, permissions: { __typename?: 'SavedViewPermissionChecks', canUpdate: { __typename?: 'PermissionCheckResult', authorized: boolean, code: string, message: string, payload?: Record | null } } } } }; +export type UpdateSavedViewMutationVariables = Exact<{ + input: UpdateSavedViewInput; +}>; + + +export type UpdateSavedViewMutation = { __typename?: 'Mutation', projectMutations: { __typename?: 'ProjectMutations', savedViewMutations: { __typename?: 'SavedViewMutations', updateView: { __typename?: 'SavedView', id: string, name: string, description?: string | null, groupId?: string | null, createdAt: Date, updatedAt: Date, resourceIdString: string, resourceIds: Array, isHomeView: boolean, visibility: SavedViewVisibility, viewerState: Record, screenshot: string, position: number, projectId: string, author?: { __typename?: 'LimitedUser', id: string } | null, group: { __typename?: 'SavedViewGroup', id: string, title: string, isUngroupedViewsGroup: boolean } } } } }; + export type BasicWorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, slug: string, updatedAt: Date, createdAt: Date, role?: string | null, readOnly: boolean }; export type BasicPendingWorkspaceCollaboratorFragment = { __typename?: 'PendingWorkspaceCollaborator', id: string, inviteId: string, title: string, role: string, token?: string | null, workspace: { __typename?: 'LimitedWorkspace', id: string, name: string }, invitedBy: { __typename?: 'LimitedUser', id: string, name: string }, user?: { __typename?: 'LimitedUser', id: string, name: string } | null }; @@ -10189,6 +10229,7 @@ export const GetProjectSavedViewDocument = {"kind":"Document","definitions":[{"k export const DeleteSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]}}]} as unknown as DocumentNode; export const CanCreateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CanCreateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canCreateSavedView"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const CanUpdateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CanUpdateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"project"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"projectId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"savedView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"viewId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"permissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"canUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"authorized"}},{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"payload"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const UpdateSavedViewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateSavedView"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSavedViewInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"savedViewMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateView"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicSavedView"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicSavedView"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SavedView"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"groupId"}},{"kind":"Field","name":{"kind":"Name","value":"group"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"isUngroupedViewsGroup"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"resourceIdString"}},{"kind":"Field","name":{"kind":"Name","value":"resourceIds"}},{"kind":"Field","name":{"kind":"Name","value":"isHomeView"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"viewerState"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"position"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}}]}}]} as unknown as DocumentNode; export const CreateWorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateWorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"create"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; export const BatchCreateWorkspaceInvitesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BatchCreateWorkspaceInvites"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteCreateInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"invites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"batchCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; export const GetWorkspaceWithTeamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaceWithTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicWorkspace"}},{"kind":"Field","name":{"kind":"Name","value":"invitedTeam"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicPendingWorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"token"}}]}}]} as unknown as DocumentNode; diff --git a/packages/server/modules/core/loaders.ts b/packages/server/modules/core/loaders.ts index f73d56170..b3cc88eba 100644 --- a/packages/server/modules/core/loaders.ts +++ b/packages/server/modules/core/loaders.ts @@ -110,6 +110,21 @@ export async function buildRequestLoaders( return regionLoaders.get(deps.db) as ModularizedDataLoaders } + /** + * Do something for each region, including mainDb (e.g. clear loader in all regions). This only + * loops over initiated/cached regions, not all server registrated regions. + */ + const forEachCachedRegion = ( + predicate: (params: { db: Knex; loaders: ModularizedDataLoaders }) => void + ) => { + for (const [db, loaders] of [ + ...regionLoaders.entries(), + [mainDb, mainDbLoaders] + ]) { + predicate({ db, loaders }) + } + } + /** * Clear all request loaders across all regions */ @@ -130,7 +145,8 @@ export async function buildRequestLoaders( return { ...mainDbLoaders, clearAll, - forRegion + forRegion, + forEachCachedRegion } } diff --git a/packages/server/modules/viewer/domain/operations/savedViews.ts b/packages/server/modules/viewer/domain/operations/savedViews.ts index 1c625c03a..ec81ae88c 100644 --- a/packages/server/modules/viewer/domain/operations/savedViews.ts +++ b/packages/server/modules/viewer/domain/operations/savedViews.ts @@ -92,10 +92,7 @@ export type GetGroupSavedViewsPageItems = ( export type GetSavedViewGroup = (params: { id: string - /** - * If undefined, skip project ID check - */ - projectId: string | undefined + projectId: string }) => Promise export type GetUngroupedSavedViewsGroup = (params: { @@ -122,10 +119,23 @@ export type GetSavedViews = (params: { [viewId: string]: SavedView | undefined }> +export type GetSavedView = (params: { + id: string + projectId: string +}) => Promise + export type DeleteSavedViewRecord = (params: { savedViewId: string }) => Promise +export type UpdateSavedViewRecord = < + Update extends Exact, Update> +>(params: { + id: string + projectId: string + update: Update +}) => Promise + ///////////////////// // SERVICE OPERATIONS: ///////////////////// @@ -180,3 +190,21 @@ export type DeleteSavedView = (params: { projectId: string userId: string }) => Promise + +export type UpdateSavedViewParams = { + id: string + projectId: string + groupId?: MaybeNullOrUndefined + name?: MaybeNullOrUndefined + description?: MaybeNullOrUndefined + isHomeView?: MaybeNullOrUndefined + visibility?: MaybeNullOrUndefined + viewerState?: MaybeNullOrUndefined + resourceIdString?: MaybeNullOrUndefined + screenshot?: MaybeNullOrUndefined +} + +export type UpdateSavedView = (params: { + input: UpdateSavedViewParams + userId: string +}) => Promise diff --git a/packages/server/modules/viewer/errors/savedViews.ts b/packages/server/modules/viewer/errors/savedViews.ts index a1521c8f8..5f60ae84d 100644 --- a/packages/server/modules/viewer/errors/savedViews.ts +++ b/packages/server/modules/viewer/errors/savedViews.ts @@ -17,3 +17,9 @@ export class SavedViewInvalidResourceTargetError extends BaseError { static defaultMessage = 'Invalid resource ids specified' static statusCode = 400 } + +export class SavedViewUpdateValidationError extends BaseError { + static code = 'SAVED_VIEW_UPDATE_VALIDATION_ERROR' + static defaultMessage = 'Saved view update failed due to a validation error' + static statusCode = 400 +} diff --git a/packages/server/modules/viewer/graph/resolvers/savedViews.ts b/packages/server/modules/viewer/graph/resolvers/savedViews.ts index 30684864b..517a3a3f6 100644 --- a/packages/server/modules/viewer/graph/resolvers/savedViews.ts +++ b/packages/server/modules/viewer/graph/resolvers/savedViews.ts @@ -22,19 +22,20 @@ import { getGroupSavedViewsTotalCountFactory, getProjectSavedViewGroupsPageItemsFactory, getProjectSavedViewGroupsTotalCountFactory, - getSavedViewGroupFactory, getStoredViewCountFactory, getUngroupedSavedViewsGroupFactory, recalculateGroupResourceIdsFactory, storeSavedViewFactory, - storeSavedViewGroupFactory + storeSavedViewGroupFactory, + updateSavedViewRecordFactory } from '@/modules/viewer/repositories/savedViews' import { createSavedViewFactory, createSavedViewGroupFactory, deleteSavedViewFactory, getGroupSavedViewsFactory, - getProjectSavedViewGroupsFactory + getProjectSavedViewGroupsFactory, + updateSavedViewFactory } from '@/modules/viewer/services/savedViewsManagement' import { getViewerResourceGroupsFactory } from '@/modules/viewer/services/viewerResources' import { Authz } from '@speckle/shared' @@ -43,6 +44,10 @@ import { formatSerializedViewerState } from '@speckle/shared/viewer/state' import type { Knex } from 'knex' import { ungroupedScenesGroupTitle } from '@speckle/shared/saved-views' import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' +import { + getSavedViewFactory, + getSavedViewGroupFactory +} from '@/modules/viewer/repositories/dataLoaders/savedViews' const buildGetViewerResourceGroups = (params: { projectDb: Knex }) => { const { projectDb } = params @@ -219,7 +224,7 @@ const resolvers: Resolvers = { getViewerResourceGroups: buildGetViewerResourceGroups({ projectDb }), getStoredViewCount: getStoredViewCountFactory({ db: projectDb }), storeSavedView: storeSavedViewFactory({ db: projectDb }), - getSavedViewGroup: getSavedViewGroupFactory({ db: projectDb }), + getSavedViewGroup: getSavedViewGroupFactory({ loaders: ctx.loaders }), recalculateGroupResourceIds: recalculateGroupResourceIdsFactory({ db: projectDb }) @@ -255,6 +260,54 @@ const resolvers: Resolvers = { return true }, + updateView: async (_parent, args, ctx) => { + const projectId = args.input.projectId + const projectDb = await getProjectDbClient({ projectId }) + + throwIfResourceAccessNotAllowed({ + resourceId: projectId, + resourceType: TokenResourceIdentifierType.Project, + resourceAccessRules: ctx.resourceAccessRules + }) + + const canUpdate = await ctx.authPolicies.project.savedViews.canUpdate({ + userId: ctx.userId, + projectId, + savedViewId: args.input.id + }) + throwIfAuthNotOk(canUpdate) + + const updateSavedView = updateSavedViewFactory({ + getViewerResourceGroups: buildGetViewerResourceGroups({ projectDb }), + getSavedView: getSavedViewFactory({ loaders: ctx.loaders }), + getSavedViewGroup: getSavedViewGroupFactory({ loaders: ctx.loaders }), + updateSavedViewRecord: updateSavedViewRecordFactory({ + db: projectDb + }) + }) + + const updatedView = await updateSavedView({ + input: args.input, + userId: ctx.userId! + }) + + // update loader cache + ctx.loaders.forEachCachedRegion(({ loaders }) => { + loaders.savedViews.getSavedView.clear({ + viewId: updatedView.id, + projectId: updatedView.projectId + }) + loaders.savedViews.getSavedView.prime( + { + viewId: updatedView.id, + projectId: updatedView.projectId + }, + updatedView + ) + }) + + return updatedView + }, createGroup: async (_parent, args, ctx) => { const projectId = args.input.projectId throwIfResourceAccessNotAllowed({ diff --git a/packages/server/modules/viewer/helpers/savedViews.ts b/packages/server/modules/viewer/helpers/savedViews.ts index 478dacb32..ae895dabc 100644 --- a/packages/server/modules/viewer/helpers/savedViews.ts +++ b/packages/server/modules/viewer/helpers/savedViews.ts @@ -1,5 +1,6 @@ import { base64Decode, base64Encode } from '@/modules/shared/helpers/cryptoHelper' import type { Nullable } from '@speckle/shared' +import type { ViewerResourcesTarget } from '@speckle/shared/viewer/route' import { isModelResource, isObjectResource, @@ -50,13 +51,9 @@ export const decodeDefaultGroupId = (id: string): Nullable * Converts a resourceId string into a more abstract format used by groups that disregards * specific versions of models and objects. */ -export const formatResourceIdsForGroup = (resourceIdString: string | string[]) => { - resourceIdString = Array.isArray(resourceIdString) - ? resourceIdString.join(',') - : resourceIdString - +export const formatResourceIdsForGroup = (resources: ViewerResourcesTarget) => { return resourceBuilder() - .addFromString(resourceIdString) + .addResources(resources) .forEach((r) => { if (isModelResource(r)) { // not interested in the specific version ids originally used diff --git a/packages/server/modules/viewer/repositories/dataLoaders/savedViews.ts b/packages/server/modules/viewer/repositories/dataLoaders/savedViews.ts new file mode 100644 index 000000000..df10d1ed5 --- /dev/null +++ b/packages/server/modules/viewer/repositories/dataLoaders/savedViews.ts @@ -0,0 +1,32 @@ +import type { RequestDataLoaders } from '@/modules/core/loaders' +import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' +import type { + GetSavedView, + GetSavedViewGroup +} from '@/modules/viewer/domain/operations/savedViews' + +export const getSavedViewFactory = + (deps: { loaders: RequestDataLoaders }): GetSavedView => + async ({ id, projectId }) => { + const projectDb = await getProjectDbClient({ projectId }) + return ( + (await deps.loaders.forRegion({ db: projectDb }).savedViews.getSavedView.load({ + viewId: id, + projectId + })) || undefined + ) + } + +export const getSavedViewGroupFactory = + (deps: { loaders: RequestDataLoaders }): GetSavedViewGroup => + async ({ id, projectId }) => { + const projectDb = await getProjectDbClient({ projectId }) + return ( + (await deps.loaders + .forRegion({ db: projectDb }) + .savedViews.getSavedViewGroup.load({ + groupId: id, + projectId + })) || undefined + ) + } diff --git a/packages/server/modules/viewer/repositories/savedViews.ts b/packages/server/modules/viewer/repositories/savedViews.ts index a16f5f6fb..75c373306 100644 --- a/packages/server/modules/viewer/repositories/savedViews.ts +++ b/packages/server/modules/viewer/repositories/savedViews.ts @@ -15,7 +15,8 @@ import type { StoreSavedView, StoreSavedViewGroup, GetSavedViews, - DeleteSavedViewRecord + DeleteSavedViewRecord, + UpdateSavedViewRecord } from '@/modules/viewer/domain/operations/savedViews' import { SavedViewVisibility, @@ -504,3 +505,20 @@ export const deleteSavedViewRecordFactory = // Otherwise, return true return true } + +export const updateSavedViewRecordFactory = + (deps: { db: Knex }): UpdateSavedViewRecord => + async (params) => { + const { id, projectId, update } = params + + // Update the saved view + const [updatedView] = await tables + .savedViews(deps.db) + .where({ + [SavedViews.col.id]: id, + [SavedViews.col.projectId]: projectId + }) + .update(update, '*') + + return updatedView || undefined + } diff --git a/packages/server/modules/viewer/services/savedViewsManagement.ts b/packages/server/modules/viewer/services/savedViewsManagement.ts index 603465581..3934aa2fd 100644 --- a/packages/server/modules/viewer/services/savedViewsManagement.ts +++ b/packages/server/modules/viewer/services/savedViewsManagement.ts @@ -9,23 +9,32 @@ import type { GetProjectSavedViewGroups, GetProjectSavedViewGroupsPageItems, GetProjectSavedViewGroupsTotalCount, + GetSavedView, GetSavedViewGroup, GetStoredViewCount, RecalculateGroupResourceIds, StoreSavedView, - StoreSavedViewGroup + StoreSavedViewGroup, + UpdateSavedView, + UpdateSavedViewRecord } from '@/modules/viewer/domain/operations/savedViews' import { SavedViewVisibility } from '@/modules/viewer/domain/types/savedViews' import { SavedViewCreationValidationError, SavedViewGroupCreationValidationError, - SavedViewInvalidResourceTargetError + SavedViewInvalidResourceTargetError, + SavedViewUpdateValidationError } from '@/modules/viewer/errors/savedViews' +import type { ResourceBuilder } from '@speckle/shared/viewer/route' import { resourceBuilder } from '@speckle/shared/viewer/route' +import type { VersionedSerializedViewerState } from '@speckle/shared/viewer/state' import { inputToVersionedState } from '@speckle/shared/viewer/state' import { isValidBase64Image } from '@speckle/shared/images/base64' import type { GetViewerResourceGroups } from '@/modules/viewer/domain/operations/resources' import { formatResourceIdsForGroup } from '@/modules/viewer/helpers/savedViews' +import { omit } from 'lodash-es' +import type { DependenciesOf } from '@/modules/shared/helpers/factory' +import { removeNullOrUndefinedKeys } from '@speckle/shared' /** * Validates an incoming resourceIdString against the resources in the project and returns the validated list (as a builder) @@ -80,6 +89,47 @@ const validateProjectResourceIdStringFactory = return resourceIds } +const validateViewerStateFactory = + () => + (params: { + viewerState: unknown + projectId: string + resourceIds: ResourceBuilder + errorMetadata: Record + }) => { + const { viewerState, projectId, resourceIds, errorMetadata } = params + + const state = inputToVersionedState(viewerState) + if (!state) { + throw new SavedViewInvalidResourceTargetError( + 'Invalid viewer state provided. Must be a valid SerializedViewerState.', + { + info: errorMetadata + } + ) + } + + // Validate state match + if (state.state.resources.request.resourceIdString !== resourceIds.toString()) { + throw new SavedViewInvalidResourceTargetError( + 'Viewer state does not match the provided resourceIdString.', + { + info: errorMetadata + } + ) + } + if (state.state.projectId !== projectId) { + throw new SavedViewInvalidResourceTargetError( + 'Viewer state projectId does not match the provided projectId.', + { + info: errorMetadata + } + ) + } + + return state + } + export const createSavedViewFactory = (deps: { getViewerResourceGroups: GetViewerResourceGroups @@ -119,42 +169,16 @@ export const createSavedViewFactory = ) } - const state = inputToVersionedState(input.viewerState) - if (!state) { - throw new SavedViewCreationValidationError( - 'Invalid viewer state provided. Must be a valid SerializedViewerState.', - { - info: { - input, - authorId - } - } - ) - } - - // Validate state match - if (state.state.resources.request.resourceIdString !== input.resourceIdString) { - throw new SavedViewCreationValidationError( - 'Viewer state does not match the provided resourceIdString.', - { - info: { - input, - authorId - } - } - ) - } - if (state.state.projectId !== projectId) { - throw new SavedViewCreationValidationError( - 'Viewer state projectId does not match the provided projectId.', - { - info: { - input, - authorId - } - } - ) - } + // Validate state + const state = validateViewerStateFactory()({ + viewerState: input.viewerState, + projectId, + resourceIds, + errorMetadata: { + input, + authorId + } + }) // Validate groupId - group is a valid and accessible group in the project if (groupId) { @@ -180,6 +204,16 @@ export const createSavedViewFactory = if (!name?.length) { const viewCount = await deps.getStoredViewCount({ projectId }) name = `View - ${String(viewCount + 1).padStart(3, '0')}` + } else if (name.length > 255) { + throw new SavedViewCreationValidationError( + 'View name must be between 1 and 255 characters long', + { + info: { + input, + authorId + } + } + ) } const concreteResourceIds = resourceIds.toResources().map((r) => r.toString()) @@ -297,3 +331,159 @@ export const deleteSavedViewFactory = const { id } = params await deps.deleteSavedViewRecord({ savedViewId: id }) } + +export const updateSavedViewFactory = + ( + deps: { + getSavedView: GetSavedView + getSavedViewGroup: GetSavedViewGroup + updateSavedViewRecord: UpdateSavedViewRecord + } & DependenciesOf + ): UpdateSavedView => + async (params) => { + const { input, userId } = params + const { projectId, id } = input + + // Check if view even exists + const view = await deps.getSavedView({ + id: input.id, + projectId + }) + if (!view) { + throw new SavedViewUpdateValidationError( + "The specified saved view doesn't exist", + { + info: { + input, + userId + } + } + ) + } + + // Validate that required fields are set + const hasResourceIdString = 'resourceIdString' in input && input.resourceIdString + const hasViewerState = 'viewerState' in input && input.viewerState + const hasScreenshot = 'screenshot' in input && input.screenshot + if (hasResourceIdString || hasViewerState) { + if (!hasResourceIdString || !hasViewerState || !hasScreenshot) { + throw new SavedViewUpdateValidationError( + 'If the resourceIdString or viewerState are being updated, resourceIdString, viewerState and screenshot must all be submitted.', + { + info: { + input, + userId + } + } + ) + } + } + + // Check if there's any actual changes + const changes = removeNullOrUndefinedKeys(omit(input, ['id', 'projectId'])) + if (Object.keys(changes).length === 0) { + throw new SavedViewUpdateValidationError('No changes submitted with the input.', { + info: { + input, + userId + } + }) + } + + // Validate updated resourceIds + let resourceIds: ResourceBuilder | undefined = undefined + if ('resourceIdString' in changes && changes.resourceIdString) { + const validate = validateProjectResourceIdStringFactory(deps) + resourceIds = await validate({ + resourceIdString: changes.resourceIdString, + projectId: input.projectId, + errorMetadata: { + input, + userId + } + }) + } + + // Validate viewerState + let viewerState: VersionedSerializedViewerState | undefined = undefined + if ('viewerState' in changes && changes.viewerState) { + // Validate state + viewerState = validateViewerStateFactory()({ + viewerState: changes.viewerState, + projectId, + resourceIds: resourceIds!, // ts not smart enough, we checked for this above + errorMetadata: { + input, + userId + } + }) + } + + // Validate groupId - group is a valid and accessible group in the project + if (changes.groupId) { + const group = await deps.getSavedViewGroup({ + id: changes.groupId, + projectId + }) + if (!group) { + throw new SavedViewUpdateValidationError( + 'Provided groupId does not exist in the project.', + { + info: { + input, + userId + } + } + ) + } + } + + // Validate screenshot + if (changes.screenshot && !isValidBase64Image(changes.screenshot)) { + throw new SavedViewUpdateValidationError( + 'Invalid screenshot provided. Must be a valid base64 encoded image.', + { + info: { + input, + userId + } + } + ) + } + + // Validate name + if (changes.name && changes.name.length > 255) { + throw new SavedViewUpdateValidationError( + 'View name must be between 1 and 255 characters long', + { + info: { + input, + userId + } + } + ) + } + + const finalChanges = omit(changes, ['resourceIdString', 'viewerState']) + const updatedView = await deps.updateSavedViewRecord({ + id, + projectId, + update: { + ...finalChanges, + ...(resourceIds + ? { + resourceIds: resourceIds + ? resourceIds.map((r) => r.toString()) + : undefined, + groupResourceIds: formatResourceIdsForGroup(resourceIds) + } + : { resourceIdString: undefined }), + ...(viewerState + ? { + viewerState + } + : { viewerState: undefined }) + } + }) + return updatedView! // should exist, we checked before + } diff --git a/packages/server/modules/viewer/tests/helpers/graphql.ts b/packages/server/modules/viewer/tests/helpers/graphql.ts index 31674cf2f..cd8bae5c0 100644 --- a/packages/server/modules/viewer/tests/helpers/graphql.ts +++ b/packages/server/modules/viewer/tests/helpers/graphql.ts @@ -178,3 +178,17 @@ export const canUpdateSavedViewQuery = gql` } } ` + +export const updateSavedViewMutation = gql` + mutation UpdateSavedView($input: UpdateSavedViewInput!) { + projectMutations { + savedViewMutations { + updateView(input: $input) { + ...BasicSavedView + } + } + } + } + + ${basicSavedViewFragment} +` diff --git a/packages/server/modules/viewer/tests/integration/savedViewsCrud.graph.spec.ts b/packages/server/modules/viewer/tests/integration/savedViewsCrud.graph.spec.ts index f4d4b6305..c1f058499 100644 --- a/packages/server/modules/viewer/tests/integration/savedViewsCrud.graph.spec.ts +++ b/packages/server/modules/viewer/tests/integration/savedViewsCrud.graph.spec.ts @@ -9,7 +9,9 @@ import type { GetProjectSavedViewGroupQueryVariables, GetProjectSavedViewGroupsQueryVariables, GetProjectSavedViewQueryVariables, - GetProjectUngroupedViewGroupQueryVariables + GetProjectUngroupedViewGroupQueryVariables, + UpdateSavedViewInput, + UpdateSavedViewMutationVariables } from '@/modules/core/graph/generated/graphql' import { CanCreateSavedViewDocument, @@ -20,7 +22,8 @@ import { GetProjectSavedViewDocument, GetProjectSavedViewGroupDocument, GetProjectSavedViewGroupsDocument, - GetProjectUngroupedViewGroupDocument + GetProjectUngroupedViewGroupDocument, + UpdateSavedViewDocument } from '@/modules/core/graph/generated/graphql' import { buildBasicTestModel, @@ -32,7 +35,8 @@ import { SavedViewVisibility } from '@/modules/viewer/domain/types/savedViews' import { SavedViewCreationValidationError, SavedViewGroupCreationValidationError, - SavedViewInvalidResourceTargetError + SavedViewInvalidResourceTargetError, + SavedViewUpdateValidationError } from '@/modules/viewer/errors/savedViews' import type { BasicTestWorkspace } from '@/modules/workspaces/tests/helpers/creation' import { @@ -67,6 +71,8 @@ const { FF_WORKSPACES_MODULE_ENABLED, FF_SAVED_VIEWS_ENABLED } = getFeatureFlags const fakeScreenshot = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PiQ2YQAAAABJRU5ErkJggg==' +const fakeScreenshot2 = + 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAICAgICAgICAgICAgICAwUDAwMDAwYEBAMFBQYGBQYGBwcICQoJCQkJCQoMCgsMDAwMDAwP/2wBDAwMDAwQDBAgEBAgQEBAgMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgP/wAARCAABAAEDAREAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAHEAP/EABQQAQAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8BP//EABQRAQAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8BP//Z' const fakeViewerState = (overrides?: PartialDeep) => merge( @@ -99,6 +105,7 @@ const fakeViewerState = (overrides?: PartialDeep apollo.execute(CanUpdateSavedViewDocument, input, options) + const updateView = ( + input: UpdateSavedViewMutationVariables, + options?: ExecuteOperationOptions + ) => apollo.execute(UpdateSavedViewDocument, input, options) + const model1ResourceIds = () => ViewerRoute.resourceBuilder().addModel(myModel1.id) const model2ResourceIds = () => ViewerRoute.resourceBuilder().addModel(myModel2.id) before(async () => { - me = await createTestUser(buildBasicTestUser({ name: 'me' })) - guest = await createTestUser(buildBasicTestUser({ name: 'guest' })) + const userCreate = await Promise.all([ + createTestUser(buildBasicTestUser({ name: 'me' })), + createTestUser(buildBasicTestUser({ name: 'guest' })), + createTestUser(buildBasicTestUser({ name: 'other-guy' })) + ]) + me = userCreate[0] + guest = userCreate[1] + otherGuy = userCreate[2] - myLackingProjectWorkspace = await createTestWorkspace( - buildBasicTestWorkspace(), - me, - { + const workspaceCreate = await Promise.all([ + createTestWorkspace(buildBasicTestWorkspace(), me, { addPlan: WorkspacePlans.Free - } - ) - myLackingProject = await createTestStream( - buildBasicTestProject({ - workspaceId: myLackingProjectWorkspace.id }), - me - ) + createTestWorkspace(buildBasicTestWorkspace(), me, { + addPlan: WorkspacePlans.Pro + }) + ]) + myLackingProjectWorkspace = workspaceCreate[0] + myProjectWorkspace = workspaceCreate[1] - myProjectWorkspace = await createTestWorkspace(buildBasicTestWorkspace(), me, { - addPlan: WorkspacePlans.Pro - }) - myProject = await createTestStream( - buildBasicTestProject({ - workspaceId: myProjectWorkspace.id + const projectCreate = await Promise.all([ + createTestStream( + buildBasicTestProject({ + workspaceId: myLackingProjectWorkspace.id + }), + me + ), + createTestStream( + buildBasicTestProject({ + workspaceId: myProjectWorkspace.id + }), + me + ) + ]) + myLackingProject = projectCreate[0] + myProject = projectCreate[1] + + const modelCreate = await Promise.all([ + createTestBranch({ + branch: buildBasicTestModel(), + stream: myProject, + owner: me }), - me - ) - myModel1 = await createTestBranch({ - branch: buildBasicTestModel(), - stream: myProject, - owner: me - }) - myModel2 = await createTestBranch({ - branch: buildBasicTestModel({ name: 'model-2' }), - stream: myProject, - owner: me - }) + createTestBranch({ + branch: buildBasicTestModel({ name: 'model-2' }), + stream: myProject, + owner: me + }) + ]) + myModel1 = modelCreate[0] + myModel2 = modelCreate[1] apollo = await testApolloServer({ authUserId: me.id }) // We only run a small subset of tests if the module is disabled, and we dont need this stuff: @@ -606,7 +633,7 @@ const fakeViewerState = (overrides?: PartialDeep { + let updatablesProject: BasicTestStream + let models: BasicTestBranch[] + let testView: BasicSavedViewFragment + let optionalGroup: BasicSavedViewGroupFragment + + before(async () => { + updatablesProject = await createTestStream( + buildBasicTestProject({ + name: 'updatables-project', + workspaceId: myProjectWorkspace.id + }), + me + ) + await addToStream(updatablesProject, otherGuy, Roles.Stream.Reviewer) + + models = await Promise.all( + times(3, async (i) => { + return await createTestBranch({ + branch: buildBasicTestModel({ + name: `Model #${i}` + }), + stream: updatablesProject, + owner: me + }) + }) + ) + + optionalGroup = ( + await createSavedViewGroup( + { + input: { + projectId: updatablesProject.id, + resourceIdString: models[0].id, + groupName: 'Test Recalculation Group' + } + }, + { assertNoErrors: true } + ) + )?.data?.projectMutations.savedViewMutations.createGroup! + }) + + beforeEach(async () => { + const createRes = await createSavedView( + buildCreateInput({ + projectId: updatablesProject.id, + resourceIdString: models[0].id, + overrides: { name: 'View to update' } + }), + { assertNoErrors: true } + ) + testView = createRes.data?.projectMutations.savedViewMutations.createView! + expect(testView).to.be.ok + }) + + afterEach(async () => { + await deleteView( + { + input: { + id: testView.id, + projectId: updatablesProject.id + } + }, + { assertNoErrors: true } + ) + }) + + const buildValidResourcesUpdate = () => ({ + resourceIdString: 'invalid-resource-id', + screenshot: fakeScreenshot, + viewerState: fakeViewerState({ + projectId: updatablesProject.id, + resources: { + request: { + resourceIdString: models[0].id + } + } + }) + }) + + it('successfully updates a saved view (name)', async () => { + const newName = 'Updated View Name' + + const res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + name: newName + } + }) + + expect(res).to.not.haveGraphQLErrors() + const updatedView = res.data?.projectMutations.savedViewMutations.updateView + expect(updatedView).to.be.ok + expect(updatedView!.id).to.equal(testView.id) + expect(updatedView!.name).to.equal(newName) + }) + + it('successfully updated everyting in a saved view', async () => { + const input: UpdateSavedViewInput = { + id: testView.id, + projectId: updatablesProject.id, + // NEW UPDATES + resourceIdString: models.at(-1)!.id, + groupId: optionalGroup.id, + name: 'Updated View Name', + description: 'Updated description :)', + viewerState: fakeViewerState({ + projectId: updatablesProject.id, + resources: { + request: { + resourceIdString: models.at(-1)!.id + } + } + }), + screenshot: fakeScreenshot2, + isHomeView: true, + visibility: SavedViewVisibility.authorOnly + } + const res = await updateView({ + input + }) + + expect(res).to.not.haveGraphQLErrors() + + const updatedView = res.data?.projectMutations.savedViewMutations.updateView + expect(updatedView).to.be.ok + expect(updatedView!.id).to.equal(testView.id) + expect(updatedView!.name).to.equal(input.name) + expect(updatedView!.description).to.equal(input.description) + expect(updatedView!.groupId).to.equal(input.groupId) + expect(updatedView!.resourceIdString).to.equal(input.resourceIdString) + expect(updatedView!.viewerState).to.deep.equalInAnyOrder(input.viewerState) + expect(updatedView!.screenshot).to.equal(input.screenshot) + expect(updatedView!.isHomeView).to.equal(input.isHomeView) + expect(updatedView!.visibility).to.equal(input.visibility) + }) + + it('fails if user has no access to update the view', async () => { + const newName = 'Updated View Name' + + const res = await updateView( + { + input: { + id: testView.id, + projectId: updatablesProject.id, + name: newName + } + }, + { authUserId: otherGuy.id } + ) + + expect(res).to.haveGraphQLErrors({ code: ForbiddenError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if view does not exist', async () => { + const res = await updateView({ + input: { id: 'non-existent-id', projectId: updatablesProject.id, name: 'x' } + }) + expect(res).to.haveGraphQLErrors({ code: NotFoundError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if no changes submitted', async () => { + const res = await updateView({ + input: { id: testView.id, projectId: updatablesProject.id } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if updating resourceIdString/viewerState/screenshot with missing required fields', async () => { + // Only resourceIdString + let res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + resourceIdString: models[0].id + } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + + // Only viewerState + res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + viewerState: { a: 1 } + } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + + // Only screenshot + res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + screenshot: 'invalid' + } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if groupId does not exist', async () => { + const res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + groupId: 'non-existent-group-id', + name: 'x' + } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if screenshot is invalid', async () => { + const res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + screenshot: 'not-base64', + name: 'x' + } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails if name is too long', async () => { + const longName = 'x'.repeat(256) + const res = await updateView({ + input: { id: testView.id, projectId: updatablesProject.id, name: longName } + }) + expect(res).to.haveGraphQLErrors({ code: SavedViewUpdateValidationError.code }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails updating resourceIdString, if its invalid', async () => { + const res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + ...buildValidResourcesUpdate(), + resourceIdString: 'invalid-resource-id' + } + }) + expect(res).to.haveGraphQLErrors({ + code: SavedViewInvalidResourceTargetError.code + }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + + it('fails updating viewerState, if its invalid', async () => { + const res = await updateView({ + input: { + id: testView.id, + projectId: updatablesProject.id, + ...buildValidResourcesUpdate(), + viewerState: { a: 1 } as unknown as ViewerState.SerializedViewerState // invalid state + } + }) + expect(res).to.haveGraphQLErrors({ + code: SavedViewInvalidResourceTargetError.code + }) + expect(res.data?.projectMutations.savedViewMutations.updateView).to.not.be.ok + }) + }) + describe('deletions', () => { let deletablesProject: BasicTestStream let models: BasicTestBranch[] @@ -711,8 +1011,7 @@ const fakeViewerState = (overrides?: PartialDeep r.type === ViewerResourceType.ModelFolder -type StringViewerResources = string | string[] -type ViewerResources = +type StringViewerResourcesTarget = string | string[] +export type ViewerResourcesTarget = | ViewerResourceBuilder | ViewerResource[] | ViewerResource - | StringViewerResources + | StringViewerResourcesTarget -const toViewerResourceArray = (res: ViewerResources): ViewerResource[] => { +const toViewerResourceArray = (res: ViewerResourcesTarget): ViewerResource[] => { if (res instanceof ViewerResourceBuilder) { return res.toResources() } @@ -184,7 +184,7 @@ class ViewerResourceBuilder implements Iterable { /** * @deprecated Use 'addResources' or 'addNew' instead */ - addFromString(stringResources: StringViewerResources) { + addFromString(stringResources: StringViewerResourcesTarget) { const strings = Array.isArray(stringResources) ? stringResources : [stringResources] for (const resourceIdString of strings) { const resources = parseUrlParameters(resourceIdString.toLowerCase()) @@ -194,7 +194,7 @@ class ViewerResourceBuilder implements Iterable { this.#order() return this } - addResources(res: ViewerResources) { + addResources(res: ViewerResourcesTarget) { this.#resources.push(...toViewerResourceArray(res)) this.#order() return this @@ -204,7 +204,7 @@ class ViewerResourceBuilder implements Iterable { * Only add those resources that are not already in the builder. */ addNew( - incoming: ViewerResources, + incoming: ViewerResourcesTarget, options?: { /** * If true, will require exact version matches for model resources @@ -290,3 +290,5 @@ class ViewerResourceBuilder implements Iterable { export function resourceBuilder() { return new ViewerResourceBuilder() } + +export type ResourceBuilder = ReturnType diff --git a/packages/ui-components/src/components/form/RadioGroup.vue b/packages/ui-components/src/components/form/RadioGroup.vue index 0e520dec6..dc9e0371c 100644 --- a/packages/ui-components/src/components/form/RadioGroup.vue +++ b/packages/ui-components/src/components/form/RadioGroup.vue @@ -18,6 +18,7 @@ : 'hover:border-outline-1' ]" :disabled="disabled || option.disabled" + type="button" @click="selectItem(option.value)" >
+
+ {{ errorMessage }} +