08e941f8af
* Implemented workspace general page * Added notifications to user input * Allowed non-admins to view but not edit * Added redirect to homeroute * Fixed validation * Squashed commit of the following: commit 7bf14ab8af0f76b4c9d0aa87fc08085af7c34959 Author: Chuck Driesler <chuck@speckle.systems> Date: Tue Aug 6 19:40:50 2024 +0200 mob next [ci-skip] [ci skip] [skip ci] lastFile:packages/server/modules/workspacesCore/migrations/20240806160740_workspace_domains.ts commit 8aa3fb0cb052c10eeeb83bf9874ae0d1c065e480 Author: Alessandro Magionami <alessandro.magionami@gmail.com> Date: Tue Aug 6 18:54:15 2024 +0200 mob next [ci-skip] [ci skip] [skip ci] lastFile:packages/server/modules/core/domain/userEmails/operations.ts commit 66dfd0cf6c15a789c8f96a65a3168323e83a7b9e Author: Chuck Driesler <chuck@speckle.systems> Date: Tue Aug 6 18:30:22 2024 +0200 mob next [ci-skip] [ci skip] [skip ci] lastFile:packages/server/modules/workspacesCore/domain/types.ts Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com> * Move General to workspaces folder * feat(workspaces): inputs on security section * feat(workspaces): add domain to workspace mutation * chore(workspaces): add blocked domains list * fix(workspaces): modals with buttons * feat(workspaceDomains): delete domain * fix(workspaces): use mutation * fix(workspaces): present user verified domains as options * Moved sidebar menu to a composable * Added coming soon tag back * feat(workspaces): create domains resolver for workspace * chore(workspaces): fix tests * chore(workspaces): fix types * chore(workspaces): fix linter * fix(workspaces): do some delete I think * chore(workspaces): add domainBasedMembershipProtectionEnabled field to workspace * chore(workspaces): improve validation for email domain * fix(workspace): query and do the thing * chore(workspaces): add graphql schema for domainBasedMembershipProtection * chore(workspaces): lint and test failures * fix(workspaces): test issues w new field * feat(workspaces): add discoverability flag * chore(workspaces): they made me do it * feat(workspaces): enable toggling domain protection * feat(workspaces): add discoverability toggle to workspace settings * feat(workspace): auto enable discoverability on first domain registration * feat(workspace): discoverability toggle fixes * fix(eventBus): fix tests * feat(workspaces): user discoverable workspaces (#2620) * feat(workspaces): it works just trust me * fix(workspaces): don't worry about it * fix(workspaces); happy path success * fix(workspaces): almost there * fix(workspaces): successful tests! * fix(workspaces): we have DISCOVERED (#2621) * Fixed linting issue * Updated query * Updated validation rules * Updated validation rules * Fix unsaved file with type export * Addressed PR comments * Updated cache * Updated item classes, add fragment back * Gergo/web 1574 join workspaces via discovery (#2623) * chore(useremails): add find verified emails by user function * chore(workspace): table helper for workspace domains * chore(workspace): get workspace with domains function * chore(workspace): test get workspace with domains function * feat(workspace): restrict workspace membership when updating workspace role * chore(workspaces): fix types * feat(workspaces): WIP join * feat(workspaces): join button makes u join * chore(useremails): fix type for find verified emails function * feat(workspaces): join * feat(workspace): prevent inviting user without email matching domain * chore(workspaces): fix linter * fix(workspaces): invoke join (gergo wrote this) * fuck * fix(workspaces): properly get discoverable workspaces * fix(workspaces): test --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com> Co-authored-by: Chuck Driesler <chuck@speckle.systems> * fix(workspaces): some query stuff * fix(workspaces): mutate cache instead of refetch * fix(workspaces): more adjustments to gql query and fragment structure * fix(workspaces): queries, style, structure * fix(workspaces): match discoverability with current styles * chore(workspaces): lint lint lint * fix(workspaces): got it twisted * chore(workspaces): fix test * fix(workspaces): route to joined workspace on join --------- Co-authored-by: Mike Tasset <mike.tasset@gmail.com> Co-authored-by: Chuck Driesler <chuck@speckle.systems> Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
359 lines
7.6 KiB
TypeScript
359 lines
7.6 KiB
TypeScript
import { graphql } from '~~/lib/common/generated/gql'
|
|
|
|
export const projectAccessCheckQuery = graphql(`
|
|
query ProjectAccessCheck($id: String!) {
|
|
project(id: $id) {
|
|
id
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectRoleCheckQuery = graphql(`
|
|
query ProjectRoleCheck($id: String!) {
|
|
project(id: $id) {
|
|
id
|
|
role
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectsDashboardQuery = graphql(`
|
|
query ProjectsDashboardQuery($filter: UserProjectsFilter, $cursor: String) {
|
|
activeUser {
|
|
id
|
|
projects(filter: $filter, limit: 6, cursor: $cursor) {
|
|
cursor
|
|
totalCount
|
|
items {
|
|
...ProjectDashboardItem
|
|
}
|
|
}
|
|
...ProjectsInviteBanners
|
|
...ProjectsDashboardHeaderProjects_User
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectsDashboardWorkspaceQuery = graphql(`
|
|
query ProjectsDashboardWorkspaceQuery {
|
|
activeUser {
|
|
id
|
|
...ProjectsDashboardHeaderWorkspaces_User
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectPageQuery = graphql(`
|
|
query ProjectPageQuery($id: String!, $token: String) {
|
|
project(id: $id) {
|
|
...ProjectPageProject
|
|
}
|
|
projectInvite(projectId: $id, token: $token) {
|
|
...ProjectsInviteBanner
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const latestModelsQuery = graphql(`
|
|
query ProjectLatestModels($projectId: String!, $filter: ProjectModelsFilter) {
|
|
project(id: $projectId) {
|
|
id
|
|
models(cursor: null, limit: 16, filter: $filter) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
...ProjectPageLatestItemsModelItem
|
|
}
|
|
}
|
|
pendingImportedModels {
|
|
...PendingFileUpload
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const latestModelsPaginationQuery = graphql(`
|
|
query ProjectLatestModelsPagination(
|
|
$projectId: String!
|
|
$filter: ProjectModelsFilter
|
|
$cursor: String = null
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
models(cursor: $cursor, limit: 16, filter: $filter) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
...ProjectPageLatestItemsModelItem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelsTreeTopLevelQuery = graphql(`
|
|
query ProjectModelsTreeTopLevel(
|
|
$projectId: String!
|
|
$filter: ProjectModelsTreeFilter
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
modelsTree(cursor: null, limit: 8, filter: $filter) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
...SingleLevelModelTreeItem
|
|
}
|
|
}
|
|
pendingImportedModels {
|
|
...PendingFileUpload
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelsTreeTopLevelPaginationQuery = graphql(`
|
|
query ProjectModelsTreeTopLevelPagination(
|
|
$projectId: String!
|
|
$filter: ProjectModelsTreeFilter
|
|
$cursor: String = null
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
modelsTree(cursor: $cursor, limit: 8, filter: $filter) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
...SingleLevelModelTreeItem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelChildrenTreeQuery = graphql(`
|
|
query ProjectModelChildrenTree($projectId: String!, $parentName: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
modelChildrenTree(fullName: $parentName) {
|
|
...SingleLevelModelTreeItem
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const latestCommentThreadsQuery = graphql(`
|
|
query ProjectLatestCommentThreads(
|
|
$projectId: String!
|
|
$cursor: String = null
|
|
$filter: ProjectCommentsFilter = null
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
commentThreads(cursor: $cursor, limit: 8, filter: $filter) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
...ProjectPageLatestItemsCommentItem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectInviteQuery = graphql(`
|
|
query ProjectInvite($projectId: String!, $token: String) {
|
|
projectInvite(projectId: $projectId, token: $token) {
|
|
...ProjectsInviteBanner
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelCheckQuery = graphql(`
|
|
query ProjectModelCheck($projectId: String!, $modelId: String!) {
|
|
project(id: $projectId) {
|
|
model(id: $modelId) {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelPageQuery = graphql(`
|
|
query ProjectModelPage(
|
|
$projectId: String!
|
|
$modelId: String!
|
|
$versionsCursor: String
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
...ProjectModelPageHeaderProject
|
|
...ProjectModelPageVersionsProject
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelVersionsQuery = graphql(`
|
|
query ProjectModelVersions(
|
|
$projectId: String!
|
|
$modelId: String!
|
|
$versionsCursor: String
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
...ProjectModelPageVersionsPagination
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectModelsPageQuery = graphql(`
|
|
query ProjectModelsPage($projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
...ProjectModelsPageHeader_Project
|
|
...ProjectModelsPageResults_Project
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectDiscussionsPageQuery = graphql(`
|
|
query ProjectDiscussionsPage($projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
...ProjectDiscussionsPageHeader_Project
|
|
...ProjectDiscussionsPageResults_Project
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectAutomationsTabQuery = graphql(`
|
|
query ProjectAutomationsTab($projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
models(limit: 1) {
|
|
items {
|
|
id
|
|
}
|
|
}
|
|
automations(filter: null, cursor: null, limit: 5) {
|
|
totalCount
|
|
items {
|
|
id
|
|
...ProjectPageAutomationsRow_Automation
|
|
}
|
|
cursor
|
|
}
|
|
...FormSelectProjects_Project
|
|
}
|
|
...ProjectPageAutomationsEmptyState_Query
|
|
}
|
|
`)
|
|
|
|
export const projectAutomationsTabAutomationsPaginationQuery = graphql(`
|
|
query ProjectAutomationsTabAutomationsPagination(
|
|
$projectId: String!
|
|
$search: String = null
|
|
$cursor: String = null
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
automations(filter: $search, cursor: $cursor, limit: 5) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
id
|
|
...ProjectPageAutomationsRow_Automation
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectAutomationPageQuery = graphql(`
|
|
query ProjectAutomationPage($projectId: String!, $automationId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
...ProjectPageAutomationPage_Project
|
|
automation(id: $automationId) {
|
|
id
|
|
...ProjectPageAutomationPage_Automation
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectAutomationPagePaginatedRunsQuery = graphql(`
|
|
query ProjectAutomationPagePaginatedRuns(
|
|
$projectId: String!
|
|
$automationId: String!
|
|
$cursor: String = null
|
|
) {
|
|
project(id: $projectId) {
|
|
id
|
|
automation(id: $automationId) {
|
|
id
|
|
runs(cursor: $cursor, limit: 10) {
|
|
totalCount
|
|
cursor
|
|
items {
|
|
id
|
|
...AutomationRunDetails
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectAutomationAccessCheckQuery = graphql(`
|
|
query ProjectAutomationAccessCheck($projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
automations(limit: 0) {
|
|
totalCount
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectWebhooksQuery = graphql(`
|
|
query ProjectWebhooks($projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
name
|
|
webhooks {
|
|
items {
|
|
streamId
|
|
triggers
|
|
enabled
|
|
url
|
|
id
|
|
description
|
|
history(limit: 5) {
|
|
items {
|
|
status
|
|
statusInfo
|
|
}
|
|
}
|
|
}
|
|
totalCount
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const projectBlobInfoQuery = graphql(`
|
|
query ProjectBlobInfo($blobId: String!, $projectId: String!) {
|
|
project(id: $projectId) {
|
|
id
|
|
blob(id: $blobId) {
|
|
id
|
|
fileName
|
|
fileType
|
|
fileSize
|
|
createdAt
|
|
}
|
|
}
|
|
}
|
|
`)
|