diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ea6bcbd1..6b78f11d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: snyk: snyk/snyk@2.0.3 - # codecov: codecov/codecov@4.1.0 + codecov: codecov/codecov@5.0.3 workflows: test-build: @@ -20,6 +20,7 @@ workflows: context: - speckle-server-licensing - stripe-integration + - speckle-server-codecov filters: &filters-allow-all tags: # run tests for any commit on any branch, including any tags @@ -93,7 +94,6 @@ workflows: - get-version - deployment-testing-approval - docker-build-server - - docker-build-frontend - docker-build-frontend-2 - docker-build-previews - docker-build-webhooks @@ -116,12 +116,6 @@ workflows: requires: - get-version - - docker-build-frontend: - context: *build-context - filters: *filters-build - requires: - - get-version - - docker-build-frontend-2: context: *build-context filters: *filters-build @@ -195,22 +189,6 @@ workflows: - test-server-multiregion - test-preview-service - - docker-publish-frontend: - context: *docker-hub-context - filters: *filters-publish - requires: - - docker-build-frontend - - get-version - - pre-commit - - publish-approval - - test-frontend-2 - - test-viewer - - test-objectsender - - test-server - - test-server-no-ff - - test-server-multiregion - - test-preview-service - - docker-publish-frontend-2: context: *docker-hub-context filters: *filters-publish @@ -340,7 +318,6 @@ workflows: - deployment-test-helm-chart - docker-publish-docker-compose-ingress - docker-publish-file-imports - - docker-publish-frontend - docker-publish-frontend-2 - docker-publish-monitor-container - docker-publish-previews @@ -494,8 +471,9 @@ jobs: S3_CREATE_BUCKET: 'true' REDIS_URL: 'redis://127.0.0.1:6379' S3_REGION: '' # optional, defaults to 'us-east-1' + FRONTEND_ORIGIN: 'http://127.0.0.1:8081' ENCRYPTION_KEYS_PATH: 'test/assets/automate/encryptionKeys.json' - FF_BILLING_INTEGRATION_ENABLED: 'true' + ENABLE_ALL_FFS: 'true' RATELIMITER_ENABLED: 'false' steps: - checkout @@ -535,8 +513,8 @@ jobs: command: yarn test:report working_directory: 'packages/server' - # - codecov/upload: - # file: packages/server/coverage/lcov.info + - codecov/upload: + files: packages/server/coverage/lcov.info - run: name: Introspect GQL schema for subsequent checks @@ -566,6 +544,7 @@ jobs: NODE_ENV: test DATABASE_URL: 'postgres://speckle:speckle@127.0.0.1:5432/speckle2_test' PGDATABASE: speckle2_test + POSTGRES_MAX_CONNECTIONS_SERVER: 20 PGUSER: speckle SESSION_SECRET: 'keyboard cat' STRATEGY_LOCAL: 'true' @@ -577,6 +556,7 @@ jobs: S3_CREATE_BUCKET: 'true' REDIS_URL: 'redis://127.0.0.1:6379' S3_REGION: '' # optional, defaults to 'us-east-1' + FRONTEND_ORIGIN: 'http://127.0.0.1:8081' ENCRYPTION_KEYS_PATH: 'test/assets/automate/encryptionKeys.json' DISABLE_ALL_FFS: 'true' RATELIMITER_ENABLED: 'false' @@ -627,6 +607,7 @@ jobs: S3_CREATE_BUCKET: 'true' REDIS_URL: 'redis://127.0.0.1:6379' S3_REGION: '' # optional, defaults to 'us-east-1' + FRONTEND_ORIGIN: 'http://127.0.0.1:8081' ENCRYPTION_KEYS_PATH: 'test/assets/automate/encryptionKeys.json' FF_BILLING_INTEGRATION_ENABLED: 'true' # These are the only different env keys: @@ -1018,11 +999,6 @@ jobs: environment: SPECKLE_SERVER_PACKAGE: server - docker-build-frontend: - <<: *build-job - environment: - SPECKLE_SERVER_PACKAGE: frontend - docker-build-frontend-2: <<: *build-job resource_class: xlarge @@ -1088,11 +1064,6 @@ jobs: environment: SPECKLE_SERVER_PACKAGE: server - docker-publish-frontend: - <<: *publish-job - environment: - SPECKLE_SERVER_PACKAGE: frontend - docker-publish-frontend-2: <<: *publish-job environment: diff --git a/.gitignore b/.gitignore index 449785fc3..72bf3f9d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ *node_modules packages/server/.env packages/server/dist -packages/frontend/dist -packages/frontend/profiler packages/viewer/dist packages/objectloader/dist packages/*/dist @@ -22,7 +20,6 @@ coverage/ packages/viewer/example/*.js packages/viewer/example/*.js.map -packages/frontend/schema.graphql .tool-versions packages/server/reports* diff --git a/README.md b/README.md index 0a9ef1fc4..d7ba3e224 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ This monorepo is the home of the Speckle v2 web packages: - [`packages/server`](https://github.com/specklesystems/speckle-server/blob/main/packages/server): the Server, a nodejs app. Core external dependencies are a Redis and Postgresql db. -- [`packages/frontend`](https://github.com/specklesystems/speckle-server/blob/main/packages/frontend): the Frontend, a static Vue app. +- [`packages/frontend-2`](https://github.com/specklesystems/speckle-server/blob/main/packages/frontend-2): the Frontend, a Nuxt/Vue app. - [`packages/viewer`](https://github.com/specklesystems/speckle-server/blob/main/packages/viewer): a threejs extension that allows you to display 3D data [![npm version](https://camo.githubusercontent.com/dc69232cc57b77de6554e752dd6dfc60ca0ecdfbe91bdfcbf7c7531a511ec200/68747470733a2f2f62616467652e667572792e696f2f6a732f253430737065636b6c652532467669657765722e737667)](https://www.npmjs.com/package/@speckle/viewer) - [`packages/objectloader`](https://github.com/specklesystems/speckle-server/blob/main/packages/objectloader): a small js utility class that helps you stream an object and all its sub-components from the Speckle Server API. [![npm version](https://camo.githubusercontent.com/4d4f1e38ce50aaf11b4a3ad8e01ce3eaaa561dc5fd08febbae556f52f1d41097/68747470733a2f2f62616467652e667572792e696f2f6a732f253430737065636b6c652532466f626a6563746c6f616465722e737667)](https://www.npmjs.com/package/@speckle/objectloader) - [`packages/preview-service`](https://github.com/specklesystems/speckle-server/blob/main/packages/preview-service): generates object previews for Speckle Objects headlessly. This package is meant to be called on by the server. diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..9ebf3bec0 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,4 @@ +codecov: + notify: + notify_error: true + require_ci_to_pass: false diff --git a/docker-compose-speckle.yml b/docker-compose-speckle.yml index 715662bbb..d1f6790f9 100644 --- a/docker-compose-speckle.yml +++ b/docker-compose-speckle.yml @@ -72,7 +72,6 @@ services: FILE_SIZE_LIMIT_MB: 100 EMAIL_FROM: 'no-reply@example.org' - USE_FRONTEND_2: true FRONTEND_ORIGIN: 'http://127.0.0.1' ONBOARDING_STREAM_URL: 'https://latest.speckle.systems/projects/843d07eb10' diff --git a/docker-compose-test.yml b/docker-compose-test.yml index 05dbd79da..c3fb4ad3e 100644 --- a/docker-compose-test.yml +++ b/docker-compose-test.yml @@ -9,7 +9,6 @@ services: environment: SPECKLE_SERVER: http://127.0.0.1 # this is the canonical url SERVER_VERSION: 2 - FRONTEND_VERSION: '2' VERIFY_CERTIFICATE: '0' restart: 'no' diff --git a/package.json b/package.json index 93f04f584..fce545129 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "dev:minimal": "yarn workspaces foreach -pivW -j unlimited --include '{@speckle/server,@speckle/frontend-2}' run dev", "gqlgen": "yarn workspaces foreach -pivW -j unlimited --include '{@speckle/server,@speckle/frontend,@speckle/frontend-2,@speckle/dui3}' run gqlgen", "dev:server": "yarn workspace @speckle/server dev", - "dev:frontend": "yarn workspace @speckle/frontend dev", "dev:frontend-2": "yarn workspace @speckle/frontend-2 dev", "dev:shared": "yarn workspace @speckle/shared dev", "prepare": "husky install", diff --git a/packages/fileimport-service/src/api.js b/packages/fileimport-service/src/api.js index f75c13faa..08e5b566c 100644 --- a/packages/fileimport-service/src/api.js +++ b/packages/fileimport-service/src/api.js @@ -9,7 +9,6 @@ const Observability = require('@speckle/shared/dist/commonjs/observability/index const tables = (db) => ({ objects: db('objects'), - closures: db('object_children_closure'), branches: db('branches'), streams: db('streams'), apiTokens: db('api_tokens'), @@ -47,17 +46,9 @@ module.exports = class ServerAPI { async createObject({ streamId, object }) { const insertionObject = this.prepInsertionObject(streamId, object) - const closures = [] const totalChildrenCountByDepth = {} if (object.__closure !== null) { for (const prop in object.__closure) { - closures.push({ - streamId, - parent: insertionObject.id, - child: prop, - minDepth: object.__closure[prop] - }) - if (totalChildrenCountByDepth[object.__closure[prop].toString()]) totalChildrenCountByDepth[object.__closure[prop].toString()]++ else totalChildrenCountByDepth[object.__closure[prop].toString()] = 1 @@ -67,22 +58,17 @@ module.exports = class ServerAPI { delete insertionObject.__tree delete insertionObject.__closure - insertionObject.totalChildrenCount = closures.length + insertionObject.totalChildrenCount = object.__closures.length insertionObject.totalChildrenCountByDepth = JSON.stringify( totalChildrenCountByDepth ) await this.tables.objects.insert(insertionObject).onConflict().ignore() - if (closures.length > 0) { - await this.tables.closures.insert(closures).onConflict().ignore() - } - return insertionObject.id } async createObjectsBatched(streamId, objects) { - const closures = [] const objsToInsert = [] const ids = [] @@ -94,12 +80,6 @@ module.exports = class ServerAPI { if (obj.__closure !== null) { for (const prop in obj.__closure) { - closures.push({ - streamId, - parent: insertionObject.id, - child: prop, - minDepth: obj.__closure[prop] - }) totalChildrenCountGlobal++ if (totalChildrenCountByDepth[obj.__closure[prop].toString()]) totalChildrenCountByDepth[obj.__closure[prop].toString()]++ @@ -119,7 +99,6 @@ module.exports = class ServerAPI { ids.push(insertionObject.id) }) - const closureBatchSize = 1000 const objectsBatchSize = 500 // step 1: insert objects @@ -139,23 +118,6 @@ module.exports = class ServerAPI { } } - // step 2: insert closures - if (closures.length > 0) { - const batches = chunk(closures, closureBatchSize) - - for (const [index, batch] of batches.entries()) { - this.prepInsertionClosureBatch(batch) - await this.tables.closures.insert(batch).onConflict().ignore() - this.logger.info( - { - currentBatchCount: batch.length, - currentBatchId: index + 1, - totalNumberOfBatches: batches.length - }, - 'Inserted {currentBatchCount} closures from batch {currentBatchId} of {totalNumberOfBatches}' - ) - } - } return ids } diff --git a/packages/frontend-2/components/auth/LoginWithEmailBlock.vue b/packages/frontend-2/components/auth/LoginWithEmailBlock.vue index 748743f83..9e2dbf8f8 100644 --- a/packages/frontend-2/components/auth/LoginWithEmailBlock.vue +++ b/packages/frontend-2/components/auth/LoginWithEmailBlock.vue @@ -12,6 +12,7 @@ show-label :disabled="!!(loading || shouldForceInviteEmail)" auto-focus + autocomplete="email" /> diff --git a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue index 4949acc51..2b339b982 100644 --- a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue +++ b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue @@ -13,6 +13,7 @@ :rules="emailRules" show-label :disabled="isEmailDisabled" + autocomplete="email" /> diff --git a/packages/frontend-2/components/auth/VerificationReminderMenuNotice.vue b/packages/frontend-2/components/auth/VerificationReminderMenuNotice.vue deleted file mode 100644 index 3c0df1c75..000000000 --- a/packages/frontend-2/components/auth/VerificationReminderMenuNotice.vue +++ /dev/null @@ -1,113 +0,0 @@ - - diff --git a/packages/frontend-2/components/auth/sso/Register.vue b/packages/frontend-2/components/auth/sso/Register.vue index 14f3756b5..3c638ce2f 100644 --- a/packages/frontend-2/components/auth/sso/Register.vue +++ b/packages/frontend-2/components/auth/sso/Register.vue @@ -39,7 +39,7 @@ import { useQuery } from '@vue/apollo-composable' const route = useRoute() const loading = ref(false) -const newsletterConsent = ref(undefined) +const newsletterConsent = ref(false) const { challenge } = useLoginOrRegisterUtils() const { signInOrSignUpWithSso } = useAuthManager() diff --git a/packages/frontend-2/components/dashboard/Page.vue b/packages/frontend-2/components/dashboard/Page.vue new file mode 100644 index 000000000..380fbfb73 --- /dev/null +++ b/packages/frontend-2/components/dashboard/Page.vue @@ -0,0 +1,186 @@ + + diff --git a/packages/frontend-2/components/feedback/Dialog.vue b/packages/frontend-2/components/feedback/Dialog.vue index 208c4be2a..a551e4f18 100644 --- a/packages/frontend-2/components/feedback/Dialog.vue +++ b/packages/frontend-2/components/feedback/Dialog.vue @@ -98,8 +98,12 @@ const onSubmit = handleSubmit(async () => { }) await sendWebhook(defaultZapierWebhookUrl, { - userId: user.value?.id ?? '', - feedback: feedback.value + feedback: [ + `**Action:** User Feedback`, + `**Type:** ${props.type}`, + `**User ID:** ${user.value?.id}`, + `**Feedback:** ${feedback.value}` + ].join('\n') }) }) diff --git a/packages/frontend-2/components/form/select/ProjectRoles.vue b/packages/frontend-2/components/form/select/ProjectRoles.vue index 4017f908d..8d30ba763 100644 --- a/packages/frontend-2/components/form/select/ProjectRoles.vue +++ b/packages/frontend-2/components/form/select/ProjectRoles.vue @@ -62,6 +62,7 @@ const emit = defineEmits<{ const props = defineProps<{ modelValue?: ValueType clearable?: boolean + hiddenItems?: StreamRoles[] disabledItems?: StreamRoles[] disabledItemsTooltip?: string allowUnset?: boolean @@ -80,7 +81,9 @@ const { selectedValue, firstItem, isMultiItemArrayValue, hiddenSelectedItemCount dynamicVisibility: { elementToWatchForChanges, itemContainer } }) -const roles = computed(() => Object.values(Roles.Stream)) +const roles = computed(() => + Object.values(Roles.Stream).filter((role) => !props.hiddenItems?.includes(role)) +) const disabledItemPredicate = (item: StreamRoles) => props.disabledItems && props.disabledItems.length > 0 diff --git a/packages/frontend-2/components/form/select/Projects.vue b/packages/frontend-2/components/form/select/Projects.vue index b1c343dbb..f65f37fbe 100644 --- a/packages/frontend-2/components/form/select/Projects.vue +++ b/packages/frontend-2/components/form/select/Projects.vue @@ -11,6 +11,7 @@ :name="name || 'projects'" :label-id="labelId" :button-id="buttonId" + :tooltip-text="tooltipText" by="id" > diff --git a/packages/frontend-2/components/settings/user/email/List.vue b/packages/frontend-2/components/settings/user/email/List.vue index 809e8fa4f..7e627da51 100644 --- a/packages/frontend-2/components/settings/user/email/List.vue +++ b/packages/frontend-2/components/settings/user/email/List.vue @@ -1,17 +1,20 @@ diff --git a/packages/frontend-2/components/settings/user/email/ListItem.vue b/packages/frontend-2/components/settings/user/email/ListItem.vue index 0a62356d8..ed865211e 100644 --- a/packages/frontend-2/components/settings/user/email/ListItem.vue +++ b/packages/frontend-2/components/settings/user/email/ListItem.vue @@ -1,7 +1,5 @@ diff --git a/packages/frontend-2/components/settings/workspaces/General/DeleteDialog.vue b/packages/frontend-2/components/settings/workspaces/General/DeleteDialog.vue index e8a0f8729..be28839b8 100644 --- a/packages/frontend-2/components/settings/workspaces/General/DeleteDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/General/DeleteDialog.vue @@ -89,6 +89,8 @@ const onDelete = async () => { if (!props.workspace) return if (workspaceNameInput.value !== props.workspace.name) return + // Create a copy of the workspace name and ID before deletion to avoid errors after deletion/cache update + const { name: workspaceName, id: workspaceId } = props.workspace const cache = apollo.cache const result = await deleteWorkspace({ workspaceId: props.workspace.id @@ -121,24 +123,26 @@ const onDelete = async () => { mixpanel.track('Workspace Deleted', { // eslint-disable-next-line camelcase - workspace_id: props.workspace.id, + workspace_id: workspaceId, feedback: feedback.value }) - mixpanel.get_group('workspace_id', props.workspace.id).set_once({ - isDeleted: true - }) await sendWebhook(defaultZapierWebhookUrl, { - userId: activeUser.value?.id ?? '', - feedback: feedback.value - ? `Action: Workspace Deleted(${props.workspace.name}) Feedback: ${feedback.value}` - : `Action: Workspace Deleted(${props.workspace.name}) - No feedback provided` + feedback: [ + `**Action:** Workspace Deleted`, + `**Workspace:** ${workspaceName}`, + `**User ID:** ${activeUser.value?.id}`, + `**Workspace ID:** ${workspaceId}`, + feedback.value + ? `**Feedback:** ${feedback.value}` + : '**Feedback:** No feedback provided' + ].join('\n') }) triggerNotification({ type: ToastNotificationType.Success, title: 'Workspace deleted', - description: `The ${props.workspace.name} workspace has been deleted` + description: `The ${workspaceName} workspace has been deleted` }) router.push(homeRoute) diff --git a/packages/frontend-2/components/settings/workspaces/security/DomainRemoveDialog.vue b/packages/frontend-2/components/settings/workspaces/security/DomainRemoveDialog.vue index 7cce2e6ca..0bfdd0ce8 100644 --- a/packages/frontend-2/components/settings/workspaces/security/DomainRemoveDialog.vue +++ b/packages/frontend-2/components/settings/workspaces/security/DomainRemoveDialog.vue @@ -17,11 +17,12 @@ import type { LayoutDialogButton } from '@speckle/ui-components' import { useApolloClient } from '@vue/apollo-composable' import { graphql } from '~/lib/common/generated/gql' +import { type SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomainFragment } from '~/lib/common/generated/gql/graphql' import { - type Workspace, - type SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomainFragment -} from '~/lib/common/generated/gql/graphql' -import { getCacheId, getFirstErrorMessage } from '~/lib/common/helpers/graphql' + getCacheId, + getFirstErrorMessage, + modifyObjectField +} from '~/lib/common/helpers/graphql' import { settingsDeleteWorkspaceDomainMutation } from '~/lib/settings/graphql/mutations' import { useMixpanel } from '~/lib/core/composables/mp' import type { MaybeNullOrUndefined } from '@speckle/shared' @@ -69,16 +70,16 @@ const handleRemove = async () => { const { data } = res if (!data?.workspaceMutations || !props.workspaceId) return - cache.modify({ - id: getCacheId('Workspace', props.workspaceId), - fields: { - domains(currentDomains, { isReference }) { - return [...(currentDomains ?? [])].filter((domain) => - isReference(domain) ? false : domain.id !== props.domain.id - ) - } + modifyObjectField( + cache, + getCacheId('Workspace', props.workspaceId), + 'domains', + ({ value, helpers }) => { + return value?.filter( + (domain) => helpers.readField(domain, 'id') !== props.domain.id + ) } - }) + ) } }) .catch(convertThrowIntoFetchResult) diff --git a/packages/frontend-2/components/settings/workspaces/security/sso/Form.vue b/packages/frontend-2/components/settings/workspaces/security/sso/Form.vue index dba6333e5..873a59e47 100644 --- a/packages/frontend-2/components/settings/workspaces/security/sso/Form.vue +++ b/packages/frontend-2/components/settings/workspaces/security/sso/Form.vue @@ -104,7 +104,9 @@ const onSubmit = handleSubmit(() => { url.searchParams.set('challenge', challenge.value) } - postAuthRedirect.set(`/workspaces/${props.workspaceSlug}?ssoValidationSuccess=true`) + postAuthRedirect.set( + `/settings/workspaces/${props.workspaceSlug}/security?ssoValidationSuccess=true` + ) mixpanel.track('Workspace SSO Configuration Started', { // eslint-disable-next-line camelcase diff --git a/packages/frontend-2/components/tour/Comment.vue b/packages/frontend-2/components/tour/Comment.vue deleted file mode 100644 index 6814899de..000000000 --- a/packages/frontend-2/components/tour/Comment.vue +++ /dev/null @@ -1,118 +0,0 @@ - - diff --git a/packages/frontend-2/components/tour/Onboarding.vue b/packages/frontend-2/components/tour/Onboarding.vue deleted file mode 100644 index 089da31d3..000000000 --- a/packages/frontend-2/components/tour/Onboarding.vue +++ /dev/null @@ -1,25 +0,0 @@ - - diff --git a/packages/frontend-2/components/tour/Segmentation.vue b/packages/frontend-2/components/tour/Segmentation.vue deleted file mode 100644 index 49f129b97..000000000 --- a/packages/frontend-2/components/tour/Segmentation.vue +++ /dev/null @@ -1,144 +0,0 @@ - - - diff --git a/packages/frontend-2/components/tour/Slideshow.vue b/packages/frontend-2/components/tour/Slideshow.vue deleted file mode 100644 index 584c9e7fd..000000000 --- a/packages/frontend-2/components/tour/Slideshow.vue +++ /dev/null @@ -1,162 +0,0 @@ - - diff --git a/packages/frontend-2/components/tour/content/BasicViewerNavigation.vue b/packages/frontend-2/components/tour/content/BasicViewerNavigation.vue deleted file mode 100644 index cc93a049f..000000000 --- a/packages/frontend-2/components/tour/content/BasicViewerNavigation.vue +++ /dev/null @@ -1,78 +0,0 @@ - - diff --git a/packages/frontend-2/components/tour/content/FirstTip.vue b/packages/frontend-2/components/tour/content/FirstTip.vue deleted file mode 100644 index 9e9a67cfa..000000000 --- a/packages/frontend-2/components/tour/content/FirstTip.vue +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/packages/frontend-2/components/tour/content/LastTip.vue b/packages/frontend-2/components/tour/content/LastTip.vue deleted file mode 100644 index 67c42c6fd..000000000 --- a/packages/frontend-2/components/tour/content/LastTip.vue +++ /dev/null @@ -1,13 +0,0 @@ - - diff --git a/packages/frontend-2/components/tour/content/OverlayModel.vue b/packages/frontend-2/components/tour/content/OverlayModel.vue deleted file mode 100644 index d8952db0c..000000000 --- a/packages/frontend-2/components/tour/content/OverlayModel.vue +++ /dev/null @@ -1,72 +0,0 @@ - - diff --git a/packages/frontend-2/components/viewer/Controls.vue b/packages/frontend-2/components/viewer/Controls.vue index f7ad78cdd..289c86935 100644 --- a/packages/frontend-2/components/viewer/Controls.vue +++ b/packages/frontend-2/components/viewer/Controls.vue @@ -1,15 +1,9 @@ - diff --git a/packages/frontend-2/components/viewer/PreSetupWrapper.vue b/packages/frontend-2/components/viewer/PreSetupWrapper.vue index 6f27130e1..14c8474d2 100644 --- a/packages/frontend-2/components/viewer/PreSetupWrapper.vue +++ b/packages/frontend-2/components/viewer/PreSetupWrapper.vue @@ -27,13 +27,6 @@ - -
- -
- +
- + - - - + -
- -
+
() const route = useRoute() -const { showTour, showControls } = useViewerTour() const isWorkspacesEnabled = useIsWorkspacesEnabled() const modelId = computed(() => route.params.modelId as string) @@ -143,7 +130,12 @@ const state = useSetupViewer({ const { filters: { hasAnyFiltersApplied } } = useFilterUtilities({ state }) -const { isEnabled: isEmbedEnabled, hideSelectionInfo, isTransparent } = useEmbed() +const { + isEnabled: isEmbedEnabled, + hideSelectionInfo, + isTransparent, + showControls +} = useEmbed() emit('setup', state) diff --git a/packages/frontend-2/components/workspace/CreatePage.vue b/packages/frontend-2/components/workspace/CreatePage.vue index b7959b219..eb56ec41b 100644 --- a/packages/frontend-2/components/workspace/CreatePage.vue +++ b/packages/frontend-2/components/workspace/CreatePage.vue @@ -1,30 +1,23 @@ diff --git a/packages/frontend-2/components/workspace/invite/dialog/UserRow.vue b/packages/frontend-2/components/workspace/invite/dialog/UserRow.vue deleted file mode 100644 index 6758f5d4d..000000000 --- a/packages/frontend-2/components/workspace/invite/dialog/UserRow.vue +++ /dev/null @@ -1,65 +0,0 @@ - - diff --git a/packages/frontend-2/components/workspaces/Promo/Card.vue b/packages/frontend-2/components/workspaces/Promo/Card.vue deleted file mode 100644 index 0f2d9af78..000000000 --- a/packages/frontend-2/components/workspaces/Promo/Card.vue +++ /dev/null @@ -1,17 +0,0 @@ - - diff --git a/packages/frontend-2/composables/globals.ts b/packages/frontend-2/composables/globals.ts index 9f1a61afd..c7b73a4e3 100644 --- a/packages/frontend-2/composables/globals.ts +++ b/packages/frontend-2/composables/globals.ts @@ -42,6 +42,14 @@ export const useIsMultipleEmailsEnabled = () => { return ref(FF_MULTIPLE_EMAILS_MODULE_ENABLED) } +export const useIsOnboardingForced = () => { + const { + public: { FF_FORCE_ONBOARDING } + } = useRuntimeConfig() + + return ref(FF_FORCE_ONBOARDING) +} + export const useIsGendoModuleEnabled = () => { const { public: { FF_GENDOAI_MODULE_ENABLED } diff --git a/packages/frontend-2/layouts/onboarding.vue b/packages/frontend-2/layouts/onboarding.vue deleted file mode 100644 index 38d7a166c..000000000 --- a/packages/frontend-2/layouts/onboarding.vue +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/packages/frontend-2/layouts/viewer.vue b/packages/frontend-2/layouts/viewer.vue index 8b952ab40..8880c0b60 100644 --- a/packages/frontend-2/layouts/viewer.vue +++ b/packages/frontend-2/layouts/viewer.vue @@ -1,28 +1,7 @@ diff --git a/packages/frontend-2/lib/auth/composables/activeUser.ts b/packages/frontend-2/lib/auth/composables/activeUser.ts index f066b4978..d5b47da99 100644 --- a/packages/frontend-2/lib/auth/composables/activeUser.ts +++ b/packages/frontend-2/lib/auth/composables/activeUser.ts @@ -11,6 +11,10 @@ export const activeUserQuery = graphql(` activeUser { id email + emails { + id + verified + } company bio name diff --git a/packages/frontend-2/lib/auth/composables/auth.ts b/packages/frontend-2/lib/auth/composables/auth.ts index da45afa74..7649bf726 100644 --- a/packages/frontend-2/lib/auth/composables/auth.ts +++ b/packages/frontend-2/lib/auth/composables/auth.ts @@ -303,12 +303,6 @@ export const useAuthManager = ( skipRedirect: postAuthRedirect.hadPendingRedirect.value }) - triggerNotification({ - type: ToastNotificationType.Success, - title: 'Welcome!', - description: "You've been successfully authenticated" - }) - postAuthRedirect.popAndFollowRedirect() } catch (e) { triggerNotification({ @@ -378,6 +372,9 @@ export const useAuthManager = ( newsletter }) + const registeredThisSession = useRegisteredThisSession() + registeredThisSession.value = true + // eslint-disable-next-line camelcase goHome({ query: { access_code: accessCode } }) } @@ -480,6 +477,12 @@ const useAuthAppIdAndChallenge = () => { return { appId, challenge } } +/** + * Indicates whether the user just completed registration + */ +export const useRegisteredThisSession = () => + useState('registered-this-session', () => false) + export const useLoginOrRegisterUtils = () => { const appIdAndChallenge = useAuthAppIdAndChallenge() const route = useRoute() diff --git a/packages/frontend-2/lib/auth/composables/onboarding.ts b/packages/frontend-2/lib/auth/composables/onboarding.ts index b7edf7000..99a13f745 100644 --- a/packages/frontend-2/lib/auth/composables/onboarding.ts +++ b/packages/frontend-2/lib/auth/composables/onboarding.ts @@ -15,26 +15,20 @@ import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables import { useNavigateToHome } from '~~/lib/common/helpers/route' import { projectsDashboardQuery } from '~~/lib/projects/graphql/queries' -const ONBOARDING_PROP_INDUSTRY = 'onboarding_v1_industry' const ONBOARDING_PROP_ROLE = 'onboarding_v1_role' export const FIRST_MODEL_NAME = 'base design' export const SECOND_MODEL_NAME = 'building wrapper' -export function useProcessOnboarding() { +export const useProcessOnboarding = () => { const mixpanel = useMixpanel() const { distinctId, activeUser } = useActiveUser() const apollo = useApolloClient().client const { triggerNotification } = useGlobalToast() const goHome = useNavigateToHome() - /** - * Sends to mp the segmentation info (industry, role) - * @param state - */ - const setMixpanelSegments = (state: OnboardingState) => { - mixpanel.people.set_once(ONBOARDING_PROP_INDUSTRY, state.industry || null) - mixpanel.people.set_once(ONBOARDING_PROP_ROLE, state.role || null) + const setMixpanelSegments = (segments: Partial) => { + mixpanel.people.set(segments) } /** @@ -113,6 +107,7 @@ export function useProcessOnboarding() { } }) .catch(convertThrowIntoFetchResult) + goHome() } /** @@ -130,7 +125,6 @@ export function useProcessOnboarding() { throw new OnboardingError('Attempting to onboard unidentified user') // Send data to mixpanel - mixpanel.people.set_once(ONBOARDING_PROP_INDUSTRY, state.industry || null) mixpanel.people.set_once(ONBOARDING_PROP_ROLE, state.role || null) // Mark onboarding as finished diff --git a/packages/frontend-2/lib/auth/helpers/onboarding.ts b/packages/frontend-2/lib/auth/helpers/onboarding.ts index 71f337f40..7413906e4 100644 --- a/packages/frontend-2/lib/auth/helpers/onboarding.ts +++ b/packages/frontend-2/lib/auth/helpers/onboarding.ts @@ -1,31 +1,66 @@ -export enum OnboardingIndustry { - Architecture = 'architecture & planning', - Engineering = 'engineering', - Construction = 'construction', - Software = 'software development', - Edu = 'higher education', +export enum OnboardingRole { + ComputationalDesign = 'computational-design', + BIM = 'bim', + ArchitecturePlanning = 'architecture-planning', + EngineeringAEC = 'engineering-aec', + EngineeringSoftware = 'engineering-software', + Education = 'education', + Management = 'management', Other = 'other' } -export enum OnboardingRole { - ComputationalDesigner = 'computational-designer', - SoftwareDeveloper = 'software-developer', - DesignerOrEngineer = 'designer-or-engineer', - Manager = 'manager', - Student = 'student', +export enum OnboardingPlan { + Exploring = 'exploring', + DataExchange = 'data-exchange', + Analytics = 'analytics', + Collaboration = 'collaboration', + DataWarehouse = 'data-warehouse', + Development = 'development', + Other = 'other' +} + +export enum OnboardingSource { + SocialMedia = 'social-media', + Search = 'internet-search', + Referral = 'friend-or-colleague', + Event = 'event-conference', + Education = 'university-course', Other = 'other' } export const RoleTitleMap: Record = { - [OnboardingRole.ComputationalDesigner]: 'Computational Designer', - [OnboardingRole.SoftwareDeveloper]: 'Software Developer', - [OnboardingRole.DesignerOrEngineer]: 'Designer Or Engineer', - [OnboardingRole.Manager]: 'Manager', - [OnboardingRole.Student]: 'Student', + [OnboardingRole.ComputationalDesign]: 'Computational Design', + [OnboardingRole.BIM]: 'Building Information Modelling (BIM)', + [OnboardingRole.ArchitecturePlanning]: 'Architecture & Planning', + [OnboardingRole.EngineeringAEC]: 'Engineering (Structural, MEP, Civil, etc)', + [OnboardingRole.EngineeringSoftware]: 'Engineering (Software)', + [OnboardingRole.Education]: 'Education', + [OnboardingRole.Management]: 'Management & Leadership', [OnboardingRole.Other]: 'Other' } -export type OnboardingState = { - industry?: OnboardingIndustry - role?: OnboardingRole +export const PlanTitleMap: Record = { + [OnboardingPlan.Exploring]: 'Just checking things out', + [OnboardingPlan.DataExchange]: 'Exchange data between applications', + [OnboardingPlan.Analytics]: + 'Data analytics, visualisation and reporting (eg PowerBI)', + [OnboardingPlan.Collaboration]: 'Collaborate with my team and share 3D models online', + [OnboardingPlan.DataWarehouse]: 'Data warehouse and common data environment (CDE)', + [OnboardingPlan.Development]: 'Develop custom functionalities and apps', + [OnboardingPlan.Other]: 'Other' +} + +export const SourceTitleMap: Record = { + [OnboardingSource.SocialMedia]: 'Social Media', + [OnboardingSource.Search]: 'Internet search', + [OnboardingSource.Referral]: 'Friend or colleague', + [OnboardingSource.Event]: 'Event or conference', + [OnboardingSource.Education]: 'University or course', + [OnboardingSource.Other]: 'Other' +} + +export type OnboardingState = { + role?: OnboardingRole + plans?: OnboardingPlan[] + source?: OnboardingSource } diff --git a/packages/frontend-2/lib/auth/helpers/strategies.ts b/packages/frontend-2/lib/auth/helpers/strategies.ts index f177e8c14..666d246d3 100644 --- a/packages/frontend-2/lib/auth/helpers/strategies.ts +++ b/packages/frontend-2/lib/auth/helpers/strategies.ts @@ -1,6 +1,3 @@ -/** - * TODO: Does this need to change for new frontend? - */ export const speckleWebAppId = 'spklwebapp' export enum AuthStrategy { diff --git a/packages/frontend-2/lib/auth/services/auth.ts b/packages/frontend-2/lib/auth/services/auth.ts index 921a310e9..f8f861f8e 100644 --- a/packages/frontend-2/lib/auth/services/auth.ts +++ b/packages/frontend-2/lib/auth/services/auth.ts @@ -6,7 +6,6 @@ import { } from '~~/lib/auth/errors/errors' import { speckleWebAppId } from '~~/lib/auth/helpers/strategies' -// TODO: Should these differ from the old frontend values? const appId = speckleWebAppId const appSecret = speckleWebAppId diff --git a/packages/frontend-2/lib/billing/composables/actions.ts b/packages/frontend-2/lib/billing/composables/actions.ts index e9d43980b..d280e6671 100644 --- a/packages/frontend-2/lib/billing/composables/actions.ts +++ b/packages/frontend-2/lib/billing/composables/actions.ts @@ -14,8 +14,6 @@ import { settingsBillingCancelCheckoutSessionMutation } from '~/lib/settings/gra import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables/toast' import { useMixpanel } from '~/lib/core/composables/mp' import { graphql } from '~~/lib/common/generated/gql' -import { useZapier } from '~/lib/core/composables/zapier' -import { defaultZapierWebhookUrl } from '~/lib/common/helpers/route' graphql(` fragment BillingActions_Workspace on Workspace { @@ -49,7 +47,6 @@ export const useBillingActions = () => { const { mutate: cancelCheckoutSessionMutation } = useMutation( settingsBillingCancelCheckoutSessionMutation ) - const { sendWebhook } = useZapier() const billingPortalRedirect = async (workspaceId?: string) => { if (!workspaceId) return @@ -188,9 +185,7 @@ export const useBillingActions = () => { }) } - const validateCheckoutSession = async ( - workspace: BillingActions_WorkspaceFragment - ) => { + const validateCheckoutSession = (workspace: BillingActions_WorkspaceFragment) => { const sessionIdQuery = route.query?.session_id const paymentStatusQuery = route.query?.payment_status @@ -218,19 +213,6 @@ export const useBillingActions = () => { // eslint-disable-next-line camelcase workspace_id: workspace.id }) - - if (import.meta.server) { - await sendWebhook(defaultZapierWebhookUrl, { - workspaceId: workspace.id, - workspaceName: workspace.name, - plan: workspace.plan?.name ?? '', - cycle: workspace.subscription?.billingInterval ?? '', - status: WorkspacePlanStatuses.Valid, - invitedTeamCount: workspace.invitedTeam?.length ?? 0, - teamCount: workspace.team?.totalCount ?? 0, - defaultRegion: workspace.defaultRegion?.name ?? '' - }) - } } const currentQueryParams = { ...route.query } diff --git a/packages/frontend-2/lib/common/generated/gql/gql.ts b/packages/frontend-2/lib/common/generated/gql/gql.ts index 5f84036ca..0f0cf759d 100644 --- a/packages/frontend-2/lib/common/generated/gql/gql.ts +++ b/packages/frontend-2/lib/common/generated/gql/gql.ts @@ -17,8 +17,6 @@ const documents = { "\n fragment AuthLoginWithEmailBlock_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n email\n user {\n id\n }\n }\n": types.AuthLoginWithEmailBlock_PendingWorkspaceCollaboratorFragmentDoc, "\n query AuthRegisterPanelWorkspaceInvite($token: String) {\n workspaceInvite(token: $token) {\n id\n ...AuthWorkspaceInviteHeader_PendingWorkspaceCollaborator\n }\n }\n": types.AuthRegisterPanelWorkspaceInviteDocument, "\n fragment ServerTermsOfServicePrivacyPolicyFragment on ServerInfo {\n termsOfService\n }\n": types.ServerTermsOfServicePrivacyPolicyFragmentFragmentDoc, - "\n query EmailVerificationBannerState {\n activeUser {\n id\n email\n verified\n hasPendingVerification\n }\n }\n": types.EmailVerificationBannerStateDocument, - "\n mutation RequestVerification {\n requestVerification\n }\n": types.RequestVerificationDocument, "\n fragment AuthWorkspaceInviteHeader_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n workspaceName\n email\n user {\n id\n ...LimitedUserAvatar\n }\n }\n": types.AuthWorkspaceInviteHeader_PendingWorkspaceCollaboratorFragmentDoc, "\n fragment AuthSsoLogin_Workspace on LimitedWorkspace {\n id\n slug\n name\n logo\n }\n": types.AuthSsoLogin_WorkspaceFragmentDoc, "\n fragment AuthStategiesServerInfoFragment on ServerInfo {\n authStrategies {\n id\n name\n url\n }\n ...AuthThirdPartyLoginButtonOIDC_ServerInfo\n }\n": types.AuthStategiesServerInfoFragmentFragmentDoc, @@ -51,6 +49,9 @@ const documents = { "\n fragment FormUsersSelectItem on LimitedUser {\n id\n name\n avatar\n }\n": types.FormUsersSelectItemFragmentDoc, "\n fragment HeaderNavShare_Project on Project {\n id\n visibility\n ...ProjectsModelPageEmbed_Project\n }\n": types.HeaderNavShare_ProjectFragmentDoc, "\n fragment InviteDialogWorkspace_Workspace on Workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\n }\n }\n }\n": types.InviteDialogWorkspace_WorkspaceFragmentDoc, + "\n fragment InviteDialogProject_Project on Project {\n id\n name\n ...InviteDialogProjectWorkspaceMembers_Project\n workspace {\n id\n name\n defaultProjectRole\n role\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\n }\n }\n }\n }\n": types.InviteDialogProject_ProjectFragmentDoc, + "\n fragment InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator on WorkspaceCollaborator {\n role\n id\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\n }\n }\n": types.InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaboratorFragmentDoc, + "\n fragment InviteDialogProjectWorkspaceMembers_Project on Project {\n id\n ...ProjectPageTeamInternals_Project\n workspace {\n team {\n items {\n ...InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator\n }\n }\n }\n }\n": types.InviteDialogProjectWorkspaceMembers_ProjectFragmentDoc, "\n fragment ProjectModelPageHeaderProject on Project {\n id\n name\n model(id: $modelId) {\n id\n name\n description\n }\n workspace {\n id\n slug\n name\n }\n }\n": types.ProjectModelPageHeaderProjectFragmentDoc, "\n fragment ProjectModelPageVersionsPagination on Project {\n id\n visibility\n model(id: $modelId) {\n id\n versions(limit: 16, cursor: $versionsCursor) {\n cursor\n totalCount\n items {\n ...ProjectModelPageVersionsCardVersion\n }\n }\n }\n ...ProjectsModelPageEmbed_Project\n }\n": types.ProjectModelPageVersionsPaginationFragmentDoc, "\n fragment ProjectModelPageVersionsProject on Project {\n ...ProjectPageProjectHeader\n model(id: $modelId) {\n id\n name\n pendingImportedVersions {\n ...PendingFileUpload\n }\n }\n ...ProjectModelPageVersionsPagination\n ...ProjectsModelPageEmbed_Project\n workspace {\n id\n readOnly\n }\n }\n": types.ProjectModelPageVersionsProjectFragmentDoc, @@ -60,7 +61,6 @@ const documents = { "\n fragment ProjectsModelPageEmbed_Project on Project {\n id\n ...ProjectsPageTeamDialogManagePermissions_Project\n }\n": types.ProjectsModelPageEmbed_ProjectFragmentDoc, "\n fragment ProjectModelPageVersionsCardVersion on Version {\n id\n message\n authorUser {\n ...LimitedUserAvatar\n }\n createdAt\n previewUrl\n sourceApplication\n commentThreadCount: commentThreads(limit: 0) {\n totalCount\n }\n ...ProjectModelPageDialogDeleteVersion\n ...ProjectModelPageDialogMoveToVersion\n automationsStatus {\n ...AutomateRunsTriggerStatus_TriggeredAutomationsStatus\n }\n }\n": types.ProjectModelPageVersionsCardVersionFragmentDoc, "\n fragment ProjectPageProjectHeader on Project {\n id\n role\n name\n description\n visibility\n allowPublicComments\n workspace {\n id\n slug\n name\n logo\n }\n }\n": types.ProjectPageProjectHeaderFragmentDoc, - "\n fragment ProjectPageInviteDialog_Project on Project {\n id\n workspaceId\n workspace {\n id\n defaultProjectRole\n team {\n items {\n role\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\n }\n }\n }\n }\n ...ProjectPageTeamInternals_Project\n workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n }\n }\n": types.ProjectPageInviteDialog_ProjectFragmentDoc, "\n fragment ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFunction on AutomationRevisionFunction {\n parameters\n release {\n id\n versionTag\n createdAt\n inputSchema\n function {\n id\n }\n }\n }\n": types.ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFunctionFragmentDoc, "\n fragment ProjectPageAutomationFunctionSettingsDialog_AutomationRevision on AutomationRevision {\n id\n triggerDefinitions {\n ... on VersionCreatedTriggerDefinition {\n type\n model {\n id\n ...CommonModelSelectorModel\n }\n }\n }\n }\n": types.ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFragmentDoc, "\n fragment ProjectPageAutomationFunctions_Automation on Automation {\n id\n currentRevision {\n id\n ...ProjectPageAutomationFunctionSettingsDialog_AutomationRevision\n functions {\n release {\n id\n inputSchema\n function {\n id\n ...AutomationsFunctionsCard_AutomateFunction\n releases(limit: 1) {\n items {\n id\n }\n }\n }\n }\n ...ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFunction\n }\n }\n }\n": types.ProjectPageAutomationFunctions_AutomationFragmentDoc, @@ -80,7 +80,7 @@ const documents = { "\n fragment SingleLevelModelTreeItem on ModelsTreeItem {\n id\n name\n fullName\n model {\n ...ProjectPageLatestItemsModelItem\n }\n hasChildren\n updatedAt\n }\n": types.SingleLevelModelTreeItemFragmentDoc, "\n fragment ProjectPageModelsCardDeleteDialog on Model {\n id\n name\n }\n": types.ProjectPageModelsCardDeleteDialogFragmentDoc, "\n fragment ProjectPageModelsCardRenameDialog on Model {\n id\n name\n description\n }\n": types.ProjectPageModelsCardRenameDialogFragmentDoc, - "\n query ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...ProjectPageInviteDialog_Project\n }\n }\n": types.ProjectPageSettingsCollaboratorsDocument, + "\n query ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...InviteDialogProject_Project\n workspaceId\n }\n }\n": types.ProjectPageSettingsCollaboratorsDocument, "\n query ProjectPageSettingsCollaboratorsWorkspace($workspaceId: String!) {\n workspace(id: $workspaceId) {\n ...ProjectPageTeamInternals_Workspace\n }\n }\n": types.ProjectPageSettingsCollaboratorsWorkspaceDocument, "\n query ProjectPageSettingsGeneral($projectId: String!) {\n project(id: $projectId) {\n id\n role\n ...ProjectPageSettingsGeneralBlockProjectInfo_Project\n ...ProjectPageSettingsGeneralBlockAccess_Project\n ...ProjectPageSettingsGeneralBlockDiscussions_Project\n ...ProjectPageSettingsGeneralBlockLeave_Project\n ...ProjectPageSettingsGeneralBlockDelete_Project\n ...ProjectPageTeamInternals_Project\n }\n }\n": types.ProjectPageSettingsGeneralDocument, "\n fragment ProjectPageSettingsGeneralBlockAccess_Project on Project {\n id\n visibility\n }\n": types.ProjectPageSettingsGeneralBlockAccess_ProjectFragmentDoc, @@ -93,7 +93,6 @@ const documents = { "\n fragment ProjectsAddDialog_Workspace on Workspace {\n id\n ...ProjectsWorkspaceSelect_Workspace\n }\n": types.ProjectsAddDialog_WorkspaceFragmentDoc, "\n fragment ProjectsAddDialog_User on User {\n workspaces {\n items {\n ...ProjectsAddDialog_Workspace\n }\n }\n }\n": types.ProjectsAddDialog_UserFragmentDoc, "\n fragment ProjectsDashboard_UserProjectCollection on UserProjectCollection {\n numberOfHidden\n }\n": types.ProjectsDashboard_UserProjectCollectionFragmentDoc, - "\n subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n ": types.OnUserProjectsUpdateDocument, "\n fragment ProjectsDashboardFilledProject on ProjectCollection {\n items {\n ...ProjectDashboardItem\n }\n }\n": types.ProjectsDashboardFilledProjectFragmentDoc, "\n fragment ProjectsDashboardFilledUser on UserProjectCollection {\n items {\n ...ProjectDashboardItem\n }\n }\n": types.ProjectsDashboardFilledUserFragmentDoc, "\n fragment ProjectsDashboardHeaderProjects_User on User {\n projectInvites {\n ...ProjectsInviteBanner\n }\n }\n": types.ProjectsDashboardHeaderProjects_UserFragmentDoc, @@ -112,7 +111,6 @@ const documents = { "\n fragment SettingsServerRegionsTable_ServerRegionItem on ServerRegionItem {\n id\n name\n key\n description\n }\n": types.SettingsServerRegionsTable_ServerRegionItemFragmentDoc, "\n fragment SettingsSharedDeleteUserDialog_Workspace on Workspace {\n id\n plan {\n status\n name\n }\n subscription {\n currentBillingCycleEnd\n seats {\n guest\n plan\n }\n }\n }\n": types.SettingsSharedDeleteUserDialog_WorkspaceFragmentDoc, "\n fragment SettingsSharedProjects_Project on Project {\n ...ProjectsDeleteDialog_Project\n id\n name\n visibility\n createdAt\n updatedAt\n models(limit: 0) {\n totalCount\n }\n versions(limit: 0) {\n totalCount\n }\n team {\n id\n user {\n name\n id\n avatar\n }\n }\n }\n": types.SettingsSharedProjects_ProjectFragmentDoc, - "\n fragment SettingsUserEmailCards_UserEmail on UserEmail {\n email\n id\n primary\n verified\n }\n": types.SettingsUserEmailCards_UserEmailFragmentDoc, "\n fragment SettingsUserProfileChangePassword_User on User {\n id\n email\n }\n": types.SettingsUserProfileChangePassword_UserFragmentDoc, "\n fragment SettingsUserProfileDeleteAccount_User on User {\n id\n email\n }\n": types.SettingsUserProfileDeleteAccount_UserFragmentDoc, "\n fragment SettingsUserProfileDetails_User on User {\n id\n name\n company\n ...UserProfileEditDialogAvatar_User\n }\n": types.SettingsUserProfileDetails_UserFragmentDoc, @@ -139,7 +137,7 @@ const documents = { "\n fragment ViewerModelVersionCardItem on Version {\n id\n message\n referencedObject\n sourceApplication\n createdAt\n previewUrl\n authorUser {\n ...LimitedUserAvatar\n }\n }\n": types.ViewerModelVersionCardItemFragmentDoc, "\n fragment MoveProjectsDialog_Workspace on Workspace {\n id\n ...ProjectsMoveToWorkspaceDialog_Workspace\n projects {\n items {\n id\n modelCount: models(limit: 0) {\n totalCount\n }\n versions(limit: 0) {\n totalCount\n }\n }\n }\n }\n": types.MoveProjectsDialog_WorkspaceFragmentDoc, "\n fragment MoveProjectsDialog_User on User {\n projects {\n items {\n ...ProjectsMoveToWorkspaceDialog_Project\n role\n workspace {\n id\n }\n }\n }\n }\n": types.MoveProjectsDialog_UserFragmentDoc, - "\n fragment WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...WorkspaceMixpanelUpdateGroup_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n": types.WorkspaceProjectList_WorkspaceFragmentDoc, + "\n fragment WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n": types.WorkspaceProjectList_WorkspaceFragmentDoc, "\n fragment WorkspaceProjectList_ProjectCollection on ProjectCollection {\n totalCount\n items {\n ...ProjectDashboardItem\n }\n cursor\n }\n": types.WorkspaceProjectList_ProjectCollectionFragmentDoc, "\n fragment WorkspaceHeader_Workspace on Workspace {\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...BillingAlert_Workspace\n slug\n readOnly\n }\n": types.WorkspaceHeader_WorkspaceFragmentDoc, "\n fragment WorkspaceInviteBanner_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n invitedBy {\n id\n ...LimitedUserAvatar\n }\n workspaceId\n workspaceName\n token\n user {\n id\n }\n ...UseWorkspaceInviteManager_PendingWorkspaceCollaborator\n }\n": types.WorkspaceInviteBanner_PendingWorkspaceCollaboratorFragmentDoc, @@ -152,7 +150,7 @@ const documents = { "\n fragment WorkspaceSidebar_Workspace on Workspace {\n ...WorkspaceDashboardAbout_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n slug\n plan {\n status\n }\n }\n": types.WorkspaceSidebar_WorkspaceFragmentDoc, "\n fragment WorkspaceWizard_Workspace on Workspace {\n creationState {\n completed\n state\n }\n name\n slug\n }\n": types.WorkspaceWizard_WorkspaceFragmentDoc, "\n fragment WorkspaceWizardStepRegion_ServerInfo on ServerInfo {\n multiRegion {\n regions {\n id\n ...SettingsWorkspacesRegionsSelect_ServerRegionItem\n }\n }\n }\n": types.WorkspaceWizardStepRegion_ServerInfoFragmentDoc, - "\n query ActiveUserMainMetadata {\n activeUser {\n id\n email\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n": types.ActiveUserMainMetadataDocument, + "\n query ActiveUserMainMetadata {\n activeUser {\n id\n email\n emails {\n id\n verified\n }\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n": types.ActiveUserMainMetadataDocument, "\n mutation CreateOnboardingProject {\n projectMutations {\n createForOnboarding {\n ...ProjectPageProject\n ...ProjectDashboardItem\n }\n }\n }\n ": types.CreateOnboardingProjectDocument, "\n mutation FinishOnboarding {\n activeUserMutations {\n finishOnboarding\n }\n }\n": types.FinishOnboardingDocument, "\n mutation RequestVerificationByEmail($email: String!) {\n requestVerificationByEmail(email: $email)\n }\n": types.RequestVerificationByEmailDocument, @@ -204,6 +202,7 @@ const documents = { "\n query InviteUserSearch($input: UsersRetrievalInput!) {\n users(input: $input) {\n items {\n id\n name\n avatar\n }\n }\n }\n": types.InviteUserSearchDocument, "\n mutation CreateNewRegion($input: CreateServerRegionInput!) {\n serverInfoMutations {\n multiRegion {\n create(input: $input) {\n id\n ...SettingsServerRegionsAddEditDialog_ServerRegionItem\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n }\n }\n }\n": types.CreateNewRegionDocument, "\n mutation UpdateRegion($input: UpdateServerRegionInput!) {\n serverInfoMutations {\n multiRegion {\n update(input: $input) {\n id\n ...SettingsServerRegionsAddEditDialog_ServerRegionItem\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n }\n }\n }\n": types.UpdateRegionDocument, + "\n query PagesOnboardingDiscoverableWorkspaces_ActiveUser {\n activeUser {\n id\n ...PagesOnboarding_DiscoverableWorkspaces\n }\n }\n": types.PagesOnboardingDiscoverableWorkspaces_ActiveUserDocument, "\n fragment ProjectPageTeamInternals_Project on Project {\n id\n role\n invitedTeam {\n id\n title\n role\n inviteId\n user {\n role\n ...LimitedUserAvatar\n }\n }\n team {\n role\n user {\n id\n role\n ...LimitedUserAvatar\n }\n }\n }\n": types.ProjectPageTeamInternals_ProjectFragmentDoc, "\n fragment ProjectPageTeamInternals_Workspace on Workspace {\n id\n team {\n items {\n id\n role\n user {\n id\n }\n }\n }\n }\n": types.ProjectPageTeamInternals_WorkspaceFragmentDoc, "\n fragment ProjectDashboardItemNoModels on Project {\n id\n name\n createdAt\n updatedAt\n role\n team {\n id\n user {\n id\n name\n avatar\n }\n }\n ...ProjectPageModelsCardProject\n }\n": types.ProjectDashboardItemNoModelsFragmentDoc, @@ -290,9 +289,9 @@ const documents = { "\n fragment AddDomainWorkspace on Workspace {\n slug\n }\n ": types.AddDomainWorkspaceFragmentDoc, "\n fragment SettingsMenu_Workspace on Workspace {\n id\n sso {\n provider {\n id\n }\n session {\n validUntil\n }\n }\n }\n": types.SettingsMenu_WorkspaceFragmentDoc, "\n mutation SettingsUpdateWorkspace($input: WorkspaceUpdateInput!) {\n workspaceMutations {\n update(input: $input) {\n ...SettingsWorkspacesGeneral_Workspace\n }\n }\n }\n": types.SettingsUpdateWorkspaceDocument, - "\n mutation SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n": types.SettingsCreateUserEmailDocument, - "\n mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n": types.SettingsDeleteUserEmailDocument, - "\n mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n": types.SettingsSetPrimaryUserEmailDocument, + "\n mutation SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n": types.SettingsCreateUserEmailDocument, + "\n mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n": types.SettingsDeleteUserEmailDocument, + "\n mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n": types.SettingsSetPrimaryUserEmailDocument, "\n mutation SettingsNewEmailVerification($input: EmailVerificationRequestInput!) {\n activeUserMutations {\n emailMutations {\n requestNewEmailVerification(input: $input)\n }\n }\n }\n": types.SettingsNewEmailVerificationDocument, "\n mutation SettingsUpdateWorkspaceSecurity($input: WorkspaceUpdateInput!) {\n workspaceMutations {\n update(input: $input) {\n id\n domainBasedMembershipProtectionEnabled\n discoverabilityEnabled\n }\n }\n }\n": types.SettingsUpdateWorkspaceSecurityDocument, "\n mutation SettingsDeleteWorkspace($workspaceId: String!) {\n workspaceMutations {\n delete(workspaceId: $workspaceId)\n }\n }\n": types.SettingsDeleteWorkspaceDocument, @@ -312,15 +311,18 @@ const documents = { "\n query SettingsWorkspacesMembersSearch($slug: String!, $filter: WorkspaceTeamFilter) {\n workspaceBySlug(slug: $slug) {\n id\n team(filter: $filter) {\n items {\n id\n ...SettingsWorkspacesMembersMembersTable_WorkspaceCollaborator\n }\n }\n }\n }\n": types.SettingsWorkspacesMembersSearchDocument, "\n query SettingsWorkspacesJoinRequestsSearch(\n $slug: String!\n $joinRequestsFilter: AdminWorkspaceJoinRequestFilter\n ) {\n workspaceBySlug(slug: $slug) {\n id\n ...SettingsWorkspacesMembersRequestsTable_Workspace\n }\n }\n": types.SettingsWorkspacesJoinRequestsSearchDocument, "\n query SettingsWorkspacesInvitesSearch(\n $slug: String!\n $invitesFilter: PendingWorkspaceCollaboratorsFilter\n ) {\n workspaceBySlug(slug: $slug) {\n ...SettingsWorkspacesMembersInvitesTable_Workspace\n }\n }\n": types.SettingsWorkspacesInvitesSearchDocument, - "\n query SettingsUserEmailsQuery {\n activeUser {\n ...SettingsUserEmails_User\n }\n }\n": types.SettingsUserEmailsQueryDocument, "\n query SettingsWorkspacesProjects(\n $slug: String!\n $limit: Int!\n $cursor: String\n $filter: WorkspaceProjectsFilter\n ) {\n workspaceBySlug(slug: $slug) {\n id\n slug\n readOnly\n projects(limit: $limit, cursor: $cursor, filter: $filter) {\n cursor\n ...SettingsWorkspacesProjects_ProjectCollection\n }\n }\n }\n": types.SettingsWorkspacesProjectsDocument, "\n query SettingsWorkspaceSecurity($slug: String!) {\n workspaceBySlug(slug: $slug) {\n ...SettingsWorkspacesSecurity_Workspace\n }\n activeUser {\n ...SettingsWorkspacesSecurity_User\n }\n }\n": types.SettingsWorkspaceSecurityDocument, "\n fragment AppAuthorAvatar on AppAuthor {\n id\n name\n avatar\n }\n": types.AppAuthorAvatarFragmentDoc, "\n fragment LimitedUserAvatar on LimitedUser {\n id\n name\n avatar\n }\n": types.LimitedUserAvatarFragmentDoc, "\n fragment ActiveUserAvatar on User {\n id\n name\n avatar\n }\n": types.ActiveUserAvatarFragmentDoc, + "\n subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n ": types.OnUserProjectsUpdateDocument, "\n mutation UpdateUser($input: UserUpdateInput!) {\n activeUserMutations {\n update(user: $input) {\n id\n name\n bio\n company\n avatar\n }\n }\n }\n": types.UpdateUserDocument, "\n mutation UpdateNotificationPreferences($input: JSONObject!) {\n userNotificationPreferencesUpdate(preferences: $input)\n }\n": types.UpdateNotificationPreferencesDocument, "\n mutation DeleteAccount($input: UserDeleteInput!) {\n userDelete(userConfirmation: $input)\n }\n": types.DeleteAccountDocument, + "\n mutation verifyEmail($input: VerifyUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n verify(input: $input)\n }\n }\n }\n": types.VerifyEmailDocument, + "\n fragment EmailFields on UserEmail {\n id\n email\n verified\n primary\n userId\n }\n": types.EmailFieldsFragmentDoc, + "\n query UserEmails {\n activeUser {\n id\n emails {\n ...EmailFields\n }\n hasPendingVerification\n }\n }\n": types.UserEmailsDocument, "\n fragment ViewerCommentBubblesData on Comment {\n id\n viewedAt\n viewerState\n }\n": types.ViewerCommentBubblesDataFragmentDoc, "\n fragment ViewerCommentThread on Comment {\n ...ViewerCommentsListItem\n ...ViewerCommentBubblesData\n ...ViewerCommentsReplyItem\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, @@ -339,8 +341,6 @@ const documents = { "\n subscription OnViewerCommentsUpdated($target: ViewerUpdateTrackingTarget!) {\n projectCommentsUpdated(target: $target) {\n id\n type\n comment {\n id\n parent {\n id\n }\n ...ViewerCommentThread\n }\n }\n }\n": types.OnViewerCommentsUpdatedDocument, "\n fragment LinkableComment on Comment {\n id\n viewerResources {\n modelId\n versionId\n objectId\n }\n }\n": types.LinkableCommentFragmentDoc, "\n fragment UseWorkspaceInviteManager_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n token\n workspaceId\n workspaceSlug\n user {\n id\n }\n }\n": types.UseWorkspaceInviteManager_PendingWorkspaceCollaboratorFragmentDoc, - "\n fragment WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator on WorkspaceCollaborator {\n id\n role\n }\n": types.WorkspaceMixpanelUpdateGroup_WorkspaceCollaboratorFragmentDoc, - "\n fragment WorkspaceMixpanelUpdateGroup_Workspace on Workspace {\n id\n name\n description\n domainBasedMembershipProtectionEnabled\n discoverabilityEnabled\n plan {\n status\n name\n createdAt\n }\n subscription {\n billingInterval\n currentBillingCycleEnd\n seats {\n guest\n plan\n }\n }\n team {\n totalCount\n items {\n ...WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator\n }\n }\n defaultRegion {\n key\n }\n }\n": types.WorkspaceMixpanelUpdateGroup_WorkspaceFragmentDoc, "\n subscription OnWorkspaceProjectsUpdate($slug: String!) {\n workspaceProjectsUpdated(workspaceId: null, workspaceSlug: $slug) {\n projectId\n workspaceId\n type\n project {\n ...ProjectDashboardItem\n }\n }\n }\n ": types.OnWorkspaceProjectsUpdateDocument, "\n fragment WorkspaceHasCustomDataResidency_Workspace on Workspace {\n id\n defaultRegion {\n id\n name\n }\n }\n": types.WorkspaceHasCustomDataResidency_WorkspaceFragmentDoc, "\n query CheckProjectWorkspaceDataResidency($projectId: String!) {\n project(id: $projectId) {\n id\n workspace {\n ...WorkspaceHasCustomDataResidency_Workspace\n }\n }\n }\n": types.CheckProjectWorkspaceDataResidencyDocument, @@ -382,14 +382,13 @@ const documents = { "\n fragment AutomateFunctionPage_AutomateFunction on AutomateFunction {\n id\n name\n description\n logo\n supportedSourceApps\n tags\n ...AutomateFunctionPageHeader_Function\n ...AutomateFunctionPageInfo_AutomateFunction\n ...AutomateAutomationCreateDialog_AutomateFunction\n creator {\n id\n }\n }\n": types.AutomateFunctionPage_AutomateFunctionFragmentDoc, "\n query AutomateFunctionPage($functionId: ID!) {\n automateFunction(id: $functionId) {\n ...AutomateFunctionPage_AutomateFunction\n }\n activeUser {\n workspaces {\n items {\n ...AutomateFunctionCreateDialog_Workspace\n ...AutomateFunctionEditDialog_Workspace\n }\n }\n }\n }\n": types.AutomateFunctionPageDocument, "\n query AutomateFunctionPageWorkspace($workspaceId: String!) {\n workspace(id: $workspaceId) {\n id\n ...AutomateFunctionPageHeader_Workspace\n }\n }\n": types.AutomateFunctionPageWorkspaceDocument, - "\n query AutomateFunctionsPage($search: String, $cursor: String = null) {\n ...AutomateFunctionsPageItems_Query\n ...AutomateFunctionsPageHeader_Query\n }\n": types.AutomateFunctionsPageDocument, + "\n fragment PagesOnboarding_DiscoverableWorkspaces on User {\n discoverableWorkspaces {\n id\n name\n logo\n description\n slug\n }\n }\n": types.PagesOnboarding_DiscoverableWorkspacesFragmentDoc, "\n fragment ProjectPageProject on Project {\n id\n createdAt\n modelCount: models(limit: 0) {\n totalCount\n }\n commentThreadCount: commentThreads(limit: 0) {\n totalCount\n }\n workspace {\n id\n }\n ...ProjectPageTeamInternals_Project\n ...ProjectPageProjectHeader\n ...ProjectPageTeamDialog\n ...ProjectsMoveToWorkspaceDialog_Project\n }\n": types.ProjectPageProjectFragmentDoc, "\n fragment ProjectPageAutomationPage_Automation on Automation {\n id\n ...ProjectPageAutomationHeader_Automation\n ...ProjectPageAutomationFunctions_Automation\n ...ProjectPageAutomationRuns_Automation\n }\n": types.ProjectPageAutomationPage_AutomationFragmentDoc, "\n fragment ProjectPageAutomationPage_Project on Project {\n id\n workspaceId\n ...ProjectPageAutomationHeader_Project\n }\n": types.ProjectPageAutomationPage_ProjectFragmentDoc, "\n fragment ProjectPageSettingsTab_Project on Project {\n id\n role\n }\n": types.ProjectPageSettingsTab_ProjectFragmentDoc, "\n fragment SettingsServerProjects_ProjectCollection on ProjectCollection {\n totalCount\n items {\n ...SettingsSharedProjects_Project\n }\n }\n": types.SettingsServerProjects_ProjectCollectionFragmentDoc, "\n query SettingsServerRegions {\n serverInfo {\n multiRegion {\n regions {\n id\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n availableKeys\n }\n }\n }\n": types.SettingsServerRegionsDocument, - "\n fragment SettingsUserEmails_User on User {\n id\n emails {\n ...SettingsUserEmailCards_UserEmail\n }\n }\n": types.SettingsUserEmails_UserFragmentDoc, "\n fragment SettingsWorkspacesBilling_Workspace on Workspace {\n ...BillingAlert_Workspace\n id\n role\n plan {\n name\n status\n createdAt\n paymentMethod\n }\n subscription {\n billingInterval\n currentBillingCycleEnd\n seats {\n guest\n plan\n }\n }\n team {\n items {\n id\n role\n }\n }\n }\n": types.SettingsWorkspacesBilling_WorkspaceFragmentDoc, "\n fragment SettingsWorkspacesGeneral_Workspace on Workspace {\n ...SettingsWorkspacesGeneralEditAvatar_Workspace\n ...SettingsWorkspaceGeneralDeleteDialog_Workspace\n ...SettingsWorkspacesGeneralEditSlugDialog_Workspace\n id\n name\n slug\n description\n logo\n role\n defaultProjectRole\n plan {\n status\n name\n }\n }\n": types.SettingsWorkspacesGeneral_WorkspaceFragmentDoc, "\n fragment SettingsWorkspacesMembers_Workspace on Workspace {\n id\n role\n team {\n items {\n id\n }\n }\n invitedTeam(filter: $invitesFilter) {\n user {\n id\n }\n }\n adminWorkspacesJoinRequests(filter: $joinRequestsFilter) {\n totalCount\n }\n }\n": types.SettingsWorkspacesMembers_WorkspaceFragmentDoc, @@ -425,14 +424,6 @@ export function graphql(source: "\n query AuthRegisterPanelWorkspaceInvite($tok * 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 ServerTermsOfServicePrivacyPolicyFragment on ServerInfo {\n termsOfService\n }\n"): (typeof documents)["\n fragment ServerTermsOfServicePrivacyPolicyFragment on ServerInfo {\n termsOfService\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 EmailVerificationBannerState {\n activeUser {\n id\n email\n verified\n hasPendingVerification\n }\n }\n"): (typeof documents)["\n query EmailVerificationBannerState {\n activeUser {\n id\n email\n verified\n hasPendingVerification\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 RequestVerification {\n requestVerification\n }\n"): (typeof documents)["\n mutation RequestVerification {\n requestVerification\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -561,6 +552,18 @@ export function graphql(source: "\n fragment HeaderNavShare_Project on 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 fragment InviteDialogWorkspace_Workspace on Workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\n }\n }\n }\n"): (typeof documents)["\n fragment InviteDialogWorkspace_Workspace on Workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\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 InviteDialogProject_Project on Project {\n id\n name\n ...InviteDialogProjectWorkspaceMembers_Project\n workspace {\n id\n name\n defaultProjectRole\n role\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\n }\n }\n }\n }\n"): (typeof documents)["\n fragment InviteDialogProject_Project on Project {\n id\n name\n ...InviteDialogProjectWorkspaceMembers_Project\n workspace {\n id\n name\n defaultProjectRole\n role\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n plan {\n status\n name\n }\n subscription {\n seats {\n guest\n plan\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 InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator on WorkspaceCollaborator {\n role\n id\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\n }\n }\n"): (typeof documents)["\n fragment InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator on WorkspaceCollaborator {\n role\n id\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\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 InviteDialogProjectWorkspaceMembers_Project on Project {\n id\n ...ProjectPageTeamInternals_Project\n workspace {\n team {\n items {\n ...InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator\n }\n }\n }\n }\n"): (typeof documents)["\n fragment InviteDialogProjectWorkspaceMembers_Project on Project {\n id\n ...ProjectPageTeamInternals_Project\n workspace {\n team {\n items {\n ...InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator\n }\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -597,10 +600,6 @@ export function graphql(source: "\n fragment ProjectModelPageVersionsCardVersio * 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 ProjectPageProjectHeader on Project {\n id\n role\n name\n description\n visibility\n allowPublicComments\n workspace {\n id\n slug\n name\n logo\n }\n }\n"): (typeof documents)["\n fragment ProjectPageProjectHeader on Project {\n id\n role\n name\n description\n visibility\n allowPublicComments\n workspace {\n id\n slug\n name\n logo\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 ProjectPageInviteDialog_Project on Project {\n id\n workspaceId\n workspace {\n id\n defaultProjectRole\n team {\n items {\n role\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\n }\n }\n }\n }\n ...ProjectPageTeamInternals_Project\n workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n }\n }\n"): (typeof documents)["\n fragment ProjectPageInviteDialog_Project on Project {\n id\n workspaceId\n workspace {\n id\n defaultProjectRole\n team {\n items {\n role\n user {\n id\n name\n bio\n company\n avatar\n verified\n role\n }\n }\n }\n }\n ...ProjectPageTeamInternals_Project\n workspace {\n id\n domainBasedMembershipProtectionEnabled\n domains {\n domain\n id\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -680,7 +679,7 @@ export function graphql(source: "\n fragment ProjectPageModelsCardRenameDialog /** * 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 ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...ProjectPageInviteDialog_Project\n }\n }\n"): (typeof documents)["\n query ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...ProjectPageInviteDialog_Project\n }\n }\n"]; +export function graphql(source: "\n query ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...InviteDialogProject_Project\n workspaceId\n }\n }\n"): (typeof documents)["\n query ProjectPageSettingsCollaborators($projectId: String!) {\n project(id: $projectId) {\n id\n ...ProjectPageTeamInternals_Project\n ...InviteDialogProject_Project\n workspaceId\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -729,10 +728,6 @@ export function graphql(source: "\n fragment ProjectsAddDialog_User on User {\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 ProjectsDashboard_UserProjectCollection on UserProjectCollection {\n numberOfHidden\n }\n"): (typeof documents)["\n fragment ProjectsDashboard_UserProjectCollection on UserProjectCollection {\n numberOfHidden\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 subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n "): (typeof documents)["\n subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n "]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -805,10 +800,6 @@ export function graphql(source: "\n fragment SettingsSharedDeleteUserDialog_Wor * 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 SettingsSharedProjects_Project on Project {\n ...ProjectsDeleteDialog_Project\n id\n name\n visibility\n createdAt\n updatedAt\n models(limit: 0) {\n totalCount\n }\n versions(limit: 0) {\n totalCount\n }\n team {\n id\n user {\n name\n id\n avatar\n }\n }\n }\n"): (typeof documents)["\n fragment SettingsSharedProjects_Project on Project {\n ...ProjectsDeleteDialog_Project\n id\n name\n visibility\n createdAt\n updatedAt\n models(limit: 0) {\n totalCount\n }\n versions(limit: 0) {\n totalCount\n }\n team {\n id\n user {\n name\n id\n avatar\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 SettingsUserEmailCards_UserEmail on UserEmail {\n email\n id\n primary\n verified\n }\n"): (typeof documents)["\n fragment SettingsUserEmailCards_UserEmail on UserEmail {\n email\n id\n primary\n verified\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -916,7 +907,7 @@ export function graphql(source: "\n fragment MoveProjectsDialog_User on User {\ /** * 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 WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...WorkspaceMixpanelUpdateGroup_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n"): (typeof documents)["\n fragment WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...WorkspaceMixpanelUpdateGroup_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n"]; +export function graphql(source: "\n fragment WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n"): (typeof documents)["\n fragment WorkspaceProjectList_Workspace on Workspace {\n id\n ...WorkspaceBase_Workspace\n ...WorkspaceTeam_Workspace\n ...WorkspaceSecurity_Workspace\n ...BillingAlert_Workspace\n ...MoveProjectsDialog_Workspace\n ...InviteDialogWorkspace_Workspace\n projects {\n ...WorkspaceProjectList_ProjectCollection\n }\n creationState {\n completed\n state\n }\n readOnly\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -968,7 +959,7 @@ export function graphql(source: "\n fragment WorkspaceWizardStepRegion_ServerIn /** * 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 ActiveUserMainMetadata {\n activeUser {\n id\n email\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n"): (typeof documents)["\n query ActiveUserMainMetadata {\n activeUser {\n id\n email\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n"]; +export function graphql(source: "\n query ActiveUserMainMetadata {\n activeUser {\n id\n email\n emails {\n id\n verified\n }\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n"): (typeof documents)["\n query ActiveUserMainMetadata {\n activeUser {\n id\n email\n emails {\n id\n verified\n }\n company\n bio\n name\n role\n avatar\n isOnboardingFinished\n createdAt\n verified\n notificationPreferences\n versions(limit: 0) {\n totalCount\n }\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1173,6 +1164,10 @@ export function graphql(source: "\n mutation CreateNewRegion($input: CreateServ * 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 UpdateRegion($input: UpdateServerRegionInput!) {\n serverInfoMutations {\n multiRegion {\n update(input: $input) {\n id\n ...SettingsServerRegionsAddEditDialog_ServerRegionItem\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n }\n }\n }\n"): (typeof documents)["\n mutation UpdateRegion($input: UpdateServerRegionInput!) {\n serverInfoMutations {\n multiRegion {\n update(input: $input) {\n id\n ...SettingsServerRegionsAddEditDialog_ServerRegionItem\n ...SettingsServerRegionsTable_ServerRegionItem\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 query PagesOnboardingDiscoverableWorkspaces_ActiveUser {\n activeUser {\n id\n ...PagesOnboarding_DiscoverableWorkspaces\n }\n }\n"): (typeof documents)["\n query PagesOnboardingDiscoverableWorkspaces_ActiveUser {\n activeUser {\n id\n ...PagesOnboarding_DiscoverableWorkspaces\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1520,15 +1515,15 @@ export function graphql(source: "\n mutation SettingsUpdateWorkspace($input: Wo /** * 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 SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"]; +export function graphql(source: "\n mutation SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsCreateUserEmail($input: CreateUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n create(input: $input) {\n id\n emails {\n ...EmailFields\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 mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"]; +export function graphql(source: "\n mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsDeleteUserEmail($input: DeleteUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n delete(input: $input) {\n id\n emails {\n ...EmailFields\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 mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n ...SettingsUserEmails_User\n }\n }\n }\n }\n"]; +export function graphql(source: "\n mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n id\n emails {\n ...EmailFields\n }\n }\n }\n }\n }\n"): (typeof documents)["\n mutation SettingsSetPrimaryUserEmail($input: SetPrimaryUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n setPrimary(input: $input) {\n id\n emails {\n ...EmailFields\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. */ @@ -1605,10 +1600,6 @@ export function graphql(source: "\n query SettingsWorkspacesJoinRequestsSearch( * 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 SettingsWorkspacesInvitesSearch(\n $slug: String!\n $invitesFilter: PendingWorkspaceCollaboratorsFilter\n ) {\n workspaceBySlug(slug: $slug) {\n ...SettingsWorkspacesMembersInvitesTable_Workspace\n }\n }\n"): (typeof documents)["\n query SettingsWorkspacesInvitesSearch(\n $slug: String!\n $invitesFilter: PendingWorkspaceCollaboratorsFilter\n ) {\n workspaceBySlug(slug: $slug) {\n ...SettingsWorkspacesMembersInvitesTable_Workspace\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 query SettingsUserEmailsQuery {\n activeUser {\n ...SettingsUserEmails_User\n }\n }\n"): (typeof documents)["\n query SettingsUserEmailsQuery {\n activeUser {\n ...SettingsUserEmails_User\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1629,6 +1620,10 @@ export function graphql(source: "\n fragment LimitedUserAvatar on LimitedUser { * 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 ActiveUserAvatar on User {\n id\n name\n avatar\n }\n"): (typeof documents)["\n fragment ActiveUserAvatar on User {\n id\n name\n avatar\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 subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n "): (typeof documents)["\n subscription OnUserProjectsUpdate {\n userProjectsUpdated {\n type\n id\n project {\n ...ProjectDashboardItem\n }\n }\n }\n "]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1641,6 +1636,18 @@ export function graphql(source: "\n mutation UpdateNotificationPreferences($inp * 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 DeleteAccount($input: UserDeleteInput!) {\n userDelete(userConfirmation: $input)\n }\n"): (typeof documents)["\n mutation DeleteAccount($input: UserDeleteInput!) {\n userDelete(userConfirmation: $input)\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 verifyEmail($input: VerifyUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n verify(input: $input)\n }\n }\n }\n"): (typeof documents)["\n mutation verifyEmail($input: VerifyUserEmailInput!) {\n activeUserMutations {\n emailMutations {\n verify(input: $input)\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 EmailFields on UserEmail {\n id\n email\n verified\n primary\n userId\n }\n"): (typeof documents)["\n fragment EmailFields on UserEmail {\n id\n email\n verified\n primary\n userId\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 UserEmails {\n activeUser {\n id\n emails {\n ...EmailFields\n }\n hasPendingVerification\n }\n }\n"): (typeof documents)["\n query UserEmails {\n activeUser {\n id\n emails {\n ...EmailFields\n }\n hasPendingVerification\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1713,14 +1720,6 @@ export function graphql(source: "\n fragment LinkableComment on Comment {\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 UseWorkspaceInviteManager_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n token\n workspaceId\n workspaceSlug\n user {\n id\n }\n }\n"): (typeof documents)["\n fragment UseWorkspaceInviteManager_PendingWorkspaceCollaborator on PendingWorkspaceCollaborator {\n id\n token\n workspaceId\n workspaceSlug\n user {\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 fragment WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator on WorkspaceCollaborator {\n id\n role\n }\n"): (typeof documents)["\n fragment WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator on WorkspaceCollaborator {\n id\n role\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 WorkspaceMixpanelUpdateGroup_Workspace on Workspace {\n id\n name\n description\n domainBasedMembershipProtectionEnabled\n discoverabilityEnabled\n plan {\n status\n name\n createdAt\n }\n subscription {\n billingInterval\n currentBillingCycleEnd\n seats {\n guest\n plan\n }\n }\n team {\n totalCount\n items {\n ...WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator\n }\n }\n defaultRegion {\n key\n }\n }\n"): (typeof documents)["\n fragment WorkspaceMixpanelUpdateGroup_Workspace on Workspace {\n id\n name\n description\n domainBasedMembershipProtectionEnabled\n discoverabilityEnabled\n plan {\n status\n name\n createdAt\n }\n subscription {\n billingInterval\n currentBillingCycleEnd\n seats {\n guest\n plan\n }\n }\n team {\n totalCount\n items {\n ...WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator\n }\n }\n defaultRegion {\n key\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1888,7 +1887,7 @@ export function graphql(source: "\n query AutomateFunctionPageWorkspace($worksp /** * 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 AutomateFunctionsPage($search: String, $cursor: String = null) {\n ...AutomateFunctionsPageItems_Query\n ...AutomateFunctionsPageHeader_Query\n }\n"): (typeof documents)["\n query AutomateFunctionsPage($search: String, $cursor: String = null) {\n ...AutomateFunctionsPageItems_Query\n ...AutomateFunctionsPageHeader_Query\n }\n"]; +export function graphql(source: "\n fragment PagesOnboarding_DiscoverableWorkspaces on User {\n discoverableWorkspaces {\n id\n name\n logo\n description\n slug\n }\n }\n"): (typeof documents)["\n fragment PagesOnboarding_DiscoverableWorkspaces on User {\n discoverableWorkspaces {\n id\n name\n logo\n description\n slug\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -1913,10 +1912,6 @@ export function graphql(source: "\n fragment SettingsServerProjects_ProjectColl * 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 SettingsServerRegions {\n serverInfo {\n multiRegion {\n regions {\n id\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n availableKeys\n }\n }\n }\n"): (typeof documents)["\n query SettingsServerRegions {\n serverInfo {\n multiRegion {\n regions {\n id\n ...SettingsServerRegionsTable_ServerRegionItem\n }\n availableKeys\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 SettingsUserEmails_User on User {\n id\n emails {\n ...SettingsUserEmailCards_UserEmail\n }\n }\n"): (typeof documents)["\n fragment SettingsUserEmails_User on User {\n id\n emails {\n ...SettingsUserEmailCards_UserEmail\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 57f505498..5dc607e8b 100644 --- a/packages/frontend-2/lib/common/generated/gql/graphql.ts +++ b/packages/frontend-2/lib/common/generated/gql/graphql.ts @@ -4736,16 +4736,6 @@ export type AuthRegisterPanelWorkspaceInviteQuery = { __typename?: 'Query', work export type ServerTermsOfServicePrivacyPolicyFragmentFragment = { __typename?: 'ServerInfo', termsOfService?: string | null }; -export type EmailVerificationBannerStateQueryVariables = Exact<{ [key: string]: never; }>; - - -export type EmailVerificationBannerStateQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null } | null }; - -export type RequestVerificationMutationVariables = Exact<{ [key: string]: never; }>; - - -export type RequestVerificationMutation = { __typename?: 'Mutation', requestVerification: boolean }; - export type AuthWorkspaceInviteHeader_PendingWorkspaceCollaboratorFragment = { __typename?: 'PendingWorkspaceCollaborator', id: string, workspaceName: string, email?: string | null, user?: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } | null }; export type AuthSsoLogin_WorkspaceFragment = { __typename?: 'LimitedWorkspace', id: string, slug: string, name: string, logo?: string | null }; @@ -4819,6 +4809,12 @@ export type HeaderNavShare_ProjectFragment = { __typename?: 'Project', id: strin export type InviteDialogWorkspace_WorkspaceFragment = { __typename?: 'Workspace', id: string, domainBasedMembershipProtectionEnabled: boolean, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans } | null, subscription?: { __typename?: 'WorkspaceSubscription', seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null }; +export type InviteDialogProject_ProjectFragment = { __typename?: 'Project', id: string, name: string, role?: string | null, workspace?: { __typename?: 'Workspace', id: string, name: string, defaultProjectRole: string, role?: string | null, domainBasedMembershipProtectionEnabled: boolean, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans } | null, subscription?: { __typename?: 'WorkspaceSubscription', seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', role: string, id: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }> } } | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, role?: string | null, name: string, avatar?: string | null } }> }; + +export type InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaboratorFragment = { __typename?: 'WorkspaceCollaborator', role: string, id: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }; + +export type InviteDialogProjectWorkspaceMembers_ProjectFragment = { __typename?: 'Project', id: string, role?: string | null, workspace?: { __typename?: 'Workspace', team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', role: string, id: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }> } } | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, role?: string | null, name: string, avatar?: string | null } }> }; + export type ProjectModelPageHeaderProjectFragment = { __typename?: 'Project', id: string, name: string, model: { __typename?: 'Model', id: string, name: string, description?: string | null }, workspace?: { __typename?: 'Workspace', id: string, slug: string, name: string } | null }; export type ProjectModelPageVersionsPaginationFragment = { __typename?: 'Project', id: string, visibility: ProjectVisibility, role?: string | null, model: { __typename?: 'Model', id: string, versions: { __typename?: 'VersionCollection', cursor?: string | null, totalCount: number, items: Array<{ __typename?: 'Version', id: string, message?: string | null, createdAt: string, previewUrl: string, sourceApplication?: string | null, authorUser?: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } | null, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> } } }; @@ -4837,8 +4833,6 @@ export type ProjectModelPageVersionsCardVersionFragment = { __typename?: 'Versio export type ProjectPageProjectHeaderFragment = { __typename?: 'Project', id: string, role?: string | null, name: string, description?: string | null, visibility: ProjectVisibility, allowPublicComments: boolean, workspace?: { __typename?: 'Workspace', id: string, slug: string, name: string, logo?: string | null } | null }; -export type ProjectPageInviteDialog_ProjectFragment = { __typename?: 'Project', id: string, workspaceId?: string | null, role?: string | null, workspace?: { __typename?: 'Workspace', id: string, defaultProjectRole: string, domainBasedMembershipProtectionEnabled: boolean, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }> }, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null } | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, role?: string | null, name: string, avatar?: string | null } }> }; - export type ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFunctionFragment = { __typename?: 'AutomationRevisionFunction', parameters?: {} | null, release: { __typename?: 'AutomateFunctionRelease', id: string, versionTag: string, createdAt: string, inputSchema?: {} | null, function: { __typename?: 'AutomateFunction', id: string } } }; export type ProjectPageAutomationFunctionSettingsDialog_AutomationRevisionFragment = { __typename?: 'AutomationRevision', id: string, triggerDefinitions: Array<{ __typename?: 'VersionCreatedTriggerDefinition', type: AutomateRunTriggerType, model?: { __typename?: 'Model', id: string, name: string } | null }> }; @@ -4882,7 +4876,7 @@ export type ProjectPageSettingsCollaboratorsQueryVariables = Exact<{ }>; -export type ProjectPageSettingsCollaboratorsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, role?: string | null, workspaceId?: string | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } }>, workspace?: { __typename?: 'Workspace', id: string, defaultProjectRole: string, domainBasedMembershipProtectionEnabled: boolean, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }> }, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null } | null } }; +export type ProjectPageSettingsCollaboratorsQuery = { __typename?: 'Query', project: { __typename?: 'Project', id: string, workspaceId?: string | null, role?: string | null, name: string, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } }>, workspace?: { __typename?: 'Workspace', id: string, name: string, defaultProjectRole: string, role?: string | null, domainBasedMembershipProtectionEnabled: boolean, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans } | null, subscription?: { __typename?: 'WorkspaceSubscription', seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', role: string, id: string, user: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, role?: string | null } }> } } | null } }; export type ProjectPageSettingsCollaboratorsWorkspaceQueryVariables = Exact<{ workspaceId: Scalars['String']['input']; @@ -4918,11 +4912,6 @@ export type ProjectsAddDialog_UserFragment = { __typename?: 'User', workspaces: export type ProjectsDashboard_UserProjectCollectionFragment = { __typename?: 'UserProjectCollection', numberOfHidden: number }; -export type OnUserProjectsUpdateSubscriptionVariables = Exact<{ [key: string]: never; }>; - - -export type OnUserProjectsUpdateSubscription = { __typename?: 'Subscription', userProjectsUpdated: { __typename?: 'UserProjectsUpdatedMessage', type: UserProjectsUpdatedMessageType, id: string, project?: { __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> } | null } }; - export type ProjectsDashboardFilledProjectFragment = { __typename?: 'ProjectCollection', items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }; export type ProjectsDashboardFilledUserFragment = { __typename?: 'UserProjectCollection', items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }; @@ -4962,8 +4951,6 @@ export type SettingsSharedDeleteUserDialog_WorkspaceFragment = { __typename?: 'W export type SettingsSharedProjects_ProjectFragment = { __typename?: 'Project', id: string, name: string, visibility: ProjectVisibility, createdAt: string, updatedAt: string, role?: string | null, models: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', name: string, id: string, avatar?: string | null } }>, workspace?: { __typename?: 'Workspace', slug: string, id: string } | null }; -export type SettingsUserEmailCards_UserEmailFragment = { __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }; - export type SettingsUserProfileChangePassword_UserFragment = { __typename?: 'User', id: string, email?: string | null }; export type SettingsUserProfileDeleteAccount_UserFragment = { __typename?: 'User', id: string, email?: string | null }; @@ -5016,7 +5003,7 @@ export type MoveProjectsDialog_WorkspaceFragment = { __typename?: 'Workspace', i export type MoveProjectsDialog_UserFragment = { __typename?: 'User', projects: { __typename?: 'UserProjectCollection', items: Array<{ __typename?: 'Project', role?: string | null, id: string, name: string, workspace?: { __typename?: 'Workspace', id: string } | null, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number } }> } }; -export type WorkspaceProjectList_WorkspaceFragment = { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, discoverabilityEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string, user: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, defaultRegion?: { __typename?: 'ServerRegionItem', key: string, id: string, name: string } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null }; +export type WorkspaceProjectList_WorkspaceFragment = { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null, defaultRegion?: { __typename?: 'ServerRegionItem', id: string, name: string } | null }; export type WorkspaceProjectList_ProjectCollectionFragment = { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }; @@ -5045,7 +5032,7 @@ export type WorkspaceWizardStepRegion_ServerInfoFragment = { __typename?: 'Serve export type ActiveUserMainMetadataQueryVariables = Exact<{ [key: string]: never; }>; -export type ActiveUserMainMetadataQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, company?: string | null, bio?: string | null, name: string, role?: string | null, avatar?: string | null, isOnboardingFinished?: boolean | null, createdAt?: string | null, verified?: boolean | null, notificationPreferences: {}, versions: { __typename?: 'CountOnlyCollection', totalCount: number } } | null }; +export type ActiveUserMainMetadataQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, company?: string | null, bio?: string | null, name: string, role?: string | null, avatar?: string | null, isOnboardingFinished?: boolean | null, createdAt?: string | null, verified?: boolean | null, notificationPreferences: {}, emails: Array<{ __typename?: 'UserEmail', id: string, verified: boolean }>, versions: { __typename?: 'CountOnlyCollection', totalCount: number } } | null }; export type CreateOnboardingProjectMutationVariables = Exact<{ [key: string]: never; }>; @@ -5367,6 +5354,11 @@ export type UpdateRegionMutationVariables = Exact<{ export type UpdateRegionMutation = { __typename?: 'Mutation', serverInfoMutations: { __typename?: 'ServerInfoMutations', multiRegion: { __typename?: 'ServerRegionMutations', update: { __typename?: 'ServerRegionItem', id: string, name: string, description?: string | null, key: string } } } }; +export type PagesOnboardingDiscoverableWorkspaces_ActiveUserQueryVariables = Exact<{ [key: string]: never; }>; + + +export type PagesOnboardingDiscoverableWorkspaces_ActiveUserQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, discoverableWorkspaces: Array<{ __typename?: 'LimitedWorkspace', id: string, name: string, logo?: string | null, description?: string | null, slug: string }> } | null }; + export type ProjectPageTeamInternals_ProjectFragment = { __typename?: 'Project', id: string, role?: string | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, user: { __typename?: 'LimitedUser', id: string, role?: string | null, name: string, avatar?: string | null } }> }; export type ProjectPageTeamInternals_WorkspaceFragment = { __typename?: 'Workspace', id: string, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string, user: { __typename?: 'LimitedUser', id: string } }> } }; @@ -5942,21 +5934,21 @@ export type SettingsCreateUserEmailMutationVariables = Exact<{ }>; -export type SettingsCreateUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', create: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }> } } } }; +export type SettingsCreateUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', create: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', id: string, email: string, verified: boolean, primary: boolean, userId: string }> } } } }; export type SettingsDeleteUserEmailMutationVariables = Exact<{ input: DeleteUserEmailInput; }>; -export type SettingsDeleteUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', delete: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }> } } } }; +export type SettingsDeleteUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', delete: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', id: string, email: string, verified: boolean, primary: boolean, userId: string }> } } } }; export type SettingsSetPrimaryUserEmailMutationVariables = Exact<{ input: SetPrimaryUserEmailInput; }>; -export type SettingsSetPrimaryUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', setPrimary: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }> } } } }; +export type SettingsSetPrimaryUserEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', setPrimary: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', id: string, email: string, verified: boolean, primary: boolean, userId: string }> } } } }; export type SettingsNewEmailVerificationMutationVariables = Exact<{ input: EmailVerificationRequestInput; @@ -6093,11 +6085,6 @@ export type SettingsWorkspacesInvitesSearchQueryVariables = Exact<{ export type SettingsWorkspacesInvitesSearchQuery = { __typename?: 'Query', workspaceBySlug: { __typename?: 'Workspace', id: string, role?: string | null, domainBasedMembershipProtectionEnabled: boolean, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, inviteId: string, role: string, title: string, updatedAt: string, user?: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> | null, domains?: Array<{ __typename?: 'WorkspaceDomain', domain: string, id: string }> | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans } | null, subscription?: { __typename?: 'WorkspaceSubscription', seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null } }; -export type SettingsUserEmailsQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -export type SettingsUserEmailsQueryQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }> } | null }; - export type SettingsWorkspacesProjectsQueryVariables = Exact<{ slug: Scalars['String']['input']; limit: Scalars['Int']['input']; @@ -6121,6 +6108,11 @@ export type LimitedUserAvatarFragment = { __typename?: 'LimitedUser', id: string export type ActiveUserAvatarFragment = { __typename?: 'User', id: string, name: string, avatar?: string | null }; +export type OnUserProjectsUpdateSubscriptionVariables = Exact<{ [key: string]: never; }>; + + +export type OnUserProjectsUpdateSubscription = { __typename?: 'Subscription', userProjectsUpdated: { __typename?: 'UserProjectsUpdatedMessage', type: UserProjectsUpdatedMessageType, id: string, project?: { __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> } | null } }; + export type UpdateUserMutationVariables = Exact<{ input: UserUpdateInput; }>; @@ -6142,6 +6134,20 @@ export type DeleteAccountMutationVariables = Exact<{ export type DeleteAccountMutation = { __typename?: 'Mutation', userDelete: boolean }; +export type VerifyEmailMutationVariables = Exact<{ + input: VerifyUserEmailInput; +}>; + + +export type VerifyEmailMutation = { __typename?: 'Mutation', activeUserMutations: { __typename?: 'ActiveUserMutations', emailMutations: { __typename?: 'UserEmailMutations', verify?: boolean | null } } }; + +export type EmailFieldsFragment = { __typename?: 'UserEmail', id: string, email: string, verified: boolean, primary: boolean, userId: string }; + +export type UserEmailsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type UserEmailsQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, hasPendingVerification?: boolean | null, emails: Array<{ __typename?: 'UserEmail', id: string, email: string, verified: boolean, primary: boolean, userId: string }> } | null }; + export type ViewerCommentBubblesDataFragment = { __typename?: 'Comment', id: string, viewedAt?: string | null, viewerState?: {} | null }; export type ViewerCommentThreadFragment = { __typename?: 'Comment', id: string, rawText: string, 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, createdAt: string, text: { __typename?: 'SmartTextEditorValue', doc?: {} | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, fileType: string, fileSize?: number | 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 } }; @@ -6258,10 +6264,6 @@ export type LinkableCommentFragment = { __typename?: 'Comment', id: string, view export type UseWorkspaceInviteManager_PendingWorkspaceCollaboratorFragment = { __typename?: 'PendingWorkspaceCollaborator', id: string, token?: string | null, workspaceId: string, workspaceSlug: string, user?: { __typename?: 'LimitedUser', id: string } | null }; -export type WorkspaceMixpanelUpdateGroup_WorkspaceCollaboratorFragment = { __typename?: 'WorkspaceCollaborator', id: string, role: string }; - -export type WorkspaceMixpanelUpdateGroup_WorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, description?: string | null, domainBasedMembershipProtectionEnabled: boolean, discoverabilityEnabled: boolean, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans, createdAt: string } | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string }> }, defaultRegion?: { __typename?: 'ServerRegionItem', key: string } | null }; - export type OnWorkspaceProjectsUpdateSubscriptionVariables = Exact<{ slug: Scalars['String']['input']; }>; @@ -6385,7 +6387,7 @@ export type WorkspacePageQueryQueryVariables = Exact<{ }>; -export type WorkspacePageQueryQuery = { __typename?: 'Query', workspaceBySlug: { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, discoverabilityEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string, user: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, defaultRegion?: { __typename?: 'ServerRegionItem', key: string, id: string, name: string } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null }, workspaceInvite?: { __typename?: 'PendingWorkspaceCollaborator', id: string, workspaceId: string, workspaceName: string, token?: string | null, title: string, email?: string | null, workspaceSlug: string, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null }, user?: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string } | null } | null }; +export type WorkspacePageQueryQuery = { __typename?: 'Query', workspaceBySlug: { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null, defaultRegion?: { __typename?: 'ServerRegionItem', id: string, name: string } | null }, workspaceInvite?: { __typename?: 'PendingWorkspaceCollaborator', id: string, workspaceId: string, workspaceName: string, token?: string | null, title: string, email?: string | null, workspaceSlug: string, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null }, user?: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string } | null } | null }; export type WorkspaceProjectsQueryQueryVariables = Exact<{ workspaceSlug: Scalars['String']['input']; @@ -6457,7 +6459,7 @@ export type OnWorkspaceUpdatedSubscriptionVariables = Exact<{ }>; -export type OnWorkspaceUpdatedSubscription = { __typename?: 'Subscription', workspaceUpdated: { __typename?: 'WorkspaceUpdatedMessage', id: string, workspace: { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, discoverabilityEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string, user: { __typename?: 'LimitedUser', id: string, avatar?: string | null, name: string } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, defaultRegion?: { __typename?: 'ServerRegionItem', key: string, id: string, name: string } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null } } }; +export type OnWorkspaceUpdatedSubscription = { __typename?: 'Subscription', workspaceUpdated: { __typename?: 'WorkspaceUpdatedMessage', id: string, workspace: { __typename?: 'Workspace', id: string, readOnly: boolean, name: string, slug: string, role?: string | null, description?: string | null, logo?: string | null, domainBasedMembershipProtectionEnabled: boolean, projects: { __typename?: 'ProjectCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Project', id: string, name: string, createdAt: string, updatedAt: string, role?: string | null, visibility: ProjectVisibility, modelCount: { __typename?: 'ModelCollection', totalCount: number }, versions: { __typename?: 'VersionCollection', totalCount: number }, models: { __typename?: 'ModelCollection', totalCount: number, items: Array<{ __typename?: 'Model', id: string, name: string, displayName: string, previewUrl?: string | null, createdAt: string, updatedAt: string, description?: string | null, versionCount: { __typename?: 'VersionCollection', totalCount: number }, commentThreadCount: { __typename?: 'CommentCollection', totalCount: number }, pendingImportedVersions: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, automationsStatus?: { __typename?: 'TriggeredAutomationsStatus', id: string, automationRuns: Array<{ __typename?: 'AutomateRun', id: string, functionRuns: Array<{ __typename?: 'AutomateFunctionRun', id: string, updatedAt: string, status: AutomateRunStatus, results?: {} | null, statusMessage?: string | null, contextView?: string | null, createdAt: string, function?: { __typename?: 'AutomateFunction', id: string, logo?: string | null, name: string } | null }>, automation: { __typename?: 'Automation', id: string, name: string } }> } | null }> }, workspace?: { __typename?: 'Workspace', id: string, readOnly: boolean, slug: string, name: string, logo?: string | null } | null, pendingImportedModels: Array<{ __typename?: 'FileUpload', id: string, projectId: string, modelName: string, convertedStatus: number, convertedMessage?: string | null, uploadDate: string, convertedLastUpdate: string, fileType: string, fileName: string }>, team: Array<{ __typename?: 'ProjectCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }> }, creationState?: { __typename?: 'WorkspaceCreationState', completed: boolean, state: {} } | null, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, createdAt: string, name: WorkspacePlans } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', totalCount: number, items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, user: { __typename?: 'LimitedUser', id: string, name: string, avatar?: string | null } }> }, adminWorkspacesJoinRequests?: { __typename?: 'WorkspaceJoinRequestCollection', totalCount: number } | null, domains?: Array<{ __typename?: 'WorkspaceDomain', id: string, domain: string }> | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, invitedTeam?: Array<{ __typename?: 'PendingWorkspaceCollaborator', id: string, role: string, email?: string | null }> | null, defaultRegion?: { __typename?: 'ServerRegionItem', id: string, name: string } | null } } }; export type LegacyBranchRedirectMetadataQueryVariables = Exact<{ streamId: Scalars['String']['input']; @@ -6515,13 +6517,7 @@ export type AutomateFunctionPageWorkspaceQueryVariables = Exact<{ export type AutomateFunctionPageWorkspaceQuery = { __typename?: 'Query', workspace: { __typename?: 'Workspace', id: string, name: string, slug: string } }; -export type AutomateFunctionsPageQueryVariables = Exact<{ - search?: InputMaybe; - cursor?: InputMaybe; -}>; - - -export type AutomateFunctionsPageQuery = { __typename?: 'Query', automateFunctions: { __typename?: 'AutomateFunctionCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'AutomateFunction', id: string, name: string, isFeatured: boolean, description: string, logo?: string | null, repo: { __typename?: 'BasicGitRepositoryMetadata', id: string, url: string, owner: string, name: string }, releases: { __typename?: 'AutomateFunctionReleaseCollection', items: Array<{ __typename?: 'AutomateFunctionRelease', id: string, inputSchema?: {} | null }> } }> }, activeUser?: { __typename?: 'User', id: string, role?: string | null, automateInfo: { __typename?: 'UserAutomateInfo', hasAutomateGithubApp: boolean, availableGithubOrgs: Array } } | null, serverInfo: { __typename?: 'ServerInfo', automate: { __typename?: 'ServerAutomateInfo', availableFunctionTemplates: Array<{ __typename?: 'AutomateFunctionTemplate', id: AutomateFunctionTemplateLanguage, title: string, logo: string, url: string }> } } }; +export type PagesOnboarding_DiscoverableWorkspacesFragment = { __typename?: 'User', discoverableWorkspaces: Array<{ __typename?: 'LimitedWorkspace', id: string, name: string, logo?: string | null, description?: string | null, slug: string }> }; export type ProjectPageProjectFragment = { __typename?: 'Project', id: string, createdAt: string, role?: string | null, name: string, description?: string | null, visibility: ProjectVisibility, allowPublicComments: boolean, modelCount: { __typename?: 'ModelCollection', totalCount: number }, commentThreadCount: { __typename?: 'ProjectCommentCollection', totalCount: number }, workspace?: { __typename?: 'Workspace', id: string, slug: string, name: string, logo?: string | null } | null, invitedTeam?: Array<{ __typename?: 'PendingStreamCollaborator', id: string, title: string, role: string, inviteId: string, user?: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } | null }> | null, team: Array<{ __typename?: 'ProjectCollaborator', role: string, id: string, user: { __typename?: 'LimitedUser', role?: string | null, id: string, name: string, avatar?: string | null } }>, versions: { __typename?: 'VersionCollection', totalCount: number } }; @@ -6538,8 +6534,6 @@ export type SettingsServerRegionsQueryVariables = Exact<{ [key: string]: never; export type SettingsServerRegionsQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', multiRegion: { __typename?: 'ServerMultiRegionConfiguration', availableKeys: Array, regions: Array<{ __typename?: 'ServerRegionItem', id: string, name: string, key: string, description?: string | null }> } } }; -export type SettingsUserEmails_UserFragment = { __typename?: 'User', id: string, emails: Array<{ __typename?: 'UserEmail', email: string, id: string, primary: boolean, verified: boolean }> }; - export type SettingsWorkspacesBilling_WorkspaceFragment = { __typename?: 'Workspace', id: string, role?: string | null, plan?: { __typename?: 'WorkspacePlan', name: WorkspacePlans, status: WorkspacePlanStatuses, createdAt: string, paymentMethod: WorkspacePaymentMethod } | null, subscription?: { __typename?: 'WorkspaceSubscription', billingInterval: BillingInterval, currentBillingCycleEnd: string, seats: { __typename?: 'WorkspaceSubscriptionSeats', guest: number, plan: number } } | null, team: { __typename?: 'WorkspaceCollaboratorCollection', items: Array<{ __typename?: 'WorkspaceCollaborator', id: string, role: string }> } }; export type SettingsWorkspacesGeneral_WorkspaceFragment = { __typename?: 'Workspace', id: string, name: string, slug: string, description?: string | null, logo?: string | null, role?: string | null, defaultProjectRole: string, plan?: { __typename?: 'WorkspacePlan', status: WorkspacePlanStatuses, name: WorkspacePlans } | null }; @@ -6583,6 +6577,10 @@ export const FormSelectProjects_ProjectFragmentDoc = {"kind":"Document","definit export const ProjectsPageTeamDialogManagePermissions_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}}]} as unknown as DocumentNode; export const ProjectsModelPageEmbed_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}}]} as unknown as DocumentNode; export const HeaderNavShare_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HeaderNavShare_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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}}]} as unknown as DocumentNode; +export const ProjectPageTeamInternals_ProjectFragmentDoc = {"kind":"Document","definitions":[{"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":"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":"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 InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaboratorFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]} as unknown as DocumentNode; +export const InviteDialogProjectWorkspaceMembers_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembers_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":"ProjectPageTeamInternals_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembersRow_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":"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":"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":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]} as unknown as DocumentNode; +export const InviteDialogProject_ProjectFragmentDoc = {"kind":"Document","definitions":[{"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":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembers_Project"}},{"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":"defaultProjectRole"}},{"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}}]}},{"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":"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":"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":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembers_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":"ProjectPageTeamInternals_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const ProjectModelPageHeaderProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageHeaderProject"},"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":"model"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"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":"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"}}]}}]}}]} as unknown as DocumentNode; export const ProjectPageProjectHeaderFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}}]} as unknown as DocumentNode; export const PendingFileUploadFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; @@ -6598,8 +6596,6 @@ export const ProjectModelPageVersionsCardVersionFragmentDoc = {"kind":"Document" export const ProjectModelPageVersionsPaginationFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageVersionsPagination"},"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":"model"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"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":"16"}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"versionsCursor"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageVersionsCardVersion"}}]}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsModelPageEmbed_Project"}}]}},{"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":"ProjectModelPageDialogDeleteVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageDialogMoveToVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageVersionsCardVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"authorUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}},{"kind":"Field","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageDialogDeleteVersion"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageDialogMoveToVersion"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}}]} as unknown as DocumentNode; export const ProjectModelPageVersionsProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageVersionsProject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Project"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProjectHeader"}},{"kind":"Field","name":{"kind":"Name","value":"model"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedVersions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageVersionsPagination"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsModelPageEmbed_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"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":"ProjectModelPageDialogDeleteVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageDialogMoveToVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageVersionsCardVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"authorUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}},{"kind":"Field","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageDialogDeleteVersion"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageDialogMoveToVersion"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageVersionsPagination"},"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":"model"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"modelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"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":"16"}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"versionsCursor"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectModelPageVersionsCardVersion"}}]}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsModelPageEmbed_Project"}}]}}]} as unknown as DocumentNode; export const ProjectModelPageDialogEditMessageVersionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectModelPageDialogEditMessageVersion"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Version"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]} as unknown as DocumentNode; -export const ProjectPageTeamInternals_ProjectFragmentDoc = {"kind":"Document","definitions":[{"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":"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":"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 ProjectPageInviteDialog_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageInviteDialog_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":"defaultProjectRole"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"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":"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 ProjectPageModelsActions_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}}]} as unknown as DocumentNode; export const ProjectPageModelsCardProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}}]} as unknown as DocumentNode; export const ProjectPageAutomationModels_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageAutomationModels_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":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}}]} as unknown as DocumentNode; @@ -6674,11 +6670,9 @@ export const WorkspaceInvitedTeam_WorkspaceFragmentDoc = {"kind":"Document","def export const WorkspaceTeam_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInvitedTeam_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":"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"}}]}}]}}]} as unknown as DocumentNode; export const WorkspaceSecurity_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}}]} as unknown as DocumentNode; export const BillingAlert_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode; -export const WorkspaceMixpanelUpdateGroup_WorkspaceCollaboratorFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"role"}}]}}]} as unknown as DocumentNode; -export const WorkspaceMixpanelUpdateGroup_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}},{"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"role"}}]}}]} as unknown as DocumentNode; export const MoveProjectsDialog_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}}]} as unknown as DocumentNode; export const WorkspaceProjectList_ProjectCollectionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; -export const WorkspaceProjectList_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}},{"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}}]} as unknown as DocumentNode; +export const WorkspaceProjectList_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}}]} as unknown as DocumentNode; export const WorkspaceHeader_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHeader_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode; export const WorkspaceInviteBlock_PendingWorkspaceCollaboratorFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBlock_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":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_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":"UseWorkspaceInviteManager_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":"token"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceSlug"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const WorkspaceDashboardAbout_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceDashboardAbout_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":"description"}}]}}]} as unknown as DocumentNode; @@ -6697,6 +6691,7 @@ export const ProjectPageLatestItemsCommentsFragmentDoc = {"kind":"Document","def export const ProjectPageLatestItemsCommentItemFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsCommentItem"},"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":"author"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FormUsersSelectItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"rawText"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"archived"}},{"kind":"Field","alias":{"kind":"Name","value":"repliesCount"},"name":{"kind":"Name","value":"replies"},"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":"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":"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"}}]}}]} as unknown as DocumentNode; export const AddDomainWorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AddDomainWorkspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]} as unknown as DocumentNode; export const AppAuthorAvatarFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AppAuthorAvatar"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AppAuthor"}},"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 EmailFieldsFragmentDoc = {"kind":"Document","definitions":[{"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 ThreadCommentAttachmentFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]}}]}}]} as unknown as DocumentNode; export const ViewerCommentsReplyItemFragmentDoc = {"kind":"Document","definitions":[{"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":"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"}}]}}]}}]}}]} as unknown as DocumentNode; export const ViewerCommentsListItemFragmentDoc = {"kind":"Document","definitions":[{"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":"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"}}]}}]} as unknown as DocumentNode; @@ -6709,6 +6704,7 @@ export const AutomateFunctionPageHeader_FunctionFragmentDoc = {"kind":"Document" export const AutomateFunctionPageParametersDialog_AutomateFunctionReleaseFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRelease"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}}]}}]} as unknown as DocumentNode; export const AutomateFunctionPageInfo_AutomateFunctionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageInfo_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":"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":"Field","name":{"kind":"Name","value":"description"}},{"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":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commitId"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRelease"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}}]}}]} as unknown as DocumentNode; export const AutomateFunctionPage_AutomateFunctionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPage_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"supportedSourceApps"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageHeader_Function"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageInfo_AutomateFunction"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"}},{"kind":"Field","name":{"kind":"Name","value":"creator"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRelease"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}}]}},{"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":"AutomateFunctionPageHeader_Function"},"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":"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":"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":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceIds"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageInfo_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":"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":"Field","name":{"kind":"Name","value":"description"}},{"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":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commitId"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"}}]}}]}}]}},{"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 PagesOnboarding_DiscoverableWorkspacesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PagesOnboarding_DiscoverableWorkspaces"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"discoverableWorkspaces"},"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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode; export const ProjectPageTeamDialogFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamDialog"},"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":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"inviteId"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"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":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}}]} as unknown as DocumentNode; export const ProjectPageProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProject"},"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":"createdAt"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProjectHeader"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Project"}}]}},{"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":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"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":"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":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamDialog"},"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":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"inviteId"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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","alias":{"kind":"Name","value":"modelCount"},"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":"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"}}]}}]}}]} as unknown as DocumentNode; export const ProjectPageAutomationHeader_AutomationFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageAutomationHeader_Automation"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Automation"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"isTestAutomation"}},{"kind":"Field","name":{"kind":"Name","value":"currentRevision"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"triggerDefinitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"VersionCreatedTriggerDefinition"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"model"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}}]} as unknown as DocumentNode; @@ -6723,8 +6719,6 @@ export const ProjectPageAutomationPage_ProjectFragmentDoc = {"kind":"Document"," export const ProjectPageSettingsTab_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageSettingsTab_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"}}]}}]} as unknown as DocumentNode; export const SettingsSharedProjects_ProjectFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsSharedProjects_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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"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":"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":"team"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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"}}]}}]}}]} as unknown as DocumentNode; export const SettingsServerProjects_ProjectCollectionFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerProjects_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"SettingsSharedProjects_Project"}}]}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SettingsSharedProjects_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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"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":"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":"team"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]}}]}}]} as unknown as DocumentNode; -export const SettingsUserEmailCards_UserEmailFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; -export const SettingsUserEmails_UserFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmails_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"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":"SettingsUserEmailCards_UserEmail"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesBilling_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesBilling_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"paymentMethod"}}]}},{"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":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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":"role"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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"}}]}}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesGeneralEditAvatar_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesGeneralEditAvatar_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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; export const SettingsWorkspaceGeneralDeleteDialog_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspaceGeneralDeleteDialog_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"}}]}}]} as unknown as DocumentNode; @@ -6738,15 +6732,12 @@ export const SettingsWorkspacesSecuritySsoWrapper_WorkspaceFragmentDoc = {"kind" export const SettingsWorkspacesSecurity_WorkspaceFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecuritySsoWrapper_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceDomain"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecuritySsoWrapper_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"provider"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"clientId"}},{"kind":"Field","name":{"kind":"Name","value":"issuerUrl"}}]}}]}},{"kind":"Field","alias":{"kind":"Name","value":"hasAccessToSSO"},"name":{"kind":"Name","value":"hasAccessToFeature"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"featureName"},"value":{"kind":"EnumValue","value":"oidcSso"}}]}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesSecurity_UserFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"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"}}]}}]}}]} as unknown as DocumentNode; 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":"workspaceName"}},{"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 EmailVerificationBannerStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"EmailVerificationBannerState"},"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":"email"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}}]}}]}}]} as unknown as DocumentNode; -export const RequestVerificationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RequestVerification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"requestVerification"}}]}}]} 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":"search"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"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":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"search"},"value":{"kind":"Variable","name":{"kind":"Name","value":"search"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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 ProjectPageSettingsCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectPageSettingsCollaborators"},"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":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageInviteDialog_Project"}}]}}]}},{"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":"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":"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":"ProjectPageInviteDialog_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":"defaultProjectRole"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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"}}]}}]}}]}}]} as unknown as DocumentNode; +export const ProjectPageSettingsCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectPageSettingsCollaborators"},"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":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProject_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}}]}}]}},{"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":"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":"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":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"role"}},{"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembers_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":"ProjectPageTeamInternals_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembersRow_WorkspaceCollaborator"}}]}}]}}]}}]}},{"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":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogProjectWorkspaceMembers_Project"}},{"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":"defaultProjectRole"}},{"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const ProjectPageSettingsCollaboratorsWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectPageSettingsCollaboratorsWorkspace"},"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":"ProjectPageTeamInternals_Workspace"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamInternals_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":"team"},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]} as unknown as DocumentNode; 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":"Field","name":{"kind":"Name","value":"role"}},{"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":"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":"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"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":"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":"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":"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":"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":"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 OnUserProjectsUpdateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OnUserProjectsUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userProjectsUpdated"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"project"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectDashboardItem"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; export const ProjectsMoveToWorkspaceDialogDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}}]}}]}}]}}]} as unknown as DocumentNode; -export const ActiveUserMainMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ActiveUserMainMetadata"},"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":"email"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"isOnboardingFinished"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"notificationPreferences"}},{"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"}}]}}]}}]}}]} as unknown as DocumentNode; +export const ActiveUserMainMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ActiveUserMainMetadata"},"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":"email"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"isOnboardingFinished"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"notificationPreferences"}},{"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"}}]}}]}}]}}]} as unknown as DocumentNode; export const CreateOnboardingProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateOnboardingProject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createForOnboarding"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProject"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectDashboardItem"}}]}}]}}]}},{"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":"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":"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":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamDialog"},"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":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"inviteId"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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","alias":{"kind":"Name","value":"modelCount"},"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":"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProject"},"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":"createdAt"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProjectHeader"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; export const FinishOnboardingDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"FinishOnboarding"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"finishOnboarding"}}]}}]}}]} as unknown as DocumentNode; export const RequestVerificationByEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RequestVerificationByEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"requestVerificationByEmail"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}}]}]}}]} as unknown as DocumentNode; @@ -6792,6 +6783,7 @@ export const ProjectVersionGendoAiRenderUpdatedDocument = {"kind":"Document","de export const InviteUserSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"InviteUserSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UsersRetrievalInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"users"},"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":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]}}]}}]} as unknown as DocumentNode; export const CreateNewRegionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateNewRegion"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateServerRegionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfoMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"multiRegion"},"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsServerRegionsAddEditDialog_ServerRegionItem"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerRegionsAddEditDialog_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"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":"key"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; export const UpdateRegionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateRegion"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateServerRegionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfoMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"multiRegion"},"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsServerRegionsAddEditDialog_ServerRegionItem"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerRegionsAddEditDialog_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"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":"key"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; +export const PagesOnboardingDiscoverableWorkspaces_ActiveUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"PagesOnboardingDiscoverableWorkspaces_ActiveUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"PagesOnboarding_DiscoverableWorkspaces"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PagesOnboarding_DiscoverableWorkspaces"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"discoverableWorkspaces"},"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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode; export const CreateModelDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateModel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateModelInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"modelMutations"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}}]} as unknown as DocumentNode; export const CreateProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCreateInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectMutations"},"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":"ProjectPageProject"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectDashboardItem"}}]}}]}}]}},{"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":"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":"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":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamDialog"},"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":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"inviteId"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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","alias":{"kind":"Name","value":"modelCount"},"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":"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProject"},"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":"createdAt"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProjectHeader"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; export const CreateWorkspaceProjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateWorkspaceProject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceProjectCreateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projects"},"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":"ProjectPageProject"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectDashboardItem"}}]}}]}}]}}]}},{"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":"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":"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":"ProjectPageProjectHeader"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","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":"logo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageTeamDialog"},"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":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"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":"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":"inviteId"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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","alias":{"kind":"Name","value":"modelCount"},"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":"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageProject"},"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":"createdAt"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamInternals_Project"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageProjectHeader"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageTeamDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; @@ -6866,9 +6858,9 @@ export const UsersCountDocument = {"kind":"Document","definitions":[{"kind":"Ope export const InvitesCountDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"InvitesCount"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"admin"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteList"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}}]}}]}}]} as unknown as DocumentNode; export const InviteServerUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"InviteServerUser"},"variableDefinitions":[{"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":"ServerInviteCreateInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInviteBatchCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const SettingsUpdateWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsUpdateWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesGeneral_Workspace"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesGeneralEditAvatar_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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspaceGeneralDeleteDialog_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":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesGeneralEditSlugDialog_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":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesGeneral_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesGeneralEditAvatar_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspaceGeneralDeleteDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesGeneralEditSlugDialog_Workspace"}},{"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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"defaultProjectRole"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; -export const SettingsCreateUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsCreateUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"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":"SettingsUserEmails_User"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmails_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"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":"SettingsUserEmailCards_UserEmail"}}]}}]}}]} as unknown as DocumentNode; -export const SettingsDeleteUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsDeleteUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"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"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsUserEmails_User"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmails_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"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":"SettingsUserEmailCards_UserEmail"}}]}}]}}]} as unknown as DocumentNode; -export const SettingsSetPrimaryUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsSetPrimaryUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetPrimaryUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setPrimary"},"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":"SettingsUserEmails_User"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmails_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"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":"SettingsUserEmailCards_UserEmail"}}]}}]}}]} as unknown as DocumentNode; +export const SettingsCreateUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsCreateUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"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":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailFields"}}]}}]}}]}}]}}]}},{"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 SettingsDeleteUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsDeleteUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DeleteUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"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"}}}],"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":"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 SettingsSetPrimaryUserEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsSetPrimaryUserEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SetPrimaryUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setPrimary"},"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":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailFields"}}]}}]}}]}}]}}]}},{"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 SettingsNewEmailVerificationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsNewEmailVerification"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EmailVerificationRequestInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"requestNewEmailVerification"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]}}]} as unknown as DocumentNode; export const SettingsUpdateWorkspaceSecurityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsUpdateWorkspaceSecurity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceMutations"},"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":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}}]}}]}}]}}]} as unknown as DocumentNode; export const SettingsDeleteWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SettingsDeleteWorkspace"},"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":"workspaceMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"delete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}]}]}}]}}]} as unknown as DocumentNode; @@ -6888,12 +6880,14 @@ export const SettingsWorkspacesMembersDocument = {"kind":"Document","definitions export const SettingsWorkspacesMembersSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsWorkspacesMembersSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"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":"WorkspaceTeamFilter"}}}],"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":"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":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersMembersTable_WorkspaceCollaborator"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesMembersMembersTable_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":"role"}},{"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceDomainPolicyCompliant"}}]}}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesJoinRequestsSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsWorkspacesJoinRequestsSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"joinRequestsFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AdminWorkspaceJoinRequestFilter"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersRequestsTable_Workspace"}}]}}]}},{"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"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":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceJoinRequestApproveDialog_WorkspaceJoinRequest"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceJoinRequest"}},"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":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesMembersRequestsTable_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersTableHeader_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"adminWorkspacesJoinRequests"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"joinRequestsFilter"}}}],"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":"WorkspaceJoinRequestApproveDialog_WorkspaceJoinRequest"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"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"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesInvitesSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsWorkspacesInvitesSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaboratorsFilter"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersInvitesTable_Workspace"}}]}}]}},{"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"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":"role"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesMembersInvitesTable_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":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"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"}}]}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesMembersInvitesTable_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersTableHeader_Workspace"}},{"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesMembersInvitesTable_PendingWorkspaceCollaborator"}}]}}]}}]} as unknown as DocumentNode; -export const SettingsUserEmailsQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsUserEmailsQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsUserEmails_User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmailCards_UserEmail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserEmail"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"primary"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsUserEmails_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"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":"SettingsUserEmailCards_UserEmail"}}]}}]}}]} as unknown as DocumentNode; export const SettingsWorkspacesProjectsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsWorkspacesProjects"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"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":"cursor"}},"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":"WorkspaceProjectsFilter"}}}],"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":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesProjects_ProjectCollection"}}]}}]}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"SettingsSharedProjects_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":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"visibility"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"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":"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":"team"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesProjects_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"SettingsSharedProjects_Project"}}]}}]}}]} as unknown as DocumentNode; export const SettingsWorkspaceSecurityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsWorkspaceSecurity"},"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":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_Workspace"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceDomain"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecuritySsoWrapper_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"provider"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"clientId"}},{"kind":"Field","name":{"kind":"Name","value":"issuerUrl"}}]}}]}},{"kind":"Field","alias":{"kind":"Name","value":"hasAccessToSSO"},"name":{"kind":"Name","value":"hasAccessToFeature"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"featureName"},"value":{"kind":"EnumValue","value":"oidcSso"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecurityDomainRemoveDialog_WorkspaceDomain"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesSecuritySsoWrapper_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesSecurity_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"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"}}]}}]}}]} as unknown as DocumentNode; +export const OnUserProjectsUpdateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"OnUserProjectsUpdate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userProjectsUpdated"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"project"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectDashboardItem"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}}]} as unknown as DocumentNode; export const UpdateUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UserUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"update"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"user"},"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":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}}]}}]}}]}}]} as unknown as DocumentNode; export const UpdateNotificationPreferencesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateNotificationPreferences"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSONObject"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userNotificationPreferencesUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"preferences"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; export const DeleteAccountDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteAccount"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UserDeleteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userConfirmation"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; +export const VerifyEmailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"verifyEmail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"VerifyUserEmailInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUserMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"verify"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]}}]} 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 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":"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"}}]}}]} as unknown as DocumentNode; @@ -6921,7 +6915,7 @@ export const WorkspaceUpdateDiscoverabilityMutationDocument = {"kind":"Document" export const ApproveWorkspaceJoinRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ApproveWorkspaceJoinRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ApproveWorkspaceJoinRequestInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceJoinRequestMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"approve"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]} as unknown as DocumentNode; export const DenyWorkspaceJoinRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DenyWorkspaceJoinRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"DenyWorkspaceJoinRequestInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceJoinRequestMutations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deny"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]}}]} as unknown as DocumentNode; export const WorkspaceAccessCheckDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceAccessCheck"},"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"}}]}}]}}]} as unknown as DocumentNode; -export const WorkspacePageQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspacePageQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaboratorsFilter"}}},{"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":"workspaceBySlug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}},{"kind":"Argument","name":{"kind":"Name","value":"options"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"useSlug"},"value":{"kind":"BooleanValue","value":true}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBanner_PendingWorkspaceCollaborator"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBlock_PendingWorkspaceCollaborator"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}},{"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseWorkspaceInviteManager_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":"token"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceSlug"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBanner_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":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBlock_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":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}}]} as unknown as DocumentNode; +export const WorkspacePageQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspacePageQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaboratorsFilter"}}},{"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":"workspaceBySlug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}},{"kind":"Argument","name":{"kind":"Name","value":"options"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"useSlug"},"value":{"kind":"BooleanValue","value":true}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBanner_PendingWorkspaceCollaborator"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBlock_PendingWorkspaceCollaborator"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UseWorkspaceInviteManager_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":"token"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceSlug"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBanner_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":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBlock_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":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}}]} as unknown as DocumentNode; export const WorkspaceProjectsQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceProjectsQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"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":"WorkspaceProjectsFilter"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"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":"workspaceSlug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"10"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}}]} as unknown as DocumentNode; export const WorkspaceFunctionsQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceFunctionsQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionsPageHeader_Query"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceBySlug"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"automateFunctions"},"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":"AutomationsFunctionsCard_AutomateFunction"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionCreateDialogTemplateStep_AutomateFunctionTemplate"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionTemplate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"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":"AutomateFunctionsPageHeader_Query"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Query"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"automateInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasAutomateGithubApp"}},{"kind":"Field","name":{"kind":"Name","value":"availableGithubOrgs"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"automate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableFunctionTemplates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionCreateDialogTemplateStep_AutomateFunctionTemplate"}}]}}]}}]}}]}},{"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 WorkspaceInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"options"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"WorkspaceInviteLookupOptions"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}},{"kind":"Argument","name":{"kind":"Name","value":"options"},"value":{"kind":"Variable","name":{"kind":"Name","value":"options"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBanner_PendingWorkspaceCollaborator"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInviteBlock_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":"UseWorkspaceInviteManager_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":"token"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceSlug"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBanner_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":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserAvatar"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceInviteBlock_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":"workspaceId"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"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":"title"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"UseWorkspaceInviteManager_PendingWorkspaceCollaborator"}}]}}]} as unknown as DocumentNode; @@ -6931,7 +6925,7 @@ export const WorkspaceSsoByEmailDocument = {"kind":"Document","definitions":[{"k export const WorkspaceSsoCheckDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceSsoCheck"},"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSsoStatus_Workspace"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSsoStatus_User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSsoStatus_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":"sso"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"provider"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"clientId"}},{"kind":"Field","name":{"kind":"Name","value":"issuerUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"session"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"validUntil"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSsoStatus_User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"expiredSsoSessions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]} as unknown as DocumentNode; export const WorkspaceWizardDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceWizard"},"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":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceWizard_Workspace"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceWizard_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]} as unknown as DocumentNode; export const WorkspaceWizardRegionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"WorkspaceWizardRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceWizardStepRegion_ServerInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsWorkspacesRegionsSelect_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceWizardStepRegion_ServerInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"multiRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"regions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsWorkspacesRegionsSelect_ServerRegionItem"}}]}}]}}]}}]} as unknown as DocumentNode; -export const OnWorkspaceUpdatedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"onWorkspaceUpdated"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaboratorsFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceUpdated"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"workspaceSlug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"domainBasedMembershipProtectionEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"discoverabilityEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}},{"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"key"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceMixpanelUpdateGroup_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]} as unknown as DocumentNode; +export const OnWorkspaceUpdatedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"onWorkspaceUpdated"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"invitesFilter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"PendingWorkspaceCollaboratorsFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaceUpdated"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"workspaceId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}},{"kind":"Argument","name":{"kind":"Name","value":"workspaceSlug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceSlug"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceBase_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"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":"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":"WorkspaceInvitedTeam_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":"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceTeam_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":"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":"adminWorkspacesJoinRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceInvitedTeam_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceSecurity_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":"domains"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"domain"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BillingAlert_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":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"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":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_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":"defaultRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceHasCustomDataResidency_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsWorkspaceSelect_Workspace"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectsMoveToWorkspaceDialog_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","alias":{"kind":"Name","value":"modelCount"},"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":"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":"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":"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":"Field","name":{"kind":"Name","value":"plan"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"seats"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"guest"}},{"kind":"Field","name":{"kind":"Name","value":"plan"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsPageTeamDialogManagePermissions_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":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectsModelPageEmbed_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":"ProjectsPageTeamDialogManagePermissions_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions_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":"ProjectsModelPageEmbed_Project"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardProject"},"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":"visibility"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions_Project"}},{"kind":"Field","name":{"kind":"Name","value":"workspace"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItemNoModels"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"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"}}]}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardProject"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"PendingFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"projectId"}},{"kind":"Field","name":{"kind":"Name","value":"modelName"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"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":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageModelsActions"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FunctionRunStatusForSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"status"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"FunctionRunStatusForSummary"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"results"}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusMessage"}},{"kind":"Field","name":{"kind":"Name","value":"contextView"}},{"kind":"Field","name":{"kind":"Name","value":"function"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automation"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateRun"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"functionRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogFunctionRun_AutomateFunctionRun"}}]}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomationsStatusOrderedRuns_AutomationRun"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"automationRuns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialogRunsRows_AutomateRun"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TriggeredAutomationsStatus"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"TriggeredAutomationsStatusSummary"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatusDialog_TriggeredAutomationsStatus"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectPageLatestItemsModelItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Model"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"displayName"}},{"kind":"Field","alias":{"kind":"Name","value":"versionCount"},"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","alias":{"kind":"Name","value":"commentThreadCount"},"name":{"kind":"Name","value":"commentThreads"},"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":"pendingImportedVersions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}},{"kind":"Field","name":{"kind":"Name","value":"previewUrl"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardRenameDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsCardDeleteDialog"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ProjectPageModelsActions"}},{"kind":"Field","name":{"kind":"Name","value":"automationsStatus"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateRunsTriggerStatus_TriggeredAutomationsStatus"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ProjectDashboardItem"},"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":"ProjectDashboardItemNoModels"}},{"kind":"Field","name":{"kind":"Name","value":"models"},"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":"ProjectPageLatestItemsModelItem"}}]}}]}},{"kind":"Field","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":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingImportedModels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"4"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"PendingFileUpload"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ProjectCollection"}},"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":"ProjectDashboardItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"WorkspaceProjectList_Workspace"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceBase_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceTeam_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceSecurity_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"BillingAlert_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"MoveProjectsDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"InviteDialogWorkspace_Workspace"}},{"kind":"Field","name":{"kind":"Name","value":"projects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"WorkspaceProjectList_ProjectCollection"}}]}},{"kind":"Field","name":{"kind":"Name","value":"creationState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"completed"}},{"kind":"Field","name":{"kind":"Name","value":"state"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readOnly"}}]}}]} as unknown as DocumentNode; export const LegacyBranchRedirectMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LegacyBranchRedirectMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"branchName"}},"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":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"modelByName"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"branchName"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]} as unknown as DocumentNode; export const LegacyViewerCommitRedirectMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LegacyViewerCommitRedirectMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"commitId"}},"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":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"version"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"commitId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"model"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const LegacyViewerStreamRedirectMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LegacyViewerStreamRedirectMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"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":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"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":"1"}}],"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":"model"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; @@ -6939,7 +6933,6 @@ export const AutoAcceptableWorkspaceInviteDocument = {"kind":"Document","definit export const ResolveCommentLinkDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ResolveCommentLink"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"commentId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"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":"comment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"commentId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"LinkableComment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LinkableComment"},"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":"viewerResources"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"modelId"}},{"kind":"Field","name":{"kind":"Name","value":"versionId"}},{"kind":"Field","name":{"kind":"Name","value":"objectId"}}]}}]}}]} as unknown as DocumentNode; export const AutomateFunctionPageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AutomateFunctionPage"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"functionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"automateFunction"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"functionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPage_AutomateFunction"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionCreateDialog_Workspace"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionEditDialog_Workspace"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageHeader_Function"},"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":"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":"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":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"workspaceIds"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionRelease"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inputSchema"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageInfo_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":"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":"Field","name":{"kind":"Name","value":"description"}},{"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":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commitId"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageParametersDialog_AutomateFunctionRelease"}}]}}]}}]}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPage_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":"description"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"supportedSourceApps"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageHeader_Function"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageInfo_AutomateFunction"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"}},{"kind":"Field","name":{"kind":"Name","value":"creator"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionCreateDialog_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":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionEditDialog_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"}}]}}]} as unknown as DocumentNode; export const AutomateFunctionPageWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AutomateFunctionPageWorkspace"},"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":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionPageHeader_Workspace"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionPageHeader_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"}}]}}]} as unknown as DocumentNode; -export const AutomateFunctionsPageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AutomateFunctionsPage"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"search"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"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":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionsPageItems_Query"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionsPageHeader_Query"}}]}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionCreateDialogTemplateStep_AutomateFunctionTemplate"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AutomateFunctionTemplate"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"logo"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionsPageItems_Query"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Query"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"automateFunctions"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"6"}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"search"},"value":{"kind":"Variable","name":{"kind":"Name","value":"search"}}}]}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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":"FragmentSpread","name":{"kind":"Name","value":"AutomationsFunctionsCard_AutomateFunction"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateAutomationCreateDialog_AutomateFunction"}}]}},{"kind":"Field","name":{"kind":"Name","value":"cursor"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AutomateFunctionsPageHeader_Query"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Query"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"automateInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasAutomateGithubApp"}},{"kind":"Field","name":{"kind":"Name","value":"availableGithubOrgs"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"automate"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableFunctionTemplates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AutomateFunctionCreateDialogTemplateStep_AutomateFunctionTemplate"}}]}}]}}]}}]}}]} as unknown as DocumentNode; export const SettingsServerRegionsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SettingsServerRegions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"multiRegion"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"regions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"}}]}},{"kind":"Field","name":{"kind":"Name","value":"availableKeys"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SettingsServerRegionsTable_ServerRegionItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerRegionItem"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"key"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; export type AllObjectTypes = { ActiveUserMutations: ActiveUserMutations, diff --git a/packages/frontend-2/lib/common/helpers/route.ts b/packages/frontend-2/lib/common/helpers/route.ts index cd3507236..7720e8c8a 100644 --- a/packages/frontend-2/lib/common/helpers/route.ts +++ b/packages/frontend-2/lib/common/helpers/route.ts @@ -13,6 +13,8 @@ export const registerRoute = '/authn/register' export const ssoLoginRoute = '/authn/sso' export const forgottenPasswordRoute = '/authn/forgotten-password' export const onboardingRoute = '/onboarding' +export const verifyEmailRoute = '/verify-email' +export const verifyEmailCountdownRoute = '/verify-email?source=registration' export const serverManagementRoute = '/server-management' export const downloadManagerUrl = 'https://speckle.systems/download' export const docsPageUrl = 'https://speckle.guide/' diff --git a/packages/frontend-2/lib/invites/helpers/constants.ts b/packages/frontend-2/lib/invites/helpers/constants.ts index 94fe2fa89..b39699e56 100644 --- a/packages/frontend-2/lib/invites/helpers/constants.ts +++ b/packages/frontend-2/lib/invites/helpers/constants.ts @@ -1,4 +1,8 @@ -import type { InviteServerItem, InviteGenericItem } from '~~/lib/invites/helpers/types' +import type { + InviteServerItem, + InviteGenericItem, + InviteProjectItem +} from '~~/lib/invites/helpers/types' import { Roles } from '@speckle/shared' export const emptyInviteServerItem: InviteServerItem = { @@ -7,6 +11,13 @@ export const emptyInviteServerItem: InviteServerItem = { project: undefined } +export const emptyInviteProjectItem: InviteProjectItem = { + email: '', + serverRole: Roles.Server.User, + projectRole: Roles.Stream.Contributor, + project: undefined +} + export const emptyInviteGenericItem: InviteGenericItem = { email: '', workspaceRole: undefined, diff --git a/packages/frontend-2/lib/invites/helpers/types.ts b/packages/frontend-2/lib/invites/helpers/types.ts index 783684472..77fb3e4b1 100644 --- a/packages/frontend-2/lib/invites/helpers/types.ts +++ b/packages/frontend-2/lib/invites/helpers/types.ts @@ -1,6 +1,7 @@ import type { ServerRoles, WorkspaceRoles, StreamRoles } from '@speckle/shared' import type { FormSelectProjects_ProjectFragment } from '~~/lib/common/generated/gql/graphql' +// Server export type InviteServerItem = { email: string serverRole: ServerRoles @@ -11,6 +12,19 @@ export interface InviteServerForm { fields: InviteServerItem[] } +// Project +export type InviteProjectItem = { + email: string + serverRole: ServerRoles + projectRole?: StreamRoles + project?: FormSelectProjects_ProjectFragment +} + +export interface InviteProjectForm { + fields: InviteProjectItem[] +} + +// Workspace export type InviteGenericItem = { email: string workspaceRole?: WorkspaceRoles diff --git a/packages/frontend-2/lib/invites/helpers/validation.ts b/packages/frontend-2/lib/invites/helpers/validation.ts index 44300383f..764d3fa13 100644 --- a/packages/frontend-2/lib/invites/helpers/validation.ts +++ b/packages/frontend-2/lib/invites/helpers/validation.ts @@ -1,6 +1,12 @@ import { isEmail } from '~/lib/common/helpers/validation' import type { GenericValidateFunction } from 'vee-validate' -import { Roles, type WorkspaceRoles, type MaybeNullOrUndefined } from '@speckle/shared' +import { + Roles, + type StreamRoles, + type WorkspaceRoles, + type ServerRoles, + type MaybeNullOrUndefined +} from '@speckle/shared' export const isValidEmail = (val: string) => isEmail(val || '', { @@ -23,16 +29,47 @@ export const canHaveRole = (params: { allowedDomains: MaybeNullOrUndefined workspaceRole?: WorkspaceRoles + projectRole?: StreamRoles }): GenericValidateFunction => (val) => { - const { allowedDomains, workspaceRole } = params + const { allowedDomains, workspaceRole, projectRole } = params if (!allowedDomains || !val) return true - if ( - !matchesDomainPolicy(val, allowedDomains) && - workspaceRole !== Roles.Workspace.Guest - ) { - return 'This email does not match the set domain policy, and can only be invited as a guest' + if (!matchesDomainPolicy(val, allowedDomains)) { + if (workspaceRole && workspaceRole !== Roles.Workspace.Guest) { + return 'This email does not match the set domain policy, and can only be invited as a guest' + } + if (projectRole && projectRole !== Roles.Stream.Reviewer) { + return 'This email does not match the set domain policy, and can only be invited as a reviewer' + } + } + + return true + } + +export const isRequiredIfDependencyExists = + (dependency: () => string) => (val?: string) => + !dependency() || !!val || 'This field is required' + +export const canBeServerGuest = + ({ + workspaceRole, + projectRole + }: { + workspaceRole?: WorkspaceRoles + projectRole?: StreamRoles + }) => + (val?: ServerRoles) => { + if (val === Roles.Server.Guest) { + if (projectRole === Roles.Stream.Owner) { + return 'A guest user cannot be a stream owner' + } + if (workspaceRole === Roles.Workspace.Admin) { + return 'A guest user cannot be a workspace admin' + } + if (workspaceRole === Roles.Workspace.Member) { + return 'A guest user cannot be a workspace member' + } } return true diff --git a/packages/frontend-2/lib/onboarding/graphql/queries.ts b/packages/frontend-2/lib/onboarding/graphql/queries.ts new file mode 100644 index 000000000..0835fa4a7 --- /dev/null +++ b/packages/frontend-2/lib/onboarding/graphql/queries.ts @@ -0,0 +1,10 @@ +import { graphql } from '~/lib/common/generated/gql' + +export const PagesOnboardingDiscoverableWorkspaces = graphql(` + query PagesOnboardingDiscoverableWorkspaces_ActiveUser { + activeUser { + id + ...PagesOnboarding_DiscoverableWorkspaces + } + } +`) diff --git a/packages/frontend-2/lib/onboarding/helpers/types.ts b/packages/frontend-2/lib/onboarding/helpers/types.ts new file mode 100644 index 000000000..03ad2ef42 --- /dev/null +++ b/packages/frontend-2/lib/onboarding/helpers/types.ts @@ -0,0 +1,4 @@ +export type OnboardingSelectOption = { + id: string + name: string +} diff --git a/packages/frontend-2/lib/projects/composables/projectManagement.ts b/packages/frontend-2/lib/projects/composables/projectManagement.ts index 04c2d320a..65610ec92 100644 --- a/packages/frontend-2/lib/projects/composables/projectManagement.ts +++ b/packages/frontend-2/lib/projects/composables/projectManagement.ts @@ -304,10 +304,7 @@ export function useInviteUserToProject() { if (err && !hideToasts) { triggerNotification({ type: ToastNotificationType.Danger, - title: - input.length > 1 - ? "Couldn't send invites" - : `Coudldn't send invite to ${input[0].email}`, + title: input.length > 1 ? "Couldn't send invites" : "Couldn't send invite", description: err }) } else { @@ -315,9 +312,7 @@ export function useInviteUserToProject() { triggerNotification({ type: ToastNotificationType.Success, title: - input.length > 1 - ? 'Invites successfully send' - : `Invite successfully sent to ${input[0].email}` + input.length > 1 ? 'Invites successfully send' : 'Invite successfully sent' }) } } diff --git a/packages/frontend-2/lib/projects/helpers/models.ts b/packages/frontend-2/lib/projects/helpers/models.ts index 2f71f6f69..775b50834 100644 --- a/packages/frontend-2/lib/projects/helpers/models.ts +++ b/packages/frontend-2/lib/projects/helpers/models.ts @@ -22,5 +22,6 @@ export function sanitizeModelName(name: string): string { return name .split('/') .map((part) => part.trim()) + .filter((part) => part.length > 0) .join('/') } diff --git a/packages/frontend-2/lib/settings/graphql/mutations.ts b/packages/frontend-2/lib/settings/graphql/mutations.ts index 7b8dcb367..87b78a51e 100644 --- a/packages/frontend-2/lib/settings/graphql/mutations.ts +++ b/packages/frontend-2/lib/settings/graphql/mutations.ts @@ -15,7 +15,10 @@ export const settingsCreateUserEmailMutation = graphql(` activeUserMutations { emailMutations { create(input: $input) { - ...SettingsUserEmails_User + id + emails { + ...EmailFields + } } } } @@ -27,7 +30,10 @@ export const settingsDeleteUserEmailMutation = graphql(` activeUserMutations { emailMutations { delete(input: $input) { - ...SettingsUserEmails_User + id + emails { + ...EmailFields + } } } } @@ -39,7 +45,10 @@ export const settingsSetPrimaryUserEmailMutation = graphql(` activeUserMutations { emailMutations { setPrimary(input: $input) { - ...SettingsUserEmails_User + id + emails { + ...EmailFields + } } } } diff --git a/packages/frontend-2/lib/settings/graphql/queries.ts b/packages/frontend-2/lib/settings/graphql/queries.ts index 5139e1fbb..c09c44a8f 100644 --- a/packages/frontend-2/lib/settings/graphql/queries.ts +++ b/packages/frontend-2/lib/settings/graphql/queries.ts @@ -106,14 +106,6 @@ export const settingsWorkspacesInvitesSearchQuery = graphql(` } `) -export const settingsUserEmailsQuery = graphql(` - query SettingsUserEmailsQuery { - activeUser { - ...SettingsUserEmails_User - } - } -`) - export const settingsWorkspacesProjectsQuery = graphql(` query SettingsWorkspacesProjects( $slug: String! diff --git a/packages/frontend-2/lib/user/composables/emails.ts b/packages/frontend-2/lib/user/composables/emails.ts new file mode 100644 index 000000000..7e02bf7af --- /dev/null +++ b/packages/frontend-2/lib/user/composables/emails.ts @@ -0,0 +1,191 @@ +import { useApolloClient, useMutation, useQuery } from '@vue/apollo-composable' +import { + settingsNewEmailVerificationMutation, + settingsDeleteUserEmailMutation, + settingsCreateUserEmailMutation +} from '~/lib/settings/graphql/mutations' +import { userEmailsQuery } from '~/lib/user/graphql/queries' +import { + convertThrowIntoFetchResult, + getFirstErrorMessage, + getCacheId, + modifyObjectField +} from '~/lib/common/helpers/graphql' +import type { UserEmail } from '~/lib/common/generated/gql/graphql' +import { useGlobalToast } from '~/lib/common/composables/toast' +import { useMixpanel } from '~/lib/core/composables/mp' +import { + verifyEmailRoute, + homeRoute, + settingsUserRoutes +} from '~/lib/common/helpers/route' +import { verifyEmailMutation } from '~/lib/user/graphql/mutations' + +export function useUserEmails() { + const { triggerNotification } = useGlobalToast() + const mixpanel = useMixpanel() + const { result } = useQuery(userEmailsQuery) + const route = useRoute() + const apollo = useApolloClient().client + const { activeUser } = useActiveUser() + + const { mutate: resendMutation } = useMutation(settingsNewEmailVerificationMutation) + const { mutate: deleteMutation } = useMutation(settingsDeleteUserEmailMutation) + const { mutate: createMutation } = useMutation(settingsCreateUserEmailMutation) + const { mutate: verifyMutation } = useMutation(verifyEmailMutation) + + // Simple array of all emails + const emails = computed(() => result.value?.activeUser?.emails ?? ([] as UserEmail[])) + + // Helper computed properties for common queries + const unverifiedPrimaryEmail = computed( + () => emails.value.find((e) => e.primary && !e.verified) || null + ) + + const unverifiedEmails = computed(() => emails.value.filter((e) => !e.verified)) + + const addUserEmail = async (email: string) => { + const result = await createMutation({ + input: { email } + }).catch(convertThrowIntoFetchResult) + + if (result?.data) { + mixpanel.track('Email Added') + navigateTo(verifyEmailRoute) + return true + } + + const errorMessage = getFirstErrorMessage(result?.errors) + triggerNotification({ + type: ToastNotificationType.Danger, + title: 'Error adding email', + description: errorMessage + }) + return false + } + + const resendVerificationEmail = async (email: UserEmail) => { + const result = await resendMutation({ + input: { id: email.id } + }).catch(convertThrowIntoFetchResult) + + if (result?.data) { + triggerNotification({ + type: ToastNotificationType.Success, + title: `Verification email sent to ${email.email}` + }) + navigateTo(verifyEmailRoute) + return true + } + + const errorMessage = getFirstErrorMessage(result?.errors) + triggerNotification({ + type: ToastNotificationType.Danger, + title: 'Error sending verification email', + description: errorMessage + }) + return false + } + + const deleteUserEmail = async (email: UserEmail, cancel = false) => { + const result = await deleteMutation({ + input: { id: email.id } + }).catch(convertThrowIntoFetchResult) + + if (result?.data) { + triggerNotification({ + type: ToastNotificationType.Success, + title: `${cancel ? 'Cancelled adding email' : 'Deleted email'}`, + description: email.email + }) + mixpanel.track('Email Deleted') + + // If we're on the verify email page and there are no more unverified emails, redirect home + if (route.path === verifyEmailRoute && unverifiedEmails.value.length === 0) { + navigateTo(homeRoute) + } + + return true + } + + const errorMessage = getFirstErrorMessage(result?.errors) + triggerNotification({ + type: ToastNotificationType.Danger, + title: 'Error deleting email', + description: errorMessage + }) + return false + } + + const verifyUserEmail = async (email: UserEmail, code: string) => { + mixpanel.track('Email Verification Started', { + email: email.email, + isPrimary: email.primary + }) + + const result = await verifyMutation({ + input: { email: email.email, code } + }).catch(convertThrowIntoFetchResult) + + const activeUserId = computed(() => activeUser.value?.id) + + if (result?.data?.activeUserMutations?.emailMutations?.verify) { + if (!activeUserId.value) return + + mixpanel.track('Email Verified', { + email: email.email, + isPrimary: email.primary + }) + + // Update UserEmail verified status in cache + modifyObjectField( + apollo.cache, + getCacheId('UserEmail', email.id), + 'verified', + () => true + ) + + // Only update User verified status if this is the primary email + if (email.primary) { + modifyObjectField( + apollo.cache, + getCacheId('User', activeUserId.value), + 'verified', + () => true + ) + navigateTo(homeRoute) + } else { + navigateTo(settingsUserRoutes.emails) + } + + triggerNotification({ + type: ToastNotificationType.Success, + title: 'Email verified', + description: 'Your email has been successfully verified' + }) + return true + } + + mixpanel.track('Email Verification Failed', { + email: email.email, + isPrimary: email.primary + }) + + triggerNotification({ + type: ToastNotificationType.Danger, + title: 'Verification failed', + description: 'The verification code you entered is incorrect or expired' + }) + return false + } + + return { + emails, + unverifiedPrimaryEmail, + unverifiedEmails, + addUserEmail, + resendVerificationEmail, + deleteUserEmail, + verifyUserEmail + } +} diff --git a/packages/frontend-2/lib/user/composables/projectUpdates.ts b/packages/frontend-2/lib/user/composables/projectUpdates.ts new file mode 100644 index 000000000..2e3ac368c --- /dev/null +++ b/packages/frontend-2/lib/user/composables/projectUpdates.ts @@ -0,0 +1,76 @@ +import { useApolloClient, useSubscription } from '@vue/apollo-composable' +import { graphql } from '~/lib/common/generated/gql' +import { UserProjectsUpdatedMessageType } from '~/lib/common/generated/gql/graphql' +import { getCacheId, modifyObjectField } from '~/lib/common/helpers/graphql' +import { ToastNotificationType, useGlobalToast } from '~/lib/common/composables/toast' +import { projectRoute } from '~/lib/common/helpers/route' + +export function useUserProjectsUpdatedTracking() { + const apollo = useApolloClient().client + const { triggerNotification } = useGlobalToast() + const { activeUser } = useActiveUser() + + const { onResult: onUserProjectsUpdate } = useSubscription( + graphql(` + subscription OnUserProjectsUpdate { + userProjectsUpdated { + type + id + project { + ...ProjectDashboardItem + } + } + } + `) + ) + + onUserProjectsUpdate((res) => { + const activeUserId = activeUser.value?.id + const event = res.data?.userProjectsUpdated + + if (!event) return + if (!activeUserId) return + + const isNewProject = event.type === UserProjectsUpdatedMessageType.Added + const incomingProject = event.project + const cache = apollo.cache + + if (isNewProject && incomingProject) { + // Add to User.projects where possible + modifyObjectField( + cache, + getCacheId('User', activeUserId), + 'projects', + ({ helpers: { ref, createUpdatedValue } }) => + createUpdatedValue(({ update }) => { + update('items', (items) => [ + ref('Project', incomingProject.id), + ...(items || []) + ]) + update('totalCount', (count) => count + 1) + }), + { autoEvictFiltered: true } + ) + } + + if (!isNewProject) { + // Evict old project from cache entirely to remove it from all searches + cache.evict({ + id: getCacheId('Project', event.id) + }) + } + + // Emit toast notification + triggerNotification({ + type: ToastNotificationType.Info, + title: isNewProject ? 'New project added' : 'A project has been removed', + cta: + isNewProject && incomingProject + ? { + url: projectRoute(incomingProject.id), + title: 'View project' + } + : undefined + }) + }) +} diff --git a/packages/frontend-2/lib/user/graphql/mutations.ts b/packages/frontend-2/lib/user/graphql/mutations.ts index 7b1d3a049..680813595 100644 --- a/packages/frontend-2/lib/user/graphql/mutations.ts +++ b/packages/frontend-2/lib/user/graphql/mutations.ts @@ -25,3 +25,13 @@ export const deleteAccountMutation = graphql(` userDelete(userConfirmation: $input) } `) + +export const verifyEmailMutation = graphql(` + mutation verifyEmail($input: VerifyUserEmailInput!) { + activeUserMutations { + emailMutations { + verify(input: $input) + } + } + } +`) diff --git a/packages/frontend-2/lib/user/graphql/queries.ts b/packages/frontend-2/lib/user/graphql/queries.ts new file mode 100644 index 000000000..622ead571 --- /dev/null +++ b/packages/frontend-2/lib/user/graphql/queries.ts @@ -0,0 +1,23 @@ +import { graphql } from '~/lib/common/generated/gql' + +export const emailFieldsFragment = graphql(` + fragment EmailFields on UserEmail { + id + email + verified + primary + userId + } +`) + +export const userEmailsQuery = graphql(` + query UserEmails { + activeUser { + id + emails { + ...EmailFields + } + hasPendingVerification + } + } +`) diff --git a/packages/frontend-2/lib/viewer/composables/setup.ts b/packages/frontend-2/lib/viewer/composables/setup.ts index cd3705fb2..1c1f06d51 100644 --- a/packages/frontend-2/lib/viewer/composables/setup.ts +++ b/packages/frontend-2/lib/viewer/composables/setup.ts @@ -277,6 +277,7 @@ export type InjectableViewerState = Readonly<{ lightConfig: Ref explodeFactor: Ref viewerBusy: WritableComputedRef + loadProgress: Ref selection: Ref> measurement: { enabled: Ref @@ -919,6 +920,8 @@ function setupInterfaceState( set: (newVal) => (isViewerBusy.value = !!newVal) }) + const loadProgress = ref(0) + const isolatedObjectIds = ref([] as string[]) const hiddenObjectIds = ref([] as string[]) const selectedObjects = shallowRef[]>([]) @@ -978,6 +981,7 @@ function setupInterfaceState( explodeFactor, spotlightUserSessionId, viewerBusy, + loadProgress, threads: { items: commentThreads, openThread: { diff --git a/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts b/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts index 2c042355a..27cc14a5a 100644 --- a/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts +++ b/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts @@ -1,5 +1,7 @@ import { difference, flatten, isEqual, uniq } from 'lodash-es' +import { useThrottleFn, onKeyStroke, watchTriggerable } from '@vueuse/core' import { + LoaderEvent, ViewMode, type PropertyInfo, type StringPropertyInfo, @@ -14,7 +16,8 @@ import { SectionToolEvent, SectionTool, ViewModes, - ViewModeEvent + ViewModeEvent, + SpeckleLoader } from '@speckle/viewer' import { useAuthCookie } from '~~/lib/auth/composables/auth' import type { @@ -55,7 +58,6 @@ import { useCameraUtilities, useMeasurementUtilities } from '~~/lib/viewer/composables/ui' -import { onKeyStroke, watchTriggerable } from '@vueuse/core' import { setupDebugMode } from '~~/lib/viewer/composables/setup/dev' import { useEmbed } from '~/lib/viewer/composables/setup/embed' import { useMixpanel } from '~~/lib/core/composables/mp' @@ -95,24 +97,55 @@ function useViewerObjectAutoLoading() { resources: { response: { resourceItems } }, + ui: { loadProgress }, urlHashState: { focusedThreadId } } = useInjectedViewerState() + const loadingProgressMap: { [id: string]: number } = {} + + viewer.on(ViewerEvent.LoadComplete, (id) => { + delete loadingProgressMap[id] + consolidateProgressInternal({ id, progress: 1 }) + }) + + const consolidateProgressInternal = (args: { progress: number; id: string }) => { + loadingProgressMap[args.id] = args.progress + let min = 42 + const values = Object.values(loadingProgressMap) as number[] + for (const num of values) { + min = Math.min(min, num) + } + + loadProgress.value = min + } + + const consolidateProgressThorttled = useThrottleFn(consolidateProgressInternal, 250) + const loadObject = ( objectId: string, unload?: boolean, options?: Partial<{ zoomToObject: boolean }> ) => { const objectUrl = getObjectUrl(projectId.value, objectId) + if (unload) { viewer.unloadObject(objectUrl) } else { - viewer.loadObjectAsync( + const loader = new SpeckleLoader( + viewer.getWorldTree(), objectUrl, authToken.value || undefined, disableViewerCache ? false : undefined, - options?.zoomToObject + undefined ) + + loader.on(LoaderEvent.LoadProgress, (args) => consolidateProgressThorttled(args)) + loader.on(LoaderEvent.LoadCancelled, (id) => { + delete loadingProgressMap[id] + consolidateProgressInternal({ id, progress: 1 }) + }) + + viewer.loadObject(loader, options?.zoomToObject) } } diff --git a/packages/frontend-2/lib/viewer/composables/tour.ts b/packages/frontend-2/lib/viewer/composables/tour.ts deleted file mode 100644 index d35f8efd8..000000000 --- a/packages/frontend-2/lib/viewer/composables/tour.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { useConditionalViewerRendering } from '~/lib/viewer/composables/ui' - -export const useTourStageState = () => - useState('viewer-tour-state', () => ({ - showNavbar: true, - showViewerControls: true, - showTour: false, - showSegmentation: true - })) - -export function useViewerTour() { - const state = useTourStageState() - const conditionalRendering = useConditionalViewerRendering() - - const showNavbar = computed({ - get: () => conditionalRendering.showNavbar.value, - set: (newVal) => (state.value.showNavbar = newVal) - }) - - const showControls = computed({ - get: () => conditionalRendering.showControls.value, - set: (newVal) => (state.value.showViewerControls = newVal) - }) - - const showTour = computed({ - get: () => state.value.showTour, - set: (newVal) => (state.value.showTour = newVal) - }) - - const showSegmentation = computed({ - get: () => state.value.showSegmentation, - set: (newVal) => (state.value.showSegmentation = newVal) - }) - - return { - showNavbar, - showControls, - showTour, - showSegmentation - } -} diff --git a/packages/frontend-2/lib/viewer/composables/ui.ts b/packages/frontend-2/lib/viewer/composables/ui.ts index 348dc0d11..a444391a9 100644 --- a/packages/frontend-2/lib/viewer/composables/ui.ts +++ b/packages/frontend-2/lib/viewer/composables/ui.ts @@ -18,7 +18,6 @@ import { type InjectableViewerState } from '~~/lib/viewer/composables/setup' import { useDiffBuilderUtilities } from '~~/lib/viewer/composables/setup/diff' -import { useTourStageState } from '~~/lib/viewer/composables/tour' import { Vector3, Box3 } from 'three' import { getKeyboardShortcutTitle, onKeyboardShortcut } from '@speckle/ui-components' import { ViewerShortcuts } from '~/lib/viewer/helpers/shortcuts/shortcuts' @@ -435,11 +434,9 @@ export function useMeasurementUtilities() { * Some conditional rendering values depend on multiple & overlapping states. This utility reconciles that. */ export function useConditionalViewerRendering() { - const tourState = useTourStageState() const embedMode = useEmbedState() const showControls = computed(() => { - if (tourState.value.showTour && !tourState.value.showViewerControls) return false if ( embedMode.embedOptions.value?.isEnabled && embedMode.embedOptions.value.hideControls @@ -452,7 +449,6 @@ export function useConditionalViewerRendering() { const showNavbar = computed(() => { if (!showControls.value) return false - if (tourState.value.showTour && !tourState.value.showNavbar) return false if (embedMode.embedOptions.value?.isEnabled) return false return true }) diff --git a/packages/frontend-2/lib/workspaces/composables/mixpanel.ts b/packages/frontend-2/lib/workspaces/composables/mixpanel.ts deleted file mode 100644 index 05556a6ef..000000000 --- a/packages/frontend-2/lib/workspaces/composables/mixpanel.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { useMixpanel } from '~/lib/core/composables/mp' -import { graphql } from '~~/lib/common/generated/gql' -import { - type WorkspaceMixpanelUpdateGroup_WorkspaceFragment, - type WorkspaceMixpanelUpdateGroup_WorkspaceCollaboratorFragment, - type PaidWorkspacePlans, - BillingInterval -} from '~/lib/common/generated/gql/graphql' -import { type MaybeNullOrUndefined, Roles, type WorkspaceRoles } from '@speckle/shared' -import { resolveMixpanelServerId } from '@speckle/shared' -import { WorkspacePlanStatuses } from '~/lib/common/generated/gql/graphql' -import { isPaidPlan } from '@/lib/billing/helpers/types' -import { pricingPlansConfig } from '~/lib/billing/helpers/constants' - -graphql(` - fragment WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator on WorkspaceCollaborator { - id - role - } -`) - -graphql(` - fragment WorkspaceMixpanelUpdateGroup_Workspace on Workspace { - id - name - description - domainBasedMembershipProtectionEnabled - discoverabilityEnabled - plan { - status - name - createdAt - } - subscription { - billingInterval - currentBillingCycleEnd - seats { - guest - plan - } - } - team { - totalCount - items { - ...WorkspaceMixpanelUpdateGroup_WorkspaceCollaborator - } - } - defaultRegion { - key - } - } -`) - -export const useWorkspacesMixpanel = () => { - const mixpanel = useMixpanel() - const isBillingIntegrationEnabled = useIsBillingIntegrationEnabled() - - const workspaceMixpanelUpdateGroup = ( - workspace: WorkspaceMixpanelUpdateGroup_WorkspaceFragment, - userEmail: MaybeNullOrUndefined - ) => { - if (!workspace.id || !import.meta.client) return - - const getEstimatedBill = () => { - if ( - !isBillingIntegrationEnabled.value || - !isPaidPlan(workspace.plan?.name) || - workspace.plan?.status !== WorkspacePlanStatuses.Valid || - !workspace.subscription?.billingInterval - ) - return null - - const planConfig = - pricingPlansConfig.plans[workspace.plan.name as unknown as PaidWorkspacePlans] - const cost = planConfig.cost[workspace.subscription.billingInterval] - const memberPrice = cost[Roles.Workspace.Member] - const guestPrice = cost[Roles.Workspace.Guest] - const memberCount = workspace.subscription?.seats?.plan || 0 - const guestCount = workspace.subscription?.seats?.guest || 0 - const totalPrice = memberPrice * memberCount + guestPrice * guestCount - return workspace.subscription.billingInterval === BillingInterval.Yearly - ? totalPrice * 12 - : totalPrice - } - - const roleCount = { - [Roles.Workspace.Admin]: 0, - [Roles.Workspace.Member]: 0, - [Roles.Workspace.Guest]: 0 - } - - workspace.team.items.forEach( - (item: WorkspaceMixpanelUpdateGroup_WorkspaceCollaboratorFragment) => { - roleCount[item.role as WorkspaceRoles] = - (roleCount[item.role as WorkspaceRoles] ?? 0) + 1 - } - ) - - const input = { - name: workspace.name, - description: workspace.description, - domainBasedMembershipProtectionEnabled: - workspace.domainBasedMembershipProtectionEnabled, - discoverabilityEnabled: workspace.discoverabilityEnabled, - teamTotalCount: workspace.team.totalCount, - teamAdminCount: roleCount[Roles.Workspace.Admin], - teamMemberCount: roleCount[Roles.Workspace.Member], - teamGuestCount: roleCount[Roles.Workspace.Guest], - defaultRegionKey: workspace.defaultRegion?.key, - planName: workspace.plan?.name || '', - planStatus: workspace.plan?.status || '', - planCreatedAt: workspace.plan?.createdAt, - subscriptionBillingInterval: workspace.subscription?.billingInterval, - subscriptionCurrentBillingCycleEnd: - workspace.subscription?.currentBillingCycleEnd, - seats: workspace.subscription?.seats?.plan || 0, - seatsGuest: workspace.subscription?.seats?.guest || 0, - estimatedBill: getEstimatedBill(), - // eslint-disable-next-line camelcase - server_id: resolveMixpanelServerId(window.location.hostname) - } - - mixpanel.get_group('workspace_id', workspace.id).set(input) - - if (userEmail?.includes('speckle.systems')) { - mixpanel.get_group('workspace_id', workspace.id).set_once({ - hasSpeckleMembers: true - }) - } - } - - return { - workspaceMixpanelUpdateGroup - } -} diff --git a/packages/frontend-2/middleware/004-emailVerification.global.ts b/packages/frontend-2/middleware/004-emailVerification.global.ts new file mode 100644 index 000000000..aad8f31a4 --- /dev/null +++ b/packages/frontend-2/middleware/004-emailVerification.global.ts @@ -0,0 +1,36 @@ +import { homeRoute, verifyEmailRoute } from '~/lib/common/helpers/route' +import { activeUserQuery } from '~~/lib/auth/composables/activeUser' +import { useApolloClientFromNuxt } from '~~/lib/common/composables/graphql' +import { convertThrowIntoFetchResult } from '~~/lib/common/helpers/graphql' + +/** + * Redirect user to /verify-email, if they haven't done it yet + */ +export default defineNuxtRouteMiddleware(async (to) => { + const client = useApolloClientFromNuxt() + const { data } = await client + .query({ + query: activeUserQuery + }) + .catch(convertThrowIntoFetchResult) + + if (!data?.activeUser?.id) return + + const isAuthPage = to.path.startsWith('/authn/') + const isVerifyEmailPage = to.path === verifyEmailRoute + + if (isAuthPage) return + + const hasUnverifiedEmails = data.activeUser.emails.some((email) => !email.verified) + + if (hasUnverifiedEmails) { + // Redirect to verify email if not already there + if (!isVerifyEmailPage) { + return navigateTo(verifyEmailRoute) + } + } else { + if (isVerifyEmailPage) { + return navigateTo(homeRoute) + } + } +}) diff --git a/packages/frontend-2/middleware/004-onboarding.global.ts b/packages/frontend-2/middleware/005-onboarding.global.ts similarity index 92% rename from packages/frontend-2/middleware/004-onboarding.global.ts rename to packages/frontend-2/middleware/005-onboarding.global.ts index cfa396e29..93e09b38a 100644 --- a/packages/frontend-2/middleware/004-onboarding.global.ts +++ b/packages/frontend-2/middleware/005-onboarding.global.ts @@ -17,6 +17,9 @@ export default defineNuxtRouteMiddleware(async (to) => { // Ignore if not logged in if (!data?.activeUser?.id) return + // Ignore if user has not verified their email yet + if (!data?.activeUser?.verified) return + const isOnboardingFinished = data?.activeUser?.isOnboardingFinished const isGoingToOnboarding = to.path === onboardingRoute const shouldRedirectToOnboarding = diff --git a/packages/frontend-2/nuxt.config.ts b/packages/frontend-2/nuxt.config.ts index 64d279849..5af02c17e 100644 --- a/packages/frontend-2/nuxt.config.ts +++ b/packages/frontend-2/nuxt.config.ts @@ -158,6 +158,12 @@ export default defineNuxtConfig({ 'Access-Control-Expose-Headers': '*' } }, + '/functions': { + redirect: { + to: '/', + statusCode: 307 + } + }, // Redirect old settings pages '/server-management/projects': { redirect: { @@ -207,7 +213,7 @@ export default defineNuxtConfig({ '/settings/server/*': { appMiddleware: ['auth', 'settings', 'admin'] }, - '/settings/workspaces/*': { + '/settings/workspaces/:slug/*': { appMiddleware: [ 'auth', 'settings', diff --git a/packages/frontend-2/pages/authn.vue b/packages/frontend-2/pages/authn.vue index 8495bdb44..fbbb60180 100644 --- a/packages/frontend-2/pages/authn.vue +++ b/packages/frontend-2/pages/authn.vue @@ -1,5 +1,7 @@ diff --git a/packages/frontend-2/pages/index.vue b/packages/frontend-2/pages/index.vue index 4d0fe8d37..24c054194 100644 --- a/packages/frontend-2/pages/index.vue +++ b/packages/frontend-2/pages/index.vue @@ -1,192 +1,12 @@ - diff --git a/packages/frontend-2/pages/onboarding.vue b/packages/frontend-2/pages/onboarding.vue index 54bc8386c..b6d568e48 100644 --- a/packages/frontend-2/pages/onboarding.vue +++ b/packages/frontend-2/pages/onboarding.vue @@ -1,70 +1,106 @@ + diff --git a/packages/frontend-2/pages/projects/[id]/models/[modelId]/index.vue b/packages/frontend-2/pages/projects/[id]/models/[modelId]/index.vue index 455c95751..faf6980e2 100644 --- a/packages/frontend-2/pages/projects/[id]/models/[modelId]/index.vue +++ b/packages/frontend-2/pages/projects/[id]/models/[modelId]/index.vue @@ -1,8 +1,8 @@ diff --git a/packages/frontend-2/pages/verify-email.vue b/packages/frontend-2/pages/verify-email.vue new file mode 100644 index 000000000..f8c6d63b3 --- /dev/null +++ b/packages/frontend-2/pages/verify-email.vue @@ -0,0 +1,183 @@ + + + diff --git a/packages/frontend/.browserslistrc b/packages/frontend/.browserslistrc deleted file mode 100644 index 75b6f1072..000000000 --- a/packages/frontend/.browserslistrc +++ /dev/null @@ -1 +0,0 @@ -since 2019 \ No newline at end of file diff --git a/packages/frontend/.vscode/launch.json b/packages/frontend/.vscode/launch.json deleted file mode 100644 index d0c177764..000000000 --- a/packages/frontend/.vscode/launch.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "firefox", - "request": "launch", - "reAttach": true, - "name": "Launch localhost", - "url": "http://127.0.0.1:3000", - "webRoot": "${workspaceFolder}", - "sourceMaps": true, - "trace": true, - "pathMappings": [ - { - "url": "webpack:///src/main", - "path": "${workspaceFolder}/src/main" - } - ] - }, - { - "type": "chrome", - "request": "launch", - "name": "Launch Chrome against localhost", - "url": "http://127.0.0.1:3000", - "webRoot": "${workspaceFolder}", - "sourceMaps": true, - "trace": true, - "pathMappings": [ - { - "url": "webpack:///src/main", - "path": "${workspaceFolder}/src/main" - } - ] - } - ] -} diff --git a/packages/frontend/.vscode/settings.json b/packages/frontend/.vscode/settings.json deleted file mode 100644 index 82356c9f1..000000000 --- a/packages/frontend/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "javascript.suggest.autoImports": true, - "typescript.suggest.autoImports": true, - "typescript.preferences.importModuleSpecifier": "non-relative", - "javascript.preferences.importModuleSpecifier": "non-relative", - "volar.completion.preferredTagNameCase": "kebab", - "vitest.disableWorkspaceWarning": true -} diff --git a/packages/frontend/Dockerfile b/packages/frontend/Dockerfile deleted file mode 100644 index 67949c017..000000000 --- a/packages/frontend/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -# NOTE: Docker context should be set to git root directory, to include the viewer -ARG NODE_ENV=production -ARG SPECKLE_SERVER_VERSION=custom -# build stage -FROM node:18-bullseye-slim@sha256:8cc7dcd5aa06715247f8f2f258332f188d4221e2685b1a0159e4e6c3382e4918 as build-stage -ARG NODE_ENV -ARG SPECKLE_SERVER_VERSION - -ENV NODE_ENV=${NODE_ENV} - -WORKDIR /speckle-server -COPY .yarnrc.yml . -COPY .yarn ./.yarn -COPY package.json yarn.lock ./ - -# Onyl copy in the relevant package.json files for the dependencies -COPY packages/frontend-2/type-augmentations/stubs ./packages/frontend-2/type-augmentations/stubs/ -COPY packages/frontend/package.json ./packages/frontend/ -COPY packages/viewer/package.json ./packages/viewer/ -COPY packages/objectloader/package.json ./packages/objectloader/ -COPY packages/shared/package.json ./packages/shared/ - -RUN yarn workspaces focus --all - -# Onyl copy in the relevant source files for the dependencies -COPY packages/objectloader ./packages/objectloader/ -COPY packages/viewer ./packages/viewer/ -COPY packages/frontend ./packages/frontend/ -COPY packages/shared ./packages/shared/ - -# This way the foreach only builds the frontend and its deps -RUN yarn workspaces foreach -W run build - -RUN DEBIAN_FRONTEND=noninteractive \ - apt-get -q update && \ - apt-get install --no-install-recommends -y \ - gettext=0.21-4 \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# production stage -FROM bitnami/openresty:1.21.4-3-debian-11-r3@sha256:456f29ba40fb4b5591ded0666c50c5026e3e0f97397440b9c5f2246813de9ec8 as production-stage -ARG NODE_ENV -ARG SPECKLE_SERVER_VERSION - -ENV NODE_ENV=${NODE_ENV} -ENV FILE_SIZE_LIMIT_MB=100 - -COPY --from=build-stage /usr/bin/envsubst /usr/bin/envsubst - -COPY --from=build-stage /speckle-server/packages/frontend/dist /app - -COPY packages/frontend/nginx/ /opt/bitnami/openresty/nginx/ - -# prepare the environment -ENTRYPOINT ["/opt/bitnami/openresty/nginx/docker-entrypoint.sh"] - -EXPOSE 8080 -CMD ["/opt/bitnami/scripts/openresty/entrypoint.sh", "/opt/bitnami/scripts/openresty/run.sh"] diff --git a/packages/frontend/README.md b/packages/frontend/README.md deleted file mode 100644 index 90ee651ec..000000000 --- a/packages/frontend/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# The Speckle Frontend App - -[![Twitter Follow](https://img.shields.io/twitter/follow/SpeckleSystems?style=social)](https://twitter.com/SpeckleSystems) [![Community forum users](https://img.shields.io/discourse/users?server=https%3A%2F%2Fspeckle.community&style=flat-square&logo=discourse&logoColor=white)](https://speckle.community) [![website](https://img.shields.io/badge/https://-speckle.systems-royalblue?style=flat-square)](https://speckle.systems) [![docs](https://img.shields.io/badge/docs-speckle.guide-orange?style=flat-square&logo=read-the-docs&logoColor=white)](https://speckle.guide/dev/) - -## Disclaimer - -We're working to stabilize the 2.0 API, and until then there will be breaking changes. - -Notes: - -- In **development** mode, the Speckle Server will proxy the frontend from `localhost:3000` to `localhost:8080`. If you don't see anything, ensure you've run `yarn serve` in the frontend package. - -- In **production** mode, the Speckle Frontend will be statically served by nginx (see the Dockerfile in the current directory). - -## Documentation - -Comprehensive developer and user documentation can be found in our: - -#### 📚 [Speckle Docs website](https://speckle.guide/dev/) - -## Project setup - -Make sure you follow the Developing and Debugging section in the project root readme. - -### Running - -Dev server with hot reload: - -``` -yarn dev -``` - -Build static build & serve it (for development, otherwise use docker image): - -``` -yarn build && yarn serve -``` - -### Apollo Client - -We're on Apollo Client v3 and Vue Apollo v4 (both the options API and composition API) in this package, so pretty much all of the latest and greatest features are there and ready to be used. - -**Note**: Do not import anything from `@apollo/client`, use `@apollo/client/core` instead! Otherwise you risk bundling in React dependencies, which we definitely do not need! - -### TypeScript - -This project also supports TypeScript, both in Vue SFCs and outside them. It's preferred that you use it when writing new code and also migrate JS files when there's a good oppurtunity to do so. - -#### TS in Vue - -1. Set ` - - diff --git a/packages/frontend/nginx/docker-entrypoint.sh b/packages/frontend/nginx/docker-entrypoint.sh deleted file mode 100755 index 67bc935fd..000000000 --- a/packages/frontend/nginx/docker-entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -euo pipefail -# shellcheck disable=SC2016,SC2046 -defined_envs=$(printf '${%s} ' $(env | cut -d= -f1)) - -echo Starting nginx environment template rendering with "${defined_envs}" - -cp /opt/bitnami/openresty/nginx/mime.types /opt/bitnami/openresty/nginx/conf/mime.types -envsubst "${defined_envs}" < /opt/bitnami/openresty/nginx/templates/nginx.conf.template > /opt/bitnami/openresty/nginx/conf/nginx.conf - -echo Nginx conf rendered, starting server... -exec "$@" diff --git a/packages/frontend/nginx/mime.types b/packages/frontend/nginx/mime.types deleted file mode 100644 index 8d37c8636..000000000 --- a/packages/frontend/nginx/mime.types +++ /dev/null @@ -1,98 +0,0 @@ -types { - text/html html htm shtml; - text/css css; - text/xml xml; - image/gif gif; - image/jpeg jpeg jpg; - application/javascript js; - application/atom+xml atom; - application/rss+xml rss; - - text/mathml mml; - text/plain txt; - text/vnd.sun.j2me.app-descriptor jad; - text/vnd.wap.wml wml; - text/x-component htc; - - image/avif avif; - image/png png; - image/svg+xml svg svgz; - image/tiff tif tiff; - image/vnd.wap.wbmp wbmp; - image/webp webp; - image/x-icon ico; - image/x-jng jng; - image/x-ms-bmp bmp; - - font/woff woff; - font/woff2 woff2; - - application/java-archive jar war ear; - application/json json; - application/mac-binhex40 hqx; - application/msword doc; - application/pdf pdf; - application/postscript ps eps ai; - application/rtf rtf; - application/vnd.apple.mpegurl m3u8; - application/vnd.google-earth.kml+xml kml; - application/vnd.google-earth.kmz kmz; - application/vnd.ms-excel xls; - application/vnd.ms-fontobject eot; - application/vnd.ms-powerpoint ppt; - application/vnd.oasis.opendocument.graphics odg; - application/vnd.oasis.opendocument.presentation odp; - application/vnd.oasis.opendocument.spreadsheet ods; - application/vnd.oasis.opendocument.text odt; - application/vnd.openxmlformats-officedocument.presentationml.presentation - pptx; - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - xlsx; - application/vnd.openxmlformats-officedocument.wordprocessingml.document - docx; - application/vnd.wap.wmlc wmlc; - application/wasm wasm; - application/x-7z-compressed 7z; - application/x-cocoa cco; - application/x-java-archive-diff jardiff; - application/x-java-jnlp-file jnlp; - application/x-makeself run; - application/x-perl pl pm; - application/x-pilot prc pdb; - application/x-rar-compressed rar; - application/x-redhat-package-manager rpm; - application/x-sea sea; - application/x-shockwave-flash swf; - application/x-stuffit sit; - application/x-tcl tcl tk; - application/x-x509-ca-cert der pem crt; - application/x-xpinstall xpi; - application/xhtml+xml xhtml; - application/xspf+xml xspf; - application/zip zip; - - application/octet-stream bin exe dll; - application/octet-stream deb; - application/octet-stream dmg; - application/octet-stream iso img; - application/octet-stream msi msp msm; - - audio/midi mid midi kar; - audio/mpeg mp3; - audio/ogg ogg; - audio/x-m4a m4a; - audio/x-realaudio ra; - - video/3gpp 3gpp 3gp; - video/mp2t ts; - video/mp4 mp4; - video/mpeg mpeg mpg; - video/quicktime mov; - video/webm webm; - video/x-flv flv; - video/x-m4v m4v; - video/x-mng mng; - video/x-ms-asf asx asf; - video/x-ms-wmv wmv; - video/x-msvideo avi; -} diff --git a/packages/frontend/nginx/templates/nginx.conf.template b/packages/frontend/nginx/templates/nginx.conf.template deleted file mode 100644 index 92e6c5c53..000000000 --- a/packages/frontend/nginx/templates/nginx.conf.template +++ /dev/null @@ -1,160 +0,0 @@ -pcre_jit on; -error_log stderr info; - -events { - worker_connections 1024; -} - -http { - include mime.types; - default_type application/octet-stream; - - # move default write paths to a custom directory - # kubernetes can mount this directory and prevent writes to the root directory - # https://github.com/openresty/docker-openresty/issues/119 - client_body_temp_path /bitnami/openresty/nginx-client-body; - proxy_temp_path /bitnami/openresty/nginx-proxy; - fastcgi_temp_path /bitnami/openresty/nginx-fastcgi; - uwsgi_temp_path /bitnami/openresty/nginx-uwsgi; - scgi_temp_path /bitnami/openresty/nginx-scgi; - - log_format json_combined escape=json - '{' - '"time_local":"$time_local",' - '"remote_addr":"$remote_addr",' - '"remote_user":"$remote_user",' - '"request":"$request",' - '"status": "$status",' - '"body_bytes_sent":"$body_bytes_sent",' - '"request_time":"$request_time",' - '"http_referrer":"$http_referer",' - '"http_user_agent":"$http_user_agent"' - '}'; - - sendfile on; - keepalive_timeout 65; - access_log /dev/stdout json_combined; - - # Speckle configuration - server_tokens off; - gzip on; - gzip_disable "msie6"; - - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types - application/atom+xml - application/geo+json - application/javascript - application/x-javascript - application/json - application/ld+json - application/manifest+json - application/rdf+xml - application/rss+xml - application/xhtml+xml - application/xml - font/eot - font/otf - font/ttf - image/svg+xml - text/css - text/javascript - text/plain - text/xml; - - set_real_ip_from 103.21.244.0/22; - set_real_ip_from 103.22.200.0/22; - set_real_ip_from 103.31.4.0/22; - set_real_ip_from 104.16.0.0/13; - set_real_ip_from 104.24.0.0/14; - set_real_ip_from 108.162.192.0/18; - set_real_ip_from 131.0.72.0/22; - set_real_ip_from 141.101.64.0/18; - set_real_ip_from 162.158.0.0/15; - set_real_ip_from 172.64.0.0/13; - set_real_ip_from 173.245.48.0/20; - set_real_ip_from 188.114.96.0/20; - set_real_ip_from 190.93.240.0/20; - set_real_ip_from 197.234.240.0/22; - set_real_ip_from 198.41.128.0/17; - set_real_ip_from 2400:cb00::/32; - set_real_ip_from 2606:4700::/32; - set_real_ip_from 2803:f800::/32; - set_real_ip_from 2405:b500::/32; - set_real_ip_from 2405:8100::/32; - set_real_ip_from 2c0f:f248::/32; - set_real_ip_from 2a06:98c0::/29; - - #use any of the following two - real_ip_header CF-Connecting-IP; - #real_ip_header X-Forwarded-For; - - server { - listen 8080; - client_max_body_size 100m; - - location / { - root /app; - index index.html; - try_files $uri $uri/ /index.html; - add_header Cache-Control "no-store, no-cache, must-revalidate"; - } - - location ~* ^/(favicon.ico|logo.svg|loadingImage.png|og_image.png) { - root /app; - index index.html; - try_files $uri $uri/ /index.html; - expires 1d; - } - - location ~* ^/(js/.*|fonts/.*|(css/.*)|(img/.*)|(assets/.*)) { - root /app; - index index.html; - try_files $uri $uri/ /index.html; - expires 1y; - } - - location ~ ^/streams/.* { - default_type text/html; - content_by_lua_block { - local f = assert(io.open('/app/index.html', "rb")) - local content = f:read("*all") - f:close() - local http_host = ngx.var.http_host - - content = content:gsub('', '') - - local stream_id = ngx.var.uri:sub(10) - local img_tag = '' - - content = content:gsub('', img_tag) - - ngx.say(content) - } - } - - location ~* ^/(graphql|explorer|(auth/.*)|(objects/.*)|(preview/.*)|(api/.*)|(static/.*)) { - resolver 127.0.0.11 valid=30s; - set $upstream_speckle_server speckle-server; - client_max_body_size ${FILE_SIZE_LIMIT_MB}m; - proxy_pass http://$upstream_speckle_server:3000; - - proxy_buffering off; - proxy_request_buffering off; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - - error_page 500 502 503 504 /50x.html; - - location = /50x.html { - root /app; - } - } -} diff --git a/packages/frontend/package.json b/packages/frontend/package.json deleted file mode 100644 index e028a6b4c..000000000 --- a/packages/frontend/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "name": "@speckle/frontend", - "version": "2.5.4", - "private": true, - "scripts": { - "dev": "vite", - "build": "vite build", - "serve": "vite preview --port 8080", - "profile": "vite-bundle-visualizer --output profiler/stats.html", - "lint:eslint": "eslint .", - "lint:ts": "vue-tsc --noEmit", - "lint": "yarn lint:eslint && yarn lint:ts", - "lint:ci": "yarn lint:ts", - "gqlgen": "graphql-codegen --config codegen.yml" - }, - "dependencies": { - "@apollo/client": "^3.7.0", - "@speckle/shared": "workspace:^", - "@speckle/viewer": "2.17.8", - "@tiptap/core": "^2.0.0-beta.176", - "@tiptap/extension-bold": "^2.0.0-beta.26", - "@tiptap/extension-document": "^2.0.0-beta.15", - "@tiptap/extension-hard-break": "^2.0.0-beta.30", - "@tiptap/extension-history": "^2.0.0-beta.21", - "@tiptap/extension-italic": "^2.0.0-beta.26", - "@tiptap/extension-link": "^2.0.0-beta.38", - "@tiptap/extension-mention": "^2.0.0-beta.97", - "@tiptap/extension-paragraph": "^2.0.0-beta.23", - "@tiptap/extension-placeholder": "^2.0.0-beta.48", - "@tiptap/extension-strike": "^2.0.0-beta.27", - "@tiptap/extension-text": "^2.0.0-beta.15", - "@tiptap/extension-underline": "^2.0.0-beta.23", - "@tiptap/vue-2": "^2.0.0-beta.79", - "@tryghost/content-api": "^1.5.12", - "@vue/apollo-composable": "^4.0.0-alpha.19", - "@vue/apollo-option": "^4.0.0-alpha.20", - "@vuejs-community/vue-filter-date-format": "^1.6.3", - "@vuejs-community/vue-filter-date-parse": "^1.2.0", - "@vueuse/core": "^9.13.0", - "apexcharts": "^3.33.1", - "apollo-upload-client": "^17.0.0", - "dompurify": "^2.5.4", - "graphql": "^15.0.0", - "graphql-tag": "^2.12.6", - "lodash": "^4.17.21", - "lodash-es": "^4.17.21", - "numeral": "^2.0.6", - "portal-vue": "^2.1.7", - "regenerator-runtime": "^0.13.9", - "subscriptions-transport-ws": "^0.11.0", - "tween": "^0.9.0", - "uuid": "^8.3.2", - "v-tooltip": "^2.0.3", - "vue": "^2.7.5", - "vue-apexcharts": "^1.6.1", - "vue-histogram-slider": "^0.3.8", - "vue-infinite-loading": "^2.4.5", - "vue-mixpanel": "1.0.7", - "vue-router": "^3.4.9", - "vue-timeago": "^5.1.2", - "vuedraggable": "^2.24.3", - "vuetify": "^2.6.10", - "vuetify-image-input": "^19.1.0" - }, - "devDependencies": { - "@graphql-codegen/cli": "^5.0.2", - "@graphql-codegen/introspection": "^4.0.3", - "@graphql-codegen/typed-document-node": "^5.0.7", - "@graphql-codegen/typescript": "^4.0.7", - "@graphql-codegen/typescript-document-nodes": "^4.0.7", - "@graphql-codegen/typescript-operations": "^4.2.1", - "@mdi/font": "^5.8.55", - "@parcel/watcher": "^2.4.1", - "@swc/core": "^1.2.222", - "@types/apollo-upload-client": "^17.0.1", - "@types/dompurify": "^2.3.3", - "@types/lodash": "^4.14.180", - "@types/mixpanel-browser": "^2.50.2", - "@types/node": "^17.0.43", - "@typescript-eslint/eslint-plugin": "^7.12.0", - "@typescript-eslint/parser": "^7.12.0", - "@vitejs/plugin-vue2": "^2.2.0", - "babel-plugin-lodash": "^3.3.4", - "eslint": "^9.4.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-vue": "^9.26.0", - "prettier": "^2.5.1", - "sass": "~1.32.6", - "ts-node": "^10.9.1", - "tsconfig-paths": "^4.0.0", - "type-fest": "^2.13.1", - "typescript": "~4.5.5", - "unplugin-vue-components": "^0.25.1", - "vite": "^5.3.4", - "vite-bundle-visualizer": "^0.7.0", - "vite-plugin-simple-gql": "^0.5.0", - "vue-tsc": "^1.8.8" - }, - "engines": { - "node": "^18.19.0" - } -} diff --git a/packages/frontend/public/favicon.ico b/packages/frontend/public/favicon.ico deleted file mode 100644 index ed7d98c11..000000000 Binary files a/packages/frontend/public/favicon.ico and /dev/null differ diff --git a/packages/frontend/public/loadingImage.png b/packages/frontend/public/loadingImage.png deleted file mode 100644 index 8c65cf7b6..000000000 Binary files a/packages/frontend/public/loadingImage.png and /dev/null differ diff --git a/packages/frontend/public/logo.svg b/packages/frontend/public/logo.svg deleted file mode 100644 index 94d42e6d0..000000000 --- a/packages/frontend/public/logo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/packages/frontend/public/og_image.png b/packages/frontend/public/og_image.png deleted file mode 100644 index 42b5ca50a..000000000 Binary files a/packages/frontend/public/og_image.png and /dev/null differ diff --git a/packages/frontend/src/assets/404box.png b/packages/frontend/src/assets/404box.png deleted file mode 100755 index 4f56ea7be..000000000 Binary files a/packages/frontend/src/assets/404box.png and /dev/null differ diff --git a/packages/frontend/src/assets/comments.gif b/packages/frontend/src/assets/comments.gif deleted file mode 100644 index 8b42ad180..000000000 Binary files a/packages/frontend/src/assets/comments.gif and /dev/null differ diff --git a/packages/frontend/src/assets/emptybox.png b/packages/frontend/src/assets/emptybox.png deleted file mode 100755 index 399a9bb54..000000000 Binary files a/packages/frontend/src/assets/emptybox.png and /dev/null differ diff --git a/packages/frontend/src/assets/lockbox.png b/packages/frontend/src/assets/lockbox.png deleted file mode 100755 index 8ea0f3f4d..000000000 Binary files a/packages/frontend/src/assets/lockbox.png and /dev/null differ diff --git a/packages/frontend/src/assets/logo.svg b/packages/frontend/src/assets/logo.svg deleted file mode 100644 index 94d42e6d0..000000000 --- a/packages/frontend/src/assets/logo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/packages/frontend/src/assets/onboarding-1.png b/packages/frontend/src/assets/onboarding-1.png deleted file mode 100644 index 015a87c90..000000000 Binary files a/packages/frontend/src/assets/onboarding-1.png and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-1.webp b/packages/frontend/src/assets/onboarding-1.webp deleted file mode 100644 index a1c4d3bf5..000000000 Binary files a/packages/frontend/src/assets/onboarding-1.webp and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-2.png b/packages/frontend/src/assets/onboarding-2.png deleted file mode 100644 index dcfb7dfe7..000000000 Binary files a/packages/frontend/src/assets/onboarding-2.png and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-2.webp b/packages/frontend/src/assets/onboarding-2.webp deleted file mode 100644 index 38f319a80..000000000 Binary files a/packages/frontend/src/assets/onboarding-2.webp and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-3.png b/packages/frontend/src/assets/onboarding-3.png deleted file mode 100644 index 10f52ee00..000000000 Binary files a/packages/frontend/src/assets/onboarding-3.png and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-3.webp b/packages/frontend/src/assets/onboarding-3.webp deleted file mode 100644 index d893bf208..000000000 Binary files a/packages/frontend/src/assets/onboarding-3.webp and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-4.png b/packages/frontend/src/assets/onboarding-4.png deleted file mode 100644 index a37bbcd5f..000000000 Binary files a/packages/frontend/src/assets/onboarding-4.png and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-4.webp b/packages/frontend/src/assets/onboarding-4.webp deleted file mode 100644 index a40cc3a3f..000000000 Binary files a/packages/frontend/src/assets/onboarding-4.webp and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-5.png b/packages/frontend/src/assets/onboarding-5.png deleted file mode 100644 index 383310d9e..000000000 Binary files a/packages/frontend/src/assets/onboarding-5.png and /dev/null differ diff --git a/packages/frontend/src/assets/onboarding-5.webp b/packages/frontend/src/assets/onboarding-5.webp deleted file mode 100644 index 630d4e885..000000000 Binary files a/packages/frontend/src/assets/onboarding-5.webp and /dev/null differ diff --git a/packages/frontend/src/assets/panning.gif b/packages/frontend/src/assets/panning.gif deleted file mode 100644 index 93c8eb9d8..000000000 Binary files a/packages/frontend/src/assets/panning.gif and /dev/null differ diff --git a/packages/frontend/src/assets/rotating.gif b/packages/frontend/src/assets/rotating.gif deleted file mode 100644 index cbf2f49dd..000000000 Binary files a/packages/frontend/src/assets/rotating.gif and /dev/null differ diff --git a/packages/frontend/src/assets/sectionbox.gif b/packages/frontend/src/assets/sectionbox.gif deleted file mode 100644 index f58fa867d..000000000 Binary files a/packages/frontend/src/assets/sectionbox.gif and /dev/null differ diff --git a/packages/frontend/src/assets/specklebrick.png b/packages/frontend/src/assets/specklebrick.png deleted file mode 100755 index 278859bc8..000000000 Binary files a/packages/frontend/src/assets/specklebrick.png and /dev/null differ diff --git a/packages/frontend/src/assets/splash.svg b/packages/frontend/src/assets/splash.svg deleted file mode 100644 index f4c4e3833..000000000 --- a/packages/frontend/src/assets/splash.svg +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/frontend/src/assets/zooming.gif b/packages/frontend/src/assets/zooming.gif deleted file mode 100644 index 9b7ce3a75..000000000 Binary files a/packages/frontend/src/assets/zooming.gif and /dev/null differ diff --git a/packages/frontend/src/bootstrapper.ts b/packages/frontend/src/bootstrapper.ts deleted file mode 100644 index 136dcdfcc..000000000 --- a/packages/frontend/src/bootstrapper.ts +++ /dev/null @@ -1,40 +0,0 @@ -import Vue from 'vue' -import VTooltip from 'v-tooltip' -import VueMixpanel from 'vue-mixpanel' -import PortalVue from 'portal-vue' -import { formatNumber } from '@/plugins/formatNumber' - -/** - * Global bootstrapping for the frontend app - */ - -// Filter to turn any number into a nice string like '10k', '5.5m' -// Accepts 'max' parameter to set it's formatting while being animated -Vue.filter('prettynum', formatNumber) - -// env vars injected by Vite -const enableDevMode = !!import.meta.env.FORCE_VUE_DEVTOOLS || !!import.meta.env.DEV - -Vue.config.productionTip = enableDevMode -Vue.config.devtools = enableDevMode - -Vue.use(VTooltip, { - defaultDelay: 300, - defaultBoundariesElement: document.body, - defaultHtml: false -}) - -// In highly restrictive sandboxed environments mixpanel init might fail due to document.cookie access -Vue.use(VueMixpanel, { - token: 'acd87c5a50b56df91a795e999812a3a4', - config: { - // eslint-disable-next-line camelcase - api_host: 'https://analytics.speckle.systems' - } -}) - -Vue.use(PortalVue) - -// Event hub -// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -Vue.prototype.$eventHub = new Vue() diff --git a/packages/frontend/src/config/apolloConfig.ts b/packages/frontend/src/config/apolloConfig.ts deleted file mode 100644 index ae860958e..000000000 --- a/packages/frontend/src/config/apolloConfig.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import Vue from 'vue' -import { createApolloProvider, ApolloProvider } from '@vue/apollo-option' -import { - ApolloClient, - ApolloLink, - InMemoryCache, - split, - TypePolicies, - from -} from '@apollo/client/core' -import { setContext } from '@apollo/client/link/context' -import { WebSocketLink } from '@apollo/client/link/ws' -import { SubscriptionClient } from 'subscriptions-transport-ws' -import { LocalStorageKeys } from '@/helpers/mainConstants' -import { createUploadLink } from 'apollo-upload-client' -import { AppLocalStorage } from '@/utils/localStorage' -import { getMainDefinition } from '@apollo/client/utilities' -import { OperationDefinitionNode, Kind } from 'graphql' -import { - buildAbstractCollectionMergeFunction, - incomingOverwritesExistingMergeFunction -} from '@/main/lib/core/helpers/apolloSetupHelper' -import { merge } from 'lodash' -import { statePolicies as commitObjectViewerStatePolicies } from '@/main/lib/viewer/commit-object-viewer/stateManagerCore' -import { Optional } from '@speckle/shared' -import { onError } from '@apollo/client/link/error' -import { registerError, isErrorState } from '@/main/lib/core/utils/appErrorStateManager' -import { isInvalidAuth } from '@/helpers/errorHelper' -import { signOut } from '@/plugins/authHelpers' - -// Name of the localStorage item -const AUTH_TOKEN = LocalStorageKeys.AuthToken -// Http endpoint -const httpEndpoint = `${window.location.origin}/graphql` -// WS endpoint -const wsEndpoint = `${window.location.origin.replace('http', 'ws')}/graphql` -// app version -const appVersion = (import.meta.env.SPECKLE_SERVER_VERSION || 'unknown') as string - -let instance: Optional = undefined - -function hasAuthToken() { - return !!AppLocalStorage.get(AUTH_TOKEN) -} - -function createCache(): InMemoryCache { - return new InMemoryCache({ - /** - * This is where you configure how various GQL fields should be read, written to or merged when new data comes in. - * If you define a merge function here, you don't need to duplicate the merge logic inside an `update()` callback - * of a fetchMore call, for example. - * - * Feel free to re-use utilities in `apolloSetupHelper` for defining merge functions or even use the ones that come from `@apollo/client/utilities`. - * - * Read more: https://www.apollographql.com/docs/react/caching/cache-field-behavior - */ - typePolicies: merge( - { - Query: { - fields: { - otherUser: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'LimitedUser', id: args.id }) - } - - return original - } - }, - user: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'User', id: args.id }) - } - - return original - } - }, - stream: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'Stream', id: args.id }) - } - - return original - } - }, - streams: { - keyArgs: ['query'], - merge: buildAbstractCollectionMergeFunction('StreamCollection', { - checkIdentity: true - }) - } - } - }, - LimitedUser: { - fields: { - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection', { - checkIdentity: true - }) - } - } - }, - User: { - fields: { - timeline: { - keyArgs: ['after', 'before'], - merge: buildAbstractCollectionMergeFunction('ActivityCollection') - }, - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection', { - checkIdentity: true - }) - }, - favoriteStreams: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('StreamCollection', { - checkIdentity: true - }) - } - } - }, - Stream: { - fields: { - activity: { - keyArgs: ['after', 'before', 'actionType'], - merge: buildAbstractCollectionMergeFunction('ActivityCollection') - }, - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection', { - checkIdentity: true - }) - }, - pendingCollaborators: { - merge: incomingOverwritesExistingMergeFunction - }, - pendingAccessRequests: { - merge: incomingOverwritesExistingMergeFunction - } - } - }, - Branch: { - fields: { - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection', { - checkIdentity: true - }) - } - } - }, - BranchCollection: { - merge: true - }, - ServerStats: { - merge: true - }, - WebhookEventCollection: { - merge: true - }, - ServerInfo: { - merge: true - }, - CommentThreadActivityMessage: { - merge: true - } - }, - commitObjectViewerStatePolicies - ) - }) -} - -function createWsClient(): SubscriptionClient { - return new SubscriptionClient(wsEndpoint, { - reconnect: true, - connectionParams: () => { - const authToken = AppLocalStorage.get(AUTH_TOKEN) - const Authorization = authToken ? `Bearer ${authToken}` : null - return Authorization ? { Authorization, headers: { Authorization } } : {} - } - }) -} - -function createLink(wsClient?: SubscriptionClient): ApolloLink { - // Prepare links - const httpLink = createUploadLink({ - uri: httpEndpoint - }) - const authLink = setContext(async (_, { headers }) => { - const authToken = AppLocalStorage.get(AUTH_TOKEN) - const authHeader = authToken ? { Authorization: `Bearer ${authToken}` } : {} - return { - headers: { - ...headers, - ...authHeader - } - } - }) - let link = authLink.concat(httpLink) - - // WS link - if (wsClient) { - const wsLink = new WebSocketLink(wsClient) - link = split( - ({ query }) => { - const definition = getMainDefinition(query) as OperationDefinitionNode - const { kind, operation } = definition - - return kind === Kind.OPERATION_DEFINITION && operation === 'subscription' - }, - wsLink, - link - ) - - // Stopping WS when in error state - wsClient.use([ - { - applyMiddleware: (_opt, next) => { - if (isErrorState()) { - return // never invokes next() - essentially stuck - } - - next() - } - } - ]) - } - - // Global error handling - const errorLink = onError((res) => { - const { networkError } = res - if (networkError && isInvalidAuth(networkError)) { - // Logout - void signOut() - } - - registerError() - }) - - return from([errorLink, link]) -} - -function createApolloClient() { - const cache = createCache() - const wsClient = createWsClient() - const link = createLink(wsClient) - - const apolloClient = new ApolloClient({ - link, - cache, - ssrForceFetchDelay: 100, - connectToDevTools: import.meta.env.DEV, - name: 'web', - version: appVersion - }) - - return { - apolloClient, - wsClient - } -} - -/** - * Create and set a global Vue Apollo provider instance - */ -export function createProvider(): ApolloProvider { - // Create apollo client - const { apolloClient, wsClient } = createApolloClient() - apolloClient.wsClient = hasAuthToken() ? wsClient : null - - // Create vue apollo provider - const apolloProvider = createApolloProvider({ - defaultClient: apolloClient - }) - instance = apolloProvider - - return apolloProvider -} - -export function getApolloProvider(): ApolloProvider { - if (!instance) { - throw new Error('Attempting to use unitialized global Apollo Provider') - } - - return instance -} - -export function installVueApollo(apolloProvider: ApolloProvider): void { - // Install apollo provider (it's done weirdly cause it's meant to be used with vue 3) - Vue.config.globalProperties ||= {} - Vue.prototype.$apolloProvider = apolloProvider - apolloProvider.install(Vue) -} diff --git a/packages/frontend/src/graphql/accessRequests.ts b/packages/frontend/src/graphql/accessRequests.ts deleted file mode 100644 index c8e40d40f..000000000 --- a/packages/frontend/src/graphql/accessRequests.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { basicStreamAccessRequestFieldsFragment } from '@/graphql/fragments/accessRequests' -import { gql } from '@apollo/client/core' - -export const getStreamAccessRequestQuery = gql` - query GetStreamAccessRequest($streamId: String!) { - streamAccessRequest(streamId: $streamId) { - ...BasicStreamAccessRequestFields - } - } - - ${basicStreamAccessRequestFieldsFragment} -` - -export const createStreamAccessRequestMutation = gql` - mutation CreateStreamAccessRequest($streamId: String!) { - streamAccessRequestCreate(streamId: $streamId) { - ...BasicStreamAccessRequestFields - } - } - - ${basicStreamAccessRequestFieldsFragment} -` - -export const useStreamAccessRequestMutation = gql` - mutation UseStreamAccessRequest( - $requestId: String! - $accept: Boolean! - $role: StreamRole = STREAM_CONTRIBUTOR - ) { - streamAccessRequestUse(requestId: $requestId, accept: $accept, role: $role) - } -` diff --git a/packages/frontend/src/graphql/branch.gql b/packages/frontend/src/graphql/branch.gql deleted file mode 100644 index b6ffda945..000000000 --- a/packages/frontend/src/graphql/branch.gql +++ /dev/null @@ -1,27 +0,0 @@ -query StreamWithBranch($streamId: String!, $branchName: String!, $cursor: String) { - stream(id: $streamId) { - id - name - role - branch(name: $branchName) { - id - name - description - commits(cursor: $cursor, limit: 4) { - totalCount - cursor - items { - id - authorName - authorId - authorAvatar - sourceApplication - message - referencedObject - createdAt - commentCount - } - } - } - } -} diff --git a/packages/frontend/src/graphql/branch.js b/packages/frontend/src/graphql/branch.js deleted file mode 100644 index 6ed84998c..000000000 --- a/packages/frontend/src/graphql/branch.js +++ /dev/null @@ -1,32 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const branchCreatedSubscription = gql` - subscription BranchCreated($streamId: String!) { - branchCreated(streamId: $streamId) - } -` -// TODO: Reusable composable -export const streamNavBranchesQuery = gql` - query StreamAllBranches($streamId: String!, $cursor: String) { - stream(id: $streamId) { - id - branches(limit: 500, cursor: $cursor) { - totalCount - cursor - items { - id - name - description - author { - id - name - } - commits { - totalCount - } - createdAt - } - } - } - } -` diff --git a/packages/frontend/src/graphql/comments.ts b/packages/frontend/src/graphql/comments.ts deleted file mode 100644 index f9a49c9b4..000000000 --- a/packages/frontend/src/graphql/comments.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const COMMENT_FULL_INFO_FRAGMENT = gql` - fragment CommentFullInfo on Comment { - id - archived - authorId - text { - doc - attachments { - id - fileName - streamId - fileType - fileSize - } - } - data - screenshot - replies { - totalCount - } - resources { - resourceId - resourceType - } - createdAt - updatedAt - viewedAt - } -` diff --git a/packages/frontend/src/graphql/commit.gql b/packages/frontend/src/graphql/commit.gql deleted file mode 100644 index 14b9b8c6a..000000000 --- a/packages/frontend/src/graphql/commit.gql +++ /dev/null @@ -1,18 +0,0 @@ -query StreamCommitQuery($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - name - role - commit(id: $id) { - id - message - referencedObject - authorName - authorId - authorAvatar - createdAt - branchName - sourceApplication - } - } -} diff --git a/packages/frontend/src/graphql/commits.ts b/packages/frontend/src/graphql/commits.ts deleted file mode 100644 index 34faed4ca..000000000 --- a/packages/frontend/src/graphql/commits.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const streamBranchesSelectorQuery = gql` - query StreamBranchesSelector($streamId: String!) { - stream(id: $streamId) { - id - branches(limit: 100) { - items { - name - } - } - } - } -` - -export const moveCommitsMutation = gql` - mutation MoveCommits($input: CommitsMoveInput!) { - commitsMove(input: $input) - } -` - -export const deleteCommitsMutation = gql` - mutation DeleteCommits($input: CommitsDeleteInput!) { - commitsDelete(input: $input) - } -` diff --git a/packages/frontend/src/graphql/fragments/accessRequests.ts b/packages/frontend/src/graphql/fragments/accessRequests.ts deleted file mode 100644 index 4cf58aa73..000000000 --- a/packages/frontend/src/graphql/fragments/accessRequests.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { limitedUserFieldsFragment } from '@/graphql/fragments/user' -import { gql } from '@apollo/client/core' - -export const basicStreamAccessRequestFieldsFragment = gql` - fragment BasicStreamAccessRequestFields on StreamAccessRequest { - id - streamId - createdAt - } -` - -export const fullStreamAccessRequestFieldsFragment = gql` - fragment FullStreamAccessRequestFields on StreamAccessRequest { - ...BasicStreamAccessRequestFields - requester { - ...LimitedUserFields - } - } - - ${limitedUserFieldsFragment} - ${basicStreamAccessRequestFieldsFragment} -` diff --git a/packages/frontend/src/graphql/fragments/activity.ts b/packages/frontend/src/graphql/fragments/activity.ts deleted file mode 100644 index 879910f3f..000000000 --- a/packages/frontend/src/graphql/fragments/activity.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const activityMainFieldsFragment = gql` - fragment ActivityMainFields on Activity { - id - actionType - info - userId - streamId - resourceId - resourceType - time - message - } -` - -export const limitedCommitActivityFieldsFragment = gql` - fragment LimitedCommitActivityFields on Activity { - id - info - time - userId - message - } -` diff --git a/packages/frontend/src/graphql/fragments/streams.ts b/packages/frontend/src/graphql/fragments/streams.ts deleted file mode 100644 index 78e8a0a7c..000000000 --- a/packages/frontend/src/graphql/fragments/streams.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { fullStreamAccessRequestFieldsFragment } from '@/graphql/fragments/accessRequests' -import { gql } from '@apollo/client/core' - -export const streamPendingAccessRequestsFragment = gql` - fragment StreamPendingAccessRequests on Stream { - pendingAccessRequests { - ...FullStreamAccessRequestFields - } - } - - ${fullStreamAccessRequestFieldsFragment} -` - -export const streamFileUploadFragment = gql` - fragment StreamFileUpload on FileUpload { - id - convertedCommitId - userId - convertedStatus - convertedMessage - fileName - fileType - uploadComplete - uploadDate - convertedLastUpdate - } -` diff --git a/packages/frontend/src/graphql/fragments/user.js b/packages/frontend/src/graphql/fragments/user.js deleted file mode 100644 index d8b51a458..000000000 --- a/packages/frontend/src/graphql/fragments/user.js +++ /dev/null @@ -1,38 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const limitedUserFieldsFragment = gql` - fragment LimitedUserFields on LimitedUser { - id - name - bio - company - avatar - verified - } -` - -export const streamCollaboratorFieldsFragment = gql` - fragment StreamCollaboratorFields on StreamCollaborator { - id - name - role - company - avatar - serverRole - } -` - -export const usersOwnInviteFieldsFragment = gql` - fragment UsersOwnInviteFields on PendingStreamCollaborator { - id - inviteId - streamId - streamName - token - invitedBy { - ...LimitedUserFields - } - } - - ${limitedUserFieldsFragment} -` diff --git a/packages/frontend/src/graphql/generated/graphql.ts b/packages/frontend/src/graphql/generated/graphql.ts deleted file mode 100644 index 87252d296..000000000 --- a/packages/frontend/src/graphql/generated/graphql.ts +++ /dev/null @@ -1,6075 +0,0 @@ -import gql from 'graphql-tag'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { [K in keyof T]: T[K] }; -export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; -export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; -export type MakeEmpty = { [_ in K]?: never }; -export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string; } - String: { input: string; output: string; } - Boolean: { input: boolean; output: boolean; } - Int: { input: number; output: number; } - Float: { input: number; output: number; } - /** The `BigInt` scalar type represents non-fractional signed whole numeric values. */ - BigInt: { input: any; output: any; } - /** A date-time string at UTC, such as 2007-12-03T10:15:30Z, compliant with the `date-time` format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar. */ - DateTime: { input: string; output: string; } - /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ - JSONObject: { input: Record; output: Record; } -}; - -export type ActiveUserMutations = { - __typename?: 'ActiveUserMutations'; - emailMutations: UserEmailMutations; - /** Mark onboarding as complete */ - finishOnboarding: Scalars['Boolean']['output']; - /** Edit a user's profile */ - update: User; -}; - - -export type ActiveUserMutationsUpdateArgs = { - user: UserUpdateInput; -}; - -export type Activity = { - __typename?: 'Activity'; - actionType: Scalars['String']['output']; - id: Scalars['ID']['output']; - info: Scalars['JSONObject']['output']; - message: Scalars['String']['output']; - resourceId: Scalars['String']['output']; - resourceType: Scalars['String']['output']; - streamId?: Maybe; - time: Scalars['DateTime']['output']; - userId: Scalars['String']['output']; -}; - -export type ActivityCollection = { - __typename?: 'ActivityCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AddDomainToWorkspaceInput = { - domain: Scalars['String']['input']; - workspaceId: Scalars['ID']['input']; -}; - -export type AdminInviteList = { - __typename?: 'AdminInviteList'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AdminMutations = { - __typename?: 'AdminMutations'; - updateWorkspacePlan: Scalars['Boolean']['output']; -}; - - -export type AdminMutationsUpdateWorkspacePlanArgs = { - input: AdminUpdateWorkspacePlanInput; -}; - -export type AdminQueries = { - __typename?: 'AdminQueries'; - inviteList: AdminInviteList; - projectList: ProjectCollection; - serverStatistics: ServerStatistics; - userList: AdminUserList; - workspaceList: WorkspaceCollection; -}; - - -export type AdminQueriesInviteListArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; - query?: InputMaybe; -}; - - -export type AdminQueriesProjectListArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; - orderBy?: InputMaybe; - query?: InputMaybe; - visibility?: InputMaybe; -}; - - -export type AdminQueriesUserListArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; - query?: InputMaybe; - role?: InputMaybe; -}; - - -export type AdminQueriesWorkspaceListArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; - query?: InputMaybe; -}; - -export type AdminUpdateWorkspacePlanInput = { - plan: WorkspacePlans; - status: WorkspacePlanStatuses; - workspaceId: Scalars['ID']['input']; -}; - -export type AdminUserList = { - __typename?: 'AdminUserList'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AdminUserListItem = { - __typename?: 'AdminUserListItem'; - avatar?: Maybe; - company?: Maybe; - email?: Maybe; - id: Scalars['ID']['output']; - name: Scalars['String']['output']; - role?: Maybe; - verified?: Maybe; -}; - -export type AdminUsersListCollection = { - __typename?: 'AdminUsersListCollection'; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -/** - * A representation of a registered or invited user in the admin users list. Either registeredUser - * or invitedUser will always be set, both values can't be null. - */ -export type AdminUsersListItem = { - __typename?: 'AdminUsersListItem'; - id: Scalars['String']['output']; - invitedUser?: Maybe; - registeredUser?: Maybe; -}; - -export type AdminWorkspaceJoinRequestFilter = { - status?: InputMaybe; -}; - -export type ApiToken = { - __typename?: 'ApiToken'; - createdAt: Scalars['DateTime']['output']; - id: Scalars['String']['output']; - lastChars: Scalars['String']['output']; - lastUsed: Scalars['DateTime']['output']; - lifespan: Scalars['BigInt']['output']; - name: Scalars['String']['output']; - scopes: Array>; -}; - -export type ApiTokenCreateInput = { - lifespan?: InputMaybe; - name: Scalars['String']['input']; - scopes: Array; -}; - -export type AppAuthor = { - __typename?: 'AppAuthor'; - avatar?: Maybe; - id: Scalars['String']['output']; - name: Scalars['String']['output']; -}; - -export type AppCreateInput = { - description: Scalars['String']['input']; - logo?: InputMaybe; - name: Scalars['String']['input']; - public?: InputMaybe; - redirectUrl: Scalars['String']['input']; - scopes: Array>; - termsAndConditionsLink?: InputMaybe; -}; - -export type AppTokenCreateInput = { - lifespan?: InputMaybe; - /** Optionally limit the token to only have access to specific resources */ - limitResources?: InputMaybe>; - name: Scalars['String']['input']; - scopes: Array; -}; - -export type AppUpdateInput = { - description: Scalars['String']['input']; - id: Scalars['String']['input']; - logo?: InputMaybe; - name: Scalars['String']['input']; - public?: InputMaybe; - redirectUrl: Scalars['String']['input']; - scopes: Array>; - termsAndConditionsLink?: InputMaybe; -}; - -export type ApproveWorkspaceJoinRequestInput = { - userId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export type ArchiveCommentInput = { - archived: Scalars['Boolean']['input']; - commentId: Scalars['String']['input']; - projectId: Scalars['String']['input']; -}; - -export type AuthStrategy = { - __typename?: 'AuthStrategy'; - color?: Maybe; - icon: Scalars['String']['output']; - id: Scalars['String']['output']; - name: Scalars['String']['output']; - url: Scalars['String']['output']; -}; - -export type AutomateAuthCodePayloadTest = { - action: Scalars['String']['input']; - code: Scalars['String']['input']; - userId: Scalars['String']['input']; - workspaceId?: InputMaybe; -}; - -export type AutomateFunction = { - __typename?: 'AutomateFunction'; - /** Only returned if user is a part of this speckle server */ - creator?: Maybe; - description: Scalars['String']['output']; - id: Scalars['ID']['output']; - isFeatured: Scalars['Boolean']['output']; - logo?: Maybe; - name: Scalars['String']['output']; - releases: AutomateFunctionReleaseCollection; - repo: BasicGitRepositoryMetadata; - /** SourceAppNames values from @speckle/shared. Empty array means - all of them */ - supportedSourceApps: Array; - tags: Array; - workspaceIds?: Maybe>; -}; - - -export type AutomateFunctionReleasesArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: InputMaybe; -}; - -export type AutomateFunctionCollection = { - __typename?: 'AutomateFunctionCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AutomateFunctionRelease = { - __typename?: 'AutomateFunctionRelease'; - commitId: Scalars['String']['output']; - createdAt: Scalars['DateTime']['output']; - function: AutomateFunction; - functionId: Scalars['String']['output']; - id: Scalars['ID']['output']; - inputSchema?: Maybe; - versionTag: Scalars['String']['output']; -}; - -export type AutomateFunctionReleaseCollection = { - __typename?: 'AutomateFunctionReleaseCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AutomateFunctionReleasesFilter = { - search?: InputMaybe; -}; - -export type AutomateFunctionRun = { - __typename?: 'AutomateFunctionRun'; - contextView?: Maybe; - createdAt: Scalars['DateTime']['output']; - elapsed: Scalars['Float']['output']; - /** Nullable, in case the function is not retrievable due to poor network conditions */ - function?: Maybe; - functionId?: Maybe; - functionReleaseId?: Maybe; - id: Scalars['ID']['output']; - /** AutomateTypes.ResultsSchema type from @speckle/shared */ - results?: Maybe; - status: AutomateRunStatus; - statusMessage?: Maybe; - updatedAt: Scalars['DateTime']['output']; -}; - -export type AutomateFunctionRunStatusReportInput = { - contextView?: InputMaybe; - functionRunId: Scalars['String']['input']; - projectId: Scalars['String']['input']; - /** AutomateTypes.ResultsSchema type from @speckle/shared */ - results?: InputMaybe; - status: AutomateRunStatus; - statusMessage?: InputMaybe; -}; - -export type AutomateFunctionTemplate = { - __typename?: 'AutomateFunctionTemplate'; - id: AutomateFunctionTemplateLanguage; - logo: Scalars['String']['output']; - title: Scalars['String']['output']; - url: Scalars['String']['output']; -}; - -export enum AutomateFunctionTemplateLanguage { - DotNet = 'DOT_NET', - Python = 'PYTHON', - Typescript = 'TYPESCRIPT' -} - -export type AutomateFunctionToken = { - __typename?: 'AutomateFunctionToken'; - functionId: Scalars['String']['output']; - functionToken: Scalars['String']['output']; -}; - -export type AutomateFunctionsFilter = { - /** By default we skip functions without releases. Set this to true to include them. */ - functionsWithoutReleases?: InputMaybe; - search?: InputMaybe; -}; - -export type AutomateMutations = { - __typename?: 'AutomateMutations'; - createFunction: AutomateFunction; - createFunctionWithoutVersion: AutomateFunctionToken; - updateFunction: AutomateFunction; -}; - - -export type AutomateMutationsCreateFunctionArgs = { - input: CreateAutomateFunctionInput; -}; - - -export type AutomateMutationsCreateFunctionWithoutVersionArgs = { - input: CreateAutomateFunctionWithoutVersionInput; -}; - - -export type AutomateMutationsUpdateFunctionArgs = { - input: UpdateAutomateFunctionInput; -}; - -export type AutomateRun = { - __typename?: 'AutomateRun'; - automation: Automation; - automationId: Scalars['String']['output']; - createdAt: Scalars['DateTime']['output']; - functionRuns: Array; - id: Scalars['ID']['output']; - status: AutomateRunStatus; - trigger: AutomationRunTrigger; - updatedAt: Scalars['DateTime']['output']; -}; - -export type AutomateRunCollection = { - __typename?: 'AutomateRunCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export enum AutomateRunStatus { - Canceled = 'CANCELED', - Exception = 'EXCEPTION', - Failed = 'FAILED', - Initializing = 'INITIALIZING', - Pending = 'PENDING', - Running = 'RUNNING', - Succeeded = 'SUCCEEDED', - Timeout = 'TIMEOUT' -} - -export enum AutomateRunTriggerType { - VersionCreated = 'VERSION_CREATED' -} - -export type Automation = { - __typename?: 'Automation'; - createdAt: Scalars['DateTime']['output']; - /** Only accessible to automation owners */ - creationPublicKeys: Array; - currentRevision?: Maybe; - enabled: Scalars['Boolean']['output']; - id: Scalars['ID']['output']; - isTestAutomation: Scalars['Boolean']['output']; - name: Scalars['String']['output']; - runs: AutomateRunCollection; - updatedAt: Scalars['DateTime']['output']; -}; - - -export type AutomationRunsArgs = { - cursor?: InputMaybe; - limit?: InputMaybe; -}; - -export type AutomationCollection = { - __typename?: 'AutomationCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type AutomationRevision = { - __typename?: 'AutomationRevision'; - functions: Array; - id: Scalars['ID']['output']; - triggerDefinitions: Array; -}; - -export type AutomationRevisionCreateFunctionInput = { - functionId: Scalars['String']['input']; - functionReleaseId: Scalars['String']['input']; - /** Should be encrypted from the client side */ - parameters?: InputMaybe; -}; - -export type AutomationRevisionFunction = { - __typename?: 'AutomationRevisionFunction'; - /** The secrets in parameters are redacted with six asterisks - ****** */ - parameters?: Maybe; - release: AutomateFunctionRelease; -}; - -export type AutomationRevisionTriggerDefinition = VersionCreatedTriggerDefinition; - -export type AutomationRunTrigger = VersionCreatedTrigger; - -export type BasicGitRepositoryMetadata = { - __typename?: 'BasicGitRepositoryMetadata'; - id: Scalars['ID']['output']; - name: Scalars['String']['output']; - owner: Scalars['String']['output']; - url: Scalars['String']['output']; -}; - -export enum BillingInterval { - Monthly = 'monthly', - Yearly = 'yearly' -} - -export type BlobMetadata = { - __typename?: 'BlobMetadata'; - createdAt: Scalars['DateTime']['output']; - fileHash?: Maybe; - fileName: Scalars['String']['output']; - fileSize?: Maybe; - fileType: Scalars['String']['output']; - id: Scalars['String']['output']; - streamId: Scalars['String']['output']; - uploadError?: Maybe; - uploadStatus: Scalars['Int']['output']; - userId: Scalars['String']['output']; -}; - -export type BlobMetadataCollection = { - __typename?: 'BlobMetadataCollection'; - cursor?: Maybe; - items?: Maybe>; - totalCount: Scalars['Int']['output']; - totalSize: Scalars['Int']['output']; -}; - -export type Branch = { - __typename?: 'Branch'; - /** - * All the recent activity on this branch in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - activity?: Maybe; - author?: Maybe; - commits?: Maybe; - createdAt?: Maybe; - description?: Maybe; - id: Scalars['String']['output']; - name: Scalars['String']['output']; -}; - - -export type BranchActivityArgs = { - actionType?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type BranchCommitsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type BranchCollection = { - __typename?: 'BranchCollection'; - cursor?: Maybe; - items?: Maybe>; - totalCount: Scalars['Int']['output']; -}; - -export type BranchCreateInput = { - description?: InputMaybe; - name: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - -export type BranchDeleteInput = { - id: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - -export type BranchUpdateInput = { - description?: InputMaybe; - id: Scalars['String']['input']; - name?: InputMaybe; - streamId: Scalars['String']['input']; -}; - -export type BulkUsersRetrievalInput = { - cursor?: InputMaybe; - emails: Array; - limit?: InputMaybe; -}; - -export type CancelCheckoutSessionInput = { - sessionId: Scalars['ID']['input']; - workspaceId: Scalars['ID']['input']; -}; - -export type CheckoutSession = { - __typename?: 'CheckoutSession'; - billingInterval: BillingInterval; - createdAt: Scalars['DateTime']['output']; - id: Scalars['ID']['output']; - paymentStatus: SessionPaymentStatus; - updatedAt: Scalars['DateTime']['output']; - url: Scalars['String']['output']; - workspacePlan: PaidWorkspacePlans; -}; - -export type CheckoutSessionInput = { - billingInterval: BillingInterval; - isCreateFlow?: InputMaybe; - workspaceId: Scalars['ID']['input']; - workspacePlan: PaidWorkspacePlans; -}; - -export type Comment = { - __typename?: 'Comment'; - archived: Scalars['Boolean']['output']; - author: LimitedUser; - authorId: Scalars['String']['output']; - createdAt: Scalars['DateTime']['output']; - /** - * Legacy comment viewer data field - * @deprecated Use the new viewerState field instead - */ - data?: Maybe; - /** Whether or not comment is a reply to another comment */ - hasParent: Scalars['Boolean']['output']; - id: Scalars['String']['output']; - /** Parent thread, if there's any */ - parent?: Maybe; - /** Plain-text version of the comment text, ideal for previews */ - rawText: Scalars['String']['output']; - /** @deprecated Not actually implemented */ - reactions?: Maybe>>; - /** Gets the replies to this comment. */ - replies: CommentCollection; - /** Get authors of replies to this comment */ - replyAuthors: CommentReplyAuthorCollection; - /** Resources that this comment targets. Can be a mixture of either one stream, or multiple commits and objects. */ - resources: Array; - screenshot?: Maybe; - text: SmartTextEditorValue; - /** The time this comment was last updated. Corresponds also to the latest reply to this comment, if any. */ - updatedAt: Scalars['DateTime']['output']; - /** The last time you viewed this comment. Present only if an auth'ed request. Relevant only if a top level commit. */ - viewedAt?: Maybe; - /** Resource identifiers as defined and implemented in the Viewer of the new frontend */ - viewerResources: Array; - /** SerializedViewerState */ - viewerState?: Maybe; -}; - - -export type CommentRepliesArgs = { - cursor?: InputMaybe; - limit?: InputMaybe; -}; - - -export type CommentReplyAuthorsArgs = { - limit?: Scalars['Int']['input']; -}; - -export type CommentActivityMessage = { - __typename?: 'CommentActivityMessage'; - comment: Comment; - type: Scalars['String']['output']; -}; - -export type CommentCollection = { - __typename?: 'CommentCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type CommentContentInput = { - blobIds?: InputMaybe>; - doc?: InputMaybe; -}; - -/** Deprecated: Used by old stream-based mutations */ -export type CommentCreateInput = { - /** IDs of uploaded blobs that should be attached to this comment */ - blobIds: Array; - data: Scalars['JSONObject']['input']; - /** - * Specifies the resources this comment is linked to. There are several use cases: - * - a comment targets only one resource (commit or object) - * - a comment targets one or more resources (commits or objects) - * - a comment targets only a stream - */ - resources: Array>; - screenshot?: InputMaybe; - streamId: Scalars['String']['input']; - /** ProseMirror document object */ - text?: InputMaybe; -}; - -export type CommentDataFilters = { - __typename?: 'CommentDataFilters'; - hiddenIds?: Maybe>; - isolatedIds?: Maybe>; - passMax?: Maybe; - passMin?: Maybe; - propertyInfoKey?: Maybe; - sectionBox?: Maybe; -}; - -/** Equivalent to frontend-1's LocalFilterState */ -export type CommentDataFiltersInput = { - hiddenIds?: InputMaybe>; - isolatedIds?: InputMaybe>; - passMax?: InputMaybe; - passMin?: InputMaybe; - propertyInfoKey?: InputMaybe; - sectionBox?: InputMaybe; -}; - -/** Deprecated: Used by old stream-based mutations */ -export type CommentEditInput = { - /** IDs of uploaded blobs that should be attached to this comment */ - blobIds: Array; - id: Scalars['String']['input']; - streamId: Scalars['String']['input']; - /** ProseMirror document object */ - text?: InputMaybe; -}; - -export type CommentMutations = { - __typename?: 'CommentMutations'; - archive: Scalars['Boolean']['output']; - create: Comment; - edit: Comment; - markViewed: Scalars['Boolean']['output']; - reply: Comment; -}; - - -export type CommentMutationsArchiveArgs = { - input: ArchiveCommentInput; -}; - - -export type CommentMutationsCreateArgs = { - input: CreateCommentInput; -}; - - -export type CommentMutationsEditArgs = { - input: EditCommentInput; -}; - - -export type CommentMutationsMarkViewedArgs = { - input: MarkCommentViewedInput; -}; - - -export type CommentMutationsReplyArgs = { - input: CreateCommentReplyInput; -}; - -export type CommentReplyAuthorCollection = { - __typename?: 'CommentReplyAuthorCollection'; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type CommentThreadActivityMessage = { - __typename?: 'CommentThreadActivityMessage'; - data?: Maybe; - reply?: Maybe; - type: Scalars['String']['output']; -}; - -export type Commit = { - __typename?: 'Commit'; - /** - * All the recent activity on this commit in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - activity?: Maybe; - authorAvatar?: Maybe; - authorId?: Maybe; - authorName?: Maybe; - branch?: Maybe; - branchName?: Maybe; - /** - * The total number of comments for this commit. To actually get the comments, use the comments query and pass in a resource array consisting of of this commit's id. - * E.g., - * ``` - * query{ - * comments(streamId:"streamId" resources:[{resourceType: commit, resourceId:"commitId"}] ){ - * ... - * } - * ``` - * @deprecated Part of the old API surface and will be removed in the future. - */ - commentCount: Scalars['Int']['output']; - createdAt?: Maybe; - id: Scalars['String']['output']; - message?: Maybe; - parents?: Maybe>>; - referencedObject: Scalars['String']['output']; - sourceApplication?: Maybe; - /** - * Will throw an authorization error if active user isn't authorized to see it, for example, - * if a stream isn't public and the user doesn't have the appropriate rights. - */ - stream: Stream; - /** @deprecated Use the stream field instead */ - streamId?: Maybe; - /** @deprecated Use the stream field instead */ - streamName?: Maybe; - totalChildrenCount?: Maybe; -}; - - -export type CommitActivityArgs = { - actionType?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type CommitCollection = { - __typename?: 'CommitCollection'; - cursor?: Maybe; - items?: Maybe>; - totalCount: Scalars['Int']['output']; -}; - -export type CommitCreateInput = { - branchName: Scalars['String']['input']; - message?: InputMaybe; - objectId: Scalars['String']['input']; - parents?: InputMaybe>>; - sourceApplication?: InputMaybe; - streamId: Scalars['String']['input']; - totalChildrenCount?: InputMaybe; -}; - -export type CommitDeleteInput = { - id: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - -export type CommitObjectViewerState = { - __typename?: 'CommitObjectViewerState'; - addingComment: Scalars['Boolean']['output']; - commentReactions: Array; - currentFilterState?: Maybe; - emojis: Array; - localFilterPropKey?: Maybe; - objectProperties?: Maybe>>; - preventCommentCollapse: Scalars['Boolean']['output']; - sectionBox?: Maybe; - selectedCommentMetaData?: Maybe; - selectedObjects?: Maybe>>; - viewerBusy: Scalars['Boolean']['output']; -}; - -export type CommitReceivedInput = { - commitId: Scalars['String']['input']; - message?: InputMaybe; - sourceApplication: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - -export type CommitUpdateInput = { - id: Scalars['String']['input']; - message?: InputMaybe; - /** To move the commit to a different branch, please the name of the branch. */ - newBranchName?: InputMaybe; - streamId: Scalars['String']['input']; -}; - -export type CommitsDeleteInput = { - commitIds: Array; - streamId: Scalars['ID']['input']; -}; - -export type CommitsMoveInput = { - commitIds: Array; - streamId: Scalars['ID']['input']; - targetBranch: Scalars['String']['input']; -}; - -/** - * Can be used instead of a full item collection, when the implementation doesn't call for it yet. Because - * of the structure, it can be swapped out to a full item collection in the future - */ -export type CountOnlyCollection = { - __typename?: 'CountOnlyCollection'; - totalCount: Scalars['Int']['output']; -}; - -export type CreateAutomateFunctionInput = { - description: Scalars['String']['input']; - /** Base64 encoded image data string */ - logo?: InputMaybe; - name: Scalars['String']['input']; - /** GitHub organization to create the repository in */ - org?: InputMaybe; - /** SourceAppNames values from @speckle/shared */ - supportedSourceApps: Array; - tags: Array; - template: AutomateFunctionTemplateLanguage; -}; - -export type CreateAutomateFunctionWithoutVersionInput = { - description: Scalars['String']['input']; - name: Scalars['String']['input']; -}; - -export type CreateCommentInput = { - content: CommentContentInput; - projectId: Scalars['String']['input']; - /** Resources that this comment should be attached to */ - resourceIdString: Scalars['String']['input']; - screenshot?: InputMaybe; - /** - * SerializedViewerState. If omitted, comment won't render (correctly) inside the - * viewer, but will still be retrievable through the API - */ - viewerState?: InputMaybe; -}; - -export type CreateCommentReplyInput = { - content: CommentContentInput; - projectId: Scalars['String']['input']; - threadId: Scalars['String']['input']; -}; - -export type CreateModelInput = { - description?: InputMaybe; - name: Scalars['String']['input']; - projectId: Scalars['ID']['input']; -}; - -export type CreateServerRegionInput = { - description?: InputMaybe; - key: Scalars['String']['input']; - name: Scalars['String']['input']; -}; - -export type CreateUserEmailInput = { - email: Scalars['String']['input']; -}; - -export type CreateVersionInput = { - message?: InputMaybe; - modelId: Scalars['String']['input']; - objectId: Scalars['String']['input']; - parents?: InputMaybe>; - projectId: Scalars['String']['input']; - sourceApplication?: InputMaybe; - totalChildrenCount?: InputMaybe; -}; - -export type DeleteModelInput = { - id: Scalars['ID']['input']; - projectId: Scalars['ID']['input']; -}; - -export type DeleteUserEmailInput = { - id: Scalars['ID']['input']; -}; - -export type DeleteVersionsInput = { - projectId: Scalars['ID']['input']; - versionIds: Array; -}; - -export type DenyWorkspaceJoinRequestInput = { - userId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export enum DiscoverableStreamsSortType { - CreatedDate = 'CREATED_DATE', - FavoritesCount = 'FAVORITES_COUNT' -} - -export type DiscoverableStreamsSortingInput = { - direction: SortDirection; - type: DiscoverableStreamsSortType; -}; - -export type EditCommentInput = { - commentId: Scalars['String']['input']; - content: CommentContentInput; - projectId: Scalars['String']['input']; -}; - -export type EmailVerificationRequestInput = { - id: Scalars['ID']['input']; -}; - -export type FileUpload = { - __typename?: 'FileUpload'; - branchName: Scalars['String']['output']; - /** If present, the conversion result is stored in this commit. */ - convertedCommitId?: Maybe; - convertedLastUpdate: Scalars['DateTime']['output']; - /** Holds any errors or info. */ - convertedMessage?: Maybe; - /** 0 = queued, 1 = processing, 2 = success, 3 = error */ - convertedStatus: Scalars['Int']['output']; - /** Alias for convertedCommitId */ - convertedVersionId?: Maybe; - fileName: Scalars['String']['output']; - fileSize: Scalars['Int']['output']; - fileType: Scalars['String']['output']; - id: Scalars['String']['output']; - /** Model associated with the file upload, if it exists already */ - model?: Maybe; - /** Alias for branchName */ - modelName: Scalars['String']['output']; - /** Alias for streamId */ - projectId: Scalars['String']['output']; - streamId: Scalars['String']['output']; - uploadComplete: Scalars['Boolean']['output']; - uploadDate: Scalars['DateTime']['output']; - /** The user's id that uploaded this file. */ - userId: Scalars['String']['output']; -}; - -export type GendoAiRender = { - __typename?: 'GendoAIRender'; - camera?: Maybe; - createdAt: Scalars['DateTime']['output']; - gendoGenerationId?: Maybe; - id: Scalars['ID']['output']; - modelId: Scalars['String']['output']; - projectId: Scalars['String']['output']; - prompt: Scalars['String']['output']; - /** This is a blob id. */ - responseImage?: Maybe; - status: Scalars['String']['output']; - updatedAt: Scalars['DateTime']['output']; - user?: Maybe; - userId: Scalars['String']['output']; - versionId: Scalars['String']['output']; -}; - -export type GendoAiRenderCollection = { - __typename?: 'GendoAIRenderCollection'; - items: Array>; - totalCount: Scalars['Int']['output']; -}; - -export type GendoAiRenderInput = { - /** Base64 encoded image of the depthmap. */ - baseImage: Scalars['String']['input']; - camera: Scalars['JSONObject']['input']; - modelId: Scalars['ID']['input']; - projectId: Scalars['ID']['input']; - /** The generation prompt. */ - prompt: Scalars['String']['input']; - versionId: Scalars['ID']['input']; -}; - -export type JoinWorkspaceInput = { - workspaceId: Scalars['ID']['input']; -}; - -export type LegacyCommentViewerData = { - __typename?: 'LegacyCommentViewerData'; - /** - * An array representing a user's camera position: - * [camPos.x, camPos.y, camPos.z, camTarget.x, camTarget.y, camTarget.z, isOrtho, zoomNumber] - */ - camPos: Array; - /** Old FE LocalFilterState type */ - filters: CommentDataFilters; - /** THREE.Vector3 {x, y, z} */ - location: Scalars['JSONObject']['output']; - /** Viewer.getCurrentSectionBox(): THREE.Box3 */ - sectionBox?: Maybe; - /** Currently unused. Ideally comments should keep track of selected objects. */ - selection?: Maybe; -}; - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUser = { - __typename?: 'LimitedUser'; - /** - * All the recent activity from this user in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - activity?: Maybe; - avatar?: Maybe; - bio?: Maybe; - /** - * Get public stream commits authored by the user - * @deprecated Part of the old API surface and will be removed in the future. - */ - commits?: Maybe; - company?: Maybe; - id: Scalars['ID']['output']; - name: Scalars['String']['output']; - role?: Maybe; - /** - * Returns all discoverable streams that the user is a collaborator on - * @deprecated Part of the old API surface and will be removed in the future. - */ - streams: UserStreamCollection; - /** - * The user's timeline in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - timeline?: Maybe; - /** - * Total amount of favorites attached to streams owned by the user - * @deprecated Part of the old API surface and will be removed in the future. - */ - totalOwnedStreamsFavorites: Scalars['Int']['output']; - verified?: Maybe; - workspaceDomainPolicyCompliant?: Maybe; - workspaceRole?: Maybe; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserActivityArgs = { - actionType?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserCommitsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserStreamsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserTimelineArgs = { - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserWorkspaceDomainPolicyCompliantArgs = { - workspaceId?: InputMaybe; -}; - - -/** - * Limited user type, for showing public info about a user - * to another user - */ -export type LimitedUserWorkspaceRoleArgs = { - workspaceId?: InputMaybe; -}; - -/** Workspace metadata visible to non-workspace members. */ -export type LimitedWorkspace = { - __typename?: 'LimitedWorkspace'; - /** Workspace description */ - description?: Maybe; - /** Workspace id */ - id: Scalars['ID']['output']; - /** Optional base64 encoded workspace logo image */ - logo?: Maybe; - /** Workspace name */ - name: Scalars['String']['output']; - /** Unique workspace short id. Used for navigation. */ - slug: Scalars['String']['output']; -}; - -export type MarkCommentViewedInput = { - commentId: Scalars['String']['input']; - projectId: Scalars['String']['input']; -}; - -export type MarkReceivedVersionInput = { - message?: InputMaybe; - projectId: Scalars['String']['input']; - sourceApplication: Scalars['String']['input']; - versionId: Scalars['String']['input']; -}; - -export type Model = { - __typename?: 'Model'; - author?: Maybe; - automationsStatus?: Maybe; - /** Return a model tree of children */ - childrenTree: Array; - /** All comment threads in this model */ - commentThreads: CommentCollection; - createdAt: Scalars['DateTime']['output']; - description?: Maybe; - /** The shortened/display name that doesn't include the names of parent models */ - displayName: Scalars['String']['output']; - id: Scalars['ID']['output']; - /** Full name including the names of parent models delimited by forward slashes */ - name: Scalars['String']['output']; - /** Returns a list of versions that are being created from a file import */ - pendingImportedVersions: Array; - previewUrl?: Maybe; - updatedAt: Scalars['DateTime']['output']; - version: Version; - versions: VersionCollection; -}; - - -export type ModelCommentThreadsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type ModelPendingImportedVersionsArgs = { - limit?: InputMaybe; -}; - - -export type ModelVersionArgs = { - id: Scalars['String']['input']; -}; - - -export type ModelVersionsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type ModelCollection = { - __typename?: 'ModelCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type ModelMutations = { - __typename?: 'ModelMutations'; - create: Model; - delete: Scalars['Boolean']['output']; - update: Model; -}; - - -export type ModelMutationsCreateArgs = { - input: CreateModelInput; -}; - - -export type ModelMutationsDeleteArgs = { - input: DeleteModelInput; -}; - - -export type ModelMutationsUpdateArgs = { - input: UpdateModelInput; -}; - -export type ModelVersionsFilter = { - /** Make sure these specified versions are always loaded first */ - priorityIds?: InputMaybe>; - /** Only return versions specified in `priorityIds` */ - priorityIdsOnly?: InputMaybe; -}; - -export type ModelsTreeItem = { - __typename?: 'ModelsTreeItem'; - children: Array; - fullName: Scalars['String']['output']; - /** Whether or not this item has nested children models */ - hasChildren: Scalars['Boolean']['output']; - id: Scalars['ID']['output']; - /** - * Nullable cause the item can represent a parent that doesn't actually exist as a model on its own. - * E.g. A model named "foo/bar" is supposed to be a child of "foo" and will be represented as such, - * even if "foo" doesn't exist as its own model. - */ - model?: Maybe; - name: Scalars['String']['output']; - updatedAt: Scalars['DateTime']['output']; -}; - -export type ModelsTreeItemCollection = { - __typename?: 'ModelsTreeItemCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type MoveVersionsInput = { - projectId: Scalars['ID']['input']; - /** If the name references a nonexistant model, it will be created */ - targetModelName: Scalars['String']['input']; - versionIds: Array; -}; - -export type Mutation = { - __typename?: 'Mutation'; - /** The void stares back. */ - _?: Maybe; - /** Various Active User oriented mutations */ - activeUserMutations: ActiveUserMutations; - admin: AdminMutations; - adminDeleteUser: Scalars['Boolean']['output']; - /** Creates an personal api token. */ - apiTokenCreate: Scalars['String']['output']; - /** Revokes (deletes) an personal api token/app token. */ - apiTokenRevoke: Scalars['Boolean']['output']; - /** Register a new third party application. */ - appCreate: Scalars['String']['output']; - /** Deletes a thirty party application. */ - appDelete: Scalars['Boolean']['output']; - /** Revokes (de-authorizes) an application that you have previously authorized. */ - appRevokeAccess?: Maybe; - /** Create an app token. Only apps can create app tokens and they don't show up under personal access tokens. */ - appTokenCreate: Scalars['String']['output']; - /** Update an existing third party application. **Note: This will invalidate all existing tokens, refresh tokens and access codes and will require existing users to re-authorize it.** */ - appUpdate: Scalars['Boolean']['output']; - automateFunctionRunStatusReport: Scalars['Boolean']['output']; - automateMutations: AutomateMutations; - /** @deprecated Part of the old API surface and will be removed in the future. Use ModelMutations.create instead. */ - branchCreate: Scalars['String']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use ModelMutations.delete instead. */ - branchDelete: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use ModelMutations.update instead. */ - branchUpdate: Scalars['Boolean']['output']; - /** Broadcast user activity in the viewer */ - broadcastViewerUserActivity: Scalars['Boolean']['output']; - /** - * Archives a comment. - * @deprecated Use commentMutations version - */ - commentArchive: Scalars['Boolean']['output']; - /** - * Creates a comment - * @deprecated Use commentMutations version - */ - commentCreate: Scalars['String']['output']; - /** - * Edits a comment. - * @deprecated Use commentMutations version - */ - commentEdit: Scalars['Boolean']['output']; - commentMutations: CommentMutations; - /** - * Adds a reply to a comment. - * @deprecated Use commentMutations version - */ - commentReply: Scalars['String']['output']; - /** - * Flags a comment as viewed by you (the logged in user). - * @deprecated Use commentMutations version - */ - commentView: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.create instead. */ - commitCreate: Scalars['String']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.delete instead. */ - commitDelete: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.markReceived instead. */ - commitReceive: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.update/moveToModel instead. */ - commitUpdate: Scalars['Boolean']['output']; - /** - * Delete a batch of commits - * @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.delete instead. - */ - commitsDelete: Scalars['Boolean']['output']; - /** - * Move a batch of commits to a new branch - * @deprecated Part of the old API surface and will be removed in the future. Use VersionMutations.moveToModel instead. - */ - commitsMove: Scalars['Boolean']['output']; - /** - * Delete a pending invite - * Note: The required scope to invoke this is not given out to app or personal access tokens - */ - inviteDelete: Scalars['Boolean']['output']; - /** - * Re-send a pending invite - * Note: The required scope to invoke this is not given out to app or personal access tokens - */ - inviteResend: Scalars['Boolean']['output']; - modelMutations: ModelMutations; - /** @deprecated Part of the old API surface and will be removed in the future. */ - objectCreate: Array; - projectMutations: ProjectMutations; - /** (Re-)send the account verification e-mail */ - requestVerification: Scalars['Boolean']['output']; - requestVerificationByEmail: Scalars['Boolean']['output']; - serverInfoMutations: ServerInfoMutations; - serverInfoUpdate?: Maybe; - /** Note: The required scope to invoke this is not given out to app or personal access tokens */ - serverInviteBatchCreate: Scalars['Boolean']['output']; - /** Invite a new user to the speckle server and return the invite ID */ - serverInviteCreate: Scalars['Boolean']['output']; - /** - * Request access to a specific stream - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectAccessRequestMutations.create instead. - */ - streamAccessRequestCreate: StreamAccessRequest; - /** - * Accept or decline a stream access request. Must be a stream owner to invoke this. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectAccessRequestMutations.use instead. - */ - streamAccessRequestUse: Scalars['Boolean']['output']; - /** - * Creates a new stream. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.create instead. - */ - streamCreate?: Maybe; - /** - * Deletes an existing stream. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.delete instead. - */ - streamDelete: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. */ - streamFavorite?: Maybe; - /** - * Note: The required scope to invoke this is not given out to app or personal access tokens - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectInviteMutations.batchCreate instead. - */ - streamInviteBatchCreate: Scalars['Boolean']['output']; - /** - * Cancel a pending stream invite. Can only be invoked by a stream owner. - * Note: The required scope to invoke this is not given out to app or personal access tokens - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectInviteMutations.cancel instead. - */ - streamInviteCancel: Scalars['Boolean']['output']; - /** - * Invite a new or registered user to the specified stream - * Note: The required scope to invoke this is not given out to app or personal access tokens - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectInviteMutations.create instead. - */ - streamInviteCreate: Scalars['Boolean']['output']; - /** - * Accept or decline a stream invite - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectInviteMutations.use instead. - */ - streamInviteUse: Scalars['Boolean']['output']; - /** - * Remove yourself from stream collaborators (not possible for the owner) - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.leave instead. - */ - streamLeave: Scalars['Boolean']['output']; - /** - * Revokes the permissions of a user on a given stream. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.updateRole instead. - */ - streamRevokePermission?: Maybe; - /** - * Updates an existing stream. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.update instead. - */ - streamUpdate: Scalars['Boolean']['output']; - /** - * Update permissions of a user on a given stream. - * @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.updateRole instead. - */ - streamUpdatePermission?: Maybe; - /** @deprecated Part of the old API surface and will be removed in the future. Use ProjectMutations.batchDelete instead. */ - streamsDelete: Scalars['Boolean']['output']; - /** - * Used for broadcasting real time typing status in comment threads. Does not persist any info. - * @deprecated Use broadcastViewerUserActivity - */ - userCommentThreadActivityBroadcast: Scalars['Boolean']['output']; - /** Delete a user's account. */ - userDelete: Scalars['Boolean']['output']; - userNotificationPreferencesUpdate?: Maybe; - userRoleChange: Scalars['Boolean']['output']; - /** - * Edits a user's profile. - * @deprecated Use activeUserMutations version - */ - userUpdate: Scalars['Boolean']['output']; - /** - * Used for broadcasting real time chat head bubbles and status. Does not persist any info. - * @deprecated Use broadcastViewerUserActivity - */ - userViewerActivityBroadcast: Scalars['Boolean']['output']; - versionMutations: VersionMutations; - /** Creates a new webhook on a stream */ - webhookCreate: Scalars['String']['output']; - /** Deletes an existing webhook */ - webhookDelete: Scalars['String']['output']; - /** Updates an existing webhook */ - webhookUpdate: Scalars['String']['output']; - workspaceJoinRequestMutations: WorkspaceJoinRequestMutations; - workspaceMutations: WorkspaceMutations; -}; - - -export type MutationAdminDeleteUserArgs = { - userConfirmation: UserDeleteInput; -}; - - -export type MutationApiTokenCreateArgs = { - token: ApiTokenCreateInput; -}; - - -export type MutationApiTokenRevokeArgs = { - token: Scalars['String']['input']; -}; - - -export type MutationAppCreateArgs = { - app: AppCreateInput; -}; - - -export type MutationAppDeleteArgs = { - appId: Scalars['String']['input']; -}; - - -export type MutationAppRevokeAccessArgs = { - appId: Scalars['String']['input']; -}; - - -export type MutationAppTokenCreateArgs = { - token: AppTokenCreateInput; -}; - - -export type MutationAppUpdateArgs = { - app: AppUpdateInput; -}; - - -export type MutationAutomateFunctionRunStatusReportArgs = { - input: AutomateFunctionRunStatusReportInput; -}; - - -export type MutationBranchCreateArgs = { - branch: BranchCreateInput; -}; - - -export type MutationBranchDeleteArgs = { - branch: BranchDeleteInput; -}; - - -export type MutationBranchUpdateArgs = { - branch: BranchUpdateInput; -}; - - -export type MutationBroadcastViewerUserActivityArgs = { - message: ViewerUserActivityMessageInput; - projectId: Scalars['String']['input']; - resourceIdString: Scalars['String']['input']; -}; - - -export type MutationCommentArchiveArgs = { - archived?: Scalars['Boolean']['input']; - commentId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type MutationCommentCreateArgs = { - input: CommentCreateInput; -}; - - -export type MutationCommentEditArgs = { - input: CommentEditInput; -}; - - -export type MutationCommentReplyArgs = { - input: ReplyCreateInput; -}; - - -export type MutationCommentViewArgs = { - commentId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type MutationCommitCreateArgs = { - commit: CommitCreateInput; -}; - - -export type MutationCommitDeleteArgs = { - commit: CommitDeleteInput; -}; - - -export type MutationCommitReceiveArgs = { - input: CommitReceivedInput; -}; - - -export type MutationCommitUpdateArgs = { - commit: CommitUpdateInput; -}; - - -export type MutationCommitsDeleteArgs = { - input: CommitsDeleteInput; -}; - - -export type MutationCommitsMoveArgs = { - input: CommitsMoveInput; -}; - - -export type MutationInviteDeleteArgs = { - inviteId: Scalars['String']['input']; -}; - - -export type MutationInviteResendArgs = { - inviteId: Scalars['String']['input']; -}; - - -export type MutationObjectCreateArgs = { - objectInput: ObjectCreateInput; -}; - - -export type MutationRequestVerificationByEmailArgs = { - email: Scalars['String']['input']; -}; - - -export type MutationServerInfoUpdateArgs = { - info: ServerInfoUpdateInput; -}; - - -export type MutationServerInviteBatchCreateArgs = { - input: Array; -}; - - -export type MutationServerInviteCreateArgs = { - input: ServerInviteCreateInput; -}; - - -export type MutationStreamAccessRequestCreateArgs = { - streamId: Scalars['String']['input']; -}; - - -export type MutationStreamAccessRequestUseArgs = { - accept: Scalars['Boolean']['input']; - requestId: Scalars['String']['input']; - role?: StreamRole; -}; - - -export type MutationStreamCreateArgs = { - stream: StreamCreateInput; -}; - - -export type MutationStreamDeleteArgs = { - id: Scalars['String']['input']; -}; - - -export type MutationStreamFavoriteArgs = { - favorited: Scalars['Boolean']['input']; - streamId: Scalars['String']['input']; -}; - - -export type MutationStreamInviteBatchCreateArgs = { - input: Array; -}; - - -export type MutationStreamInviteCancelArgs = { - inviteId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type MutationStreamInviteCreateArgs = { - input: StreamInviteCreateInput; -}; - - -export type MutationStreamInviteUseArgs = { - accept: Scalars['Boolean']['input']; - streamId: Scalars['String']['input']; - token: Scalars['String']['input']; -}; - - -export type MutationStreamLeaveArgs = { - streamId: Scalars['String']['input']; -}; - - -export type MutationStreamRevokePermissionArgs = { - permissionParams: StreamRevokePermissionInput; -}; - - -export type MutationStreamUpdateArgs = { - stream: StreamUpdateInput; -}; - - -export type MutationStreamUpdatePermissionArgs = { - permissionParams: StreamUpdatePermissionInput; -}; - - -export type MutationStreamsDeleteArgs = { - ids?: InputMaybe>; -}; - - -export type MutationUserCommentThreadActivityBroadcastArgs = { - commentId: Scalars['String']['input']; - data?: InputMaybe; - streamId: Scalars['String']['input']; -}; - - -export type MutationUserDeleteArgs = { - userConfirmation: UserDeleteInput; -}; - - -export type MutationUserNotificationPreferencesUpdateArgs = { - preferences: Scalars['JSONObject']['input']; -}; - - -export type MutationUserRoleChangeArgs = { - userRoleInput: UserRoleInput; -}; - - -export type MutationUserUpdateArgs = { - user: UserUpdateInput; -}; - - -export type MutationUserViewerActivityBroadcastArgs = { - data?: InputMaybe; - resourceId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type MutationWebhookCreateArgs = { - webhook: WebhookCreateInput; -}; - - -export type MutationWebhookDeleteArgs = { - webhook: WebhookDeleteInput; -}; - - -export type MutationWebhookUpdateArgs = { - webhook: WebhookUpdateInput; -}; - -export type Object = { - __typename?: 'Object'; - /** @deprecated Not implemented. */ - applicationId?: Maybe; - /** - * Get any objects that this object references. In the case of commits, this will give you a commit's constituent objects. - * **NOTE**: Providing any of the two last arguments ( `query`, `orderBy` ) will trigger a different code branch that executes a much more expensive SQL query. It is not recommended to do so for basic clients that are interested in purely getting all the objects of a given commit. - */ - children: ObjectCollection; - /** - * The total number of comments for this commit. To actually get the comments, use the comments query and pass in a resource array consisting of of this object's id. - * E.g., - * ``` - * query{ - * comments(streamId:"streamId" resources:[{resourceType: object, resourceId:"objectId"}] ){ - * ... - * } - * ``` - * @deprecated Part of the old API surface and will be removed in the future. - */ - commentCount: Scalars['Int']['output']; - createdAt?: Maybe; - /** The full object, with all its props & other things. **NOTE:** If you're requesting objects for the purpose of recreating & displaying, you probably only want to request this specific field. */ - data?: Maybe; - id: Scalars['String']['output']; - speckleType?: Maybe; - totalChildrenCount?: Maybe; -}; - - -export type ObjectChildrenArgs = { - cursor?: InputMaybe; - depth?: Scalars['Int']['input']; - limit?: Scalars['Int']['input']; - orderBy?: InputMaybe; - query?: InputMaybe>; - select?: InputMaybe>>; -}; - -export type ObjectCollection = { - __typename?: 'ObjectCollection'; - cursor?: Maybe; - objects: Array; - totalCount: Scalars['Int']['output']; -}; - -export type ObjectCreateInput = { - /** The objects you want to create. */ - objects: Array>; - /** The stream against which these objects will be created. */ - streamId: Scalars['String']['input']; -}; - -export enum PaidWorkspacePlans { - Business = 'business', - Plus = 'plus', - Starter = 'starter' -} - -export type PasswordStrengthCheckFeedback = { - __typename?: 'PasswordStrengthCheckFeedback'; - suggestions: Array; - warning?: Maybe; -}; - -export type PasswordStrengthCheckResults = { - __typename?: 'PasswordStrengthCheckResults'; - /** Verbal feedback to help choose better passwords. set when score <= 2. */ - feedback: PasswordStrengthCheckFeedback; - /** - * Integer from 0-4 (useful for implementing a strength bar): - * 0 too guessable: risky password. (guesses < 10^3) - * 1 very guessable: protection from throttled online attacks. (guesses < 10^6) - * 2 somewhat guessable: protection from unthrottled online attacks. (guesses < 10^8) - * 3 safely unguessable: moderate protection from offline slow-hash scenario. (guesses < 10^10) - * 4 very unguessable: strong protection from offline slow-hash scenario. (guesses >= 10^10) - */ - score: Scalars['Int']['output']; -}; - -export type PendingStreamCollaborator = { - __typename?: 'PendingStreamCollaborator'; - id: Scalars['String']['output']; - inviteId: Scalars['String']['output']; - invitedBy: LimitedUser; - projectId: Scalars['String']['output']; - projectName: Scalars['String']['output']; - role: Scalars['String']['output']; - /** @deprecated Use projectId instead */ - streamId: Scalars['String']['output']; - /** @deprecated Use projectName instead */ - streamName: Scalars['String']['output']; - /** E-mail address or name of the invited user */ - title: Scalars['String']['output']; - /** Only available if the active user is the pending stream collaborator */ - token?: Maybe; - /** Set only if user is registered */ - user?: Maybe; -}; - -export type PendingWorkspaceCollaborator = { - __typename?: 'PendingWorkspaceCollaborator'; - /** - * E-mail address if target is unregistered or primary e-mail of target registered user - * if token was specified to retrieve this invite - */ - email?: Maybe; - id: Scalars['ID']['output']; - inviteId: Scalars['String']['output']; - invitedBy: LimitedUser; - /** Target workspace role */ - role: Scalars['String']['output']; - /** E-mail address or name of the invited user */ - title: Scalars['String']['output']; - /** - * Only available if the active user is the pending workspace collaborator or if it was already - * specified when retrieving this invite - */ - token?: Maybe; - updatedAt: Scalars['DateTime']['output']; - /** Set only if user is registered */ - user?: Maybe; - workspaceId: Scalars['String']['output']; - workspaceName: Scalars['String']['output']; - workspaceSlug: Scalars['String']['output']; -}; - -export type PendingWorkspaceCollaboratorsFilter = { - search?: InputMaybe; -}; - -export type Project = { - __typename?: 'Project'; - allowPublicComments: Scalars['Boolean']['output']; - /** Get a single automation by id. Error will be thrown if automation is not found or inaccessible. */ - automation: Automation; - automations: AutomationCollection; - blob?: Maybe; - /** Get the metadata collection of blobs stored for this stream. */ - blobs?: Maybe; - /** Get specific project comment/thread by ID */ - comment?: Maybe; - /** All comment threads in this project */ - commentThreads: ProjectCommentCollection; - createdAt: Scalars['DateTime']['output']; - description?: Maybe; - id: Scalars['ID']['output']; - /** Collaborators who have been invited, but not yet accepted. */ - invitedTeam?: Maybe>; - /** Returns a specific model by its ID */ - model: Model; - /** Retrieve a specific project model by its ID */ - modelByName: Model; - /** Return a model tree of children for the specified model name */ - modelChildrenTree: Array; - /** Returns a flat list of all models */ - models: ModelCollection; - /** - * Return's a project's models in a tree view with submodels being nested under parent models - * real or fake (e.g., with a foo/bar model, it will be nested under foo even if such a model doesn't actually exist) - */ - modelsTree: ModelsTreeItemCollection; - name: Scalars['String']['output']; - object?: Maybe; - /** Pending project access requests */ - pendingAccessRequests?: Maybe>; - /** Returns a list models that are being created from a file import */ - pendingImportedModels: Array; - /** Active user's role for this project. `null` if request is not authenticated, or the project is not explicitly shared with you. */ - role?: Maybe; - /** Source apps used in any models of this project */ - sourceApps: Array; - team: Array; - updatedAt: Scalars['DateTime']['output']; - /** Retrieve a specific project version by its ID */ - version: Version; - /** Returns a flat list of all project versions */ - versions: VersionCollection; - /** Return metadata about resources being requested in the viewer */ - viewerResources: Array; - visibility: ProjectVisibility; - webhooks: WebhookCollection; - workspace?: Maybe; - workspaceId?: Maybe; -}; - - -export type ProjectAutomationArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectAutomationsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: InputMaybe; -}; - - -export type ProjectBlobArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectBlobsArgs = { - cursor?: InputMaybe; - limit?: InputMaybe; - query?: InputMaybe; -}; - - -export type ProjectCommentArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectCommentThreadsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: InputMaybe; -}; - - -export type ProjectModelArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectModelByNameArgs = { - name: Scalars['String']['input']; -}; - - -export type ProjectModelChildrenTreeArgs = { - fullName: Scalars['String']['input']; -}; - - -export type ProjectModelsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type ProjectModelsTreeArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type ProjectObjectArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectPendingImportedModelsArgs = { - limit?: InputMaybe; -}; - - -export type ProjectVersionArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectVersionsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type ProjectViewerResourcesArgs = { - loadedVersionsOnly?: InputMaybe; - resourceIdString: Scalars['String']['input']; -}; - - -export type ProjectWebhooksArgs = { - id?: InputMaybe; -}; - -/** Created when a user requests to become a contributor on a project */ -export type ProjectAccessRequest = { - __typename?: 'ProjectAccessRequest'; - createdAt: Scalars['DateTime']['output']; - id: Scalars['ID']['output']; - /** Can only be selected if authed user has proper access */ - project: Project; - projectId: Scalars['String']['output']; - requester: LimitedUser; - requesterId: Scalars['String']['output']; -}; - -export type ProjectAccessRequestMutations = { - __typename?: 'ProjectAccessRequestMutations'; - /** Request access to a specific project */ - create: ProjectAccessRequest; - /** Accept or decline a project access request. Must be a project owner to invoke this. */ - use: Project; -}; - - -export type ProjectAccessRequestMutationsCreateArgs = { - projectId: Scalars['String']['input']; -}; - - -export type ProjectAccessRequestMutationsUseArgs = { - accept: Scalars['Boolean']['input']; - requestId: Scalars['String']['input']; - role?: StreamRole; -}; - -export type ProjectAutomationCreateInput = { - enabled: Scalars['Boolean']['input']; - name: Scalars['String']['input']; -}; - -export type ProjectAutomationMutations = { - __typename?: 'ProjectAutomationMutations'; - create: Automation; - createRevision: AutomationRevision; - createTestAutomation: Automation; - createTestAutomationRun: TestAutomationRun; - /** - * Trigger an automation with a fake "version created" trigger. The "version created" will - * just refer to the last version of the model. - */ - trigger: Scalars['String']['output']; - update: Automation; -}; - - -export type ProjectAutomationMutationsCreateArgs = { - input: ProjectAutomationCreateInput; -}; - - -export type ProjectAutomationMutationsCreateRevisionArgs = { - input: ProjectAutomationRevisionCreateInput; -}; - - -export type ProjectAutomationMutationsCreateTestAutomationArgs = { - input: ProjectTestAutomationCreateInput; -}; - - -export type ProjectAutomationMutationsCreateTestAutomationRunArgs = { - automationId: Scalars['ID']['input']; -}; - - -export type ProjectAutomationMutationsTriggerArgs = { - automationId: Scalars['ID']['input']; -}; - - -export type ProjectAutomationMutationsUpdateArgs = { - input: ProjectAutomationUpdateInput; -}; - -export type ProjectAutomationRevisionCreateInput = { - automationId: Scalars['ID']['input']; - functions: Array; - /** AutomateTypes.TriggerDefinitionsSchema type from @speckle/shared */ - triggerDefinitions: Scalars['JSONObject']['input']; -}; - -export type ProjectAutomationUpdateInput = { - enabled?: InputMaybe; - id: Scalars['ID']['input']; - name?: InputMaybe; -}; - -export type ProjectAutomationsUpdatedMessage = { - __typename?: 'ProjectAutomationsUpdatedMessage'; - automation?: Maybe; - automationId: Scalars['String']['output']; - /** Only set if type === CREATED_REVISION */ - revision?: Maybe; - type: ProjectAutomationsUpdatedMessageType; -}; - -export enum ProjectAutomationsUpdatedMessageType { - Created = 'CREATED', - CreatedRevision = 'CREATED_REVISION', - Updated = 'UPDATED' -} - -export type ProjectCollaborator = { - __typename?: 'ProjectCollaborator'; - id: Scalars['ID']['output']; - role: Scalars['String']['output']; - user: LimitedUser; -}; - -export type ProjectCollection = { - __typename?: 'ProjectCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type ProjectCommentCollection = { - __typename?: 'ProjectCommentCollection'; - cursor?: Maybe; - items: Array; - totalArchivedCount: Scalars['Int']['output']; - totalCount: Scalars['Int']['output']; -}; - -export type ProjectCommentsFilter = { - /** Whether or not to include archived/resolved threads */ - includeArchived?: InputMaybe; - /** - * By default if resourceIdString is set, the "versionId" part of model resource identifiers will be ignored - * and all comments of all versions of any of the referenced models will be returned. If `loadedVersionsOnly` is - * enabled, then only comment threads of loaded/referenced versions in resourceIdString will be returned. - */ - loadedVersionsOnly?: InputMaybe; - /** - * Only request comments belonging to the resources identified by this - * comma-delimited resouce string (same format that's used in the viewer URL) - */ - resourceIdString?: InputMaybe; -}; - -export type ProjectCommentsUpdatedMessage = { - __typename?: 'ProjectCommentsUpdatedMessage'; - /** Null if deleted */ - comment?: Maybe; - id: Scalars['String']['output']; - type: ProjectCommentsUpdatedMessageType; -}; - -export enum ProjectCommentsUpdatedMessageType { - Archived = 'ARCHIVED', - Created = 'CREATED', - Updated = 'UPDATED' -} - -/** Any values left null will be ignored */ -export type ProjectCreateInput = { - description?: InputMaybe; - name?: InputMaybe; - visibility?: InputMaybe; -}; - -export type ProjectFileImportUpdatedMessage = { - __typename?: 'ProjectFileImportUpdatedMessage'; - /** Upload ID */ - id: Scalars['String']['output']; - type: ProjectFileImportUpdatedMessageType; - upload: FileUpload; -}; - -export enum ProjectFileImportUpdatedMessageType { - Created = 'CREATED', - Updated = 'UPDATED' -} - -export type ProjectInviteCreateInput = { - /** Either this or userId must be filled */ - email?: InputMaybe; - /** Defaults to the contributor role, if not specified */ - role?: InputMaybe; - /** Can only be specified if guest mode is on or if the user is an admin */ - serverRole?: InputMaybe; - /** Either this or email must be filled */ - userId?: InputMaybe; -}; - -export type ProjectInviteMutations = { - __typename?: 'ProjectInviteMutations'; - /** Batch invite to project */ - batchCreate: Project; - /** Cancel a pending stream invite. Can only be invoked by a project owner. */ - cancel: Project; - /** Invite a new or registered user to be a project collaborator. Can only be invoked by a project owner. */ - create: Project; - /** - * Create invite(-s) for a project in a workspace. Unlike the base create() mutation, this allows - * configuring the workspace role. - */ - createForWorkspace: Project; - /** Accept or decline a project invite */ - use: Scalars['Boolean']['output']; -}; - - -export type ProjectInviteMutationsBatchCreateArgs = { - input: Array; - projectId: Scalars['ID']['input']; -}; - - -export type ProjectInviteMutationsCancelArgs = { - inviteId: Scalars['String']['input']; - projectId: Scalars['ID']['input']; -}; - - -export type ProjectInviteMutationsCreateArgs = { - input: ProjectInviteCreateInput; - projectId: Scalars['ID']['input']; -}; - - -export type ProjectInviteMutationsCreateForWorkspaceArgs = { - inputs: Array; - projectId: Scalars['ID']['input']; -}; - - -export type ProjectInviteMutationsUseArgs = { - input: ProjectInviteUseInput; -}; - -export type ProjectInviteUseInput = { - accept: Scalars['Boolean']['input']; - projectId: Scalars['ID']['input']; - token: Scalars['String']['input']; -}; - -export type ProjectModelsFilter = { - /** Filter by IDs of contributors who participated in models */ - contributors?: InputMaybe>; - /** Excldue models w/ the specified IDs */ - excludeIds?: InputMaybe>; - /** Only select models w/ the specified IDs */ - ids?: InputMaybe>; - /** Filter out models that don't have any versions */ - onlyWithVersions?: InputMaybe; - /** Filter by model names */ - search?: InputMaybe; - /** Filter by source apps used in models */ - sourceApps?: InputMaybe>; -}; - -export type ProjectModelsTreeFilter = { - /** Filter by IDs of contributors who participated in models */ - contributors?: InputMaybe>; - /** Search for specific models. If used, tree items from different levels may be mixed. */ - search?: InputMaybe; - /** Filter by source apps used in models */ - sourceApps?: InputMaybe>; -}; - -export type ProjectModelsUpdatedMessage = { - __typename?: 'ProjectModelsUpdatedMessage'; - /** Model ID */ - id: Scalars['String']['output']; - /** Null if model was deleted */ - model?: Maybe; - type: ProjectModelsUpdatedMessageType; -}; - -export enum ProjectModelsUpdatedMessageType { - Created = 'CREATED', - Deleted = 'DELETED', - Updated = 'UPDATED' -} - -export type ProjectMutations = { - __typename?: 'ProjectMutations'; - /** Access request related mutations */ - accessRequestMutations: ProjectAccessRequestMutations; - automationMutations: ProjectAutomationMutations; - /** Batch delete projects */ - batchDelete: Scalars['Boolean']['output']; - /** Create new project */ - create: Project; - /** - * Create onboarding/tutorial project. If one is already created for the active user, that - * one will be returned instead. - */ - createForOnboarding: Project; - /** Delete an existing project */ - delete: Scalars['Boolean']['output']; - /** Invite related mutations */ - invites: ProjectInviteMutations; - /** Leave a project. Only possible if you're not the last remaining owner. */ - leave: Scalars['Boolean']['output']; - /** Updates an existing project */ - update: Project; - /** Update role for a collaborator */ - updateRole: Project; -}; - - -export type ProjectMutationsAutomationMutationsArgs = { - projectId: Scalars['ID']['input']; -}; - - -export type ProjectMutationsBatchDeleteArgs = { - ids: Array; -}; - - -export type ProjectMutationsCreateArgs = { - input?: InputMaybe; -}; - - -export type ProjectMutationsDeleteArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectMutationsLeaveArgs = { - id: Scalars['String']['input']; -}; - - -export type ProjectMutationsUpdateArgs = { - update: ProjectUpdateInput; -}; - - -export type ProjectMutationsUpdateRoleArgs = { - input: ProjectUpdateRoleInput; -}; - -export type ProjectPendingModelsUpdatedMessage = { - __typename?: 'ProjectPendingModelsUpdatedMessage'; - /** Upload ID */ - id: Scalars['String']['output']; - model: FileUpload; - type: ProjectPendingModelsUpdatedMessageType; -}; - -export enum ProjectPendingModelsUpdatedMessageType { - Created = 'CREATED', - Updated = 'UPDATED' -} - -export type ProjectPendingVersionsUpdatedMessage = { - __typename?: 'ProjectPendingVersionsUpdatedMessage'; - /** Upload ID */ - id: Scalars['String']['output']; - type: ProjectPendingVersionsUpdatedMessageType; - version: FileUpload; -}; - -export enum ProjectPendingVersionsUpdatedMessageType { - Created = 'CREATED', - Updated = 'UPDATED' -} - -export type ProjectRole = { - __typename?: 'ProjectRole'; - project: Project; - role: Scalars['String']['output']; -}; - -export type ProjectTestAutomationCreateInput = { - functionId: Scalars['String']['input']; - modelId: Scalars['String']['input']; - name: Scalars['String']['input']; -}; - -export type ProjectTriggeredAutomationsStatusUpdatedMessage = { - __typename?: 'ProjectTriggeredAutomationsStatusUpdatedMessage'; - model: Model; - project: Project; - run: AutomateRun; - type: ProjectTriggeredAutomationsStatusUpdatedMessageType; - version: Version; -}; - -export enum ProjectTriggeredAutomationsStatusUpdatedMessageType { - RunCreated = 'RUN_CREATED', - RunUpdated = 'RUN_UPDATED' -} - -/** Any values left null will be ignored, so only set the properties that you want updated */ -export type ProjectUpdateInput = { - allowPublicComments?: InputMaybe; - description?: InputMaybe; - id: Scalars['ID']['input']; - name?: InputMaybe; - visibility?: InputMaybe; -}; - -export type ProjectUpdateRoleInput = { - projectId: Scalars['String']['input']; - /** Leave role as null to revoke access entirely */ - role?: InputMaybe; - userId: Scalars['String']['input']; -}; - -export type ProjectUpdatedMessage = { - __typename?: 'ProjectUpdatedMessage'; - /** Project ID */ - id: Scalars['String']['output']; - /** Project entity, null if project was deleted */ - project?: Maybe; - /** Message type */ - type: ProjectUpdatedMessageType; -}; - -export enum ProjectUpdatedMessageType { - Deleted = 'DELETED', - Updated = 'UPDATED' -} - -export type ProjectVersionsPreviewGeneratedMessage = { - __typename?: 'ProjectVersionsPreviewGeneratedMessage'; - objectId: Scalars['String']['output']; - projectId: Scalars['String']['output']; - versionId: Scalars['String']['output']; -}; - -export type ProjectVersionsUpdatedMessage = { - __typename?: 'ProjectVersionsUpdatedMessage'; - /** Version ID */ - id: Scalars['String']['output']; - /** Version's model ID */ - modelId: Scalars['String']['output']; - type: ProjectVersionsUpdatedMessageType; - /** Null if version was deleted */ - version?: Maybe; -}; - -export enum ProjectVersionsUpdatedMessageType { - Created = 'CREATED', - Deleted = 'DELETED', - Updated = 'UPDATED' -} - -export enum ProjectVisibility { - Private = 'PRIVATE', - Public = 'PUBLIC', - Unlisted = 'UNLISTED' -} - -export type Query = { - __typename?: 'Query'; - /** Stare into the void. */ - _?: Maybe; - /** Gets the profile of the authenticated user or null if not authenticated */ - activeUser?: Maybe; - admin: AdminQueries; - /** - * All the streams of the server. Available to admins only. - * @deprecated use admin.projectList instead - */ - adminStreams?: Maybe; - /** - * Get all (or search for specific) users, registered or invited, from the server in a paginated view. - * The query looks for matches in name, company and email. - * @deprecated use admin.UserList instead - */ - adminUsers?: Maybe; - /** Gets a specific app from the server. */ - app?: Maybe; - /** - * Returns all the publicly available apps on this server. - * @deprecated Part of the old API surface and will be removed in the future. - */ - apps?: Maybe>>; - /** If user is authenticated using an app token, this will describe the app */ - authenticatedAsApp?: Maybe; - /** Get a single automate function by id. Error will be thrown if function is not found or inaccessible. */ - automateFunction: AutomateFunction; - automateFunctions: AutomateFunctionCollection; - /** Part of the automation/function creation handshake mechanism */ - automateValidateAuthCode: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.comment instead. */ - comment?: Maybe; - /** - * This query can be used in the following ways: - * - get all the comments for a stream: **do not pass in any resource identifiers**. - * - get the comments targeting any of a set of provided resources (comments/objects): **pass in an array of resources.** - * @deprecated Use Project/Version/Model 'commentThreads' fields instead - */ - comments?: Maybe; - /** Commit/Object viewer state (local-only) */ - commitObjectViewerState: CommitObjectViewerState; - /** - * All of the discoverable streams of the server - * @deprecated Part of the old API surface and will be removed in the future. - */ - discoverableStreams?: Maybe; - /** Get the (limited) profile information of another server user */ - otherUser?: Maybe; - /** - * Find a specific project. Will throw an authorization error if active user isn't authorized - * to see it, for example, if a project isn't public and the user doesn't have the appropriate rights. - */ - project: Project; - /** - * Look for an invitation to a project, for the current user (authed or not). If token - * isn't specified, the server will look for any valid invite. - */ - projectInvite?: Maybe; - serverInfo: ServerInfo; - /** Receive metadata about an invite by the invite token */ - serverInviteByToken?: Maybe; - /** @deprecated use admin.serverStatistics instead */ - serverStats: ServerStats; - /** - * Returns a specific stream. Will throw an authorization error if active user isn't authorized - * to see it, for example, if a stream isn't public and the user doesn't have the appropriate rights. - * @deprecated Part of the old API surface and will be removed in the future. Use Query.project instead. - */ - stream?: Maybe; - /** - * Get authed user's stream access request - * @deprecated Part of the old API surface and will be removed in the future. Use User.projectAccessRequest instead. - */ - streamAccessRequest?: Maybe; - /** - * Look for an invitation to a stream, for the current user (authed or not). If token - * isn't specified, the server will look for any valid invite. - * @deprecated Part of the old API surface and will be removed in the future. Use Query.projectInvite instead. - */ - streamInvite?: Maybe; - /** - * Get all invitations to streams that the active user has - * @deprecated Part of the old API surface and will be removed in the future. Use User.projectInvites instead. - */ - streamInvites: Array; - /** - * Returns all streams that the active user is a collaborator on. - * Pass in the `query` parameter to search by name, description or ID. - * @deprecated Part of the old API surface and will be removed in the future. Use User.projects instead. - */ - streams?: Maybe; - /** - * Gets the profile of a user. If no id argument is provided, will return the current authenticated user's profile (as extracted from the authorization header). - * @deprecated To be removed in the near future! Use 'activeUser' to get info about the active user or 'otherUser' to get info about another user. - */ - user?: Maybe; - /** - * Validate password strength - * @deprecated Part of the old API surface and will be removed in the future. - */ - userPwdStrength: PasswordStrengthCheckResults; - /** - * Search for users and return limited metadata about them, if you have the server:user role. - * The query looks for matches in name & email - * @deprecated Use users() instead. - */ - userSearch: UserSearchResultCollection; - /** Look up server users */ - users: UserSearchResultCollection; - /** Look up server users with a collection of emails */ - usersByEmail: Array>; - /** Validates the slug, to make sure it contains only valid characters and its not taken. */ - validateWorkspaceSlug: Scalars['Boolean']['output']; - workspace: Workspace; - workspaceBySlug: Workspace; - /** - * Look for an invitation to a workspace, for the current user (authed or not). - * - * If token is specified, it will return the corresponding invite even if it belongs to a different user. - * - * Either token or workspaceId must be specified, or both - */ - workspaceInvite?: Maybe; - workspacePricingPlans: Scalars['JSONObject']['output']; - /** Find workspaces a given user email can use SSO to sign with */ - workspaceSsoByEmail: Array; -}; - - -export type QueryAdminStreamsArgs = { - limit?: InputMaybe; - offset?: InputMaybe; - orderBy?: InputMaybe; - query?: InputMaybe; - visibility?: InputMaybe; -}; - - -export type QueryAdminUsersArgs = { - limit?: Scalars['Int']['input']; - offset?: Scalars['Int']['input']; - query?: InputMaybe; -}; - - -export type QueryAppArgs = { - id: Scalars['String']['input']; -}; - - -export type QueryAutomateFunctionArgs = { - id: Scalars['ID']['input']; -}; - - -export type QueryAutomateFunctionsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: InputMaybe; -}; - - -export type QueryAutomateValidateAuthCodeArgs = { - payload: AutomateAuthCodePayloadTest; -}; - - -export type QueryCommentArgs = { - id: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type QueryCommentsArgs = { - archived?: Scalars['Boolean']['input']; - cursor?: InputMaybe; - limit?: InputMaybe; - resources?: InputMaybe>>; - streamId: Scalars['String']['input']; -}; - - -export type QueryDiscoverableStreamsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; - sort?: InputMaybe; -}; - - -export type QueryOtherUserArgs = { - id: Scalars['String']['input']; -}; - - -export type QueryProjectArgs = { - id: Scalars['String']['input']; -}; - - -export type QueryProjectInviteArgs = { - projectId: Scalars['String']['input']; - token?: InputMaybe; -}; - - -export type QueryServerInviteByTokenArgs = { - token?: InputMaybe; -}; - - -export type QueryStreamArgs = { - id: Scalars['String']['input']; -}; - - -export type QueryStreamAccessRequestArgs = { - streamId: Scalars['String']['input']; -}; - - -export type QueryStreamInviteArgs = { - streamId: Scalars['String']['input']; - token?: InputMaybe; -}; - - -export type QueryStreamsArgs = { - cursor?: InputMaybe; - limit?: InputMaybe; - query?: InputMaybe; -}; - - -export type QueryUserArgs = { - id?: InputMaybe; -}; - - -export type QueryUserPwdStrengthArgs = { - pwd: Scalars['String']['input']; -}; - - -export type QueryUserSearchArgs = { - archived?: InputMaybe; - cursor?: InputMaybe; - emailOnly?: InputMaybe; - limit?: Scalars['Int']['input']; - query: Scalars['String']['input']; -}; - - -export type QueryUsersArgs = { - input: UsersRetrievalInput; -}; - - -export type QueryUsersByEmailArgs = { - input: BulkUsersRetrievalInput; -}; - - -export type QueryValidateWorkspaceSlugArgs = { - slug: Scalars['String']['input']; -}; - - -export type QueryWorkspaceArgs = { - id: Scalars['String']['input']; -}; - - -export type QueryWorkspaceBySlugArgs = { - slug: Scalars['String']['input']; -}; - - -export type QueryWorkspaceInviteArgs = { - options?: InputMaybe; - token?: InputMaybe; - workspaceId?: InputMaybe; -}; - - -export type QueryWorkspaceSsoByEmailArgs = { - email: Scalars['String']['input']; -}; - -/** Deprecated: Used by old stream-based mutations */ -export type ReplyCreateInput = { - /** IDs of uploaded blobs that should be attached to this reply */ - blobIds: Array; - data?: InputMaybe; - parentComment: Scalars['String']['input']; - streamId: Scalars['String']['input']; - /** ProseMirror document object */ - text?: InputMaybe; -}; - -export type ResourceIdentifier = { - __typename?: 'ResourceIdentifier'; - resourceId: Scalars['String']['output']; - resourceType: ResourceType; -}; - -export type ResourceIdentifierInput = { - resourceId: Scalars['String']['input']; - resourceType: ResourceType; -}; - -export enum ResourceType { - Comment = 'comment', - Commit = 'commit', - Object = 'object', - Stream = 'stream' -} - -export type Role = { - __typename?: 'Role'; - description: Scalars['String']['output']; - name: Scalars['String']['output']; - resourceTarget: Scalars['String']['output']; -}; - -/** Available scopes. */ -export type Scope = { - __typename?: 'Scope'; - description: Scalars['String']['output']; - name: Scalars['String']['output']; -}; - -export type SelectedCommentMetaData = { - __typename?: 'SelectedCommentMetaData'; - id: Scalars['String']['output']; - selectionLocation: Scalars['JSONObject']['output']; -}; - -export type ServerApp = { - __typename?: 'ServerApp'; - author?: Maybe; - createdAt: Scalars['DateTime']['output']; - description?: Maybe; - id: Scalars['String']['output']; - logo?: Maybe; - name: Scalars['String']['output']; - public?: Maybe; - redirectUrl: Scalars['String']['output']; - scopes: Array; - secret?: Maybe; - termsAndConditionsLink?: Maybe; - trustByDefault?: Maybe; -}; - -export type ServerAppListItem = { - __typename?: 'ServerAppListItem'; - author?: Maybe; - description?: Maybe; - id: Scalars['String']['output']; - logo?: Maybe; - name: Scalars['String']['output']; - redirectUrl: Scalars['String']['output']; - termsAndConditionsLink?: Maybe; - trustByDefault?: Maybe; -}; - -export type ServerAutomateInfo = { - __typename?: 'ServerAutomateInfo'; - availableFunctionTemplates: Array; -}; - -/** Server configuration. */ -export type ServerConfiguration = { - __typename?: 'ServerConfiguration'; - blobSizeLimitBytes: Scalars['Int']['output']; - objectMultipartUploadSizeLimitBytes: Scalars['Int']['output']; - objectSizeLimitBytes: Scalars['Int']['output']; -}; - -/** Information about this server. */ -export type ServerInfo = { - __typename?: 'ServerInfo'; - adminContact?: Maybe; - /** The authentication strategies available on this server. */ - authStrategies: Array; - automate: ServerAutomateInfo; - /** Base URL of Speckle Automate, if set */ - automateUrl?: Maybe; - /** @deprecated Use the ServerInfo{configuration{blobSizeLimitBytes}} field instead. */ - blobSizeLimitBytes: Scalars['Int']['output']; - canonicalUrl?: Maybe; - company?: Maybe; - /** - * Configuration values that are specific to this server. - * These are read-only and can only be adjusted during server setup. - * Please contact your server administrator if you wish to suggest a change to these values. - */ - configuration: ServerConfiguration; - description?: Maybe; - /** Whether or not to show messaging about FE2 (banners etc.) */ - enableNewWebUiMessaging?: Maybe; - guestModeEnabled: Scalars['Boolean']['output']; - inviteOnly?: Maybe; - /** Server relocation / migration info */ - migration?: Maybe; - /** Info about server regions */ - multiRegion: ServerMultiRegionConfiguration; - name: Scalars['String']['output']; - /** @deprecated Use role constants from the @speckle/shared npm package instead */ - roles: Array; - scopes: Array; - serverRoles: Array; - termsOfService?: Maybe; - version?: Maybe; - workspaces: ServerWorkspacesInfo; -}; - -export type ServerInfoMutations = { - __typename?: 'ServerInfoMutations'; - multiRegion: ServerRegionMutations; -}; - -export type ServerInfoUpdateInput = { - adminContact?: InputMaybe; - company?: InputMaybe; - description?: InputMaybe; - guestModeEnabled?: InputMaybe; - inviteOnly?: InputMaybe; - name: Scalars['String']['input']; - termsOfService?: InputMaybe; -}; - -export type ServerInvite = { - __typename?: 'ServerInvite'; - email: Scalars['String']['output']; - id: Scalars['String']['output']; - invitedBy: LimitedUser; -}; - -export type ServerInviteCreateInput = { - email: Scalars['String']['input']; - message?: InputMaybe; - /** Can only be specified if guest mode is on or if the user is an admin */ - serverRole?: InputMaybe; -}; - -export type ServerMigration = { - __typename?: 'ServerMigration'; - movedFrom?: Maybe; - movedTo?: Maybe; -}; - -export type ServerMultiRegionConfiguration = { - __typename?: 'ServerMultiRegionConfiguration'; - /** - * Keys of available regions defined in the multi region config file. Used keys will - * be filtered out from the result. - */ - availableKeys: Array; - /** Regions available for project data residency */ - regions: Array; -}; - -export type ServerRegionItem = { - __typename?: 'ServerRegionItem'; - description?: Maybe; - id: Scalars['String']['output']; - key: Scalars['String']['output']; - name: Scalars['String']['output']; -}; - -export type ServerRegionMutations = { - __typename?: 'ServerRegionMutations'; - create: ServerRegionItem; - update: ServerRegionItem; -}; - - -export type ServerRegionMutationsCreateArgs = { - input: CreateServerRegionInput; -}; - - -export type ServerRegionMutationsUpdateArgs = { - input: UpdateServerRegionInput; -}; - -export enum ServerRole { - ServerAdmin = 'SERVER_ADMIN', - ServerArchivedUser = 'SERVER_ARCHIVED_USER', - ServerGuest = 'SERVER_GUEST', - ServerUser = 'SERVER_USER' -} - -export type ServerRoleItem = { - __typename?: 'ServerRoleItem'; - id: Scalars['String']['output']; - title: Scalars['String']['output']; -}; - -export type ServerStatistics = { - __typename?: 'ServerStatistics'; - totalPendingInvites: Scalars['Int']['output']; - totalProjectCount: Scalars['Int']['output']; - totalUserCount: Scalars['Int']['output']; -}; - -export type ServerStats = { - __typename?: 'ServerStats'; - /** An array of objects currently structured as { created_month: Date, count: int }. */ - commitHistory?: Maybe>>; - /** An array of objects currently structured as { created_month: Date, count: int }. */ - objectHistory?: Maybe>>; - /** An array of objects currently structured as { created_month: Date, count: int }. */ - streamHistory?: Maybe>>; - totalCommitCount: Scalars['Int']['output']; - totalObjectCount: Scalars['Int']['output']; - totalStreamCount: Scalars['Int']['output']; - totalUserCount: Scalars['Int']['output']; - /** An array of objects currently structured as { created_month: Date, count: int }. */ - userHistory?: Maybe>>; -}; - -export type ServerWorkspacesInfo = { - __typename?: 'ServerWorkspacesInfo'; - /** - * This is a backend control variable for the workspaces feature set. - * Since workspaces need a backend logic to be enabled, this is not enough as a feature flag. - */ - workspacesEnabled: Scalars['Boolean']['output']; -}; - -export enum SessionPaymentStatus { - Paid = 'paid', - Unpaid = 'unpaid' -} - -export type SetPrimaryUserEmailInput = { - id: Scalars['ID']['input']; -}; - -export type SmartTextEditorValue = { - __typename?: 'SmartTextEditorValue'; - /** File attachments, if any */ - attachments?: Maybe>; - /** - * The actual (ProseMirror) document representing the text. Can be empty, - * if there are attachments. - */ - doc?: Maybe; - /** The type of editor value (comment, blog post etc.) */ - type: Scalars['String']['output']; - /** The version of the schema */ - version: Scalars['String']['output']; -}; - -export enum SortDirection { - Asc = 'ASC', - Desc = 'DESC' -} - -export type Stream = { - __typename?: 'Stream'; - /** - * All the recent activity on this stream in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - activity?: Maybe; - allowPublicComments: Scalars['Boolean']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.blob instead. */ - blob?: Maybe; - /** - * Get the metadata collection of blobs stored for this stream. - * @deprecated Part of the old API surface and will be removed in the future. Use Project.blobs instead. - */ - blobs?: Maybe; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.model or Project.modelByName instead. */ - branch?: Maybe; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.models or Project.modelsTree instead. */ - branches?: Maybe; - collaborators: Array; - /** - * The total number of comments for this stream. To actually get the comments, use the comments query without passing in a resource array. E.g.: - * - * ``` - * query{ - * comments(streamId:"streamId"){ - * ... - * } - * ``` - * @deprecated Part of the old API surface and will be removed in the future. - */ - commentCount: Scalars['Int']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.version instead. */ - commit?: Maybe; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.versions instead. */ - commits?: Maybe; - createdAt: Scalars['DateTime']['output']; - description?: Maybe; - /** Date when you favorited this stream. `null` if stream isn't viewed from a specific user's perspective or if it isn't favorited. */ - favoritedDate?: Maybe; - favoritesCount: Scalars['Int']['output']; - /** - * Returns a specific file upload that belongs to this stream. - * @deprecated Part of the old API surface and will be removed in the future. Use Project.pendingImportedModels or Model.pendingImportedVersions instead. - */ - fileUpload?: Maybe; - /** - * Returns a list of all the file uploads for this stream. - * @deprecated Part of the old API surface and will be removed in the future. Use Project.pendingImportedModels or Model.pendingImportedVersions instead. - */ - fileUploads: Array; - id: Scalars['String']['output']; - /** - * Whether the stream (if public) can be found on public stream exploration pages - * and searches - */ - isDiscoverable: Scalars['Boolean']['output']; - /** Whether the stream can be viewed by non-contributors */ - isPublic: Scalars['Boolean']['output']; - name: Scalars['String']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.object instead. */ - object?: Maybe; - /** - * Pending stream access requests - * @deprecated Part of the old API surface and will be removed in the future. Use Project.pendingAccessRequests instead. - */ - pendingAccessRequests?: Maybe>; - /** Collaborators who have been invited, but not yet accepted. */ - pendingCollaborators?: Maybe>; - /** Your role for this stream. `null` if request is not authenticated, or the stream is not explicitly shared with you. */ - role?: Maybe; - size?: Maybe; - updatedAt: Scalars['DateTime']['output']; - /** @deprecated Part of the old API surface and will be removed in the future. Use Project.webhooks instead. */ - webhooks: WebhookCollection; -}; - - -export type StreamActivityArgs = { - actionType?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type StreamBlobArgs = { - id: Scalars['String']['input']; -}; - - -export type StreamBlobsArgs = { - cursor?: InputMaybe; - limit?: InputMaybe; - query?: InputMaybe; -}; - - -export type StreamBranchArgs = { - name?: InputMaybe; -}; - - -export type StreamBranchesArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type StreamCommitArgs = { - id?: InputMaybe; -}; - - -export type StreamCommitsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type StreamFileUploadArgs = { - id: Scalars['String']['input']; -}; - - -export type StreamObjectArgs = { - id: Scalars['String']['input']; -}; - - -export type StreamWebhooksArgs = { - id?: InputMaybe; -}; - -/** Created when a user requests to become a contributor on a stream */ -export type StreamAccessRequest = { - __typename?: 'StreamAccessRequest'; - createdAt: Scalars['DateTime']['output']; - id: Scalars['ID']['output']; - requester: LimitedUser; - requesterId: Scalars['String']['output']; - /** Can only be selected if authed user has proper access */ - stream: Stream; - streamId: Scalars['String']['output']; -}; - -export type StreamCollaborator = { - __typename?: 'StreamCollaborator'; - avatar?: Maybe; - company?: Maybe; - id: Scalars['String']['output']; - name: Scalars['String']['output']; - role: Scalars['String']['output']; - serverRole: Scalars['String']['output']; -}; - -export type StreamCollection = { - __typename?: 'StreamCollection'; - cursor?: Maybe; - items?: Maybe>; - totalCount: Scalars['Int']['output']; -}; - -export type StreamCreateInput = { - description?: InputMaybe; - /** - * Whether the stream (if public) can be found on public stream exploration pages - * and searches - */ - isDiscoverable?: InputMaybe; - /** Whether the stream can be viewed by non-contributors */ - isPublic?: InputMaybe; - name?: InputMaybe; - /** Optionally specify user IDs of users that you want to invite to be contributors to this stream */ - withContributors?: InputMaybe>; -}; - -export type StreamInviteCreateInput = { - email?: InputMaybe; - message?: InputMaybe; - /** Defaults to the contributor role, if not specified */ - role?: InputMaybe; - /** Can only be specified if guest mode is on or if the user is an admin */ - serverRole?: InputMaybe; - streamId: Scalars['String']['input']; - userId?: InputMaybe; -}; - -export type StreamRevokePermissionInput = { - streamId: Scalars['String']['input']; - userId: Scalars['String']['input']; -}; - -export enum StreamRole { - StreamContributor = 'STREAM_CONTRIBUTOR', - StreamOwner = 'STREAM_OWNER', - StreamReviewer = 'STREAM_REVIEWER' -} - -export type StreamUpdateInput = { - allowPublicComments?: InputMaybe; - description?: InputMaybe; - id: Scalars['String']['input']; - /** - * Whether the stream (if public) can be found on public stream exploration pages - * and searches - */ - isDiscoverable?: InputMaybe; - /** Whether the stream can be viewed by non-contributors */ - isPublic?: InputMaybe; - name?: InputMaybe; -}; - -export type StreamUpdatePermissionInput = { - role: Scalars['String']['input']; - streamId: Scalars['String']['input']; - userId: Scalars['String']['input']; -}; - -export type Subscription = { - __typename?: 'Subscription'; - /** It's lonely in the void. */ - _?: Maybe; - /** - * Subscribe to branch created event - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectModelsUpdated' instead. - */ - branchCreated?: Maybe; - /** - * Subscribe to branch deleted event - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectModelsUpdated' instead. - */ - branchDeleted?: Maybe; - /** - * Subscribe to branch updated event. - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectModelsUpdated' instead. - */ - branchUpdated?: Maybe; - /** - * Subscribe to new comment events. There's two ways to use this subscription: - * - for a whole stream: do not pass in any resourceIds; this sub will get called whenever a comment (not reply) is added to any of the stream's resources. - * - for a specific resource/set of resources: pass in a list of resourceIds (commit or object ids); this sub will get called when *any* of the resources provided get a comment. - * @deprecated Use projectCommentsUpdated - */ - commentActivity: CommentActivityMessage; - /** - * Subscribes to events on a specific comment. Use to find out when: - * - a top level comment is deleted (trigger a deletion event outside) - * - a top level comment receives a reply. - * @deprecated Use projectCommentsUpdated or viewerUserActivityBroadcasted for reply status - */ - commentThreadActivity: CommentThreadActivityMessage; - /** - * Subscribe to commit created event - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectVersionsUpdated' instead. - */ - commitCreated?: Maybe; - /** - * Subscribe to commit deleted event - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectVersionsUpdated' instead. - */ - commitDeleted?: Maybe; - /** - * Subscribe to commit updated event. - * @deprecated Part of the old API surface and will be removed in the future. Use 'projectVersionsUpdated' instead. - */ - commitUpdated?: Maybe; - /** - * Cyclically sends a message to the client, used for testing - * Note: Only works in test environment - */ - ping: Scalars['String']['output']; - /** Subscribe to updates to automations in the project */ - projectAutomationsUpdated: ProjectAutomationsUpdatedMessage; - /** - * Subscribe to updates to resource comments/threads. Optionally specify resource ID string to only receive - * updates regarding comments for those resources. - */ - projectCommentsUpdated: ProjectCommentsUpdatedMessage; - /** - * Subscribe to changes to any of a project's file imports - * @deprecated Part of the old API surface and will be removed in the future. Use projectPendingModelsUpdated or projectPendingVersionsUpdated instead. - */ - projectFileImportUpdated: ProjectFileImportUpdatedMessage; - /** Subscribe to changes to a project's models. Optionally specify modelIds to track. */ - projectModelsUpdated: ProjectModelsUpdatedMessage; - /** Subscribe to changes to a project's pending models */ - projectPendingModelsUpdated: ProjectPendingModelsUpdatedMessage; - /** Subscribe to changes to a project's pending versions */ - projectPendingVersionsUpdated: ProjectPendingVersionsUpdatedMessage; - /** Subscribe to updates to any triggered automations statuses in the project */ - projectTriggeredAutomationsStatusUpdated: ProjectTriggeredAutomationsStatusUpdatedMessage; - /** Track updates to a specific project */ - projectUpdated: ProjectUpdatedMessage; - projectVersionGendoAIRenderCreated: GendoAiRender; - projectVersionGendoAIRenderUpdated: GendoAiRender; - /** Subscribe to when a project's versions get their preview image fully generated. */ - projectVersionsPreviewGenerated: ProjectVersionsPreviewGeneratedMessage; - /** Subscribe to changes to a project's versions. */ - projectVersionsUpdated: ProjectVersionsUpdatedMessage; - /** - * Subscribes to stream deleted event. Use this in clients/components that pertain only to this stream. - * @deprecated Part of the old API surface and will be removed in the future. Use projectUpdated instead. - */ - streamDeleted?: Maybe; - /** - * Subscribes to stream updated event. Use this in clients/components that pertain only to this stream. - * @deprecated Part of the old API surface and will be removed in the future. Use projectUpdated instead. - */ - streamUpdated?: Maybe; - /** Track newly added or deleted projects owned by the active user */ - userProjectsUpdated: UserProjectsUpdatedMessage; - /** - * Subscribes to new stream added event for your profile. Use this to display an up-to-date list of streams. - * **NOTE**: If someone shares a stream with you, this subscription will be triggered with an extra value of `sharedBy` in the payload. - * @deprecated Part of the old API surface and will be removed in the future. Use userProjectsUpdated instead. - */ - userStreamAdded?: Maybe; - /** - * Subscribes to stream removed event for your profile. Use this to display an up-to-date list of streams for your profile. - * **NOTE**: If someone revokes your permissions on a stream, this subscription will be triggered with an extra value of `revokedBy` in the payload. - * @deprecated Part of the old API surface and will be removed in the future. Use userProjectsUpdated instead. - */ - userStreamRemoved?: Maybe; - /** - * Broadcasts "real-time" location data for viewer users. - * @deprecated Use viewerUserActivityBroadcasted - */ - userViewerActivity?: Maybe; - /** Track user activities in the viewer relating to the specified resources */ - viewerUserActivityBroadcasted: ViewerUserActivityMessage; - /** - * Track newly added or deleted projects in a specific workspace. - * Either slug or id must be set. - */ - workspaceProjectsUpdated: WorkspaceProjectsUpdatedMessage; - /** - * Track updates to a specific workspace. - * Either slug or id must be set. - */ - workspaceUpdated: WorkspaceUpdatedMessage; -}; - - -export type SubscriptionBranchCreatedArgs = { - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionBranchDeletedArgs = { - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionBranchUpdatedArgs = { - branchId?: InputMaybe; - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionCommentActivityArgs = { - resourceIds?: InputMaybe>>; - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionCommentThreadActivityArgs = { - commentId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionCommitCreatedArgs = { - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionCommitDeletedArgs = { - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionCommitUpdatedArgs = { - commitId?: InputMaybe; - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionProjectAutomationsUpdatedArgs = { - projectId: Scalars['String']['input']; -}; - - -export type SubscriptionProjectCommentsUpdatedArgs = { - target: ViewerUpdateTrackingTarget; -}; - - -export type SubscriptionProjectFileImportUpdatedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionProjectModelsUpdatedArgs = { - id: Scalars['String']['input']; - modelIds?: InputMaybe>; -}; - - -export type SubscriptionProjectPendingModelsUpdatedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionProjectPendingVersionsUpdatedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionProjectTriggeredAutomationsStatusUpdatedArgs = { - projectId: Scalars['String']['input']; -}; - - -export type SubscriptionProjectUpdatedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionProjectVersionGendoAiRenderCreatedArgs = { - id: Scalars['String']['input']; - versionId: Scalars['String']['input']; -}; - - -export type SubscriptionProjectVersionGendoAiRenderUpdatedArgs = { - id: Scalars['String']['input']; - versionId: Scalars['String']['input']; -}; - - -export type SubscriptionProjectVersionsPreviewGeneratedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionProjectVersionsUpdatedArgs = { - id: Scalars['String']['input']; -}; - - -export type SubscriptionStreamDeletedArgs = { - streamId?: InputMaybe; -}; - - -export type SubscriptionStreamUpdatedArgs = { - streamId?: InputMaybe; -}; - - -export type SubscriptionUserViewerActivityArgs = { - resourceId: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - - -export type SubscriptionViewerUserActivityBroadcastedArgs = { - sessionId?: InputMaybe; - target: ViewerUpdateTrackingTarget; -}; - - -export type SubscriptionWorkspaceProjectsUpdatedArgs = { - workspaceId?: InputMaybe; - workspaceSlug?: InputMaybe; -}; - - -export type SubscriptionWorkspaceUpdatedArgs = { - workspaceId?: InputMaybe; - workspaceSlug?: InputMaybe; -}; - -export type TestAutomationRun = { - __typename?: 'TestAutomationRun'; - automationRunId: Scalars['String']['output']; - functionRunId: Scalars['String']['output']; - triggers: Array; -}; - -export type TestAutomationRunTrigger = { - __typename?: 'TestAutomationRunTrigger'; - payload: TestAutomationRunTriggerPayload; - triggerType: Scalars['String']['output']; -}; - -export type TestAutomationRunTriggerPayload = { - __typename?: 'TestAutomationRunTriggerPayload'; - modelId: Scalars['String']['output']; - versionId: Scalars['String']['output']; -}; - -export type TokenResourceIdentifier = { - __typename?: 'TokenResourceIdentifier'; - id: Scalars['String']['output']; - type: TokenResourceIdentifierType; -}; - -export type TokenResourceIdentifierInput = { - id: Scalars['String']['input']; - type: TokenResourceIdentifierType; -}; - -export enum TokenResourceIdentifierType { - Project = 'project', - Workspace = 'workspace' -} - -export type TriggeredAutomationsStatus = { - __typename?: 'TriggeredAutomationsStatus'; - automationRuns: Array; - id: Scalars['ID']['output']; - status: AutomateRunStatus; - statusMessage?: Maybe; -}; - -/** Any null values will be ignored */ -export type UpdateAutomateFunctionInput = { - description?: InputMaybe; - id: Scalars['ID']['input']; - logo?: InputMaybe; - name?: InputMaybe; - /** SourceAppNames values from @speckle/shared */ - supportedSourceApps?: InputMaybe>; - tags?: InputMaybe>; - workspaceIds?: InputMaybe>; -}; - -export type UpdateModelInput = { - description?: InputMaybe; - id: Scalars['ID']['input']; - name?: InputMaybe; - projectId: Scalars['ID']['input']; -}; - -export type UpdateServerRegionInput = { - description?: InputMaybe; - key: Scalars['String']['input']; - name?: InputMaybe; -}; - -/** Only non-null values will be updated */ -export type UpdateVersionInput = { - message?: InputMaybe; - projectId: Scalars['ID']['input']; - versionId: Scalars['ID']['input']; -}; - -export type UpgradePlanInput = { - billingInterval: BillingInterval; - workspaceId: Scalars['ID']['input']; - workspacePlan: PaidWorkspacePlans; -}; - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type User = { - __typename?: 'User'; - /** - * All the recent activity from this user in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - activity?: Maybe; - /** Returns a list of your personal api tokens. */ - apiTokens: Array; - /** Returns the apps you have authorized. */ - authorizedApps?: Maybe>; - automateFunctions: AutomateFunctionCollection; - automateInfo: UserAutomateInfo; - avatar?: Maybe; - bio?: Maybe; - /** - * Get commits authored by the user. If requested for another user, then only commits - * from public streams will be returned. - * @deprecated Part of the old API surface and will be removed in the future. Use User.versions instead. - */ - commits?: Maybe; - company?: Maybe; - /** Returns the apps you have created. */ - createdApps?: Maybe>; - createdAt?: Maybe; - /** Get discoverable workspaces with verified domains that match the active user's */ - discoverableWorkspaces: Array; - /** Only returned if API user is the user being requested or an admin */ - email?: Maybe; - emails: Array; - /** - * A list of workspaces for the active user where: - * (1) The user is a member or admin - * (2) The workspace has SSO provider enabled - * (3) The user does not have a valid SSO session for the given SSO provider - */ - expiredSsoSessions: Array; - /** - * All the streams that a active user has favorited. - * Note: You can't use this to retrieve another user's favorite streams. - * @deprecated Part of the old API surface and will be removed in the future. - */ - favoriteStreams: StreamCollection; - gendoAICredits: UserGendoAiCredits; - /** Whether the user has a pending/active email verification token */ - hasPendingVerification?: Maybe; - id: Scalars['ID']['output']; - /** Whether post-sign up onboarding has been finished or skipped entirely */ - isOnboardingFinished?: Maybe; - name: Scalars['String']['output']; - notificationPreferences: Scalars['JSONObject']['output']; - profiles?: Maybe; - /** Get pending project access request, that the user made */ - projectAccessRequest?: Maybe; - /** Get all invitations to projects that the active user has */ - projectInvites: Array; - /** Get projects that the user participates in */ - projects: UserProjectCollection; - role?: Maybe; - /** - * Returns all streams that the user is a collaborator on. If requested for a user, who isn't the - * authenticated user, then this will only return discoverable streams. - * @deprecated Part of the old API surface and will be removed in the future. Use User.projects instead. - */ - streams: UserStreamCollection; - /** - * The user's timeline in chronological order - * @deprecated Part of the old API surface and will be removed in the future. - */ - timeline?: Maybe; - /** - * Total amount of favorites attached to streams owned by the user - * @deprecated Part of the old API surface and will be removed in the future. - */ - totalOwnedStreamsFavorites: Scalars['Int']['output']; - verified?: Maybe; - /** - * Get (count of) user's versions. By default gets all versions of all projects the user has access to. - * Set authoredOnly=true to only retrieve versions authored by the user. - * - * Note: Only count resolution is currently implemented - */ - versions: CountOnlyCollection; - /** Get all invitations to workspaces that the active user has */ - workspaceInvites: Array; - /** Get the workspaces for the user */ - workspaces: WorkspaceCollection; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserActivityArgs = { - actionType?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserAutomateFunctionsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: InputMaybe; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserCommitsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserFavoriteStreamsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserProjectAccessRequestArgs = { - projectId: Scalars['String']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserProjectsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserStreamsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserTimelineArgs = { - after?: InputMaybe; - before?: InputMaybe; - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserVersionsArgs = { - authoredOnly?: Scalars['Boolean']['input']; - limit?: Scalars['Int']['input']; -}; - - -/** - * Full user type, should only be used in the context of admin operations or - * when a user is reading/writing info about himself - */ -export type UserWorkspacesArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type UserAutomateInfo = { - __typename?: 'UserAutomateInfo'; - availableGithubOrgs: Array; - hasAutomateGithubApp: Scalars['Boolean']['output']; -}; - -export type UserDeleteInput = { - email: Scalars['String']['input']; -}; - -export type UserEmail = { - __typename?: 'UserEmail'; - email: Scalars['String']['output']; - id: Scalars['ID']['output']; - primary: Scalars['Boolean']['output']; - userId: Scalars['ID']['output']; - verified: Scalars['Boolean']['output']; -}; - -export type UserEmailMutations = { - __typename?: 'UserEmailMutations'; - create: User; - delete: User; - requestNewEmailVerification?: Maybe; - setPrimary: User; - verify?: Maybe; -}; - - -export type UserEmailMutationsCreateArgs = { - input: CreateUserEmailInput; -}; - - -export type UserEmailMutationsDeleteArgs = { - input: DeleteUserEmailInput; -}; - - -export type UserEmailMutationsRequestNewEmailVerificationArgs = { - input: EmailVerificationRequestInput; -}; - - -export type UserEmailMutationsSetPrimaryArgs = { - input: SetPrimaryUserEmailInput; -}; - - -export type UserEmailMutationsVerifyArgs = { - input: VerifyUserEmailInput; -}; - -export type UserGendoAiCredits = { - __typename?: 'UserGendoAICredits'; - limit: Scalars['Int']['output']; - resetDate: Scalars['DateTime']['output']; - used: Scalars['Int']['output']; -}; - -export type UserProjectCollection = { - __typename?: 'UserProjectCollection'; - cursor?: Maybe; - items: Array; - numberOfHidden: Scalars['Int']['output']; - totalCount: Scalars['Int']['output']; -}; - -export type UserProjectsFilter = { - /** Only include projects where user has the specified roles */ - onlyWithRoles?: InputMaybe>; - /** Filter out projects by name */ - search?: InputMaybe; - workspaceId?: InputMaybe; -}; - -export type UserProjectsUpdatedMessage = { - __typename?: 'UserProjectsUpdatedMessage'; - /** Project ID */ - id: Scalars['String']['output']; - /** Project entity, null if project was deleted */ - project?: Maybe; - /** Message type */ - type: UserProjectsUpdatedMessageType; -}; - -export enum UserProjectsUpdatedMessageType { - Added = 'ADDED', - Removed = 'REMOVED' -} - -export type UserRoleInput = { - id: Scalars['String']['input']; - role: Scalars['String']['input']; -}; - -export type UserSearchResultCollection = { - __typename?: 'UserSearchResultCollection'; - cursor?: Maybe; - items: Array; -}; - -export type UserStreamCollection = { - __typename?: 'UserStreamCollection'; - cursor?: Maybe; - items?: Maybe>; - numberOfHidden: Scalars['Int']['output']; - totalCount: Scalars['Int']['output']; -}; - -export type UserUpdateInput = { - avatar?: InputMaybe; - bio?: InputMaybe; - company?: InputMaybe; - name?: InputMaybe; -}; - -export type UserWorkspacesFilter = { - search?: InputMaybe; -}; - -export type UsersRetrievalInput = { - cursor?: InputMaybe; - /** Only find users with directly matching emails */ - emailOnly?: InputMaybe; - /** Limit defaults to 10 */ - limit?: InputMaybe; - /** Only find users that are collaborators of the specified project */ - projectId?: InputMaybe; - /** The query looks for matches in user name & email */ - query: Scalars['String']['input']; -}; - -export type VerifyUserEmailInput = { - code: Scalars['String']['input']; - email: Scalars['String']['input']; -}; - -export type Version = { - __typename?: 'Version'; - authorUser?: Maybe; - automationsStatus?: Maybe; - /** All comment threads in this version */ - commentThreads: CommentCollection; - createdAt: Scalars['DateTime']['output']; - gendoAIRender: GendoAiRender; - gendoAIRenders: GendoAiRenderCollection; - id: Scalars['ID']['output']; - message?: Maybe; - model: Model; - parents?: Maybe>>; - previewUrl: Scalars['String']['output']; - referencedObject: Scalars['String']['output']; - sourceApplication?: Maybe; - totalChildrenCount?: Maybe; -}; - - -export type VersionCommentThreadsArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type VersionGendoAiRenderArgs = { - id: Scalars['String']['input']; -}; - -export type VersionCollection = { - __typename?: 'VersionCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type VersionCreatedTrigger = { - __typename?: 'VersionCreatedTrigger'; - model?: Maybe; - type: AutomateRunTriggerType; - version?: Maybe; -}; - -export type VersionCreatedTriggerDefinition = { - __typename?: 'VersionCreatedTriggerDefinition'; - model?: Maybe; - type: AutomateRunTriggerType; -}; - -export type VersionMutations = { - __typename?: 'VersionMutations'; - create: Version; - delete: Scalars['Boolean']['output']; - markReceived: Scalars['Boolean']['output']; - moveToModel: Model; - requestGendoAIRender: Scalars['Boolean']['output']; - update: Version; -}; - - -export type VersionMutationsCreateArgs = { - input: CreateVersionInput; -}; - - -export type VersionMutationsDeleteArgs = { - input: DeleteVersionsInput; -}; - - -export type VersionMutationsMarkReceivedArgs = { - input: MarkReceivedVersionInput; -}; - - -export type VersionMutationsMoveToModelArgs = { - input: MoveVersionsInput; -}; - - -export type VersionMutationsRequestGendoAiRenderArgs = { - input: GendoAiRenderInput; -}; - - -export type VersionMutationsUpdateArgs = { - input: UpdateVersionInput; -}; - -export type ViewerResourceGroup = { - __typename?: 'ViewerResourceGroup'; - /** Resource identifier used to refer to a collection of resource items */ - identifier: Scalars['String']['output']; - /** Viewer resources that the identifier refers to */ - items: Array; -}; - -export type ViewerResourceItem = { - __typename?: 'ViewerResourceItem'; - /** Null if resource represents an object */ - modelId?: Maybe; - objectId: Scalars['String']['output']; - /** Null if resource represents an object */ - versionId?: Maybe; -}; - -export type ViewerUpdateTrackingTarget = { - /** - * By default if resourceIdString is set, the "versionId" part of model resource identifiers will be ignored - * and all updates to of all versions of any of the referenced models will be returned. If `loadedVersionsOnly` is - * enabled, then only updates of loaded/referenced versions in resourceIdString will be returned. - */ - loadedVersionsOnly?: InputMaybe; - projectId: Scalars['String']['input']; - /** - * Only request updates to the resources identified by this - * comma-delimited resouce string (same format that's used in the viewer URL) - */ - resourceIdString: Scalars['String']['input']; -}; - -export type ViewerUserActivityMessage = { - __typename?: 'ViewerUserActivityMessage'; - sessionId: Scalars['String']['output']; - /** SerializedViewerState, only null if DISCONNECTED */ - state?: Maybe; - status: ViewerUserActivityStatus; - user?: Maybe; - userId?: Maybe; - userName: Scalars['String']['output']; -}; - -export type ViewerUserActivityMessageInput = { - sessionId: Scalars['String']['input']; - /** SerializedViewerState, only null if DISCONNECTED */ - state?: InputMaybe; - status: ViewerUserActivityStatus; - userId?: InputMaybe; - userName: Scalars['String']['input']; -}; - -export enum ViewerUserActivityStatus { - Disconnected = 'DISCONNECTED', - Viewing = 'VIEWING' -} - -export type Webhook = { - __typename?: 'Webhook'; - description?: Maybe; - enabled?: Maybe; - hasSecret: Scalars['Boolean']['output']; - history?: Maybe; - id: Scalars['String']['output']; - projectId: Scalars['String']['output']; - streamId: Scalars['String']['output']; - triggers: Array; - url: Scalars['String']['output']; -}; - - -export type WebhookHistoryArgs = { - limit?: Scalars['Int']['input']; -}; - -export type WebhookCollection = { - __typename?: 'WebhookCollection'; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type WebhookCreateInput = { - description?: InputMaybe; - enabled?: InputMaybe; - secret?: InputMaybe; - streamId: Scalars['String']['input']; - triggers: Array; - url: Scalars['String']['input']; -}; - -export type WebhookDeleteInput = { - id: Scalars['String']['input']; - streamId: Scalars['String']['input']; -}; - -export type WebhookEvent = { - __typename?: 'WebhookEvent'; - id: Scalars['String']['output']; - lastUpdate: Scalars['DateTime']['output']; - payload: Scalars['String']['output']; - retryCount: Scalars['Int']['output']; - status: Scalars['Int']['output']; - statusInfo: Scalars['String']['output']; - webhookId: Scalars['String']['output']; -}; - -export type WebhookEventCollection = { - __typename?: 'WebhookEventCollection'; - items?: Maybe>>; - totalCount?: Maybe; -}; - -export type WebhookUpdateInput = { - description?: InputMaybe; - enabled?: InputMaybe; - id: Scalars['String']['input']; - secret?: InputMaybe; - streamId: Scalars['String']['input']; - triggers?: InputMaybe>; - url?: InputMaybe; -}; - -export type Workspace = { - __typename?: 'Workspace'; - /** Get all join requests for all the workspaces the user is an admin of */ - adminWorkspacesJoinRequests?: Maybe; - automateFunctions: AutomateFunctionCollection; - createdAt: Scalars['DateTime']['output']; - /** Info about the workspace creation state */ - creationState?: Maybe; - customerPortalUrl?: Maybe; - /** The default role workspace members will receive for workspace projects. */ - defaultProjectRole: Scalars['String']['output']; - /** - * The default region where project data will be stored, if set. If undefined, defaults to main/default - * region. - */ - defaultRegion?: Maybe; - description?: Maybe; - /** Enable/Disable discovery of the workspace */ - discoverabilityEnabled: Scalars['Boolean']['output']; - /** Enable/Disable restriction to invite users to workspace as Guests only */ - domainBasedMembershipProtectionEnabled: Scalars['Boolean']['output']; - /** Verified workspace domains */ - domains?: Maybe>; - hasAccessToFeature: Scalars['Boolean']['output']; - id: Scalars['ID']['output']; - /** Only available to workspace owners/members */ - invitedTeam?: Maybe>; - /** Logo image as base64-encoded string */ - logo?: Maybe; - name: Scalars['String']['output']; - plan?: Maybe; - projects: ProjectCollection; - /** A Workspace is marked as readOnly if its trial period is finished or a paid plan is subscribed but payment has failed */ - readOnly: Scalars['Boolean']['output']; - /** Active user's role for this workspace. `null` if request is not authenticated, or the workspace is not explicitly shared with you. */ - role?: Maybe; - slug: Scalars['String']['output']; - /** Information about the workspace's SSO configuration and the current user's SSO session, if present */ - sso?: Maybe; - subscription?: Maybe; - team: WorkspaceCollaboratorCollection; - updatedAt: Scalars['DateTime']['output']; -}; - - -export type WorkspaceAdminWorkspacesJoinRequestsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type WorkspaceAutomateFunctionsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type WorkspaceHasAccessToFeatureArgs = { - featureName: WorkspaceFeatureName; -}; - - -export type WorkspaceInvitedTeamArgs = { - filter?: InputMaybe; -}; - - -export type WorkspaceProjectsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -export type WorkspaceTeamArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type WorkspaceBillingMutations = { - __typename?: 'WorkspaceBillingMutations'; - cancelCheckoutSession: Scalars['Boolean']['output']; - createCheckoutSession: CheckoutSession; - upgradePlan: Scalars['Boolean']['output']; -}; - - -export type WorkspaceBillingMutationsCancelCheckoutSessionArgs = { - input: CancelCheckoutSessionInput; -}; - - -export type WorkspaceBillingMutationsCreateCheckoutSessionArgs = { - input: CheckoutSessionInput; -}; - - -export type WorkspaceBillingMutationsUpgradePlanArgs = { - input: UpgradePlanInput; -}; - -/** Overridden by `WorkspaceCollaboratorGraphQLReturn` */ -export type WorkspaceCollaborator = { - __typename?: 'WorkspaceCollaborator'; - id: Scalars['ID']['output']; - projectRoles: Array; - role: Scalars['String']['output']; - user: LimitedUser; -}; - -export type WorkspaceCollaboratorCollection = { - __typename?: 'WorkspaceCollaboratorCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type WorkspaceCollection = { - __typename?: 'WorkspaceCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type WorkspaceCreateInput = { - description?: InputMaybe; - /** Logo image as base64-encoded string */ - logo?: InputMaybe; - name: Scalars['String']['input']; - slug?: InputMaybe; -}; - -export type WorkspaceCreationState = { - __typename?: 'WorkspaceCreationState'; - completed: Scalars['Boolean']['output']; - state: Scalars['JSONObject']['output']; -}; - -export type WorkspaceCreationStateInput = { - completed: Scalars['Boolean']['input']; - state: Scalars['JSONObject']['input']; - workspaceId: Scalars['ID']['input']; -}; - -export type WorkspaceDismissInput = { - workspaceId: Scalars['ID']['input']; -}; - -export type WorkspaceDomain = { - __typename?: 'WorkspaceDomain'; - domain: Scalars['String']['output']; - id: Scalars['ID']['output']; -}; - -export type WorkspaceDomainDeleteInput = { - id: Scalars['ID']['input']; - workspaceId: Scalars['ID']['input']; -}; - -export enum WorkspaceFeatureName { - DomainBasedSecurityPolicies = 'domainBasedSecurityPolicies', - OidcSso = 'oidcSso', - WorkspaceDataRegionSpecificity = 'workspaceDataRegionSpecificity' -} - -export type WorkspaceInviteCreateInput = { - /** Either this or userId must be filled */ - email?: InputMaybe; - /** Defaults to the member role, if not specified */ - role?: InputMaybe; - /** Defaults to User, if not specified */ - serverRole?: InputMaybe; - /** Either this or email must be filled */ - userId?: InputMaybe; -}; - -export type WorkspaceInviteLookupOptions = { - /** If true, the query will assume workspaceId is actually the workspace slug, and do the lookup by slug */ - useSlug?: InputMaybe; -}; - -export type WorkspaceInviteMutations = { - __typename?: 'WorkspaceInviteMutations'; - batchCreate: Workspace; - cancel: Workspace; - create: Workspace; - resend: Scalars['Boolean']['output']; - use: Scalars['Boolean']['output']; -}; - - -export type WorkspaceInviteMutationsBatchCreateArgs = { - input: Array; - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceInviteMutationsCancelArgs = { - inviteId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceInviteMutationsCreateArgs = { - input: WorkspaceInviteCreateInput; - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceInviteMutationsResendArgs = { - input: WorkspaceInviteResendInput; -}; - - -export type WorkspaceInviteMutationsUseArgs = { - input: WorkspaceInviteUseInput; -}; - -export type WorkspaceInviteResendInput = { - inviteId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export type WorkspaceInviteUseInput = { - accept: Scalars['Boolean']['input']; - /** - * If invite is attached to an unregistered email, the invite can only be used if this is set to true. - * Upon accepting such an invite, the unregistered email will be added to the user's account as well. - */ - addNewEmail?: InputMaybe; - token: Scalars['String']['input']; -}; - -export type WorkspaceJoinRequest = { - __typename?: 'WorkspaceJoinRequest'; - createdAt: Scalars['DateTime']['output']; - id: Scalars['String']['output']; - status: WorkspaceJoinRequestStatus; - user: LimitedUser; - workspace: Workspace; -}; - -export type WorkspaceJoinRequestCollection = { - __typename?: 'WorkspaceJoinRequestCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -export type WorkspaceJoinRequestMutations = { - __typename?: 'WorkspaceJoinRequestMutations'; - approve: Scalars['Boolean']['output']; - deny: Scalars['Boolean']['output']; -}; - - -export type WorkspaceJoinRequestMutationsApproveArgs = { - input: ApproveWorkspaceJoinRequestInput; -}; - - -export type WorkspaceJoinRequestMutationsDenyArgs = { - input: DenyWorkspaceJoinRequestInput; -}; - -export enum WorkspaceJoinRequestStatus { - Approved = 'approved', - Denied = 'denied', - Pending = 'pending' -} - -export type WorkspaceMutations = { - __typename?: 'WorkspaceMutations'; - addDomain: Workspace; - billing: WorkspaceBillingMutations; - create: Workspace; - delete: Scalars['Boolean']['output']; - deleteDomain: Workspace; - deleteSsoProvider: Scalars['Boolean']['output']; - /** Dismiss a workspace from the discoverable list, behind the scene a join request is created with the status "dismissed" */ - dismiss: Scalars['Boolean']['output']; - invites: WorkspaceInviteMutations; - join: Workspace; - leave: Scalars['Boolean']['output']; - projects: WorkspaceProjectMutations; - requestToJoin: Scalars['Boolean']['output']; - /** Set the default region where project data will be stored. Only available to admins. */ - setDefaultRegion: Workspace; - update: Workspace; - updateCreationState: Scalars['Boolean']['output']; - updateRole: Workspace; -}; - - -export type WorkspaceMutationsAddDomainArgs = { - input: AddDomainToWorkspaceInput; -}; - - -export type WorkspaceMutationsCreateArgs = { - input: WorkspaceCreateInput; -}; - - -export type WorkspaceMutationsDeleteArgs = { - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceMutationsDeleteDomainArgs = { - input: WorkspaceDomainDeleteInput; -}; - - -export type WorkspaceMutationsDeleteSsoProviderArgs = { - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceMutationsDismissArgs = { - input: WorkspaceDismissInput; -}; - - -export type WorkspaceMutationsJoinArgs = { - input: JoinWorkspaceInput; -}; - - -export type WorkspaceMutationsLeaveArgs = { - id: Scalars['ID']['input']; -}; - - -export type WorkspaceMutationsRequestToJoinArgs = { - input: WorkspaceRequestToJoinInput; -}; - - -export type WorkspaceMutationsSetDefaultRegionArgs = { - regionKey: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceMutationsUpdateArgs = { - input: WorkspaceUpdateInput; -}; - - -export type WorkspaceMutationsUpdateCreationStateArgs = { - input: WorkspaceCreationStateInput; -}; - - -export type WorkspaceMutationsUpdateRoleArgs = { - input: WorkspaceRoleUpdateInput; -}; - -export enum WorkspacePaymentMethod { - Billing = 'billing', - Invoice = 'invoice', - Unpaid = 'unpaid' -} - -export type WorkspacePlan = { - __typename?: 'WorkspacePlan'; - createdAt: Scalars['DateTime']['output']; - name: WorkspacePlans; - paymentMethod: WorkspacePaymentMethod; - status: WorkspacePlanStatuses; -}; - -export enum WorkspacePlanStatuses { - CancelationScheduled = 'cancelationScheduled', - Canceled = 'canceled', - Expired = 'expired', - PaymentFailed = 'paymentFailed', - Trial = 'trial', - Valid = 'valid' -} - -export enum WorkspacePlans { - Academia = 'academia', - Business = 'business', - BusinessInvoiced = 'businessInvoiced', - Plus = 'plus', - PlusInvoiced = 'plusInvoiced', - Starter = 'starter', - StarterInvoiced = 'starterInvoiced', - Unlimited = 'unlimited' -} - -export type WorkspaceProjectCreateInput = { - description?: InputMaybe; - name?: InputMaybe; - visibility?: InputMaybe; - workspaceId: Scalars['String']['input']; -}; - -export type WorkspaceProjectInviteCreateInput = { - /** Either this or userId must be filled */ - email?: InputMaybe; - /** Defaults to the contributor role, if not specified */ - role?: InputMaybe; - /** Can only be specified if guest mode is on or if the user is an admin */ - serverRole?: InputMaybe; - /** Either this or email must be filled */ - userId?: InputMaybe; - /** Only taken into account, if project belongs to a workspace. Defaults to guest access. */ - workspaceRole?: InputMaybe; -}; - -export type WorkspaceProjectMutations = { - __typename?: 'WorkspaceProjectMutations'; - create: Project; - moveToWorkspace: Project; - updateRole: Project; -}; - - -export type WorkspaceProjectMutationsCreateArgs = { - input: WorkspaceProjectCreateInput; -}; - - -export type WorkspaceProjectMutationsMoveToWorkspaceArgs = { - projectId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - - -export type WorkspaceProjectMutationsUpdateRoleArgs = { - input: ProjectUpdateRoleInput; -}; - -export type WorkspaceProjectsFilter = { - /** Filter out projects by name */ - search?: InputMaybe; -}; - -export type WorkspaceProjectsUpdatedMessage = { - __typename?: 'WorkspaceProjectsUpdatedMessage'; - /** Project entity, null if project was deleted */ - project?: Maybe; - /** Project ID */ - projectId: Scalars['String']['output']; - /** Message type */ - type: WorkspaceProjectsUpdatedMessageType; - /** Workspace ID */ - workspaceId: Scalars['String']['output']; -}; - -export enum WorkspaceProjectsUpdatedMessageType { - Added = 'ADDED', - Removed = 'REMOVED' -} - -export type WorkspaceRequestToJoinInput = { - workspaceId: Scalars['ID']['input']; -}; - -export enum WorkspaceRole { - Admin = 'ADMIN', - Guest = 'GUEST', - Member = 'MEMBER' -} - -export type WorkspaceRoleDeleteInput = { - userId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export type WorkspaceRoleUpdateInput = { - /** Leave role null to revoke access entirely */ - role?: InputMaybe; - userId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export type WorkspaceSso = { - __typename?: 'WorkspaceSso'; - /** If null, the workspace does not have SSO configured */ - provider?: Maybe; - session?: Maybe; -}; - -export type WorkspaceSsoProvider = { - __typename?: 'WorkspaceSsoProvider'; - clientId: Scalars['String']['output']; - id: Scalars['ID']['output']; - issuerUrl: Scalars['String']['output']; - name: Scalars['String']['output']; -}; - -export type WorkspaceSsoSession = { - __typename?: 'WorkspaceSsoSession'; - createdAt: Scalars['DateTime']['output']; - validUntil: Scalars['DateTime']['output']; -}; - -export type WorkspaceSubscription = { - __typename?: 'WorkspaceSubscription'; - billingInterval: BillingInterval; - createdAt: Scalars['DateTime']['output']; - currentBillingCycleEnd: Scalars['DateTime']['output']; - seats: WorkspaceSubscriptionSeats; - updatedAt: Scalars['DateTime']['output']; -}; - -export type WorkspaceSubscriptionSeats = { - __typename?: 'WorkspaceSubscriptionSeats'; - guest: Scalars['Int']['output']; - plan: Scalars['Int']['output']; -}; - -export type WorkspaceTeamFilter = { - /** Limit team members to provided role(s) */ - roles?: InputMaybe>; - /** Search for team members by name or email */ - search?: InputMaybe; -}; - -export type WorkspaceUpdateInput = { - defaultProjectRole?: InputMaybe; - description?: InputMaybe; - discoverabilityEnabled?: InputMaybe; - domainBasedMembershipProtectionEnabled?: InputMaybe; - id: Scalars['String']['input']; - /** Logo image as base64-encoded string */ - logo?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; -}; - -export type WorkspaceUpdatedMessage = { - __typename?: 'WorkspaceUpdatedMessage'; - /** Workspace ID */ - id: Scalars['String']['output']; - /** Workspace itself */ - workspace: Workspace; -}; - -export type GetStreamAccessRequestQueryVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type GetStreamAccessRequestQuery = { __typename?: 'Query', streamAccessRequest?: { __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string } | null }; - -export type CreateStreamAccessRequestMutationVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type CreateStreamAccessRequestMutation = { __typename?: 'Mutation', streamAccessRequestCreate: { __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string } }; - -export type UseStreamAccessRequestMutationVariables = Exact<{ - requestId: Scalars['String']['input']; - accept: Scalars['Boolean']['input']; - role?: InputMaybe; -}>; - - -export type UseStreamAccessRequestMutation = { __typename?: 'Mutation', streamAccessRequestUse: boolean }; - -export type StreamWithBranchQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - branchName: Scalars['String']['input']; - cursor?: InputMaybe; -}>; - - -export type StreamWithBranchQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, role?: string | null, branch?: { __typename?: 'Branch', id: string, name: string, description?: string | null, commits?: { __typename?: 'CommitCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Commit', id: string, authorName?: string | null, authorId?: string | null, authorAvatar?: string | null, sourceApplication?: string | null, message?: string | null, referencedObject: string, createdAt?: string | null, commentCount: number }> | null } | null } | null } | null }; - -export type BranchCreatedSubscriptionVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type BranchCreatedSubscription = { __typename?: 'Subscription', branchCreated?: Record | null }; - -export type StreamAllBranchesQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - cursor?: InputMaybe; -}>; - - -export type StreamAllBranchesQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, branches?: { __typename?: 'BranchCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Branch', id: string, name: string, description?: string | null, createdAt?: string | null, author?: { __typename?: 'User', id: string, name: string } | null, commits?: { __typename?: 'CommitCollection', totalCount: number } | null }> | null } | null } | null }; - -export type CommentFullInfoFragment = { __typename?: 'Comment', id: string, archived: boolean, authorId: string, data?: Record | null, screenshot?: string | null, createdAt: string, updatedAt: string, viewedAt?: string | null, text: { __typename?: 'SmartTextEditorValue', doc?: Record | null, attachments?: Array<{ __typename?: 'BlobMetadata', id: string, fileName: string, streamId: string, fileType: string, fileSize?: number | null }> | null }, replies: { __typename?: 'CommentCollection', totalCount: number }, resources: Array<{ __typename?: 'ResourceIdentifier', resourceId: string, resourceType: ResourceType }> }; - -export type StreamCommitQueryQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - id: Scalars['String']['input']; -}>; - - -export type StreamCommitQueryQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, role?: string | null, commit?: { __typename?: 'Commit', id: string, message?: string | null, referencedObject: string, authorName?: string | null, authorId?: string | null, authorAvatar?: string | null, createdAt?: string | null, branchName?: string | null, sourceApplication?: string | null } | null } | null }; - -export type StreamBranchesSelectorQueryVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type StreamBranchesSelectorQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, branches?: { __typename?: 'BranchCollection', items?: Array<{ __typename?: 'Branch', name: string }> | null } | null } | null }; - -export type MoveCommitsMutationVariables = Exact<{ - input: CommitsMoveInput; -}>; - - -export type MoveCommitsMutation = { __typename?: 'Mutation', commitsMove: boolean }; - -export type DeleteCommitsMutationVariables = Exact<{ - input: CommitsDeleteInput; -}>; - - -export type DeleteCommitsMutation = { __typename?: 'Mutation', commitsDelete: boolean }; - -export type BasicStreamAccessRequestFieldsFragment = { __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string }; - -export type FullStreamAccessRequestFieldsFragment = { __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string, requester: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } }; - -export type ActivityMainFieldsFragment = { __typename?: 'Activity', id: string, actionType: string, info: Record, userId: string, streamId?: string | null, resourceId: string, resourceType: string, time: string, message: string }; - -export type LimitedCommitActivityFieldsFragment = { __typename?: 'Activity', id: string, info: Record, time: string, userId: string, message: string }; - -export type StreamPendingAccessRequestsFragment = { __typename?: 'Stream', pendingAccessRequests?: Array<{ __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string, requester: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } }> | null }; - -export type StreamFileUploadFragment = { __typename?: 'FileUpload', id: string, convertedCommitId?: string | null, userId: string, convertedStatus: number, convertedMessage?: string | null, fileName: string, fileType: string, uploadComplete: boolean, uploadDate: string, convertedLastUpdate: string }; - -export type LimitedUserFieldsFragment = { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null }; - -export type StreamCollaboratorFieldsFragment = { __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }; - -export type UsersOwnInviteFieldsFragment = { __typename?: 'PendingStreamCollaborator', id: string, inviteId: string, streamId: string, streamName: string, token?: string | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } }; - -export type StreamInviteQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - token?: InputMaybe; -}>; - - -export type StreamInviteQuery = { __typename?: 'Query', streamInvite?: { __typename?: 'PendingStreamCollaborator', id: string, inviteId: string, streamId: string, streamName: string, token?: string | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } } | null }; - -export type UserStreamInvitesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type UserStreamInvitesQuery = { __typename?: 'Query', streamInvites: Array<{ __typename?: 'PendingStreamCollaborator', id: string, inviteId: string, streamId: string, streamName: string, token?: string | null, invitedBy: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } }> }; - -export type UseStreamInviteMutationVariables = Exact<{ - accept: Scalars['Boolean']['input']; - streamId: Scalars['String']['input']; - token: Scalars['String']['input']; -}>; - - -export type UseStreamInviteMutation = { __typename?: 'Mutation', streamInviteUse: boolean }; - -export type CancelStreamInviteMutationVariables = Exact<{ - streamId: Scalars['String']['input']; - inviteId: Scalars['String']['input']; -}>; - - -export type CancelStreamInviteMutation = { __typename?: 'Mutation', streamInviteCancel: boolean }; - -export type DeleteInviteMutationVariables = Exact<{ - inviteId: Scalars['String']['input']; -}>; - - -export type DeleteInviteMutation = { __typename?: 'Mutation', inviteDelete: boolean }; - -export type ResendInviteMutationVariables = Exact<{ - inviteId: Scalars['String']['input']; -}>; - - -export type ResendInviteMutation = { __typename?: 'Mutation', inviteResend: boolean }; - -export type BatchInviteToServerMutationVariables = Exact<{ - paramsArray: Array | ServerInviteCreateInput; -}>; - - -export type BatchInviteToServerMutation = { __typename?: 'Mutation', serverInviteBatchCreate: boolean }; - -export type BatchInviteToStreamsMutationVariables = Exact<{ - paramsArray: Array | StreamInviteCreateInput; -}>; - - -export type BatchInviteToStreamsMutation = { __typename?: 'Mutation', streamInviteBatchCreate: boolean }; - -export type StreamObjectQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - id: Scalars['String']['input']; -}>; - - -export type StreamObjectQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, object?: { __typename?: 'Object', totalChildrenCount?: number | null, id: string, speckleType?: string | null, data?: Record | null } | null } | null }; - -export type StreamObjectNoDataQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - id: Scalars['String']['input']; -}>; - - -export type StreamObjectNoDataQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, object?: { __typename?: 'Object', totalChildrenCount?: number | null, id: string, speckleType?: string | null } | null } | null }; - -export type ServerInfoBlobSizeFieldsFragment = { __typename?: 'ServerInfo', configuration: { __typename?: 'ServerConfiguration', blobSizeLimitBytes: number } }; - -export type MainServerInfoFieldsFragment = { __typename?: 'ServerInfo', name: string, company?: string | null, description?: string | null, adminContact?: string | null, canonicalUrl?: string | null, termsOfService?: string | null, inviteOnly?: boolean | null, version?: string | null, guestModeEnabled: boolean, enableNewWebUiMessaging?: boolean | null, migration?: { __typename?: 'ServerMigration', movedTo?: string | null } | null }; - -export type ServerInfoRolesFieldsFragment = { __typename?: 'ServerInfo', serverRoles: Array<{ __typename?: 'ServerRoleItem', id: string, title: string }> }; - -export type ServerInfoScopesFieldsFragment = { __typename?: 'ServerInfo', scopes: Array<{ __typename?: 'Scope', name: string, description: string }> }; - -export type MainServerInfoQueryVariables = Exact<{ [key: string]: never; }>; - - -export type MainServerInfoQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', name: string, company?: string | null, description?: string | null, adminContact?: string | null, canonicalUrl?: string | null, termsOfService?: string | null, inviteOnly?: boolean | null, version?: string | null, guestModeEnabled: boolean, enableNewWebUiMessaging?: boolean | null, migration?: { __typename?: 'ServerMigration', movedTo?: string | null } | null } }; - -export type FullServerInfoQueryVariables = Exact<{ [key: string]: never; }>; - - -export type FullServerInfoQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', name: string, company?: string | null, description?: string | null, adminContact?: string | null, canonicalUrl?: string | null, termsOfService?: string | null, inviteOnly?: boolean | null, version?: string | null, guestModeEnabled: boolean, enableNewWebUiMessaging?: boolean | null, migration?: { __typename?: 'ServerMigration', movedTo?: string | null } | null, serverRoles: Array<{ __typename?: 'ServerRoleItem', id: string, title: string }>, scopes: Array<{ __typename?: 'Scope', name: string, description: string }>, configuration: { __typename?: 'ServerConfiguration', blobSizeLimitBytes: number } } }; - -export type ServerInfoBlobSizeLimitQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ServerInfoBlobSizeLimitQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', configuration: { __typename?: 'ServerConfiguration', blobSizeLimitBytes: number } } }; - -export type AvailableServerRolesQueryVariables = Exact<{ [key: string]: never; }>; - - -export type AvailableServerRolesQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', guestModeEnabled: boolean, serverRoles: Array<{ __typename?: 'ServerRoleItem', id: string, title: string }> } }; - -export type StreamCommitsQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamCommitsQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, role?: string | null, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, authorId?: string | null, authorName?: string | null, authorAvatar?: string | null, createdAt?: string | null, message?: string | null, referencedObject: string, branchName?: string | null, sourceApplication?: string | null }> | null } | null } | null }; - -export type StreamsQueryVariables = Exact<{ - cursor?: InputMaybe; -}>; - - -export type StreamsQuery = { __typename?: 'Query', streams?: { __typename?: 'UserStreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, company?: string | null, avatar?: string | null, role: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null, message?: string | null, authorId?: string | null, branchName?: string | null, authorName?: string | null, authorAvatar?: string | null, referencedObject: string }> | null } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }> | null } | null }; - -export type CommonStreamFieldsFragment = { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }; - -export type StreamQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null } | null }; - -export type StreamWithCollaboratorsQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamWithCollaboratorsQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, isPublic: boolean, role?: string | null, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }>, pendingCollaborators?: Array<{ __typename?: 'PendingStreamCollaborator', title: string, inviteId: string, role: string, user?: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } | null }> | null, pendingAccessRequests?: Array<{ __typename?: 'StreamAccessRequest', id: string, streamId: string, createdAt: string, requester: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } }> | null } | null }; - -export type StreamWithActivityQueryVariables = Exact<{ - id: Scalars['String']['input']; - cursor?: InputMaybe; -}>; - - -export type StreamWithActivityQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, createdAt: string, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null, activity?: { __typename?: 'ActivityCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Activity', id: string, actionType: string, info: Record, userId: string, streamId?: string | null, resourceId: string, resourceType: string, time: string, message: string }> } | null } | null }; - -export type LeaveStreamMutationVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type LeaveStreamMutation = { __typename?: 'Mutation', streamLeave: boolean }; - -export type UpdateStreamPermissionMutationVariables = Exact<{ - params: StreamUpdatePermissionInput; -}>; - - -export type UpdateStreamPermissionMutation = { __typename?: 'Mutation', streamUpdatePermission?: boolean | null }; - -export type StreamFirstCommitQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamFirstCommitQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, referencedObject: string }> | null } | null } | null }; - -export type StreamBranchFirstCommitQueryVariables = Exact<{ - id: Scalars['String']['input']; - branch: Scalars['String']['input']; -}>; - - -export type StreamBranchFirstCommitQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, branch?: { __typename?: 'Branch', commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, referencedObject: string }> | null } | null } | null } | null }; - -export type StreamSettingsQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamSettingsQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, description?: string | null, isPublic: boolean, isDiscoverable: boolean, allowPublicComments: boolean, role?: string | null } | null }; - -export type SearchStreamsQueryVariables = Exact<{ - query?: InputMaybe; -}>; - - -export type SearchStreamsQuery = { __typename?: 'Query', streams?: { __typename?: 'UserStreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, updatedAt: string }> | null } | null }; - -export type UpdateStreamSettingsMutationVariables = Exact<{ - input: StreamUpdateInput; -}>; - - -export type UpdateStreamSettingsMutation = { __typename?: 'Mutation', streamUpdate: boolean }; - -export type DeleteStreamMutationVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type DeleteStreamMutation = { __typename?: 'Mutation', streamDelete: boolean }; - -export type ShareableStreamQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type ShareableStreamQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, isPublic: boolean, role?: string | null, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }> } | null }; - -export type StreamFileUploadsUpdatedSubscriptionVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type StreamFileUploadsUpdatedSubscription = { __typename?: 'Subscription', projectFileImportUpdated: { __typename?: 'ProjectFileImportUpdatedMessage', type: ProjectFileImportUpdatedMessageType, id: string, upload: { __typename?: 'FileUpload', id: string, convertedCommitId?: string | null, userId: string, convertedStatus: number, convertedMessage?: string | null, fileName: string, fileType: string, uploadComplete: boolean, uploadDate: string, convertedLastUpdate: string } } }; - -export type CommonUserFieldsFragment = { __typename?: 'User', id: string, email?: string | null, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record | null, role?: string | null, streams: { __typename?: 'UserStreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null }; - -export type UserFavoriteStreamsQueryVariables = Exact<{ - cursor?: InputMaybe; -}>; - - -export type UserFavoriteStreamsQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record | null, role?: string | null, favoriteStreams: { __typename?: 'StreamCollection', totalCount: number, cursor?: string | null, items?: Array<{ __typename?: 'Stream', id: string, name: string, description?: string | null, role?: string | null, isPublic: boolean, createdAt: string, updatedAt: string, commentCount: number, favoritedDate?: string | null, favoritesCount: number, collaborators: Array<{ __typename?: 'StreamCollaborator', id: string, name: string, role: string, company?: string | null, avatar?: string | null, serverRole: string }>, commits?: { __typename?: 'CommitCollection', totalCount: number } | null, branches?: { __typename?: 'BranchCollection', totalCount: number } | null }> | null }, streams: { __typename?: 'UserStreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null } | null }; - -export type MainUserDataQueryVariables = Exact<{ [key: string]: never; }>; - - -export type MainUserDataQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record | null, role?: string | null, streams: { __typename?: 'UserStreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null } | null }; - -export type ProfileSelfQueryVariables = Exact<{ [key: string]: never; }>; - - -export type ProfileSelfQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', totalOwnedStreamsFavorites: number, notificationPreferences: Record, id: string, email?: string | null, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null, profiles?: Record | null, role?: string | null, streams: { __typename?: 'UserStreamCollection', totalCount: number }, commits?: { __typename?: 'CommitCollection', totalCount: number, items?: Array<{ __typename?: 'Commit', id: string, createdAt?: string | null }> | null } | null } | null }; - -export type UserSearchQueryVariables = Exact<{ - query: Scalars['String']['input']; - limit: Scalars['Int']['input']; - cursor?: InputMaybe; - archived?: InputMaybe; -}>; - - -export type UserSearchQuery = { __typename?: 'Query', userSearch: { __typename?: 'UserSearchResultCollection', cursor?: string | null, items: Array<{ __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null }> } }; - -export type IsLoggedInQueryVariables = Exact<{ [key: string]: never; }>; - - -export type IsLoggedInQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string } | null }; - -export type AdminUsersListQueryVariables = Exact<{ - limit?: InputMaybe; - offset?: InputMaybe; - query?: InputMaybe; -}>; - - -export type AdminUsersListQuery = { __typename?: 'Query', adminUsers?: { __typename?: 'AdminUsersListCollection', totalCount: number, items: Array<{ __typename?: 'AdminUsersListItem', id: string, registeredUser?: { __typename?: 'User', id: string, email?: string | null, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null, profiles?: Record | null, role?: string | null, authorizedApps?: Array<{ __typename?: 'ServerAppListItem', name: string }> | null } | null, invitedUser?: { __typename?: 'ServerInvite', id: string, email: string, invitedBy: { __typename?: 'LimitedUser', id: string, name: string } } | null }> } | null }; - -export type UserTimelineQueryVariables = Exact<{ - cursor?: InputMaybe; -}>; - - -export type UserTimelineQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, timeline?: { __typename?: 'ActivityCollection', totalCount: number, cursor?: string | null, items: Array<{ __typename?: 'Activity', id: string, actionType: string, info: Record, userId: string, streamId?: string | null, resourceId: string, resourceType: string, time: string, message: string }> } | null } | null }; - -export type ValidatePasswordStrengthQueryVariables = Exact<{ - pwd: Scalars['String']['input']; -}>; - - -export type ValidatePasswordStrengthQuery = { __typename?: 'Query', userPwdStrength: { __typename?: 'PasswordStrengthCheckResults', score: number, feedback: { __typename?: 'PasswordStrengthCheckFeedback', warning?: string | null, suggestions: Array } } }; - -export type EmailVerificationBannerStateQueryVariables = Exact<{ [key: string]: never; }>; - - -export type EmailVerificationBannerStateQuery = { __typename?: 'Query', activeUser?: { __typename?: 'User', id: string, email?: string | null, verified?: boolean | null, hasPendingVerification?: boolean | null } | null }; - -export type RequestVerificationMutationVariables = Exact<{ [key: string]: never; }>; - - -export type RequestVerificationMutation = { __typename?: 'Mutation', requestVerification: boolean }; - -export type UpdateUserNotificationPreferencesMutationVariables = Exact<{ - preferences: Scalars['JSONObject']['input']; -}>; - - -export type UpdateUserNotificationPreferencesMutation = { __typename?: 'Mutation', userNotificationPreferencesUpdate?: boolean | null }; - -export type UserByIdQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type UserByIdQuery = { __typename?: 'Query', otherUser?: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } | null }; - -export type UserProfileQueryVariables = Exact<{ - id: Scalars['String']['input']; -}>; - - -export type UserProfileQuery = { __typename?: 'Query', otherUser?: { __typename?: 'LimitedUser', id: string, name: string, bio?: string | null, company?: string | null, avatar?: string | null, verified?: boolean | null } | null }; - -export type WebhookQueryVariables = Exact<{ - streamId: Scalars['String']['input']; - webhookId: Scalars['String']['input']; -}>; - - -export type WebhookQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, role?: string | null, webhooks: { __typename?: 'WebhookCollection', items: Array<{ __typename?: 'Webhook', id: string, streamId: string, url: string, description?: string | null, triggers: Array, enabled?: boolean | null, history?: { __typename?: 'WebhookEventCollection', items?: Array<{ __typename?: 'WebhookEvent', status: number, statusInfo: string } | null> | null } | null }> } } | null }; - -export type WebhooksQueryVariables = Exact<{ - streamId: Scalars['String']['input']; -}>; - - -export type WebhooksQuery = { __typename?: 'Query', stream?: { __typename?: 'Stream', id: string, name: string, role?: string | null, webhooks: { __typename?: 'WebhookCollection', items: Array<{ __typename?: 'Webhook', id: string, streamId: string, url: string, description?: string | null, triggers: Array, enabled?: boolean | null, history?: { __typename?: 'WebhookEventCollection', items?: Array<{ __typename?: 'WebhookEvent', status: number, statusInfo: string, lastUpdate: string } | null> | null } | null }> } } | null }; - -export const CommentFullInfo = gql` - fragment CommentFullInfo on Comment { - id - archived - authorId - text { - doc - attachments { - id - fileName - streamId - fileType - fileSize - } - } - data - screenshot - replies { - totalCount - } - resources { - resourceId - resourceType - } - createdAt - updatedAt - viewedAt -} - `; -export const ActivityMainFields = gql` - fragment ActivityMainFields on Activity { - id - actionType - info - userId - streamId - resourceId - resourceType - time - message -} - `; -export const LimitedCommitActivityFields = gql` - fragment LimitedCommitActivityFields on Activity { - id - info - time - userId - message -} - `; -export const BasicStreamAccessRequestFields = gql` - fragment BasicStreamAccessRequestFields on StreamAccessRequest { - id - streamId - createdAt -} - `; -export const LimitedUserFields = gql` - fragment LimitedUserFields on LimitedUser { - id - name - bio - company - avatar - verified -} - `; -export const FullStreamAccessRequestFields = gql` - fragment FullStreamAccessRequestFields on StreamAccessRequest { - ...BasicStreamAccessRequestFields - requester { - ...LimitedUserFields - } -} - `; -export const StreamPendingAccessRequests = gql` - fragment StreamPendingAccessRequests on Stream { - pendingAccessRequests { - ...FullStreamAccessRequestFields - } -} - `; -export const StreamFileUpload = gql` - fragment StreamFileUpload on FileUpload { - id - convertedCommitId - userId - convertedStatus - convertedMessage - fileName - fileType - uploadComplete - uploadDate - convertedLastUpdate -} - `; -export const UsersOwnInviteFields = gql` - fragment UsersOwnInviteFields on PendingStreamCollaborator { - id - inviteId - streamId - streamName - token - invitedBy { - ...LimitedUserFields - } -} - `; -export const ServerInfoBlobSizeFields = gql` - fragment ServerInfoBlobSizeFields on ServerInfo { - configuration { - blobSizeLimitBytes - } -} - `; -export const MainServerInfoFields = gql` - fragment MainServerInfoFields on ServerInfo { - name - company - description - adminContact - canonicalUrl - termsOfService - inviteOnly - version - guestModeEnabled - enableNewWebUiMessaging - migration { - movedTo - } -} - `; -export const ServerInfoRolesFields = gql` - fragment ServerInfoRolesFields on ServerInfo { - serverRoles { - id - title - } -} - `; -export const ServerInfoScopesFields = gql` - fragment ServerInfoScopesFields on ServerInfo { - scopes { - name - description - } -} - `; -export const StreamCollaboratorFields = gql` - fragment StreamCollaboratorFields on StreamCollaborator { - id - name - role - company - avatar - serverRole -} - `; -export const CommonStreamFields = gql` - fragment CommonStreamFields on Stream { - id - name - description - role - isPublic - createdAt - updatedAt - commentCount - collaborators { - ...StreamCollaboratorFields - } - commits(limit: 1) { - totalCount - } - branches { - totalCount - } - favoritedDate - favoritesCount -} - `; -export const CommonUserFields = gql` - fragment CommonUserFields on User { - id - email - name - bio - company - avatar - verified - hasPendingVerification - profiles - role - streams { - totalCount - } - commits(limit: 1) { - totalCount - items { - id - createdAt - } - } -} - `; -export const GetStreamAccessRequest = gql` - query GetStreamAccessRequest($streamId: String!) { - streamAccessRequest(streamId: $streamId) { - ...BasicStreamAccessRequestFields - } -} - ${BasicStreamAccessRequestFields}`; -export const CreateStreamAccessRequest = gql` - mutation CreateStreamAccessRequest($streamId: String!) { - streamAccessRequestCreate(streamId: $streamId) { - ...BasicStreamAccessRequestFields - } -} - ${BasicStreamAccessRequestFields}`; -export const UseStreamAccessRequest = gql` - mutation UseStreamAccessRequest($requestId: String!, $accept: Boolean!, $role: StreamRole = STREAM_CONTRIBUTOR) { - streamAccessRequestUse(requestId: $requestId, accept: $accept, role: $role) -} - `; -export const StreamWithBranch = gql` - query StreamWithBranch($streamId: String!, $branchName: String!, $cursor: String) { - stream(id: $streamId) { - id - name - role - branch(name: $branchName) { - id - name - description - commits(cursor: $cursor, limit: 4) { - totalCount - cursor - items { - id - authorName - authorId - authorAvatar - sourceApplication - message - referencedObject - createdAt - commentCount - } - } - } - } -} - `; -export const BranchCreated = gql` - subscription BranchCreated($streamId: String!) { - branchCreated(streamId: $streamId) -} - `; -export const StreamAllBranches = gql` - query StreamAllBranches($streamId: String!, $cursor: String) { - stream(id: $streamId) { - id - branches(limit: 500, cursor: $cursor) { - totalCount - cursor - items { - id - name - description - author { - id - name - } - commits { - totalCount - } - createdAt - } - } - } -} - `; -export const StreamCommitQuery = gql` - query StreamCommitQuery($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - name - role - commit(id: $id) { - id - message - referencedObject - authorName - authorId - authorAvatar - createdAt - branchName - sourceApplication - } - } -} - `; -export const StreamBranchesSelector = gql` - query StreamBranchesSelector($streamId: String!) { - stream(id: $streamId) { - id - branches(limit: 100) { - items { - name - } - } - } -} - `; -export const MoveCommits = gql` - mutation MoveCommits($input: CommitsMoveInput!) { - commitsMove(input: $input) -} - `; -export const DeleteCommits = gql` - mutation DeleteCommits($input: CommitsDeleteInput!) { - commitsDelete(input: $input) -} - `; -export const StreamInvite = gql` - query StreamInvite($streamId: String!, $token: String) { - streamInvite(streamId: $streamId, token: $token) { - ...UsersOwnInviteFields - } -} - ${UsersOwnInviteFields} -${LimitedUserFields}`; -export const UserStreamInvites = gql` - query UserStreamInvites { - streamInvites { - ...UsersOwnInviteFields - } -} - ${UsersOwnInviteFields} -${LimitedUserFields}`; -export const UseStreamInvite = gql` - mutation UseStreamInvite($accept: Boolean!, $streamId: String!, $token: String!) { - streamInviteUse(accept: $accept, streamId: $streamId, token: $token) -} - `; -export const CancelStreamInvite = gql` - mutation CancelStreamInvite($streamId: String!, $inviteId: String!) { - streamInviteCancel(streamId: $streamId, inviteId: $inviteId) -} - `; -export const DeleteInvite = gql` - mutation DeleteInvite($inviteId: String!) { - inviteDelete(inviteId: $inviteId) -} - `; -export const ResendInvite = gql` - mutation ResendInvite($inviteId: String!) { - inviteResend(inviteId: $inviteId) -} - `; -export const BatchInviteToServer = gql` - mutation BatchInviteToServer($paramsArray: [ServerInviteCreateInput!]!) { - serverInviteBatchCreate(input: $paramsArray) -} - `; -export const BatchInviteToStreams = gql` - mutation BatchInviteToStreams($paramsArray: [StreamInviteCreateInput!]!) { - streamInviteBatchCreate(input: $paramsArray) -} - `; -export const StreamObject = gql` - query StreamObject($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - object(id: $id) { - totalChildrenCount - id - speckleType - data - } - } -} - `; -export const StreamObjectNoData = gql` - query StreamObjectNoData($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - name - object(id: $id) { - totalChildrenCount - id - speckleType - } - } -} - `; -export const MainServerInfo = gql` - query MainServerInfo { - serverInfo { - ...MainServerInfoFields - } -} - ${MainServerInfoFields}`; -export const FullServerInfo = gql` - query FullServerInfo { - serverInfo { - ...MainServerInfoFields - ...ServerInfoRolesFields - ...ServerInfoScopesFields - ...ServerInfoBlobSizeFields - } -} - ${MainServerInfoFields} -${ServerInfoRolesFields} -${ServerInfoScopesFields} -${ServerInfoBlobSizeFields}`; -export const ServerInfoBlobSizeLimit = gql` - query ServerInfoBlobSizeLimit { - serverInfo { - ...ServerInfoBlobSizeFields - } -} - ${ServerInfoBlobSizeFields}`; -export const AvailableServerRoles = gql` - query AvailableServerRoles { - serverInfo { - serverRoles { - id - title - } - guestModeEnabled - } -} - `; -export const StreamCommits = gql` - query StreamCommits($id: String!) { - stream(id: $id) { - id - role - commits { - totalCount - items { - id - authorId - authorName - authorAvatar - createdAt - message - referencedObject - branchName - sourceApplication - } - } - } -} - `; -export const Streams = gql` - query Streams($cursor: String) { - streams(cursor: $cursor, limit: 10) { - totalCount - cursor - items { - id - name - description - role - isPublic - createdAt - updatedAt - commentCount - collaborators { - id - name - company - avatar - role - } - commits(limit: 1) { - totalCount - items { - id - createdAt - message - authorId - branchName - authorName - authorAvatar - referencedObject - } - } - branches { - totalCount - } - favoritedDate - favoritesCount - } - } -} - `; -export const Stream = gql` - query Stream($id: String!) { - stream(id: $id) { - ...CommonStreamFields - } -} - ${CommonStreamFields} -${StreamCollaboratorFields}`; -export const StreamWithCollaborators = gql` - query StreamWithCollaborators($id: String!) { - stream(id: $id) { - id - name - isPublic - role - collaborators { - ...StreamCollaboratorFields - } - pendingCollaborators { - title - inviteId - role - user { - ...LimitedUserFields - } - } - pendingAccessRequests { - ...FullStreamAccessRequestFields - } - } -} - ${StreamCollaboratorFields} -${LimitedUserFields} -${FullStreamAccessRequestFields} -${BasicStreamAccessRequestFields}`; -export const StreamWithActivity = gql` - query StreamWithActivity($id: String!, $cursor: DateTime) { - stream(id: $id) { - id - name - createdAt - commits { - totalCount - } - branches { - totalCount - } - activity(cursor: $cursor) { - totalCount - cursor - items { - ...ActivityMainFields - } - } - } -} - ${ActivityMainFields}`; -export const LeaveStream = gql` - mutation LeaveStream($streamId: String!) { - streamLeave(streamId: $streamId) -} - `; -export const UpdateStreamPermission = gql` - mutation UpdateStreamPermission($params: StreamUpdatePermissionInput!) { - streamUpdatePermission(permissionParams: $params) -} - `; -export const StreamFirstCommit = gql` - query StreamFirstCommit($id: String!) { - stream(id: $id) { - id - commits(limit: 1) { - totalCount - items { - id - referencedObject - } - } - } -} - `; -export const StreamBranchFirstCommit = gql` - query StreamBranchFirstCommit($id: String!, $branch: String!) { - stream(id: $id) { - id - branch(name: $branch) { - commits(limit: 1) { - totalCount - items { - id - referencedObject - } - } - } - } -} - `; -export const StreamSettings = gql` - query StreamSettings($id: String!) { - stream(id: $id) { - id - name - description - isPublic - isDiscoverable - allowPublicComments - role - } -} - `; -export const SearchStreams = gql` - query SearchStreams($query: String) { - streams(query: $query) { - totalCount - cursor - items { - id - name - updatedAt - } - } -} - `; -export const UpdateStreamSettings = gql` - mutation UpdateStreamSettings($input: StreamUpdateInput!) { - streamUpdate(stream: $input) -} - `; -export const DeleteStream = gql` - mutation DeleteStream($id: String!) { - streamDelete(id: $id) -} - `; -export const ShareableStream = gql` - query ShareableStream($id: String!) { - stream(id: $id) { - id - isPublic - role - collaborators { - ...StreamCollaboratorFields - } - } -} - ${StreamCollaboratorFields}`; -export const StreamFileUploadsUpdated = gql` - subscription StreamFileUploadsUpdated($id: String!) { - projectFileImportUpdated(id: $id) { - type - id - upload { - ...StreamFileUpload - } - } -} - ${StreamFileUpload}`; -export const UserFavoriteStreams = gql` - query UserFavoriteStreams($cursor: String) { - activeUser { - ...CommonUserFields - favoriteStreams(cursor: $cursor, limit: 10) { - totalCount - cursor - items { - ...CommonStreamFields - } - } - } -} - ${CommonUserFields} -${CommonStreamFields} -${StreamCollaboratorFields}`; -export const MainUserData = gql` - query MainUserData { - activeUser { - ...CommonUserFields - } -} - ${CommonUserFields}`; -export const ProfileSelf = gql` - query ProfileSelf { - activeUser { - ...CommonUserFields - totalOwnedStreamsFavorites - notificationPreferences - } -} - ${CommonUserFields}`; -export const UserSearch = gql` - query UserSearch($query: String!, $limit: Int!, $cursor: String, $archived: Boolean) { - userSearch(query: $query, limit: $limit, cursor: $cursor, archived: $archived) { - cursor - items { - ...LimitedUserFields - } - } -} - ${LimitedUserFields}`; -export const IsLoggedIn = gql` - query IsLoggedIn { - activeUser { - id - } -} - `; -export const AdminUsersList = gql` - query AdminUsersList($limit: Int, $offset: Int, $query: String) { - adminUsers(limit: $limit, offset: $offset, query: $query) { - totalCount - items { - id - registeredUser { - id - email - name - bio - company - avatar - verified - profiles - role - authorizedApps { - name - } - } - invitedUser { - id - email - invitedBy { - id - name - } - } - } - } -} - `; -export const UserTimeline = gql` - query UserTimeline($cursor: DateTime) { - activeUser { - id - timeline(cursor: $cursor) { - totalCount - cursor - items { - ...ActivityMainFields - } - } - } -} - ${ActivityMainFields}`; -export const ValidatePasswordStrength = gql` - query ValidatePasswordStrength($pwd: String!) { - userPwdStrength(pwd: $pwd) { - score - feedback { - warning - suggestions - } - } -} - `; -export const EmailVerificationBannerState = gql` - query EmailVerificationBannerState { - activeUser { - id - email - verified - hasPendingVerification - } -} - `; -export const RequestVerification = gql` - mutation RequestVerification { - requestVerification -} - `; -export const UpdateUserNotificationPreferences = gql` - mutation UpdateUserNotificationPreferences($preferences: JSONObject!) { - userNotificationPreferencesUpdate(preferences: $preferences) -} - `; -export const UserById = gql` - query UserById($id: String!) { - otherUser(id: $id) { - id - name - bio - company - avatar - verified - } -} - `; -export const UserProfile = gql` - query UserProfile($id: String!) { - otherUser(id: $id) { - id - name - bio - company - avatar - verified - } -} - `; -export const Webhook = gql` - query webhook($streamId: String!, $webhookId: String!) { - stream(id: $streamId) { - id - role - webhooks(id: $webhookId) { - items { - id - streamId - url - description - triggers - enabled - history(limit: 1) { - items { - status - statusInfo - } - } - } - } - } -} - `; -export const Webhooks = gql` - query webhooks($streamId: String!) { - stream(id: $streamId) { - id - name - role - webhooks { - items { - id - streamId - url - description - triggers - enabled - history(limit: 50) { - items { - status - statusInfo - lastUpdate - } - } - } - } - } -} - `; -export const CommentFullInfoFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommentFullInfo"},"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":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"text"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"doc"}},{"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":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"fileSize"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"data"}},{"kind":"Field","name":{"kind":"Name","value":"screenshot"}},{"kind":"Field","name":{"kind":"Name","value":"replies"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"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":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"viewedAt"}}]}}]} as unknown as DocumentNode; -export const ActivityMainFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityMainFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Activity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actionType"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceType"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]} as unknown as DocumentNode; -export const LimitedCommitActivityFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedCommitActivityFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Activity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]} as unknown as DocumentNode; -export const BasicStreamAccessRequestFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; -export const LimitedUserFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; -export const FullStreamAccessRequestFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}},{"kind":"Field","name":{"kind":"Name","value":"requester"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; -export const StreamPendingAccessRequestsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamPendingAccessRequests"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"pendingAccessRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullStreamAccessRequestFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}},{"kind":"Field","name":{"kind":"Name","value":"requester"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode; -export const StreamFileUploadFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"convertedCommitId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"uploadComplete"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}}]}}]} as unknown as DocumentNode; -export const UsersOwnInviteFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UsersOwnInviteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingStreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"streamName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; -export const ServerInfoBlobSizeFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blobSizeLimitBytes"}}]}}]}}]} as unknown as DocumentNode; -export const MainServerInfoFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MainServerInfoFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"adminContact"}},{"kind":"Field","name":{"kind":"Name","value":"canonicalUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsOfService"}},{"kind":"Field","name":{"kind":"Name","value":"inviteOnly"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"guestModeEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"enableNewWebUiMessaging"}},{"kind":"Field","name":{"kind":"Name","value":"migration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"movedTo"}}]}}]}}]} as unknown as DocumentNode; -export const ServerInfoRolesFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoRolesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverRoles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]} as unknown as DocumentNode; -export const ServerInfoScopesFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoScopesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scopes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]}}]} as unknown as DocumentNode; -export const StreamCollaboratorFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}}]} as unknown as DocumentNode; -export const CommonStreamFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonStreamFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}}]} as unknown as DocumentNode; -export const CommonUserFieldsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"streams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode; -export const GetStreamAccessRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetStreamAccessRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamAccessRequest"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; -export const CreateStreamAccessRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateStreamAccessRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamAccessRequestCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; -export const UseStreamAccessRequestDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UseStreamAccessRequest"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"requestId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accept"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"role"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StreamRole"}},"defaultValue":{"kind":"EnumValue","value":"STREAM_CONTRIBUTOR"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamAccessRequestUse"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"requestId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"requestId"}}},{"kind":"Argument","name":{"kind":"Name","value":"accept"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accept"}}},{"kind":"Argument","name":{"kind":"Name","value":"role"},"value":{"kind":"Variable","name":{"kind":"Name","value":"role"}}}]}]}}]} as unknown as DocumentNode; -export const StreamWithBranchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamWithBranch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"branchName"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"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":"branch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"branchName"}}}],"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":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"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":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const BranchCreatedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"BranchCreated"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"branchCreated"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}]}]}}]} as unknown as DocumentNode; -export const StreamAllBranchesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamAllBranches"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"500"}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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":"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":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamCommitQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamCommitQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"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":"commit"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"branchName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamBranchesSelectorDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamBranchesSelector"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"100"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const MoveCommitsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"MoveCommits"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CommitsMoveInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commitsMove"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; -export const DeleteCommitsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteCommits"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CommitsDeleteInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commitsDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; -export const StreamInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"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":"streamInvite"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UsersOwnInviteFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UsersOwnInviteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingStreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"streamName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode; -export const UserStreamInvitesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserStreamInvites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamInvites"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"UsersOwnInviteFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"UsersOwnInviteFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"PendingStreamCollaborator"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"streamName"}},{"kind":"Field","name":{"kind":"Name","value":"token"}},{"kind":"Field","name":{"kind":"Name","value":"invitedBy"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode; -export const UseStreamInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UseStreamInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"accept"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"token"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamInviteUse"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"accept"},"value":{"kind":"Variable","name":{"kind":"Name","value":"accept"}}},{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"token"},"value":{"kind":"Variable","name":{"kind":"Name","value":"token"}}}]}]}}]} as unknown as DocumentNode; -export const CancelStreamInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CancelStreamInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamInviteCancel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"inviteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}}}]}]}}]} as unknown as DocumentNode; -export const DeleteInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inviteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}}}]}]}}]} as unknown as DocumentNode; -export const ResendInviteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResendInvite"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"inviteResend"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"inviteId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"inviteId"}}}]}]}}]} as unknown as DocumentNode; -export const BatchInviteToServerDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BatchInviteToServer"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"paramsArray"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInviteCreateInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInviteBatchCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"paramsArray"}}}]}]}}]} as unknown as DocumentNode; -export const BatchInviteToStreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"BatchInviteToStreams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"paramsArray"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StreamInviteCreateInput"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamInviteBatchCreate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"paramsArray"}}}]}]}}]} as unknown as DocumentNode; -export const StreamObjectDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamObject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"object"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalChildrenCount"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"speckleType"}},{"kind":"Field","name":{"kind":"Name","value":"data"}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamObjectNoDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamObjectNoData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"object"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalChildrenCount"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"speckleType"}}]}}]}}]}}]} as unknown as DocumentNode; -export const MainServerInfoDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MainServerInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MainServerInfoFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MainServerInfoFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"adminContact"}},{"kind":"Field","name":{"kind":"Name","value":"canonicalUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsOfService"}},{"kind":"Field","name":{"kind":"Name","value":"inviteOnly"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"guestModeEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"enableNewWebUiMessaging"}},{"kind":"Field","name":{"kind":"Name","value":"migration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"movedTo"}}]}}]}}]} as unknown as DocumentNode; -export const FullServerInfoDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"FullServerInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MainServerInfoFields"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerInfoRolesFields"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerInfoScopesFields"}},{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MainServerInfoFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"adminContact"}},{"kind":"Field","name":{"kind":"Name","value":"canonicalUrl"}},{"kind":"Field","name":{"kind":"Name","value":"termsOfService"}},{"kind":"Field","name":{"kind":"Name","value":"inviteOnly"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"guestModeEnabled"}},{"kind":"Field","name":{"kind":"Name","value":"enableNewWebUiMessaging"}},{"kind":"Field","name":{"kind":"Name","value":"migration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"movedTo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoRolesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverRoles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoScopesFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"scopes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blobSizeLimitBytes"}}]}}]}}]} as unknown as DocumentNode; -export const ServerInfoBlobSizeLimitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ServerInfoBlobSizeLimit"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ServerInfoBlobSizeFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ServerInfo"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"configuration"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"blobSizeLimitBytes"}}]}}]}}]} as unknown as DocumentNode; -export const AvailableServerRolesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AvailableServerRoles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverRoles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}},{"kind":"Field","name":{"kind":"Name","value":"guestModeEnabled"}}]}}]}}]} as unknown as DocumentNode; -export const StreamCommitsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamCommits"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"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":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}},{"kind":"Field","name":{"kind":"Name","value":"branchName"}},{"kind":"Field","name":{"kind":"Name","value":"sourceApplication"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Streams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streams"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"10"}}],"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":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"message"}},{"kind":"Field","name":{"kind":"Name","value":"authorId"}},{"kind":"Field","name":{"kind":"Name","value":"branchName"}},{"kind":"Field","name":{"kind":"Name","value":"authorName"}},{"kind":"Field","name":{"kind":"Name","value":"authorAvatar"}},{"kind":"Field","name":{"kind":"Name","value":"referencedObject"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Stream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"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":"CommonStreamFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonStreamFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]} as unknown as DocumentNode; -export const StreamWithCollaboratorsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamWithCollaborators"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingCollaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"inviteId"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pendingAccessRequests"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FullStreamAccessRequestFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FullStreamAccessRequestFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamAccessRequest"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BasicStreamAccessRequestFields"}},{"kind":"Field","name":{"kind":"Name","value":"requester"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]} as unknown as DocumentNode; -export const StreamWithActivityDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamWithActivity"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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":"ActivityMainFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityMainFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Activity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actionType"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceType"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]} as unknown as DocumentNode; -export const LeaveStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"LeaveStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamLeave"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"streamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}]}]}}]} as unknown as DocumentNode; -export const UpdateStreamPermissionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateStreamPermission"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"params"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StreamUpdatePermissionInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamUpdatePermission"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"permissionParams"},"value":{"kind":"Variable","name":{"kind":"Name","value":"params"}}}]}]}}]} as unknown as DocumentNode; -export const StreamFirstCommitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamFirstCommit"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"referencedObject"}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamBranchFirstCommitDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamBranchFirstCommit"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"branch"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"branch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"branch"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"referencedObject"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const StreamSettingsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"StreamSettings"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"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":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"isDiscoverable"}},{"kind":"Field","name":{"kind":"Name","value":"allowPublicComments"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]}}]} as unknown as DocumentNode; -export const SearchStreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SearchStreams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streams"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}}],"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":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}}]}}]}}]}}]} as unknown as DocumentNode; -export const UpdateStreamSettingsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateStreamSettings"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StreamUpdateInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"stream"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}]}]}}]} as unknown as DocumentNode; -export const DeleteStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"streamDelete"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode; -export const ShareableStreamDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ShareableStream"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}}]} as unknown as DocumentNode; -export const StreamFileUploadsUpdatedDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"StreamFileUploadsUpdated"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"projectFileImportUpdated"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"upload"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamFileUpload"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamFileUpload"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileUpload"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"convertedCommitId"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"convertedStatus"}},{"kind":"Field","name":{"kind":"Name","value":"convertedMessage"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}},{"kind":"Field","name":{"kind":"Name","value":"fileType"}},{"kind":"Field","name":{"kind":"Name","value":"uploadComplete"}},{"kind":"Field","name":{"kind":"Name","value":"uploadDate"}},{"kind":"Field","name":{"kind":"Name","value":"convertedLastUpdate"}}]}}]} as unknown as DocumentNode; -export const UserFavoriteStreamsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserFavoriteStreams"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}},{"kind":"Field","name":{"kind":"Name","value":"favoriteStreams"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"10"}}],"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":"CommonStreamFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"StreamCollaboratorFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"StreamCollaborator"}},"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":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"serverRole"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"streams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"createdAt"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonStreamFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Stream"}},"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":"role"}},{"kind":"Field","name":{"kind":"Name","value":"isPublic"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"updatedAt"}},{"kind":"Field","name":{"kind":"Name","value":"commentCount"}},{"kind":"Field","name":{"kind":"Name","value":"collaborators"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"StreamCollaboratorFields"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"branches"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"favoritedDate"}},{"kind":"Field","name":{"kind":"Name","value":"favoritesCount"}}]}}]} as unknown as DocumentNode; -export const MainUserDataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MainUserData"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"streams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode; -export const ProfileSelfDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProfileSelf"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CommonUserFields"}},{"kind":"Field","name":{"kind":"Name","value":"totalOwnedStreamsFavorites"}},{"kind":"Field","name":{"kind":"Name","value":"notificationPreferences"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CommonUserFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"streams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}}]}},{"kind":"Field","name":{"kind":"Name","value":"commits"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"1"}}],"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":"createdAt"}}]}}]}}]}}]} as unknown as DocumentNode; -export const UserSearchDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserSearch"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"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":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"archived"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userSearch"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}},{"kind":"Argument","name":{"kind":"Name","value":"archived"},"value":{"kind":"Variable","name":{"kind":"Name","value":"archived"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"cursor"}},{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LimitedUserFields"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LimitedUserFields"},"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":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]} as unknown as DocumentNode; -export const IsLoggedInDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"IsLoggedIn"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"activeUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; -export const AdminUsersListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdminUsersList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"query"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adminUsers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"query"},"value":{"kind":"Variable","name":{"kind":"Name","value":"query"}}}],"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":"registeredUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"profiles"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"authorizedApps"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"invitedUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"email"}},{"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"}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const UserTimelineDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserTimeline"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"DateTime"}}}],"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":"timeline"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"cursor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"cursor"}}}],"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":"ActivityMainFields"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActivityMainFields"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Activity"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"actionType"}},{"kind":"Field","name":{"kind":"Name","value":"info"}},{"kind":"Field","name":{"kind":"Name","value":"userId"}},{"kind":"Field","name":{"kind":"Name","value":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceId"}},{"kind":"Field","name":{"kind":"Name","value":"resourceType"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"message"}}]}}]} as unknown as DocumentNode; -export const ValidatePasswordStrengthDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ValidatePasswordStrength"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"pwd"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userPwdStrength"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"pwd"},"value":{"kind":"Variable","name":{"kind":"Name","value":"pwd"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"score"}},{"kind":"Field","name":{"kind":"Name","value":"feedback"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"warning"}},{"kind":"Field","name":{"kind":"Name","value":"suggestions"}}]}}]}}]}}]} as unknown as DocumentNode; -export const EmailVerificationBannerStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"EmailVerificationBannerState"},"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":"email"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}},{"kind":"Field","name":{"kind":"Name","value":"hasPendingVerification"}}]}}]}}]} as unknown as DocumentNode; -export const RequestVerificationDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RequestVerification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"requestVerification"}}]}}]} as unknown as DocumentNode; -export const UpdateUserNotificationPreferencesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateUserNotificationPreferences"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"preferences"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"JSONObject"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"userNotificationPreferencesUpdate"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"preferences"},"value":{"kind":"Variable","name":{"kind":"Name","value":"preferences"}}}]}]}}]} as unknown as DocumentNode; -export const UserByIdDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserById"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"otherUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]}}]} as unknown as DocumentNode; -export const UserProfileDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"UserProfile"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"otherUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"bio"}},{"kind":"Field","name":{"kind":"Name","value":"company"}},{"kind":"Field","name":{"kind":"Name","value":"avatar"}},{"kind":"Field","name":{"kind":"Name","value":"verified"}}]}}]}}]} as unknown as DocumentNode; -export const WebhookDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"webhook"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"webhookId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"webhooks"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"webhookId"}}}],"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":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"triggers"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"history"},"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":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusInfo"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; -export const WebhooksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"webhooks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"stream"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"streamId"}}}],"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":"webhooks"},"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":"streamId"}},{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"triggers"}},{"kind":"Field","name":{"kind":"Name","value":"enabled"}},{"kind":"Field","name":{"kind":"Name","value":"history"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"IntValue","value":"50"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"items"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"statusInfo"}},{"kind":"Field","name":{"kind":"Name","value":"lastUpdate"}}]}}]}}]}}]}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/packages/frontend/src/graphql/invites.js b/packages/frontend/src/graphql/invites.js deleted file mode 100644 index 651aaf4f2..000000000 --- a/packages/frontend/src/graphql/invites.js +++ /dev/null @@ -1,58 +0,0 @@ -import { gql } from '@apollo/client/core' -import { usersOwnInviteFieldsFragment } from '@/graphql/fragments/user' - -export const streamInviteQuery = gql` - query StreamInvite($streamId: String!, $token: String) { - streamInvite(streamId: $streamId, token: $token) { - ...UsersOwnInviteFields - } - } - - ${usersOwnInviteFieldsFragment} -` - -export const userStreamInvitesQuery = gql` - query UserStreamInvites { - streamInvites { - ...UsersOwnInviteFields - } - } - - ${usersOwnInviteFieldsFragment} -` - -export const useStreamInviteMutation = gql` - mutation UseStreamInvite($accept: Boolean!, $streamId: String!, $token: String!) { - streamInviteUse(accept: $accept, streamId: $streamId, token: $token) - } -` - -export const cancelStreamInviteMutation = gql` - mutation CancelStreamInvite($streamId: String!, $inviteId: String!) { - streamInviteCancel(streamId: $streamId, inviteId: $inviteId) - } -` - -export const deleteInviteMutation = gql` - mutation DeleteInvite($inviteId: String!) { - inviteDelete(inviteId: $inviteId) - } -` - -export const resendInviteMutation = gql` - mutation ResendInvite($inviteId: String!) { - inviteResend(inviteId: $inviteId) - } -` - -export const batchInviteToServerMutation = gql` - mutation BatchInviteToServer($paramsArray: [ServerInviteCreateInput!]!) { - serverInviteBatchCreate(input: $paramsArray) - } -` - -export const batchInviteToStreamsMutation = gql` - mutation BatchInviteToStreams($paramsArray: [StreamInviteCreateInput!]!) { - streamInviteBatchCreate(input: $paramsArray) - } -` diff --git a/packages/frontend/src/graphql/local-only/schema.gql b/packages/frontend/src/graphql/local-only/schema.gql deleted file mode 100644 index 05a5861e3..000000000 --- a/packages/frontend/src/graphql/local-only/schema.gql +++ /dev/null @@ -1,25 +0,0 @@ -extend type Query { - """ - Commit/Object viewer state (local-only) - """ - commitObjectViewerState: CommitObjectViewerState! -} - -type CommitObjectViewerState { - viewerBusy: Boolean! - selectedCommentMetaData: SelectedCommentMetaData - addingComment: Boolean! - preventCommentCollapse: Boolean! - commentReactions: [String!]! - emojis: [String!]! - currentFilterState: JSONObject - selectedObjects: [JSONObject] - objectProperties: [JSONObject] - localFilterPropKey: String - sectionBox: Boolean -} - -type SelectedCommentMetaData { - id: String! - selectionLocation: JSONObject! -} diff --git a/packages/frontend/src/graphql/objectSingle.gql b/packages/frontend/src/graphql/objectSingle.gql deleted file mode 100644 index c43cb4f60..000000000 --- a/packages/frontend/src/graphql/objectSingle.gql +++ /dev/null @@ -1,11 +0,0 @@ -query StreamObject($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - object(id: $id) { - totalChildrenCount - id - speckleType - data - } - } -} diff --git a/packages/frontend/src/graphql/objectSingleNoData.gql b/packages/frontend/src/graphql/objectSingleNoData.gql deleted file mode 100644 index 6f6c59e26..000000000 --- a/packages/frontend/src/graphql/objectSingleNoData.gql +++ /dev/null @@ -1,11 +0,0 @@ -query StreamObjectNoData($streamId: String!, $id: String!) { - stream(id: $streamId) { - id - name - object(id: $id) { - totalChildrenCount - id - speckleType - } - } -} diff --git a/packages/frontend/src/graphql/server.js b/packages/frontend/src/graphql/server.js deleted file mode 100644 index b03ae54db..000000000 --- a/packages/frontend/src/graphql/server.js +++ /dev/null @@ -1,95 +0,0 @@ -import { gql } from '@apollo/client/core' - -export const serverInfoBlobSizeFragment = gql` - fragment ServerInfoBlobSizeFields on ServerInfo { - configuration { - blobSizeLimitBytes - } - } -` - -export const mainServerInfoFieldsFragment = gql` - fragment MainServerInfoFields on ServerInfo { - name - company - description - adminContact - canonicalUrl - termsOfService - inviteOnly - version - guestModeEnabled - enableNewWebUiMessaging - migration { - movedTo - } - } -` - -export const serverInfoRolesFieldsFragment = gql` - fragment ServerInfoRolesFields on ServerInfo { - serverRoles { - id - title - } - } -` - -export const serverInfoScopesFieldsFragment = gql` - fragment ServerInfoScopesFields on ServerInfo { - scopes { - name - description - } - } -` - -/** - * Get main server info - */ -export const mainServerInfoQuery = gql` - query MainServerInfo { - serverInfo { - ...MainServerInfoFields - } - } - - ${mainServerInfoFieldsFragment} -` - -export const fullServerInfoQuery = gql` - query FullServerInfo { - serverInfo { - ...MainServerInfoFields - ...ServerInfoRolesFields - ...ServerInfoScopesFields - ...ServerInfoBlobSizeFields - } - } - - ${mainServerInfoFieldsFragment} - ${serverInfoRolesFieldsFragment} - ${serverInfoScopesFieldsFragment} - ${serverInfoBlobSizeFragment} -` - -export const serverInfoBlobSizeLimitQuery = gql` - query ServerInfoBlobSizeLimit { - serverInfo { - ...ServerInfoBlobSizeFields - } - } - ${serverInfoBlobSizeFragment} -` - -export const availableServerRolesQuery = gql` - query AvailableServerRoles { - serverInfo { - serverRoles { - id - title - } - guestModeEnabled - } - } -` diff --git a/packages/frontend/src/graphql/streamCommits.gql b/packages/frontend/src/graphql/streamCommits.gql deleted file mode 100644 index 84228afdc..000000000 --- a/packages/frontend/src/graphql/streamCommits.gql +++ /dev/null @@ -1,20 +0,0 @@ -query StreamCommits($id: String!) { - stream(id: $id) { - id - role - commits { - totalCount - items { - id - authorId - authorName - authorAvatar - createdAt - message - referencedObject - branchName - sourceApplication - } - } - } -} diff --git a/packages/frontend/src/graphql/streams.gql b/packages/frontend/src/graphql/streams.gql deleted file mode 100644 index 939d30773..000000000 --- a/packages/frontend/src/graphql/streams.gql +++ /dev/null @@ -1,41 +0,0 @@ -query Streams($cursor: String) { - streams(cursor: $cursor, limit: 10) { - totalCount - cursor - items { - id - name - description - role - isPublic - createdAt - updatedAt - commentCount - collaborators { - id - name - company - avatar - role - } - commits(limit: 1) { - totalCount - items { - id - createdAt - message - authorId - branchName - authorName - authorAvatar - referencedObject - } - } - branches { - totalCount - } - favoritedDate - favoritesCount - } - } -} diff --git a/packages/frontend/src/graphql/streams.js b/packages/frontend/src/graphql/streams.js deleted file mode 100644 index 70f78a6c2..000000000 --- a/packages/frontend/src/graphql/streams.js +++ /dev/null @@ -1,231 +0,0 @@ -import { fullStreamAccessRequestFieldsFragment } from '@/graphql/fragments/accessRequests' -import { activityMainFieldsFragment } from '@/graphql/fragments/activity' -import { - limitedUserFieldsFragment, - streamCollaboratorFieldsFragment -} from '@/graphql/fragments/user' -import { gql } from '@apollo/client/core' -import { streamFileUploadFragment } from '@/graphql/fragments/streams' - -/** - * Common stream fields when querying for streams - */ -export const commonStreamFieldsFragment = gql` - fragment CommonStreamFields on Stream { - id - name - description - role - isPublic - createdAt - updatedAt - commentCount - collaborators { - ...StreamCollaboratorFields - } - commits(limit: 1) { - totalCount - } - branches { - totalCount - } - favoritedDate - favoritesCount - } - - ${streamCollaboratorFieldsFragment} -` - -/** - * Retrieve a single stream - */ -export const streamQuery = gql` - query Stream($id: String!) { - stream(id: $id) { - ...CommonStreamFields - } - } - - ${commonStreamFieldsFragment} -` - -/** - * Retrieve stream collaborators info - */ -export const streamWithCollaboratorsQuery = gql` - query StreamWithCollaborators($id: String!) { - stream(id: $id) { - id - name - isPublic - role - collaborators { - ...StreamCollaboratorFields - } - pendingCollaborators { - title - inviteId - role - user { - ...LimitedUserFields - } - } - pendingAccessRequests { - ...FullStreamAccessRequestFields - } - } - } - ${limitedUserFieldsFragment} - ${streamCollaboratorFieldsFragment} - ${fullStreamAccessRequestFieldsFragment} -` - -export const streamWithActivityQuery = gql` - query StreamWithActivity($id: String!, $cursor: DateTime) { - stream(id: $id) { - id - name - createdAt - commits { - totalCount - } - branches { - totalCount - } - activity(cursor: $cursor) { - totalCount - cursor - items { - ...ActivityMainFields - } - } - } - } - - ${activityMainFieldsFragment} -` - -/** - * Remove authenticated user from the collaborators list - */ -export const leaveStreamMutation = gql` - mutation LeaveStream($streamId: String!) { - streamLeave(streamId: $streamId) - } -` - -/** - * Update a user's stream permission - */ -export const updateStreamPermissionMutation = gql` - mutation UpdateStreamPermission($params: StreamUpdatePermissionInput!) { - streamUpdatePermission(permissionParams: $params) - } -` - -/** - * Get a stream's first commit - */ -export const streamFirstCommitQuery = gql` - query StreamFirstCommit($id: String!) { - stream(id: $id) { - id - commits(limit: 1) { - totalCount - items { - id - referencedObject - } - } - } - } -` - -/** - * Get a stream branch's first commit - */ -export const streamBranchFirstCommitQuery = gql` - query StreamBranchFirstCommit($id: String!, $branch: String!) { - stream(id: $id) { - id - branch(name: $branch) { - commits(limit: 1) { - totalCount - items { - id - referencedObject - } - } - } - } - } -` - -export const streamSettingsQuery = gql` - query StreamSettings($id: String!) { - stream(id: $id) { - id - name - description - isPublic - isDiscoverable - allowPublicComments - role - } - } -` - -export const searchStreamsQuery = gql` - query SearchStreams($query: String) { - streams(query: $query) { - totalCount - cursor - items { - id - name - updatedAt - } - } - } -` - -export const updateStreamSettingsMutation = gql` - mutation UpdateStreamSettings($input: StreamUpdateInput!) { - streamUpdate(stream: $input) - } -` - -export const deleteStreamMutation = gql` - mutation DeleteStream($id: String!) { - streamDelete(id: $id) - } -` - -export const shareableStreamQuery = gql` - query ShareableStream($id: String!) { - stream(id: $id) { - id - isPublic - role - collaborators { - ...StreamCollaboratorFields - } - } - } - - ${streamCollaboratorFieldsFragment} -` - -export const streamFileUploadsUpdatedSubscription = gql` - subscription StreamFileUploadsUpdated($id: String!) { - projectFileImportUpdated(id: $id) { - type - id - upload { - ...StreamFileUpload - } - } - } - - ${streamFileUploadFragment} -` diff --git a/packages/frontend/src/graphql/user.js b/packages/frontend/src/graphql/user.js deleted file mode 100644 index fcac45082..000000000 --- a/packages/frontend/src/graphql/user.js +++ /dev/null @@ -1,193 +0,0 @@ -import { activityMainFieldsFragment } from '@/graphql/fragments/activity' -import { limitedUserFieldsFragment } from '@/graphql/fragments/user' -import { commonStreamFieldsFragment } from '@/graphql/streams' -import { gql } from '@apollo/client/core' - -export const commonUserFieldsFragment = gql` - fragment CommonUserFields on User { - id - email - name - bio - company - avatar - verified - hasPendingVerification - profiles - role - streams { - totalCount - } - commits(limit: 1) { - totalCount - items { - id - createdAt - } - } - } -` - -/** - * User data with favorite streams - */ -export const userFavoriteStreamsQuery = gql` - query UserFavoriteStreams($cursor: String) { - activeUser { - ...CommonUserFields - favoriteStreams(cursor: $cursor, limit: 10) { - totalCount - cursor - items { - ...CommonStreamFields - } - } - } - } - - ${commonUserFieldsFragment} - ${commonStreamFieldsFragment} -` - -/** - * Get main user metadata - */ -export const mainUserDataQuery = gql` - query MainUserData { - activeUser { - ...CommonUserFields - } - } - - ${commonUserFieldsFragment} -` - -/** - * Main metadata + extra info shown on profile page - */ -export const profileSelfQuery = gql` - query ProfileSelf { - activeUser { - ...CommonUserFields - totalOwnedStreamsFavorites - notificationPreferences - } - } - - ${commonUserFieldsFragment} -` - -/** - * (Limited, not admin) User search - */ -export const userSearchQuery = gql` - query UserSearch($query: String!, $limit: Int!, $cursor: String, $archived: Boolean) { - userSearch(query: $query, limit: $limit, cursor: $cursor, archived: $archived) { - cursor - items { - ...LimitedUserFields - } - } - } - - ${limitedUserFieldsFragment} -` - -/** - * Basic query for checking if user is logged in - */ -export const isLoggedInQuery = gql` - query IsLoggedIn { - activeUser { - id - } - } -` - -/** - * Admin panel (invited/registered) users list - */ -export const adminUsersListQuery = gql` - query AdminUsersList($limit: Int, $offset: Int, $query: String) { - adminUsers(limit: $limit, offset: $offset, query: $query) { - totalCount - items { - id - registeredUser { - id - email - name - bio - company - avatar - verified - profiles - role - authorizedApps { - name - } - } - invitedUser { - id - email - invitedBy { - id - name - } - } - } - } - } -` - -export const userTimelineQuery = gql` - query UserTimeline($cursor: DateTime) { - activeUser { - id - timeline(cursor: $cursor) { - totalCount - cursor - items { - ...ActivityMainFields - } - } - } - } - - ${activityMainFieldsFragment} -` - -export const validatePasswordStrengthQuery = gql` - query ValidatePasswordStrength($pwd: String!) { - userPwdStrength(pwd: $pwd) { - score - feedback { - warning - suggestions - } - } - } -` - -export const emailVerificationBannerStateQuery = gql` - query EmailVerificationBannerState { - activeUser { - id - email - verified - hasPendingVerification - } - } -` - -export const requestVerificationMutation = gql` - mutation RequestVerification { - requestVerification - } -` - -export const updateUserNotificationPreferencesMutation = gql` - mutation UpdateUserNotificationPreferences($preferences: JSONObject!) { - userNotificationPreferencesUpdate(preferences: $preferences) - } -` diff --git a/packages/frontend/src/graphql/userById.gql b/packages/frontend/src/graphql/userById.gql deleted file mode 100644 index 0ef343daf..000000000 --- a/packages/frontend/src/graphql/userById.gql +++ /dev/null @@ -1,10 +0,0 @@ -query UserById($id: String!) { - otherUser(id: $id) { - id - name - bio - company - avatar - verified - } -} diff --git a/packages/frontend/src/graphql/userProfile.gql b/packages/frontend/src/graphql/userProfile.gql deleted file mode 100644 index b3894f329..000000000 --- a/packages/frontend/src/graphql/userProfile.gql +++ /dev/null @@ -1,10 +0,0 @@ -query UserProfile($id: String!) { - otherUser(id: $id) { - id - name - bio - company - avatar - verified - } -} diff --git a/packages/frontend/src/graphql/webhook.gql b/packages/frontend/src/graphql/webhook.gql deleted file mode 100644 index 30f301bca..000000000 --- a/packages/frontend/src/graphql/webhook.gql +++ /dev/null @@ -1,22 +0,0 @@ -query webhook($streamId: String!, $webhookId: String!) { - stream(id: $streamId) { - id - role - webhooks(id: $webhookId) { - items { - id - streamId - url - description - triggers - enabled - history(limit: 1) { - items { - status - statusInfo - } - } - } - } - } -} diff --git a/packages/frontend/src/graphql/webhooks.gql b/packages/frontend/src/graphql/webhooks.gql deleted file mode 100644 index bb0c68b86..000000000 --- a/packages/frontend/src/graphql/webhooks.gql +++ /dev/null @@ -1,24 +0,0 @@ -query webhooks($streamId: String!) { - stream(id: $streamId) { - id - name - role - webhooks { - items { - id - streamId - url - description - triggers - enabled - history(limit: 50) { - items { - status - statusInfo - lastUpdate - } - } - } - } - } -} diff --git a/packages/frontend/src/helpers/errorHelper.ts b/packages/frontend/src/helpers/errorHelper.ts deleted file mode 100644 index 7157385e3..000000000 --- a/packages/frontend/src/helpers/errorHelper.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ApolloError, ServerError, ServerParseError } from '@apollo/client/core' -import { NetworkError } from '@apollo/client/errors' -import { has, isString } from 'lodash' - -/** - * Base application error - */ -export abstract class BaseError extends Error { - /** - * Default message if none is passed - */ - static defaultMessage = 'Unexpected error occurred!' - - constructor(message?: string, options?: ErrorOptions) { - message ||= new.target.defaultMessage - super(message, options) - } -} - -const isServerError = (err: Error): err is ServerError => - has(err, 'response') && has(err, 'result') && has(err, 'statusCode') -const isServerParseError = (err: Error): err is ServerParseError => - has(err, 'response') && has(err, 'bodyText') && has(err, 'statusCode') - -export function isInvalidAuth(error: ApolloError | NetworkError) { - const networkError = error instanceof ApolloError ? error.networkError : error - if ( - !networkError || - (!isServerError(networkError) && !isServerParseError(networkError)) - ) - return false - - const statusCode = networkError.statusCode - const hasCorrectCode = [403].includes(statusCode) - if (!hasCorrectCode) return false - - const message: string | undefined = ( - isServerError(networkError) - ? isString(networkError.result) - ? networkError.result - : networkError.result?.error - : networkError.bodyText - ) as string | undefined - - return (message || '').toLowerCase().includes('token') -} diff --git a/packages/frontend/src/helpers/mainConstants.ts b/packages/frontend/src/helpers/mainConstants.ts deleted file mode 100644 index 088c1c89d..000000000 --- a/packages/frontend/src/helpers/mainConstants.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Roles } from '@speckle/shared' -import type { ServerRoles, StreamRoles } from '@speckle/shared' -import { StreamRole } from '@/graphql/generated/graphql' - -/** - * Keys for values stored in localStorage - */ -export const LocalStorageKeys = Object.freeze({ - AuthToken: 'AuthToken', - RefreshToken: 'RefreshToken', - Uuid: 'uuid', - ShouldRedirectTo: 'shouldRedirectTo' -}) - -/** - * Our GQL schema has a StreamRoles enum that unfortunately can't have the same exact values as our roles constants, because - * we can't use colons (:) there. So you can use this function to map from our constant value to the GQL one. - */ -export function streamRoleToGraphQLEnum(role: StreamRoles): StreamRole { - switch (role) { - case Roles.Stream.Owner: - return StreamRole.StreamOwner - case Roles.Stream.Reviewer: - return StreamRole.StreamReviewer - case Roles.Stream.Contributor: - default: - return StreamRole.StreamContributor - } -} - -export { Roles, ServerRoles, StreamRoles } diff --git a/packages/frontend/src/helpers/md5.ts b/packages/frontend/src/helpers/md5.ts deleted file mode 100644 index 15823aa52..000000000 --- a/packages/frontend/src/helpers/md5.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { md5 } from '@speckle/shared' -export default md5 -export { md5 } diff --git a/packages/frontend/src/helpers/randomHelpers.js b/packages/frontend/src/helpers/randomHelpers.js deleted file mode 100644 index b2f9850b2..000000000 --- a/packages/frontend/src/helpers/randomHelpers.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Generate a random string of any length - * @param {number} length - * @returns - */ -export function randomString(length) { - return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length)) - .toString(36) - .slice(1) -} diff --git a/packages/frontend/src/helpers/streamHelpers.js b/packages/frontend/src/helpers/streamHelpers.js deleted file mode 100644 index a0cbe2176..000000000 --- a/packages/frontend/src/helpers/streamHelpers.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Check whether or not a stream can be favorited by the active user - */ -export function canBeFavorited(stream) { - return stream && (stream.isPublic || stream.role) -} diff --git a/packages/frontend/src/helpers/typeHelpers.ts b/packages/frontend/src/helpers/typeHelpers.ts deleted file mode 100644 index 7267c900b..000000000 --- a/packages/frontend/src/helpers/typeHelpers.ts +++ /dev/null @@ -1,79 +0,0 @@ -export { isUndefinedOrVoid } from '@speckle/shared' -export type { - Nullable, - Optional, - MaybeNullOrUndefined, - MaybeAsync, - MaybeFalsy -} from '@speckle/shared' -import { ReactiveVar } from '@apollo/client/core' -import Vue, { VueConstructor } from 'vue' -import { LooseRequired } from 'vue/types/common' - -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type GetReactiveVarType> = V extends ReactiveVar< - infer T -> - ? T - : unknown - -export type SetupProps

= Readonly> - -// Copied from Vue typings & improved ergonomics -export type CombinedVueInstance< - Instance extends Vue = Vue, - Data = unknown, - Methods = unknown, - Computed = unknown, - Props = unknown -> = Data & Methods & Computed & Props & Instance - -export type ExtendedVue< - Instance extends Vue = Vue, - Data = unknown, - Methods = unknown, - Computed = unknown, - Props = unknown -> = VueConstructor & Vue> - -export type VueWithMixins< - A extends VueConstructor = VueConstructor, - B extends VueConstructor = VueConstructor, - C extends VueConstructor = VueConstructor, - D extends VueConstructor = VueConstructor, - E extends VueConstructor = VueConstructor -> = VueConstructor< - Vue & - InstanceType & - InstanceType & - InstanceType & - InstanceType & - InstanceType -> - -/** - * Create Vue base class with the specified mixins and correctly returned TypeScript types - * @deprecated Use Composition API instead - * @returns - */ -export function vueWithMixins< - A extends VueConstructor = VueConstructor, - B extends VueConstructor = VueConstructor, - C extends VueConstructor = VueConstructor, - D extends VueConstructor = VueConstructor, - E extends VueConstructor = VueConstructor ->( - mixin1?: A, - mixin2?: B, - mixin3?: C, - mixin4?: D, - mixin5?: E -): VueWithMixins { - const mixins = [mixin1, mixin2, mixin3, mixin4, mixin5].filter( - (m): m is A | B | C | D | E => !!m - ) - - return Vue.extend({ - mixins - }) as VueWithMixins -} diff --git a/packages/frontend/src/helpers/vuetifyHelpers.ts b/packages/frontend/src/helpers/vuetifyHelpers.ts deleted file mode 100644 index aeb2fb7d7..000000000 --- a/packages/frontend/src/helpers/vuetifyHelpers.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { CombinedVueInstance } from 'vue/types/vue' - -/** - * Use this to type v-form $refs instances - */ -export type VFormInstance = CombinedVueInstance< - Vue, - unknown, - { - /** - * Reset validation state - */ - resetValidation(): void - /** - * Validate the form and return whether it's valid or not - */ - validate(): boolean - }, - unknown, - unknown, - unknown -> diff --git a/packages/frontend/src/main/App.vue b/packages/frontend/src/main/App.vue deleted file mode 100644 index 52838ae43..000000000 --- a/packages/frontend/src/main/App.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/packages/frontend/src/main/app.js b/packages/frontend/src/main/app.js deleted file mode 100644 index cf889f891..000000000 --- a/packages/frontend/src/main/app.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Don't export anything out of this file and import it in other files, this borks Vite HMR for some reason - * (runs app.js twice in the browser)! - */ - -import '@/bootstrapper' -import Vue from 'vue' - -import App from '@/main/App.vue' -import { LocalStorageKeys } from '@/helpers/mainConstants' -import * as MixpanelManager from '@/mixpanelManager' - -import { provide } from 'vue' -import { DefaultApolloClient } from '@vue/apollo-composable' -import { createProvider, installVueApollo } from '@/config/apolloConfig' -import { - checkAccessCodeAndGetTokens, - prefetchUserAndSetID -} from '@/plugins/authHelpers' - -import router from '@/main/router/index' -import vuetify from '@/plugins/vuetify' -import VueTimeago from 'vue-timeago' - -Vue.use(VueTimeago, { locale: 'en' }) - -import VueFilterDateParse from '@vuejs-community/vue-filter-date-parse' -Vue.use(VueFilterDateParse) - -import VueFilterDateFormat from '@vuejs-community/vue-filter-date-format' -Vue.use(VueFilterDateFormat) - -// adds various helper methods -import '@/plugins/helpers' -import { AppLocalStorage } from '@/utils/localStorage' -import { InvalidAuthTokenError } from '@/main/lib/auth/errors' - -// Async ApexChart load -Vue.component('ApexChart', async () => { - const VueApexCharts = await import('vue-apexcharts') - Vue.use(VueApexCharts) - - return VueApexCharts -}) - -// Filter to capitalize words -Vue.filter('capitalize', (value) => { - if (!value) return '' - value = value.toString() - return value.charAt(0).toUpperCase() + value.slice(1) -}) - -const apolloProvider = createProvider() -installVueApollo(apolloProvider) - -function postAuthInit() { - // Init mixpanel - MixpanelManager.initialize({ - hostApp: 'web', - hostAppDisplayName: 'Web App' - }) - - new Vue({ - router, - vuetify, - setup() { - provide(DefaultApolloClient, apolloProvider.defaultClient) - }, - render: (h) => h(App) - }).$mount('#app') -} - -async function init() { - const authToken = AppLocalStorage.get(LocalStorageKeys.AuthToken) - - // no auth token - check if we can resolve it from access code - if (!authToken) { - const gotToken = await checkAccessCodeAndGetTokens() - if (gotToken) { - // Remove access_code get param from current url - const url = new URL(window.location.href) - url.searchParams.delete('access_code') - window.history.replaceState({}, document.title, url.toString()) - } - } - - // try to retrieve user info with auth token - try { - await prefetchUserAndSetID(apolloProvider.defaultClient) - } catch (e) { - if (e instanceof InvalidAuthTokenError) { - // data retrieval failed and user was logged out - go to login page - window.location = `${window.location.origin}/authn/login` - return - } - - // Log and continue - console.error(e) - } - - // Init app - postAuthInit() -} -init() diff --git a/packages/frontend/src/main/components/activity/ListItemActivity.vue b/packages/frontend/src/main/components/activity/ListItemActivity.vue deleted file mode 100644 index e3db32010..000000000 --- a/packages/frontend/src/main/components/activity/ListItemActivity.vue +++ /dev/null @@ -1,596 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/activity/ListItemActivityDescription.vue b/packages/frontend/src/main/components/activity/ListItemActivityDescription.vue deleted file mode 100644 index b7fc09849..000000000 --- a/packages/frontend/src/main/components/activity/ListItemActivityDescription.vue +++ /dev/null @@ -1,133 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/activity/UserPill.vue b/packages/frontend/src/main/components/activity/UserPill.vue deleted file mode 100644 index d1980a65a..000000000 --- a/packages/frontend/src/main/components/activity/UserPill.vue +++ /dev/null @@ -1,60 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/admin/ActivityCard.vue b/packages/frontend/src/main/components/admin/ActivityCard.vue deleted file mode 100644 index 7e491ae87..000000000 --- a/packages/frontend/src/main/components/admin/ActivityCard.vue +++ /dev/null @@ -1,190 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/admin/AnimatedNumber.vue b/packages/frontend/src/main/components/admin/AnimatedNumber.vue deleted file mode 100644 index ef1cc3410..000000000 --- a/packages/frontend/src/main/components/admin/AnimatedNumber.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/admin/GeneralInfoCard.vue b/packages/frontend/src/main/components/admin/GeneralInfoCard.vue deleted file mode 100644 index dc24842d6..000000000 --- a/packages/frontend/src/main/components/admin/GeneralInfoCard.vue +++ /dev/null @@ -1,66 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/admin/StreamListItem.vue b/packages/frontend/src/main/components/admin/StreamListItem.vue deleted file mode 100644 index 3c65bd376..000000000 --- a/packages/frontend/src/main/components/admin/StreamListItem.vue +++ /dev/null @@ -1,66 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/admin/UsersListInviteItem.vue b/packages/frontend/src/main/components/admin/UsersListInviteItem.vue deleted file mode 100644 index 8137e93d8..000000000 --- a/packages/frontend/src/main/components/admin/UsersListInviteItem.vue +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/admin/UsersListItem.vue b/packages/frontend/src/main/components/admin/UsersListItem.vue deleted file mode 100644 index 3d382b06d..000000000 --- a/packages/frontend/src/main/components/admin/UsersListItem.vue +++ /dev/null @@ -1,48 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/admin/UsersListUserItem.vue b/packages/frontend/src/main/components/admin/UsersListUserItem.vue deleted file mode 100644 index 677a8cd64..000000000 --- a/packages/frontend/src/main/components/admin/UsersListUserItem.vue +++ /dev/null @@ -1,83 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/admin/VersionInfoCard.vue b/packages/frontend/src/main/components/admin/VersionInfoCard.vue deleted file mode 100644 index 8ad9823cf..000000000 --- a/packages/frontend/src/main/components/admin/VersionInfoCard.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/auth/AuthStrategies.vue b/packages/frontend/src/main/components/auth/AuthStrategies.vue deleted file mode 100644 index 753b3fa59..000000000 --- a/packages/frontend/src/main/components/auth/AuthStrategies.vue +++ /dev/null @@ -1,65 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/auth/LoginBlurb.vue b/packages/frontend/src/main/components/auth/LoginBlurb.vue deleted file mode 100644 index 0c8a861af..000000000 --- a/packages/frontend/src/main/components/auth/LoginBlurb.vue +++ /dev/null @@ -1,96 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/auth/UserAvatarAuthoriseApp.vue b/packages/frontend/src/main/components/auth/UserAvatarAuthoriseApp.vue deleted file mode 100644 index a00da55ff..000000000 --- a/packages/frontend/src/main/components/auth/UserAvatarAuthoriseApp.vue +++ /dev/null @@ -1,60 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/comments/CommentEditor.vue b/packages/frontend/src/main/components/comments/CommentEditor.vue deleted file mode 100644 index 73561160b..000000000 --- a/packages/frontend/src/main/components/comments/CommentEditor.vue +++ /dev/null @@ -1,251 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/comments/CommentListItem.vue b/packages/frontend/src/main/components/comments/CommentListItem.vue deleted file mode 100644 index f0a0355a8..000000000 --- a/packages/frontend/src/main/components/comments/CommentListItem.vue +++ /dev/null @@ -1,287 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/comments/CommentThreadAttachmentPreview.vue b/packages/frontend/src/main/components/comments/CommentThreadAttachmentPreview.vue deleted file mode 100644 index 102414284..000000000 --- a/packages/frontend/src/main/components/comments/CommentThreadAttachmentPreview.vue +++ /dev/null @@ -1,112 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/comments/CommentThreadReply.vue b/packages/frontend/src/main/components/comments/CommentThreadReply.vue deleted file mode 100644 index 9a410410d..000000000 --- a/packages/frontend/src/main/components/comments/CommentThreadReply.vue +++ /dev/null @@ -1,196 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/comments/CommentThreadReplyAttachments.vue b/packages/frontend/src/main/components/comments/CommentThreadReplyAttachments.vue deleted file mode 100644 index aaf0b6ccb..000000000 --- a/packages/frontend/src/main/components/comments/CommentThreadReplyAttachments.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/comments/CommentThreadViewer.vue b/packages/frontend/src/main/components/comments/CommentThreadViewer.vue deleted file mode 100644 index 589798b51..000000000 --- a/packages/frontend/src/main/components/comments/CommentThreadViewer.vue +++ /dev/null @@ -1,919 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/comments/CommentsViewerNavbar.vue b/packages/frontend/src/main/components/comments/CommentsViewerNavbar.vue deleted file mode 100644 index a4b8dce75..000000000 --- a/packages/frontend/src/main/components/comments/CommentsViewerNavbar.vue +++ /dev/null @@ -1,206 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/CommitPreviewCard.vue b/packages/frontend/src/main/components/common/CommitPreviewCard.vue deleted file mode 100644 index 9177cd727..000000000 --- a/packages/frontend/src/main/components/common/CommitPreviewCard.vue +++ /dev/null @@ -1,208 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/CommitReceivedReceipts.vue b/packages/frontend/src/main/components/common/CommitReceivedReceipts.vue deleted file mode 100644 index c64141c45..000000000 --- a/packages/frontend/src/main/components/common/CommitReceivedReceipts.vue +++ /dev/null @@ -1,147 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/ErrorPlaceholder.vue b/packages/frontend/src/main/components/common/ErrorPlaceholder.vue deleted file mode 100644 index e7677a6ae..000000000 --- a/packages/frontend/src/main/components/common/ErrorPlaceholder.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/GlobalLoading.vue b/packages/frontend/src/main/components/common/GlobalLoading.vue deleted file mode 100644 index 7eb4ac885..000000000 --- a/packages/frontend/src/main/components/common/GlobalLoading.vue +++ /dev/null @@ -1,20 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/GlobalToast.vue b/packages/frontend/src/main/components/common/GlobalToast.vue deleted file mode 100644 index b29c5318f..000000000 --- a/packages/frontend/src/main/components/common/GlobalToast.vue +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/NoDataPlaceholder.vue b/packages/frontend/src/main/components/common/NoDataPlaceholder.vue deleted file mode 100644 index b76161793..000000000 --- a/packages/frontend/src/main/components/common/NoDataPlaceholder.vue +++ /dev/null @@ -1,190 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/PagePlaceholder.vue b/packages/frontend/src/main/components/common/PagePlaceholder.vue deleted file mode 100644 index 1670e243f..000000000 --- a/packages/frontend/src/main/components/common/PagePlaceholder.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/PreviewImage.vue b/packages/frontend/src/main/components/common/PreviewImage.vue deleted file mode 100644 index f25641512..000000000 --- a/packages/frontend/src/main/components/common/PreviewImage.vue +++ /dev/null @@ -1,192 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/SearchBar.vue b/packages/frontend/src/main/components/common/SearchBar.vue deleted file mode 100644 index b5edc58fe..000000000 --- a/packages/frontend/src/main/components/common/SearchBar.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/SectionCard.vue b/packages/frontend/src/main/components/common/SectionCard.vue deleted file mode 100644 index 1b94a1b5b..000000000 --- a/packages/frontend/src/main/components/common/SectionCard.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/SourceAppAvatar.vue b/packages/frontend/src/main/components/common/SourceAppAvatar.vue deleted file mode 100644 index 74a276194..000000000 --- a/packages/frontend/src/main/components/common/SourceAppAvatar.vue +++ /dev/null @@ -1,47 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/SpeckleViewer.vue b/packages/frontend/src/main/components/common/SpeckleViewer.vue deleted file mode 100644 index 10e5bb9f3..000000000 --- a/packages/frontend/src/main/components/common/SpeckleViewer.vue +++ /dev/null @@ -1,143 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/StreamPreviewCard.vue b/packages/frontend/src/main/components/common/StreamPreviewCard.vue deleted file mode 100644 index cd4175367..000000000 --- a/packages/frontend/src/main/components/common/StreamPreviewCard.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/TextDotsTyping.vue b/packages/frontend/src/main/components/common/TextDotsTyping.vue deleted file mode 100644 index 2ba37f70f..000000000 --- a/packages/frontend/src/main/components/common/TextDotsTyping.vue +++ /dev/null @@ -1,58 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/UserAvatar.vue b/packages/frontend/src/main/components/common/UserAvatar.vue deleted file mode 100644 index b79e7c44c..000000000 --- a/packages/frontend/src/main/components/common/UserAvatar.vue +++ /dev/null @@ -1,131 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/UserAvatarIcon.vue b/packages/frontend/src/main/components/common/UserAvatarIcon.vue deleted file mode 100644 index c4bda1fb4..000000000 --- a/packages/frontend/src/main/components/common/UserAvatarIcon.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/UserRoleSelect.vue b/packages/frontend/src/main/components/common/UserRoleSelect.vue deleted file mode 100644 index 661cb162c..000000000 --- a/packages/frontend/src/main/components/common/UserRoleSelect.vue +++ /dev/null @@ -1,53 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/file-upload/FileUploadProgress.vue b/packages/frontend/src/main/components/common/file-upload/FileUploadProgress.vue deleted file mode 100644 index ea06a858f..000000000 --- a/packages/frontend/src/main/components/common/file-upload/FileUploadProgress.vue +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/file-upload/FileUploadProgressRow.vue b/packages/frontend/src/main/components/common/file-upload/FileUploadProgressRow.vue deleted file mode 100644 index 2318d5819..000000000 --- a/packages/frontend/src/main/components/common/file-upload/FileUploadProgressRow.vue +++ /dev/null @@ -1,112 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/file-upload/FileUploadZone.vue b/packages/frontend/src/main/components/common/file-upload/FileUploadZone.vue deleted file mode 100644 index 208774268..000000000 --- a/packages/frontend/src/main/components/common/file-upload/FileUploadZone.vue +++ /dev/null @@ -1,198 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/layout/BaseDialog.vue b/packages/frontend/src/main/components/common/layout/BaseDialog.vue deleted file mode 100644 index 22d782624..000000000 --- a/packages/frontend/src/main/components/common/layout/BaseDialog.vue +++ /dev/null @@ -1,70 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/layout/BasicPanel.vue b/packages/frontend/src/main/components/common/layout/BasicPanel.vue deleted file mode 100644 index 82fc731cf..000000000 --- a/packages/frontend/src/main/components/common/layout/BasicPanel.vue +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/packages/frontend/src/main/components/common/layout/RoundedButtonList.vue b/packages/frontend/src/main/components/common/layout/RoundedButtonList.vue deleted file mode 100644 index f9558d0de..000000000 --- a/packages/frontend/src/main/components/common/layout/RoundedButtonList.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/layout/rounded-button-list/RoundedButtonListItem.vue b/packages/frontend/src/main/components/common/layout/rounded-button-list/RoundedButtonListItem.vue deleted file mode 100644 index 77e1723db..000000000 --- a/packages/frontend/src/main/components/common/layout/rounded-button-list/RoundedButtonListItem.vue +++ /dev/null @@ -1,69 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/text-editor/SmartTextEditor.vue b/packages/frontend/src/main/components/common/text-editor/SmartTextEditor.vue deleted file mode 100644 index 1980e1ffc..000000000 --- a/packages/frontend/src/main/components/common/text-editor/SmartTextEditor.vue +++ /dev/null @@ -1,330 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorLinkDialog.vue b/packages/frontend/src/main/components/common/text-editor/SmartTextEditorLinkDialog.vue deleted file mode 100644 index e5be6e002..000000000 --- a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorLinkDialog.vue +++ /dev/null @@ -1,89 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorMentionList.vue b/packages/frontend/src/main/components/common/text-editor/SmartTextEditorMentionList.vue deleted file mode 100644 index a663fb673..000000000 --- a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorMentionList.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbar.vue b/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbar.vue deleted file mode 100644 index 801a8f140..000000000 --- a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbar.vue +++ /dev/null @@ -1,126 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbarBtn.vue b/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbarBtn.vue deleted file mode 100644 index 2f7fb45d1..000000000 --- a/packages/frontend/src/main/components/common/text-editor/SmartTextEditorToolbarBtn.vue +++ /dev/null @@ -1,22 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/common/utility/PrioritizedPortal.vue b/packages/frontend/src/main/components/common/utility/PrioritizedPortal.vue deleted file mode 100644 index b6bf4aeee..000000000 --- a/packages/frontend/src/main/components/common/utility/PrioritizedPortal.vue +++ /dev/null @@ -1,56 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/feed/FeedTimeline.vue b/packages/frontend/src/main/components/feed/FeedTimeline.vue deleted file mode 100644 index b6d686a4c..000000000 --- a/packages/frontend/src/main/components/feed/FeedTimeline.vue +++ /dev/null @@ -1,245 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/feed/LatestBlogposts.vue b/packages/frontend/src/main/components/feed/LatestBlogposts.vue deleted file mode 100644 index 156fd449d..000000000 --- a/packages/frontend/src/main/components/feed/LatestBlogposts.vue +++ /dev/null @@ -1,150 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/onboarding/GettingStartedSteps.vue b/packages/frontend/src/main/components/onboarding/GettingStartedSteps.vue deleted file mode 100644 index 1aae10441..000000000 --- a/packages/frontend/src/main/components/onboarding/GettingStartedSteps.vue +++ /dev/null @@ -1,395 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/CollaboratorsDisplay.vue b/packages/frontend/src/main/components/stream/CollaboratorsDisplay.vue deleted file mode 100644 index d68c5a71e..000000000 --- a/packages/frontend/src/main/components/stream/CollaboratorsDisplay.vue +++ /dev/null @@ -1,66 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/ListItemCommit.vue b/packages/frontend/src/main/components/stream/ListItemCommit.vue deleted file mode 100644 index 81932ddee..000000000 --- a/packages/frontend/src/main/components/stream/ListItemCommit.vue +++ /dev/null @@ -1,241 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/StreamAccessRequestBanner.vue b/packages/frontend/src/main/components/stream/StreamAccessRequestBanner.vue deleted file mode 100644 index f821790c9..000000000 --- a/packages/frontend/src/main/components/stream/StreamAccessRequestBanner.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/StreamActivity.vue b/packages/frontend/src/main/components/stream/StreamActivity.vue deleted file mode 100644 index 7f150118f..000000000 --- a/packages/frontend/src/main/components/stream/StreamActivity.vue +++ /dev/null @@ -1,135 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/StreamInviteBanner.vue b/packages/frontend/src/main/components/stream/StreamInviteBanner.vue deleted file mode 100644 index 2646f09f3..000000000 --- a/packages/frontend/src/main/components/stream/StreamInviteBanner.vue +++ /dev/null @@ -1,72 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/StreamInvitePlaceholder.vue b/packages/frontend/src/main/components/stream/StreamInvitePlaceholder.vue deleted file mode 100644 index 3f23cdfce..000000000 --- a/packages/frontend/src/main/components/stream/StreamInvitePlaceholder.vue +++ /dev/null @@ -1,57 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/UserStreamInviteBanners.vue b/packages/frontend/src/main/components/stream/UserStreamInviteBanners.vue deleted file mode 100644 index 77eff6c6d..000000000 --- a/packages/frontend/src/main/components/stream/UserStreamInviteBanners.vue +++ /dev/null @@ -1,37 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/WebhookForm.vue b/packages/frontend/src/main/components/stream/WebhookForm.vue deleted file mode 100644 index bdd0d4962..000000000 --- a/packages/frontend/src/main/components/stream/WebhookForm.vue +++ /dev/null @@ -1,244 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/branch/BranchSelect.vue b/packages/frontend/src/main/components/stream/branch/BranchSelect.vue deleted file mode 100644 index 586e1a6e7..000000000 --- a/packages/frontend/src/main/components/stream/branch/BranchSelect.vue +++ /dev/null @@ -1,53 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/collaborators/LeaveStreamPanel.vue b/packages/frontend/src/main/components/stream/collaborators/LeaveStreamPanel.vue deleted file mode 100644 index e1b9fc9f9..000000000 --- a/packages/frontend/src/main/components/stream/collaborators/LeaveStreamPanel.vue +++ /dev/null @@ -1,94 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/collaborators/StreamCollaboratorRow.vue b/packages/frontend/src/main/components/stream/collaborators/StreamCollaboratorRow.vue deleted file mode 100644 index 77257fc53..000000000 --- a/packages/frontend/src/main/components/stream/collaborators/StreamCollaboratorRow.vue +++ /dev/null @@ -1,75 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/collaborators/StreamPendingCollaboratorRow.vue b/packages/frontend/src/main/components/stream/collaborators/StreamPendingCollaboratorRow.vue deleted file mode 100644 index f35555a25..000000000 --- a/packages/frontend/src/main/components/stream/collaborators/StreamPendingCollaboratorRow.vue +++ /dev/null @@ -1,72 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/collaborators/StreamRoleCollaborators.vue b/packages/frontend/src/main/components/stream/collaborators/StreamRoleCollaborators.vue deleted file mode 100644 index 40e734681..000000000 --- a/packages/frontend/src/main/components/stream/collaborators/StreamRoleCollaborators.vue +++ /dev/null @@ -1,118 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/commit/CommitMultiSelectToolbar.vue b/packages/frontend/src/main/components/stream/commit/CommitMultiSelectToolbar.vue deleted file mode 100644 index 148fdeaaa..000000000 --- a/packages/frontend/src/main/components/stream/commit/CommitMultiSelectToolbar.vue +++ /dev/null @@ -1,79 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/commit/CommitShareBtn.vue b/packages/frontend/src/main/components/stream/commit/CommitShareBtn.vue deleted file mode 100644 index 918424df1..000000000 --- a/packages/frontend/src/main/components/stream/commit/CommitShareBtn.vue +++ /dev/null @@ -1,9 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/editor/StreamVisibilityToggle.vue b/packages/frontend/src/main/components/stream/editor/StreamVisibilityToggle.vue deleted file mode 100644 index 1f3b70f74..000000000 --- a/packages/frontend/src/main/components/stream/editor/StreamVisibilityToggle.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/favorites/FavoriteStreamsPlaceholder.vue b/packages/frontend/src/main/components/stream/favorites/FavoriteStreamsPlaceholder.vue deleted file mode 100644 index 3c14b5d1b..000000000 --- a/packages/frontend/src/main/components/stream/favorites/FavoriteStreamsPlaceholder.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/favorites/StreamFavoriteBtn.vue b/packages/frontend/src/main/components/stream/favorites/StreamFavoriteBtn.vue deleted file mode 100644 index ca9fcfa3f..000000000 --- a/packages/frontend/src/main/components/stream/favorites/StreamFavoriteBtn.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/globals/GlobalsBuilder.vue b/packages/frontend/src/main/components/stream/globals/GlobalsBuilder.vue deleted file mode 100644 index d23713aa3..000000000 --- a/packages/frontend/src/main/components/stream/globals/GlobalsBuilder.vue +++ /dev/null @@ -1,376 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/components/stream/globals/GlobalsEntry.vue b/packages/frontend/src/main/components/stream/globals/GlobalsEntry.vue deleted file mode 100644 index 81ef1afcc..000000000 --- a/packages/frontend/src/main/components/stream/globals/GlobalsEntry.vue +++ /dev/null @@ -1,322 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/stream/uploads/FileProcessingItem.vue b/packages/frontend/src/main/components/stream/uploads/FileProcessingItem.vue deleted file mode 100644 index be86bd030..000000000 --- a/packages/frontend/src/main/components/stream/uploads/FileProcessingItem.vue +++ /dev/null @@ -1,97 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/stream/uploads/FileUploadItem.vue b/packages/frontend/src/main/components/stream/uploads/FileUploadItem.vue deleted file mode 100644 index 33c027cb6..000000000 --- a/packages/frontend/src/main/components/stream/uploads/FileUploadItem.vue +++ /dev/null @@ -1,114 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/AppEditDialog.vue b/packages/frontend/src/main/components/user/AppEditDialog.vue deleted file mode 100644 index 30a2b4b20..000000000 --- a/packages/frontend/src/main/components/user/AppEditDialog.vue +++ /dev/null @@ -1,251 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/AppNewDialog.vue b/packages/frontend/src/main/components/user/AppNewDialog.vue deleted file mode 100644 index 9430a0338..000000000 --- a/packages/frontend/src/main/components/user/AppNewDialog.vue +++ /dev/null @@ -1,206 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/BasicUserInfoRow.vue b/packages/frontend/src/main/components/user/BasicUserInfoRow.vue deleted file mode 100644 index 9217695c4..000000000 --- a/packages/frontend/src/main/components/user/BasicUserInfoRow.vue +++ /dev/null @@ -1,60 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/EmailVerificationBanner.vue b/packages/frontend/src/main/components/user/EmailVerificationBanner.vue deleted file mode 100644 index 9f6d44b72..000000000 --- a/packages/frontend/src/main/components/user/EmailVerificationBanner.vue +++ /dev/null @@ -1,132 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/ListItemPersonalAccessToken.vue b/packages/frontend/src/main/components/user/ListItemPersonalAccessToken.vue deleted file mode 100644 index a99e5d79e..000000000 --- a/packages/frontend/src/main/components/user/ListItemPersonalAccessToken.vue +++ /dev/null @@ -1,77 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/ListItemStream.vue b/packages/frontend/src/main/components/user/ListItemStream.vue deleted file mode 100644 index febec9793..000000000 --- a/packages/frontend/src/main/components/user/ListItemStream.vue +++ /dev/null @@ -1,64 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/ListItemUserApp.vue b/packages/frontend/src/main/components/user/ListItemUserApp.vue deleted file mode 100644 index c6809c418..000000000 --- a/packages/frontend/src/main/components/user/ListItemUserApp.vue +++ /dev/null @@ -1,143 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/TokenDialog.vue b/packages/frontend/src/main/components/user/TokenDialog.vue deleted file mode 100644 index 4440edc51..000000000 --- a/packages/frontend/src/main/components/user/TokenDialog.vue +++ /dev/null @@ -1,140 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserAccessTokens.vue b/packages/frontend/src/main/components/user/UserAccessTokens.vue deleted file mode 100644 index fb94babdd..000000000 --- a/packages/frontend/src/main/components/user/UserAccessTokens.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserApps.vue b/packages/frontend/src/main/components/user/UserApps.vue deleted file mode 100644 index 17d4260a6..000000000 --- a/packages/frontend/src/main/components/user/UserApps.vue +++ /dev/null @@ -1,67 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserAuthorisedApps.vue b/packages/frontend/src/main/components/user/UserAuthorisedApps.vue deleted file mode 100644 index aebeddfd2..000000000 --- a/packages/frontend/src/main/components/user/UserAuthorisedApps.vue +++ /dev/null @@ -1,131 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserDeleteCard.vue b/packages/frontend/src/main/components/user/UserDeleteCard.vue deleted file mode 100644 index 24ec0a3f0..000000000 --- a/packages/frontend/src/main/components/user/UserDeleteCard.vue +++ /dev/null @@ -1,77 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserInfoCard.vue b/packages/frontend/src/main/components/user/UserInfoCard.vue deleted file mode 100644 index 639c0dbf2..000000000 --- a/packages/frontend/src/main/components/user/UserInfoCard.vue +++ /dev/null @@ -1,194 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/user/UserNotificationPreferences.vue b/packages/frontend/src/main/components/user/UserNotificationPreferences.vue deleted file mode 100644 index a065d3bad..000000000 --- a/packages/frontend/src/main/components/user/UserNotificationPreferences.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/CanonicalViews.vue b/packages/frontend/src/main/components/viewer/CanonicalViews.vue deleted file mode 100644 index 166b7502a..000000000 --- a/packages/frontend/src/main/components/viewer/CanonicalViews.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/CommentAddOverlay.vue b/packages/frontend/src/main/components/viewer/CommentAddOverlay.vue deleted file mode 100644 index 9df8cc353..000000000 --- a/packages/frontend/src/main/components/viewer/CommentAddOverlay.vue +++ /dev/null @@ -1,601 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/CommentsOverlay.vue b/packages/frontend/src/main/components/viewer/CommentsOverlay.vue deleted file mode 100644 index 56ab82729..000000000 --- a/packages/frontend/src/main/components/viewer/CommentsOverlay.vue +++ /dev/null @@ -1,748 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/CommitInfoResource.vue b/packages/frontend/src/main/components/viewer/CommitInfoResource.vue deleted file mode 100644 index 5e78b23ef..000000000 --- a/packages/frontend/src/main/components/viewer/CommitInfoResource.vue +++ /dev/null @@ -1,166 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/CommitObjectViewerScope.vue b/packages/frontend/src/main/components/viewer/CommitObjectViewerScope.vue deleted file mode 100644 index feaf6ba52..000000000 --- a/packages/frontend/src/main/components/viewer/CommitObjectViewerScope.vue +++ /dev/null @@ -1,35 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/FilterCategoryActive.vue b/packages/frontend/src/main/components/viewer/FilterCategoryActive.vue deleted file mode 100644 index c9ffcfe78..000000000 --- a/packages/frontend/src/main/components/viewer/FilterCategoryActive.vue +++ /dev/null @@ -1,193 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/FilterNumericActive.vue b/packages/frontend/src/main/components/viewer/FilterNumericActive.vue deleted file mode 100644 index 22ae1ab03..000000000 --- a/packages/frontend/src/main/components/viewer/FilterNumericActive.vue +++ /dev/null @@ -1,183 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/FilterRowSelect.vue b/packages/frontend/src/main/components/viewer/FilterRowSelect.vue deleted file mode 100644 index 87acb5e4c..000000000 --- a/packages/frontend/src/main/components/viewer/FilterRowSelect.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/LightsMenu.vue b/packages/frontend/src/main/components/viewer/LightsMenu.vue deleted file mode 100644 index 75a28b3bb..000000000 --- a/packages/frontend/src/main/components/viewer/LightsMenu.vue +++ /dev/null @@ -1,68 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/ObjectInfoResource.vue b/packages/frontend/src/main/components/viewer/ObjectInfoResource.vue deleted file mode 100644 index 7631cd511..000000000 --- a/packages/frontend/src/main/components/viewer/ObjectInfoResource.vue +++ /dev/null @@ -1,132 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/ObjectProperties.vue b/packages/frontend/src/main/components/viewer/ObjectProperties.vue deleted file mode 100644 index aab181a5b..000000000 --- a/packages/frontend/src/main/components/viewer/ObjectProperties.vue +++ /dev/null @@ -1,152 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/ObjectPropertiesRow.vue b/packages/frontend/src/main/components/viewer/ObjectPropertiesRow.vue deleted file mode 100644 index c668d9ddc..000000000 --- a/packages/frontend/src/main/components/viewer/ObjectPropertiesRow.vue +++ /dev/null @@ -1,324 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ObjectSelection.vue b/packages/frontend/src/main/components/viewer/ObjectSelection.vue deleted file mode 100644 index 6da556b0b..000000000 --- a/packages/frontend/src/main/components/viewer/ObjectSelection.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ResourceGroup.vue b/packages/frontend/src/main/components/viewer/ResourceGroup.vue deleted file mode 100644 index db9d89e91..000000000 --- a/packages/frontend/src/main/components/viewer/ResourceGroup.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ViewerBubbles.vue b/packages/frontend/src/main/components/viewer/ViewerBubbles.vue deleted file mode 100644 index 9f0b09fbc..000000000 --- a/packages/frontend/src/main/components/viewer/ViewerBubbles.vue +++ /dev/null @@ -1,570 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ViewerControls.vue b/packages/frontend/src/main/components/viewer/ViewerControls.vue deleted file mode 100644 index aed11ef3c..000000000 --- a/packages/frontend/src/main/components/viewer/ViewerControls.vue +++ /dev/null @@ -1,184 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ViewerFilters.vue b/packages/frontend/src/main/components/viewer/ViewerFilters.vue deleted file mode 100644 index 28310749b..000000000 --- a/packages/frontend/src/main/components/viewer/ViewerFilters.vue +++ /dev/null @@ -1,274 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/ViewsDisplay.vue b/packages/frontend/src/main/components/viewer/ViewsDisplay.vue deleted file mode 100644 index 77c637ccc..000000000 --- a/packages/frontend/src/main/components/viewer/ViewsDisplay.vue +++ /dev/null @@ -1,75 +0,0 @@ - - - diff --git a/packages/frontend/src/main/components/viewer/dialogs/AllCommits.vue b/packages/frontend/src/main/components/viewer/dialogs/AllCommits.vue deleted file mode 100644 index 530dfa091..000000000 --- a/packages/frontend/src/main/components/viewer/dialogs/AllCommits.vue +++ /dev/null @@ -1,118 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/dialogs/AllCommitsBranch.vue b/packages/frontend/src/main/components/viewer/dialogs/AllCommitsBranch.vue deleted file mode 100644 index 99e22248a..000000000 --- a/packages/frontend/src/main/components/viewer/dialogs/AllCommitsBranch.vue +++ /dev/null @@ -1,136 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/dialogs/StreamOverlayViewer.vue b/packages/frontend/src/main/components/viewer/dialogs/StreamOverlayViewer.vue deleted file mode 100644 index 98e987d21..000000000 --- a/packages/frontend/src/main/components/viewer/dialogs/StreamOverlayViewer.vue +++ /dev/null @@ -1,189 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/dialogs/ViewerHelp.vue b/packages/frontend/src/main/components/viewer/dialogs/ViewerHelp.vue deleted file mode 100644 index 7c5aab66b..000000000 --- a/packages/frontend/src/main/components/viewer/dialogs/ViewerHelp.vue +++ /dev/null @@ -1,64 +0,0 @@ - - diff --git a/packages/frontend/src/main/components/viewer/embed/EmbeddedCommitObjectViewer.vue b/packages/frontend/src/main/components/viewer/embed/EmbeddedCommitObjectViewer.vue deleted file mode 100644 index 8ff4711f1..000000000 --- a/packages/frontend/src/main/components/viewer/embed/EmbeddedCommitObjectViewer.vue +++ /dev/null @@ -1,176 +0,0 @@ - - - diff --git a/packages/frontend/src/main/dialogs/BranchEditDialog.vue b/packages/frontend/src/main/dialogs/BranchEditDialog.vue deleted file mode 100644 index 0a3195777..000000000 --- a/packages/frontend/src/main/dialogs/BranchEditDialog.vue +++ /dev/null @@ -1,269 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/CommitEdit.vue b/packages/frontend/src/main/dialogs/CommitEdit.vue deleted file mode 100644 index c2e7a7d44..000000000 --- a/packages/frontend/src/main/dialogs/CommitEdit.vue +++ /dev/null @@ -1,227 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/InviteDialog.vue b/packages/frontend/src/main/dialogs/InviteDialog.vue deleted file mode 100644 index 8b6e29733..000000000 --- a/packages/frontend/src/main/dialogs/InviteDialog.vue +++ /dev/null @@ -1,253 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/NewBranch.vue b/packages/frontend/src/main/dialogs/NewBranch.vue deleted file mode 100644 index 28ba2264e..000000000 --- a/packages/frontend/src/main/dialogs/NewBranch.vue +++ /dev/null @@ -1,123 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/NewSpeckle.vue b/packages/frontend/src/main/dialogs/NewSpeckle.vue deleted file mode 100644 index 07d762f9b..000000000 --- a/packages/frontend/src/main/dialogs/NewSpeckle.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - diff --git a/packages/frontend/src/main/dialogs/NewStream.vue b/packages/frontend/src/main/dialogs/NewStream.vue deleted file mode 100644 index ee818870f..000000000 --- a/packages/frontend/src/main/dialogs/NewStream.vue +++ /dev/null @@ -1,233 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/ShareStreamDialog.vue b/packages/frontend/src/main/dialogs/ShareStreamDialog.vue deleted file mode 100644 index 6d44db100..000000000 --- a/packages/frontend/src/main/dialogs/ShareStreamDialog.vue +++ /dev/null @@ -1,453 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/UserDeleteDialog.vue b/packages/frontend/src/main/dialogs/UserDeleteDialog.vue deleted file mode 100644 index 7f3da5330..000000000 --- a/packages/frontend/src/main/dialogs/UserDeleteDialog.vue +++ /dev/null @@ -1,108 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/UserEditDialog.vue b/packages/frontend/src/main/dialogs/UserEditDialog.vue deleted file mode 100644 index 775dd8fff..000000000 --- a/packages/frontend/src/main/dialogs/UserEditDialog.vue +++ /dev/null @@ -1,127 +0,0 @@ - - diff --git a/packages/frontend/src/main/dialogs/commit/CommitsBatchActionsDialog.vue b/packages/frontend/src/main/dialogs/commit/CommitsBatchActionsDialog.vue deleted file mode 100644 index a884e5b5b..000000000 --- a/packages/frontend/src/main/dialogs/commit/CommitsBatchActionsDialog.vue +++ /dev/null @@ -1,214 +0,0 @@ - - diff --git a/packages/frontend/src/main/layouts/TheAuth.vue b/packages/frontend/src/main/layouts/TheAuth.vue deleted file mode 100644 index b8636013a..000000000 --- a/packages/frontend/src/main/layouts/TheAuth.vue +++ /dev/null @@ -1,71 +0,0 @@ - - diff --git a/packages/frontend/src/main/layouts/TheBasic.vue b/packages/frontend/src/main/layouts/TheBasic.vue deleted file mode 100644 index 8e61ad665..000000000 --- a/packages/frontend/src/main/layouts/TheBasic.vue +++ /dev/null @@ -1,23 +0,0 @@ - - diff --git a/packages/frontend/src/main/layouts/TheMain.vue b/packages/frontend/src/main/layouts/TheMain.vue deleted file mode 100644 index 16fd2dfb1..000000000 --- a/packages/frontend/src/main/layouts/TheMain.vue +++ /dev/null @@ -1,185 +0,0 @@ - - - diff --git a/packages/frontend/src/main/lib/auth/composables/useValidatablePasswordEntry.ts b/packages/frontend/src/main/lib/auth/composables/useValidatablePasswordEntry.ts deleted file mode 100644 index b7792c805..000000000 --- a/packages/frontend/src/main/lib/auth/composables/useValidatablePasswordEntry.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { ValidatePasswordStrengthDocument } from '@/graphql/generated/graphql' -import { Nullable } from '@/helpers/typeHelpers' -import { useApolloClient } from '@vue/apollo-composable' -import { ref, watch } from 'vue' - -export function useValidatablePasswordEntry() { - const password = ref>(null) - const passwordConfirmation = ref>(null) - /** - * Strength value from 1 to 100. Its PasswordStrengthCheckResults.score times 25. - */ - const passwordStrength = ref>(null) - const passwordSuggestion = ref>(null) - - const apollo = useApolloClient() - - /** - * Re-check password strength - */ - const updatePasswordStrength = async () => { - if (!password.value) { - passwordStrength.value = 1 - passwordSuggestion.value = null - return - } - - const result = await apollo.client.query({ - query: ValidatePasswordStrengthDocument, - variables: { pwd: password.value } - }) - - passwordStrength.value = result.data.userPwdStrength.score * 25 - passwordSuggestion.value = - result.data.userPwdStrength.feedback.suggestions[0] || null - } - - /** - * Do basic validation - */ - const validatePassword = () => { - if (!password.value) { - throw new Error('Password is empty') - } - - if (password.value !== passwordConfirmation.value) { - throw new Error('Passwords do not match') - } - } - - /** - * Asynchronously validate that the password is strong enough - */ - const validatePasswordStrength = async () => { - await updatePasswordStrength() - if ((passwordStrength.value || 0) < 50) { - throw new Error('Password too weak') - } - } - - // Wipe old suggestion, if password is changed - watch(password, () => { - passwordStrength.value = 0 - passwordSuggestion.value = null - }) - - return { - password, - passwordConfirmation, - passwordStrength, - passwordSuggestion, - updatePasswordStrength, - validatePassword, - validatePasswordStrength - } -} diff --git a/packages/frontend/src/main/lib/auth/errors/index.ts b/packages/frontend/src/main/lib/auth/errors/index.ts deleted file mode 100644 index 1dc876515..000000000 --- a/packages/frontend/src/main/lib/auth/errors/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { BaseError } from '@/helpers/errorHelper' - -export class InvalidAuthTokenError extends BaseError { - static defaultMessage = 'Invalid auth token stored locally' -} diff --git a/packages/frontend/src/main/lib/auth/services/authService.ts b/packages/frontend/src/main/lib/auth/services/authService.ts deleted file mode 100644 index 398416a8d..000000000 --- a/packages/frontend/src/main/lib/auth/services/authService.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Nullable } from '@/helpers/typeHelpers' -import { - deletePostAuthRedirect, - getPostAuthRedirect -} from '@/main/lib/auth/utils/postAuthRedirectManager' -import { getCurrentQueryParams } from '@/main/lib/common/web-apis/helpers/urlHelper' -import { Route } from 'vue-router' - -/** - * Process a successful authentication (from login page, registration page or elsewhere) - */ -export function processSuccessfulAuth(res: Response): void { - // Redirect status means that auth was successful - if (!res.redirected) return - - // If we already have a preferred redirect URL, use that instead, but take the access_code - // from the incoming redirect URL - let redirectUrl = undefined - const postAuthRedirect = getPostAuthRedirect() - if (postAuthRedirect?.pathWithQuery) { - const accessCode = new URL(res.url).searchParams.get('access_code') - if (accessCode) { - const newUrl = new URL(postAuthRedirect.pathWithQuery, location.origin) - newUrl.searchParams.set('access_code', accessCode) - redirectUrl = newUrl.toString() - deletePostAuthRedirect() - } - } - - // Fallback to default redirect url - if (!redirectUrl) { - redirectUrl = res.url - } - - window.location.href = redirectUrl -} - -/** - * Get invite id from URL query string - */ -export function getInviteTokenFromURL(): Nullable { - const query = getCurrentQueryParams() - return query.get('token') || query.get('inviteId') -} - -/** - * Get invite id from VueRouter route, can be used instead of getInviteTokenFromURL() - * when you want the result to be reactive and dependant on the route object - */ -export function getInviteTokenFromRoute(route: Route): Nullable { - const query = route.query - return (query.token as string) || (query.inviteId as string) || null -} diff --git a/packages/frontend/src/main/lib/auth/utils/postAuthRedirectManager.ts b/packages/frontend/src/main/lib/auth/utils/postAuthRedirectManager.ts deleted file mode 100644 index 9594e532a..000000000 --- a/packages/frontend/src/main/lib/auth/utils/postAuthRedirectManager.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { LocalStorageKeys } from '@/helpers/mainConstants' -import { Optional, SafeLocalStorage } from '@speckle/shared' - -const expirationDateInSeconds = 60 * 5 // 5 min - -type PostAuthRedirectState = { - /** - * Path with querystring - */ - pathWithQuery: string - date: number -} - -export function setPostAuthRedirect(params: { pathWithQuery: string }) { - const { pathWithQuery } = params - const state: PostAuthRedirectState = { - pathWithQuery, - date: Date.now() - } - - SafeLocalStorage.set(LocalStorageKeys.ShouldRedirectTo, JSON.stringify(state)) -} - -export function getPostAuthRedirect(): Optional { - const stateString = SafeLocalStorage.get(LocalStorageKeys.ShouldRedirectTo) - if (!stateString) return undefined - - let state: Optional = undefined - try { - state = JSON.parse(stateString) as PostAuthRedirectState - if (!state?.pathWithQuery || !state.date) { - throw new Error('Invalid state struct') - } - - const currentTimestamp = Date.now() - if (state.date < currentTimestamp - expirationDateInSeconds * 1000) { - throw new Error('Expired state') - } - } catch (e) { - // wipe - deletePostAuthRedirect() - } - - return state -} - -export function deletePostAuthRedirect() { - SafeLocalStorage.remove(LocalStorageKeys.ShouldRedirectTo) -} diff --git a/packages/frontend/src/main/lib/common/apollo/helpers/apolloOperationHelper.ts b/packages/frontend/src/main/lib/common/apollo/helpers/apolloOperationHelper.ts deleted file mode 100644 index 276ee83da..000000000 --- a/packages/frontend/src/main/lib/common/apollo/helpers/apolloOperationHelper.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { isUndefinedOrVoid } from '@/helpers/typeHelpers' -import { - ApolloError, - FetchResult, - DataProxy, - ApolloCache, - defaultDataIdFromObject, - Reference -} from '@apollo/client/core' -import { GraphQLError } from 'graphql' - -/** - * Get a cached object's identifier - */ -export function getCacheId(typeName: string, id: string) { - const cachedId = defaultDataIdFromObject({ - __typename: typeName, - id - }) - if (!cachedId) throw new Error('Unable to build Apollo cache ID') - - return cachedId -} - -/** - * Convert an error thrown during $apollo.mutate() into a fetch result - */ -export function convertThrowIntoFetchResult(err: unknown): FetchResult { - let gqlErrors: readonly GraphQLError[] - if (err instanceof ApolloError) { - gqlErrors = err.graphQLErrors - } else if (err instanceof Error) { - gqlErrors = [new GraphQLError(err.message)] - } else { - gqlErrors = [new GraphQLError(`${err}` + '')] - } - - return { - data: undefined, - errors: gqlErrors - } -} - -/** - * Get first error message from a GQL errors array - */ -export function getFirstErrorMessage( - errs: readonly GraphQLError[] | undefined | null, - fallbackMessage = 'An unexpected issue occurred' -): string { - return errs?.[0]?.message || fallbackMessage -} - -/** - * Find some cached Apollo data through a fragment/query and use the updater function - * to return the replacement for the data that the fragment initially found - * @returns Whether an update was made - */ -export function updateCacheByFilter( - cache: ApolloCache, - filter: { - fragment?: DataProxy.Fragment - query?: DataProxy.Query - }, - /** - * If returns undefined/void, then updating is essentially canceled. Be careful not to - * mutate anything being passed into this function! E.g. if you want to mutate arrays, - * create new arrays through slice()/filter() instead - */ - updater: (data: TData) => TData | undefined | void, - options: Partial<{ - /** - * Whether to suppress errors that occur when the fragment being queried - * doesn't find anything - * Default: true - */ - ignoreCacheErrors: boolean - - /** - * Whether to overwrite the old cache results, instead of triggering a merge function - * to merge the old and new results. - * Default: true - */ - overwrite: boolean - }> = {} -): boolean { - const { fragment, query } = filter - const { ignoreCacheErrors = true, overwrite = true } = options - - if (!fragment && !query) { - throw new Error( - 'Either fragment or query must be specified to be able to find cached data to update' - ) - } - - const readData = (): TData | null => { - if (fragment) { - return cache.readFragment(fragment) - } else if (query) { - return cache.readQuery(query) - } else { - return null - } - } - - const writeData = (data: TData): boolean => { - if (fragment) { - cache.writeFragment({ ...fragment, data, overwrite }) - return true - } else if (query) { - cache.writeQuery({ ...query, data, overwrite }) - return true - } else { - return false - } - } - - try { - const currentData = readData() - if (!currentData) return false - - const newData = updater(currentData) - if (isUndefinedOrVoid(newData)) return false - - return writeData(newData) - } catch (e: unknown) { - if (ignoreCacheErrors) { - console.warn('Failed Apollo cache update', e) - return false - } - throw e - } -} - -/** - * Inside cache.modify calls you'll get these instead of full objects when reading fields that hold - * identifiable objects or object arrays - */ -export type CacheObjectReference = Reference - -/** - * Objects & object arrays in `cache.modify` calls are represented through reference objects, so - * if you want to add new ones you shouldn't add the entire object, but only its reference - */ -export function getObjectReference(typeName: string, id: string): CacheObjectReference { - return { - __ref: getCacheId(typeName, id) - } -} diff --git a/packages/frontend/src/main/lib/common/file-upload/blobStorageApi.ts b/packages/frontend/src/main/lib/common/file-upload/blobStorageApi.ts deleted file mode 100644 index 4f3098e0f..000000000 --- a/packages/frontend/src/main/lib/common/file-upload/blobStorageApi.ts +++ /dev/null @@ -1,220 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import Vue from 'vue' -import { - UploadableFileItem, - UploadFileItem -} from '@/main/lib/common/file-upload/fileUploadHelper' -import { getAuthToken } from '@/plugins/authHelpers' -import { clamp } from 'lodash' -import { BaseError } from '@/helpers/errorHelper' - -export type BlobPostResultItem = { - blobId?: string - fileName?: string - fileSize?: number - formKey: string - uploadStatus: number - uploadError: string -} - -type BlobUploadPrincipal = { - streamId: string -} - -export class BlobRetrievalError extends BaseError { - static defaultMessage = 'An error occurred while trying to retrieve the blob' -} - -/** - * Initiate a browser file download of the specified blob - * @param blobId - * @param fileName Download filename - * @param principal Owner of the blob - */ -export async function downloadBlobWithUrl( - blobId: string, - fileName: string, - principal: BlobUploadPrincipal -) { - const token = getAuthToken() - const res = await fetch(`/api/stream/${principal.streamId}/blob/${blobId}`, { - headers: token - ? { - Authorization: token - } - : undefined - }) - - if (res.status !== 200) { - throw new BlobRetrievalError() - } - - const blob = await res.blob() - const fileUrl = window.URL.createObjectURL(blob) - - const a = document.createElement('a') - a.setAttribute('style', 'display: none;') - a.setAttribute('href', fileUrl) - a.setAttribute('download', fileName) - document.body.appendChild(a) - - a.click() - a.remove() - window.URL.revokeObjectURL(fileUrl) -} - -/** - * Creates a string with a URL representing the blob. Use to display image previews, etc. - * @param blobId - * @param fileName Download filename - * @param principal Owner of the blob - */ -export async function getBlobUrl(blobId: string, principal: BlobUploadPrincipal) { - const token = getAuthToken() - const res = await fetch(`/api/stream/${principal.streamId}/blob/${blobId}`, { - headers: token - ? { - Authorization: token - } - : undefined - }) - - if (res.status !== 200) { - throw new BlobRetrievalError() - } - - const blob = await res.blob() - const fileUrl = window.URL.createObjectURL(blob) - return fileUrl -} - -/** - * Upload a single file and return an UploadFileItem - * @param file File emitted from FileUploadZone - * @param principal What entity should the file be attached to on the server - * @returns A Vue Observable UploadFileItem, it's reactive so you can watch it etc. inside - * your Vue components - */ -export function uploadFile( - file: UploadFileItem, - principal: BlobUploadPrincipal, - callback?: (file: UploadFileItem) => void -): UploadFileItem { - const cbWrapper = callback - ? (files: Record) => callback(Object.values(files)[0]) - : undefined - const results = uploadFiles([file], principal, cbWrapper) - return Object.values(results)[0] -} - -/** - * Upload files and return an UploadFileItem for each file (keyed by file ID) - * @param files Files emitted from FileUploadZone - * @param principal What entity should the file be attached to on the server - * @returns A map of Vue observable UploadFileItems (they're reactive), keyed by - * file.id - */ -export function uploadFiles( - files: UploadableFileItem[], - principal: BlobUploadPrincipal, - callback?: (files: Record) => void -): Record { - const authToken = getAuthToken() - const formData = new FormData() - const uploadFiles: Record = {} - - for (const file of files) { - // Actually upload the file only if it doesn't have an attached error - // & if it isn't already added - const hasError = file.error - if (!hasError && !uploadFiles[file.id]) { - formData.append(file.id, file.file) - } - - uploadFiles[file.id] = Vue.observable({ - ...file, - result: undefined, - progress: 0 - }) - } - - // Nothing to upload, return - if (![...formData.keys()].length) return uploadFiles - - // Init req - const req = new XMLHttpRequest() - req.open('POST', `/api/stream/${principal.streamId}/blob`) - req.responseType = 'json' - - if (authToken) { - req.setRequestHeader('Authorization', `Bearer ${authToken}`) - } - - req.upload.addEventListener('progress', (e) => { - const newProgress = clamp(Math.floor((e.loaded / e.total) * 100), 0, 100) - - for (const resultItem of Object.values(uploadFiles)) { - if (resultItem.error) continue - - resultItem.progress = newProgress - } - }) - - req.addEventListener('load', () => { - const uploadResults: BlobPostResultItem[] = (req.response?.uploadResults || - []) as BlobPostResultItem[] - for (const uploadFile of Object.values(uploadFiles)) { - if (uploadFile.error) continue - - uploadFile.progress = 100 - uploadFile.result = uploadResults.find((r) => r.formKey === uploadFile.id) || { - uploadError: 'Unable to resolve upload results', - uploadStatus: 2, - formKey: uploadFile.id - } - } - - if (callback) callback(uploadFiles) - }) - - req.addEventListener('error', () => { - const uploadResults: BlobPostResultItem[] = (req.response?.uploadResults || - []) as BlobPostResultItem[] - for (const uploadFile of Object.values(uploadFiles)) { - if (uploadFile.error) continue - - uploadFile.progress = 100 - uploadFile.result = uploadResults.find((r) => r.formKey === uploadFile.id) || { - uploadError: 'Upload request failed unexpectedly', - uploadStatus: 2, - formKey: uploadFile.id - } - } - - if (callback) callback(uploadFiles) - }) - - req.send(formData) - - return uploadFiles -} - -export class BlobDeleteFailedError extends BaseError { - static defaultMessage = 'Unable to delete the file' -} - -export async function deleteBlob(blobId: string, principal: BlobUploadPrincipal) { - const { streamId } = principal - const authToken = getAuthToken() - - const res = await fetch(`/api/stream/${streamId}/blob/${blobId}`, { - method: 'DELETE', - headers: { - ...(authToken ? { Authorization: `Bearer ${authToken}` } : {}) - } - }) - - if (res.status !== 204) { - throw new BlobDeleteFailedError() - } -} diff --git a/packages/frontend/src/main/lib/common/file-upload/fileUploadHelper.ts b/packages/frontend/src/main/lib/common/file-upload/fileUploadHelper.ts deleted file mode 100644 index dd35c712a..000000000 --- a/packages/frontend/src/main/lib/common/file-upload/fileUploadHelper.ts +++ /dev/null @@ -1,188 +0,0 @@ -import { BaseError } from '@/helpers/errorHelper' -import md5 from '@/helpers/md5' -import { Nullable, Optional } from '@/helpers/typeHelpers' -import { BlobPostResultItem } from '@/main/lib/common/file-upload/blobStorageApi' -import { difference, has, intersection } from 'lodash' - -/** - * A file, as emitted out from FileUploadZone - */ -export interface UploadableFileItem { - file: File - error: Nullable - /** - * You can use this ID to check for File equality - */ - id: string -} - -/** - * A file once it's upload has started - */ -export interface UploadFileItem extends UploadableFileItem { - /** - * Progress between 0 and 100 - */ - progress: number - - /** - * When upload has finished this contains a BlobPostResultItem - */ - result: Optional - - /** - * When a blob gets assigned to a resource, it should count as in use, and this will - * prevent it from being deleted as junk - */ - inUse?: boolean -} - -export type FilesSelectedEvent = { files: UploadableFileItem[] } - -export type FileUploadDeleteEvent = { id: string } - -export type FileTypeSpecifier = UniqueFileTypeSpecifier | `.${string}` - -export enum UniqueFileTypeSpecifier { - AnyAudio = 'audio/*', - AnyVideo = 'video/*', - AnyImage = 'image/*' -} - -function isUploadFileItem( - uploadable: UploadableFileItem -): uploadable is UploadFileItem { - return has(uploadable, 'progress') || has(uploadable, 'result') -} - -export function isSuccessfullyUploaded(upload: UploadFileItem): boolean { - return !!upload.result?.blobId -} - -/** - * Validate if the upload is fully processed (successfully or not) - */ -export function isUploadProcessed( - upload: UploadableFileItem | UploadFileItem -): boolean { - if (upload.error) return true - if (isUploadFileItem(upload)) { - return upload.progress >= 100 - } - - return false -} - -/** - * Validate if file has the allowed type. While we could also test for MIME types - * not in UniqueFileTypeSpecifier, this function is meant to be equivalent to the - * 'accept' attribute, which only allows for extensions or UniqueFileTypeSpecifier - * values. - * @param file - * @param allowedTypes The file must have one of these types - * @returns True if valid, Error object if not - */ -export function validateFileType( - file: File, - allowedTypes: FileTypeSpecifier[] -): true | Error { - // Check one of the unique file type specifiers first - const allowedUniqueTypes = intersection( - Object.values(UniqueFileTypeSpecifier), - allowedTypes - ) - for (const allowedUniqueType of allowedUniqueTypes) { - switch (allowedUniqueType) { - case UniqueFileTypeSpecifier.AnyAudio: - if (file.type.startsWith('audio')) return true - break - case UniqueFileTypeSpecifier.AnyImage: - if (file.type.startsWith('image')) return true - break - case UniqueFileTypeSpecifier.AnyVideo: - if (file.type.startsWith('video')) return true - break - } - } - - // Check file extensions - const allowedExtensions = difference(allowedTypes, allowedUniqueTypes) - const fileExt = resolveFileExtension(file.name) - if (!fileExt) return new MissingFileExtensionError() - - for (const allowedExtension of allowedExtensions) { - if (allowedExtension === fileExt.toLowerCase()) return true - } - - return new ForbiddenFileTypeError() -} - -/** - * Resolve file extension (with leading dot) - */ -export function resolveFileExtension(fileName: string): Nullable { - const ext = fileName.split('.').pop() || null - return ext ? `.${ext}` : null -} - -/** - * Check if string is a FileTypeSpecifier - */ -export function isFileTypeSpecifier(type: string): type is FileTypeSpecifier { - return ( - type.startsWith('.') || - Object.values(UniqueFileTypeSpecifier as Record).includes(type) - ) -} - -/** - * Create a human readable file size string from the numeric size in bytes - */ -export function prettyFileSize(sizeInBytes: number): string { - const removeTrailingZeroes = (fileSize: number) => - parseFloat(fileSize.toFixed(2)).toString() - - if (sizeInBytes < 1024) { - return `${sizeInBytes}bytes` - } - - const kbSize = sizeInBytes / 1024 - if (kbSize < 1024) { - return `${removeTrailingZeroes(kbSize)}KB` - } - - const mbSize = kbSize / 1024 - if (mbSize < 1024) { - return `${removeTrailingZeroes(mbSize)}MB` - } - - const gbSize = mbSize / 1024 - return `${removeTrailingZeroes(gbSize)}GB` -} - -/** - * Generate an ID that uniquely identifies a specific file. The same file - * will always have the same ID. - */ -export function generateFileId(file: File): string { - const importantData = { - name: file.name, - lastModified: file.lastModified, - size: file.size, - type: file.type - } - - return md5(JSON.stringify(importantData)) -} - -export class ForbiddenFileTypeError extends BaseError { - static defaultMessage = 'The selected file type is forbidden' -} - -export class MissingFileExtensionError extends BaseError { - static defaultMessage = 'The selected file has a missing extension' -} - -export class FileTooLargeError extends BaseError { - static defaultMessage = "The selected file's size is too large" -} diff --git a/packages/frontend/src/main/lib/common/general/helpers/errorHelper.ts b/packages/frontend/src/main/lib/common/general/helpers/errorHelper.ts deleted file mode 100644 index 368ef1ec2..000000000 --- a/packages/frontend/src/main/lib/common/general/helpers/errorHelper.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { BaseError } from '@/helpers/errorHelper' - -class UnexpectedErrorStructureError extends BaseError { - static defaultMessage = 'An unexpected error type was thrown' -} - -/** - * In JS catch clauses can receive not only Errors, but pretty much any other kind of data type, so - * you can use this helper to ensure that whatever is passed in is a real error - */ -export function ensureError(e: unknown, fallbackMessage?: string): Error { - if (e instanceof Error) return e - return new UnexpectedErrorStructureError(fallbackMessage) -} diff --git a/packages/frontend/src/main/lib/common/text-editor/documentHelper.ts b/packages/frontend/src/main/lib/common/text-editor/documentHelper.ts deleted file mode 100644 index 345d21ee8..000000000 --- a/packages/frontend/src/main/lib/common/text-editor/documentHelper.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { RichTextEditor } from '@speckle/shared' -import { JSONContent } from '@tiptap/core' - -const { isDocEmpty, documentToBasicString } = RichTextEditor -export { isDocEmpty, documentToBasicString } - -export type SmartTextEditorSchemaOptions = { - /** - * Whether the document supports multi-line input - */ - multiLine?: boolean -} - -export type SmartTextEditorOptions = { - /** - * Placeholder to show, if any - */ - placeholder?: string -} - -/** - * Create a TipTap document from basic text - */ -export function basicStringToDocument(text: string): JSONContent { - const textNode = { type: 'text', text } - return { - type: 'doc', - content: [{ type: 'paragraph', content: [textNode] }] - } -} diff --git a/packages/frontend/src/main/lib/common/text-editor/formattingHelpers.js b/packages/frontend/src/main/lib/common/text-editor/formattingHelpers.js deleted file mode 100644 index f56cc3c9f..000000000 --- a/packages/frontend/src/main/lib/common/text-editor/formattingHelpers.js +++ /dev/null @@ -1,11 +0,0 @@ -export const FormattingMarks = Object.freeze({ - Bold: 'bold', - Italic: 'italic', - Strikethrough: 'strike', - Underline: 'underline' -}) - -export const LinkOptions = Object.freeze({ - Link: 'link', - Unlink: 'unlink' -}) diff --git a/packages/frontend/src/main/lib/common/text-editor/mentionSuggestion.js b/packages/frontend/src/main/lib/common/text-editor/mentionSuggestion.js deleted file mode 100644 index 8944e4a03..000000000 --- a/packages/frontend/src/main/lib/common/text-editor/mentionSuggestion.js +++ /dev/null @@ -1,110 +0,0 @@ -import { VueRenderer } from '@tiptap/vue-2' -import SmartTextEditorMentionList from '@/main/components/common/text-editor/SmartTextEditorMentionList.vue' -import Popper from 'popper.js' -import vuetify from '@/plugins/vuetify' -import { getApolloProvider } from '@/config/apolloConfig' -import { userSearchQuery } from '@/graphql/user' - -/** - * @type {import('@tiptap/suggestion').SuggestionOptions} - */ -export const suggestion = { - items: async ({ query }) => { - if ((query?.length || 0) < 3) { - return undefined - } - - // Execute users search query - const client = getApolloProvider().defaultClient - const { data } = await client.query({ - query: userSearchQuery, - variables: { - query, - limit: 5, - archived: false - } - }) - - return data.userSearch.items - }, - - render: () => { - /** @type {import('@tiptap/vue-2').VueRenderer} */ - let component - /** @type {import('popper.js').default} */ - let popup - /** @type {Function} */ - let clickHandler - - const hidePopup = () => { - if (!popup) return - - popup.popper.style.display = 'none' - popup.update() - } - - return { - onStart: (props) => { - // Render mention list with popper.js (which we have because of v-tooltip) - component = new VueRenderer(SmartTextEditorMentionList, { - parent: undefined, - propsData: props, - vuetify - }) - document.getElementsByClassName('v-application')[0].append(component.element) - - if (!props.clientRect) { - return - } - - popup = new Popper( - { getBoundingClientRect: props.clientRect }, - component.element - ) - - // Init click handler for hiding when clicking outside of the popper - /** @param {MouseEvent} e */ - clickHandler = (e) => { - /** @type {Element} */ - const el = e.target - const popperEl = popup.popper - - if (el !== popperEl && !popperEl.contains(el)) { - hidePopup() - } - } - document.addEventListener('click', clickHandler) - document.addEventListener('touchend', clickHandler) - }, - - onUpdate(props) { - component.updateProps(props) - - if (!props.clientRect) { - return - } - - popup.reference.getBoundingClientRect = props.clientRect - popup.update() - }, - - onKeyDown(props) { - if (props.event.key === 'Escape') { - hidePopup() - return true - } - - return component.ref?.onKeyDown(props) - }, - - onExit() { - popup.destroy() - component.destroy() - component.element.remove() - - document.removeEventListener('click', clickHandler) - document.removeEventListener('touchend', clickHandler) - } - } - } -} diff --git a/packages/frontend/src/main/lib/common/text-editor/tipTapExtensions.js b/packages/frontend/src/main/lib/common/text-editor/tipTapExtensions.js deleted file mode 100644 index c15cf95f2..000000000 --- a/packages/frontend/src/main/lib/common/text-editor/tipTapExtensions.js +++ /dev/null @@ -1,223 +0,0 @@ -import Document from '@tiptap/extension-document' -import Paragraph from '@tiptap/extension-paragraph' -import Text from '@tiptap/extension-text' -import Underline from '@tiptap/extension-underline' -import Bold from '@tiptap/extension-bold' -import Italic from '@tiptap/extension-italic' -import Strike from '@tiptap/extension-strike' -import Link from '@tiptap/extension-link' -import HardBreak from '@tiptap/extension-hard-break' -import Mention from '@tiptap/extension-mention' -import History from '@tiptap/extension-history' -import Placeholder from '@tiptap/extension-placeholder' - -import { Node, Extension } from '@tiptap/core' -import { TextSelection } from 'prosemirror-state' -import { VALID_HTTP_URL } from '@/main/lib/common/vuetify/validators' - -import { suggestion } from '@/main/lib/common/text-editor/mentionSuggestion' - -/** - * Document node that only supports inline content (no paragraphs or line breaks) - */ -export const InlineDoc = Node.create({ - name: 'doc', - topNode: true, - content: 'block' -}) - -/** - * Used to track Enter events for submitting on enter etc. - */ -export const EnterKeypressTrackerExtension = Extension.create({ - name: 'enterKeypressTracker', - - addStorage() { - return { - /** - * Bizarre, but the TipTap extension storage is globally shared between all instances of - * the extension. This is why I have to store callbacks separately per editor instance - */ - editorCallbacks: new WeakMap(), - subscribe(editor, cb) { - const storage = editor.storage.enterKeypressTracker - const editorCallbacks = storage.editorCallbacks.get(editor) || [] - - const idx = editorCallbacks.indexOf(cb) - if (idx !== -1) return - - editorCallbacks.push(cb) - storage.editorCallbacks.set(editor, editorCallbacks) - }, - unsubscribe(editor, cb) { - const storage = editor.storage.enterKeypressTracker - const editorCallbacks = storage.editorCallbacks.get(editor) || [] - - const idx = editorCallbacks.indexOf(cb) - if (idx === -1) return - - editorCallbacks.splice(idx, 1) - storage.editorCallbacks.set(editor, editorCallbacks) - } - } - }, - - addKeyboardShortcuts() { - return { - Enter: () => { - const { storage, editor } = this - const callbacks = storage.editorCallbacks.get(editor) || [] - - if (!callbacks?.length) return false - - for (const cb of callbacks) { - cb() - } - - return true - } - } - } -}) - -/** - * Various useful utility commands - */ -export const UtilitiesExtension = Extension.create({ - name: 'speckleUtilities', - - /** - * Various utility functions that aren't TipTap commands - */ - addStorage() { - return { - /** - * Get currently selected text or null if no selection - * @param {import('@tiptap/core').Editor} editor - */ - getSelectedText: (editor) => { - const { from, to, empty } = editor.state.selection - - if (empty) { - return null - } - - return editor.state.doc.textBetween(from, to, ' ') - }, - - /** - * Get full text of the selected link node - * @param {import('@tiptap/core').Editor} editor - */ - getLinkText: (editor) => { - const { $from: pos } = editor.state.selection - if (!pos) return null - - // Check if link mark is inclusive, as this changes the child idx resolution algo - const isLinkInclusive = editor.schema.mark('link').type.spec.inclusive || false - - // Resolve link node's index using parent - let parentChildIdx = pos.index() - if (isLinkInclusive) { - // Since link is inclusive, if textOffset is 0 (the cursor is at the end of the link) we need - // to decrease index by 1 to get the actual link, not the next node - // Except if the cursor is at the very beginning (which is why we clamp it) - parentChildIdx = Math.max(0, pos.textOffset ? pos.index() : pos.index() - 1) - } - - const parent = pos.parent - const textNode = parent.child(parentChildIdx) - - // Check if actually a link - if (!textNode.marks.find((m) => m.type.name === 'link')) return null - - return textNode.textContent - } - } - }, - - /** - * Only add "commands" here (they should mutate the state of the editor and be transactional) - */ - addCommands() { - return { - /** - * Insert new link or update the one currently selected with a new title & URL - * @param {string} url - * @param {string} title - */ - addOrUpdateLink: (url, title) => (cmdProps) => { - const { chain } = cmdProps - const cmdChain = chain().focus() - - // Change selection to entire link, if part of it is selected - cmdChain.extendMarkRange('link') - - // Insert (& replace old, if selection isnt empty) new title - cmdChain.insertContent(title) - - // Select newly created text - cmdChain.command((cmdProps) => { - const { tr } = cmdProps - - // Select the newly added text - const selection = tr.selection - const $anchor = tr.selection.$anchor // insertContent() moves selection to the end of the new text - const $head = tr.doc.resolve(selection.anchor - title.length) - - const newSelection = new TextSelection($anchor, $head) - tr.setSelection(newSelection) - }) - - // Set it to be a link - cmdChain.setLink({ href: url }) - - // Collapse selection to point to the end of the link - cmdChain.command((cmdProps) => { - const { tr } = cmdProps - - const newSelection = new TextSelection(tr.selection.$to) - tr.setSelection(newSelection) - }) - - // Run chain - return cmdChain.run() - } - } - } -}) - -/** - * Get TipTap editor extensions that should be loaded in the editor - * @param {import('@/main/lib/common/text-editor/documentHelper').SmartTextEditorSchemaOptions} - * @param {import('@/main/lib/common/text-editor/documentHelper').SmartTextEditorOptions} - */ -export function getEditorExtensions({ multiLine = true } = {}, { placeholder } = {}) { - return [ - ...(multiLine ? [Document] : [InlineDoc, EnterKeypressTrackerExtension]), - HardBreak, - UtilitiesExtension, - Text, - Paragraph, - Bold, - Underline, - Italic, - Strike, - Link.configure({ - // Only allow http protocol links (no JS) - validate: (href) => VALID_HTTP_URL.test(href), - // Open on click would be too annoying during editing - openOnClick: false, - // Autolink off cause otherwise it's impossible to end the link - autolink: false - }), - Mention.configure({ - suggestion, - HTMLAttributes: { - class: 'editor-mention' - } - }), - History, - ...(placeholder ? [Placeholder.configure({ placeholder })] : []) - ] -} diff --git a/packages/frontend/src/main/lib/common/vuetify/validators.ts b/packages/frontend/src/main/lib/common/vuetify/validators.ts deleted file mode 100644 index 91fba6442..000000000 --- a/packages/frontend/src/main/lib/common/vuetify/validators.ts +++ /dev/null @@ -1,35 +0,0 @@ -import DOMPurify from 'dompurify' -import type { InputValidationRule } from 'vuetify' - -export const VALID_EMAIL_REGEX = - /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ - -export const VALID_HTTP_URL = /^https?:\/\// - -export const required = - (error = 'This field is required'): InputValidationRule => - (val: string) => - !!val || error - -export const email = - (error = 'Value must be a valid e-mail address'): InputValidationRule => - (val: string) => - VALID_EMAIL_REGEX.test(val) || error - -export const url = - (error = 'Value must be a valid URL'): InputValidationRule => - (val: string) => - VALID_HTTP_URL.test(val) || error - -export const maxLength = - (limit: number, error = 'Value is too long'): InputValidationRule => - (val: string) => - val.length <= limit || error - -export const noXss = - (error = 'No crazy hacks please'): InputValidationRule => - (val: string) => { - const pure = DOMPurify.sanitize(val) - if (pure !== val) return error - return true - } diff --git a/packages/frontend/src/main/lib/common/web-apis/helpers/urlHelper.ts b/packages/frontend/src/main/lib/common/web-apis/helpers/urlHelper.ts deleted file mode 100644 index 7535d5c16..000000000 --- a/packages/frontend/src/main/lib/common/web-apis/helpers/urlHelper.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function getCurrentQueryParams() { - return new URL(window.location.href).searchParams -} diff --git a/packages/frontend/src/main/lib/common/web-apis/mixins/windowResizeHandler.js b/packages/frontend/src/main/lib/common/web-apis/mixins/windowResizeHandler.js deleted file mode 100644 index 62e5cebd3..000000000 --- a/packages/frontend/src/main/lib/common/web-apis/mixins/windowResizeHandler.js +++ /dev/null @@ -1,37 +0,0 @@ -import { throttle, debounce } from 'lodash' - -/** - * Window resize handler mixin with debounce/throttle built in - */ - -export function buildResizeHandlerMixin({ shouldThrottle, wait } = {}) { - const waitTime = wait || 100 - - return { - mounted() { - this.resizeHandler = shouldThrottle - ? throttle(this.onWindowResize, waitTime) - : debounce(this.onWindowResize, waitTime) - window.addEventListener('resize', this.resizeHandler) - }, - beforeDestroy() { - window.removeEventListener('resize', this.resizeHandler) - }, - watch: { - '$vuetify.breakpoint': { - handler() { - // Vuetify breakpoint service sometimes kicks in late, so we're triggering - // a final update handler on next tick to make sure any code that depends on $vuetify.breakpoint - // can be updated as well - this.resizeHandler() - }, - deep: true - } - }, - methods: { - onWindowResize(e) { - console.warn('Resize handler mixin onWindowResize method not overridden!', e) - } - } - } -} diff --git a/packages/frontend/src/main/lib/core/composables/activeUser.ts b/packages/frontend/src/main/lib/core/composables/activeUser.ts deleted file mode 100644 index 1b52591ac..000000000 --- a/packages/frontend/src/main/lib/core/composables/activeUser.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { MainUserDataDocument } from '@/graphql/generated/graphql' -import { md5 } from '@speckle/shared' -import { useQuery } from '@vue/apollo-composable' -import { computed } from 'vue' -import { isAdmin, isGuest } from '@/main/lib/core/helpers/users' - -/** - * Get active user. - * undefined - not yet resolved - * null - resolved that user is a guest - */ -export function useActiveUser() { - const { result, refetch, onResult } = useQuery(MainUserDataDocument) - - const activeUser = computed(() => - result.value ? result.value.activeUser : undefined - ) - const isLoggedIn = computed(() => !!activeUser.value?.id) - const distinctId = computed(() => { - const user = activeUser.value - if (!user) return user // null or undefined - if (!user.email) return null - - return '@' + md5(user.email.toLowerCase()).toUpperCase() - }) - - const isAdminUser = computed(() => isAdmin(activeUser.value)) - const isServerGuest = computed(() => isGuest(activeUser.value)) - - return { - activeUser, - isLoggedIn, - distinctId, - refetch, - onResult, - isAdmin: isAdminUser, - isServerGuest - } -} diff --git a/packages/frontend/src/main/lib/core/composables/core.ts b/packages/frontend/src/main/lib/core/composables/core.ts deleted file mode 100644 index 9d4ae1597..000000000 --- a/packages/frontend/src/main/lib/core/composables/core.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { OverridedMixpanel } from 'mixpanel-browser' -import { getCurrentInstance, computed } from 'vue' -import { useQuery } from '@vue/apollo-composable' -import { IsLoggedInDocument } from '@/graphql/generated/graphql' -import { ComposableInvokedOutOfScopeError } from '@/main/lib/core/errors/composition' - -/** - * Get EventHub - */ -export function useEventHub() { - const vm = getCurrentInstance() - if (!vm) throw new ComposableInvokedOutOfScopeError() - - return vm.proxy.$eventHub -} - -/** - * Get Mixpanel instance (not reactive) - */ -export function useMixpanel(): OverridedMixpanel { - const vm = getCurrentInstance() - if (!vm) throw new ComposableInvokedOutOfScopeError() - - return vm.proxy.$mixpanel -} - -/** - * Composable that resolves user auth information through an Apollo query - */ -export function useIsLoggedIn() { - const { result } = useQuery(IsLoggedInDocument) - const userId = computed(() => result.value?.activeUser?.id) - const isLoggedIn = computed(() => !!userId.value) - return { isLoggedIn, userId } -} - -/** - * Get Vuetify - */ -export function useVuetify() { - const vm = getCurrentInstance() - if (!vm) throw new ComposableInvokedOutOfScopeError() - - return vm.proxy.$vuetify -} diff --git a/packages/frontend/src/main/lib/core/composables/dom.ts b/packages/frontend/src/main/lib/core/composables/dom.ts deleted file mode 100644 index 06eed5b70..000000000 --- a/packages/frontend/src/main/lib/core/composables/dom.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { useEventHub } from '@/main/lib/core/composables/core' -import { useRoute } from '@/main/lib/core/composables/router' -import Vue, { onBeforeUnmount, onMounted, Ref, ref, unref, watch } from 'vue' - -/** - * Sets up v-navigation-drawer autoresize (ask @dim how this works) - */ -export function useNavigationDrawerAutoResize(params: { - navRestWidth?: number - borderSize?: number - drawerRef: Ref | Vue -}) { - const { navRestWidth = 300, borderSize = 3, drawerRef } = params - const navWidth = ref(navRestWidth) - const minSize = borderSize - - const route = useRoute() - const eventHub = useEventHub() - const drawerEl = () => { - const comp = unref(drawerRef) - if (!comp) - throw new Error( - "Couldn't resolve drawer ref! Is it returned from the setup function?" - ) - - return comp.$el as HTMLElement - } - - // Adjust navigation width according to route metadata - watch( - () => route, - (to) => { - if (!to.meta?.resizableNavbar) { - navWidth.value = navRestWidth - } - if (to.meta?.resizableNavbar && window.__lastNavSize) { - navWidth.value = window.__lastNavSize - } - }, - { immediate: true } - ) - - function onMouseMove(e: MouseEvent) { - e.preventDefault() - const el = drawerEl() - - const maxWidth = document.body.offsetWidth / 2 - const minWidth = 300 - - document.body.style.cursor = 'ew-resize' - if (!(e.clientX > maxWidth || e.clientX < minWidth)) { - el.style.width = e.clientX + 'px' - window.__lastNavSize = e.clientX - } - } - - function onMouseDown(e: MouseEvent) { - e.preventDefault() - const el = drawerEl() - - if (e.offsetX < minSize) { - el.style.transition = 'initial' - document.addEventListener('mousemove', onMouseMove, false) - } - } - - function onMouseUp(e: MouseEvent) { - e.preventDefault() - const el = drawerEl() - - el.style.transition = '' - document.body.style.cursor = '' - navWidth.value = el.style.width - document.removeEventListener('mousemove', onMouseMove, false) - setTimeout(() => { - // @Dim: Why are we resizing the viewer here? We generally want to avoid needless resizes - eventHub.$emit('resize-viewer') - }, 300) - } - - // Setup resize events - onMounted(() => { - const el = drawerEl() - const drawerBorder = el.querySelector('.nav-resizer') - if (drawerBorder) { - drawerBorder.style.cursor = 'ew-resize' - drawerBorder.addEventListener('mousedown', onMouseDown, false) - } - - document.addEventListener('mouseup', onMouseUp, false) - }) - - // Unsub events - onBeforeUnmount(() => { - const el = drawerEl() - const drawerBorder = el.querySelector('.nav-resizer') - - if (drawerBorder) { - drawerBorder.removeEventListener('mousedown', onMouseDown) - } - - document.removeEventListener('mouseup', onMouseUp) - document.removeEventListener('mousemove', onMouseMove) - }) - - return { - navWidth - } -} diff --git a/packages/frontend/src/main/lib/core/composables/notifications.ts b/packages/frontend/src/main/lib/core/composables/notifications.ts deleted file mode 100644 index 0a1aee641..000000000 --- a/packages/frontend/src/main/lib/core/composables/notifications.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { Nullable } from '@/helpers/typeHelpers' -import { useEventHub } from '@/main/lib/core/composables/core' -import { - GlobalEvents, - NotificationEventPayload, - ToastNotificationType -} from '@/main/lib/core/helpers/eventHubHelper' -import Vue, { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue' - -const globalToastState = Vue.observable({ - isInitialized: false, - queuedNotifications: [] as NotificationEventPayload[] -}) - -const isInitialized = () => !!globalToastState.isInitialized -const queuedNotifications = () => globalToastState.queuedNotifications -const resetQueue = () => (globalToastState.queuedNotifications = []) -const queueNotification = (e: NotificationEventPayload) => { - const notifications = queuedNotifications().slice() - notifications.push(e) - Vue.set(globalToastState, 'queuedNotifications', notifications) -} - -/** - * Invoke this only in GlobalToast.vue to properly initialize it - */ -export function setupGlobalToast() { - const eventHub = useEventHub() - - const snack = ref(false) - const text = ref(null as Nullable) - const actionName = ref(null as Nullable) - const to = ref(null as Nullable) - const type = ref('primary' as ToastNotificationType) - - const color = computed((): ToastNotificationType => type.value || 'primary') - - watch(snack, (newVal) => { - if (!newVal) { - text.value = null - actionName.value = null - to.value = null - } - }) - - const handleEvent = (e: NotificationEventPayload) => { - // first set snack.value to false so that the previous notification gets removed - // then wait for next tick so that we're sure vuetify has reset the timeout - snack.value = false - nextTick().then(() => { - snack.value = true - text.value = e.text - actionName.value = e.action ? e.action.name : null - to.value = e.action ? e.action.to : null - type.value = e.type || 'primary' - }) - } - - onMounted(() => { - Vue.set(globalToastState, 'isInitialized', true) - - eventHub.$on(GlobalEvents.Notification, handleEvent) - - const queue = queuedNotifications() - for (const queueItem of queue) { - handleEvent(queueItem) - } - resetQueue() - }) - - onUnmounted(() => { - Vue.set(globalToastState, 'isInitialized', false) - - eventHub.$off(GlobalEvents.Notification, handleEvent) - }) - - return { - snack, - text, - actionName, - to, - type, - color - } -} - -/** - * Trigger notification or queue it up to be triggered when GlobalToast.vue is ready - */ -export async function triggerToastNotification( - eventHub: Vue, - e: NotificationEventPayload -) { - if (isInitialized()) { - eventHub.$emit(GlobalEvents.Notification, e) - } else { - queueNotification(e) - } -} - -/** - * Allows you to emit toast notifications - */ -export function useGlobalToast() { - const eventHub = useEventHub() - - return { - /** - * Trigger a toast notification - */ - triggerNotification: (args: NotificationEventPayload) => { - triggerToastNotification(eventHub, args) - } - } -} diff --git a/packages/frontend/src/main/lib/core/composables/router.ts b/packages/frontend/src/main/lib/core/composables/router.ts deleted file mode 100644 index c942d8d14..000000000 --- a/packages/frontend/src/main/lib/core/composables/router.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Optional } from '@/helpers/typeHelpers' -import { ComposableInvokedOutOfScopeError } from '@/main/lib/core/errors/composition' -import { getCurrentInstance, reactive } from 'vue' -import VueRouter, { Route } from 'vue-router' - -let currentRoute: Optional - -/** - * Get router (not reactive) - */ -export function useRouter(): VueRouter { - const vm = getCurrentInstance() - if (!vm) throw new ComposableInvokedOutOfScopeError() - - return vm.proxy.$router -} - -/** - * Get current route object (reactive) - */ -export function useRoute(): Route { - if (currentRoute) return currentRoute - - const router = useRouter() - const vm = getCurrentInstance() - if (!vm) throw new ComposableInvokedOutOfScopeError() - - const newRoute = reactive({ ...vm.proxy.$route } as Route) - router.afterEach((to) => { - Object.assign(newRoute, to) - }) - currentRoute = newRoute - - return newRoute -} diff --git a/packages/frontend/src/main/lib/core/composables/server.ts b/packages/frontend/src/main/lib/core/composables/server.ts deleted file mode 100644 index c96ee25be..000000000 --- a/packages/frontend/src/main/lib/core/composables/server.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { MainServerInfoDocument } from '@/graphql/generated/graphql' -import { useQuery } from '@vue/apollo-composable' -import { computed } from 'vue' - -export function useServerInfo() { - const { result } = useQuery(MainServerInfoDocument) - - const serverInfo = computed(() => result.value?.serverInfo) - const isGuestMode = computed(() => !!serverInfo.value?.guestModeEnabled) - - return { serverInfo, isGuestMode } -} - -export function useFE2Messaging() { - const { serverInfo } = useServerInfo() - const fe2MessagingEnabled = computed( - () => serverInfo.value?.enableNewWebUiMessaging || false - ) - const migrationMovedTo = computed( - () => serverInfo.value?.migration?.movedTo || 'https://app.speckle.systems' - ) - return { fe2MessagingEnabled, migrationMovedTo } -} diff --git a/packages/frontend/src/main/lib/core/errors/composition.ts b/packages/frontend/src/main/lib/core/errors/composition.ts deleted file mode 100644 index 8e16a4994..000000000 --- a/packages/frontend/src/main/lib/core/errors/composition.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { BaseError } from '@/helpers/errorHelper' - -export class ComposableInvokedOutOfScopeError extends BaseError { - static defaultMessage = - 'getCurrentInstance() returned null. Method must be called at the top of a setup function' -} diff --git a/packages/frontend/src/main/lib/core/helpers/apolloSetupHelper.ts b/packages/frontend/src/main/lib/core/helpers/apolloSetupHelper.ts deleted file mode 100644 index d0bb81af5..000000000 --- a/packages/frontend/src/main/lib/core/helpers/apolloSetupHelper.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Optional } from '@/helpers/typeHelpers' -import { FieldMergeFunction } from '@apollo/client/core' - -interface AbstractCollection { - __typename: T - totalCount: number - cursor: string | null - items: Record[] -} - -/** - * Build an Apollo merge function for a field that returns a collection like AbstractCollection - * @param {{}} [param0] - * @param {boolean} [param0.checkIdentity] Set to false if you want to merge incoming items without checking - * for duplicates. Usually you don't want to do this as you can introduce duplicates this way. - * @param {string} [param0.identityProp] Optionally change the prop that should be used to compare - * equality between items - */ -export function buildAbstractCollectionMergeFunction( - typeName: T, - { checkIdentity = true, identityProp = '__ref' } = {} -): FieldMergeFunction>, AbstractCollection> { - return ( - existing: Optional>, - incoming: AbstractCollection - ) => { - const existingItems = existing?.items || [] - const incomingItems = incoming?.items || [] - - let finalItems: Record[] - if (checkIdentity) { - finalItems = [...existingItems] - for (const newItem of incomingItems) { - if ( - finalItems.findIndex( - (item) => item[identityProp] === newItem[identityProp] - ) === -1 - ) { - finalItems.push(newItem) - } - } - } else { - finalItems = [...existingItems, ...incomingItems] - } - - return { - __typename: incoming?.__typename || existing?.__typename || typeName, - totalCount: incoming.totalCount || 0, - cursor: incoming.cursor || null, - items: finalItems - } - } -} - -/** - * Merge function that just takes incoming data and overrides all of old data with it - * Useful for array fields w/o pagination, where a new array response is supposed to replace - * the entire old one - */ -export const incomingOverwritesExistingMergeFunction: FieldMergeFunction = ( - _existing: unknown, - incoming: unknown -) => incoming diff --git a/packages/frontend/src/main/lib/core/helpers/eventHubHelper.ts b/packages/frontend/src/main/lib/core/helpers/eventHubHelper.ts deleted file mode 100644 index 92a48ffea..000000000 --- a/packages/frontend/src/main/lib/core/helpers/eventHubHelper.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * EVENT BRIDGE/BUS EVENTS - */ - -export type ToastNotificationType = 'primary' | 'success' | 'error' - -export type NotificationEventPayload = { - text: string - action?: { name: string; to: string } - type?: ToastNotificationType -} - -/** - * Global app events - */ -export const GlobalEvents = Object.freeze({ - /** - * For emitting a global toast notification - */ - Notification: 'notification', - /** - * Emits 'true' when moving to a new route and 'false' once loading is done - */ - PageLoading: 'page-load' -}) - -/** - * Stream page events - */ -export const StreamEvents = Object.freeze({ - /** - * For triggering a refetch of main stream data - */ - Refetch: 'stream:refetch', - - /** - * For triggering a refetch of stream collaborator data - */ - RefetchCollaborators: 'stream:refetch:collaborators', - - /** - * For triggering a refetch of stream branch data - */ - RefetchBranches: 'stream:refetch:branches' -}) diff --git a/packages/frontend/src/main/lib/core/helpers/users.ts b/packages/frontend/src/main/lib/core/helpers/users.ts deleted file mode 100644 index 78f2f4ce8..000000000 --- a/packages/frontend/src/main/lib/core/helpers/users.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Nullable, Roles } from '@speckle/shared' - -export function isGuest(user?: Nullable<{ role?: Nullable }>) { - return user?.role === Roles.Server.Guest -} - -export function isAdmin(user?: Nullable<{ role?: Nullable }>) { - return user?.role === Roles.Server.Admin -} diff --git a/packages/frontend/src/main/lib/core/mixins/isLoggedInMixin.ts b/packages/frontend/src/main/lib/core/mixins/isLoggedInMixin.ts deleted file mode 100644 index b56bcb4b0..000000000 --- a/packages/frontend/src/main/lib/core/mixins/isLoggedInMixin.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Vue from 'vue' -import { IsLoggedInDocument, IsLoggedInQuery } from '@/graphql/generated/graphql' -/** - * Mixin for checking if user is logged in through Apollo Client. Use the reactive 'isLoggedIn' data property - * to check if a user is logged in. - */ -export const IsLoggedInMixin = Vue.extend({ - data: () => ({ - /** - * Whether or not the user is currently logged in. Resolved through - * the `user` query. - */ - isLoggedIn: false - }), - apollo: { - isLoggedIn: { - query: IsLoggedInDocument, - update: (data: IsLoggedInQuery) => !!data.activeUser?.id - } - } -}) diff --git a/packages/frontend/src/main/lib/core/utils/appErrorStateManager.ts b/packages/frontend/src/main/lib/core/utils/appErrorStateManager.ts deleted file mode 100644 index 2b4364bde..000000000 --- a/packages/frontend/src/main/lib/core/utils/appErrorStateManager.ts +++ /dev/null @@ -1,25 +0,0 @@ -import * as Observability from '@speckle/shared/dist/esm/observability/index' -import Vue from 'vue' - -const ENTER_STATE_AT_ERRORS_PER_MIN = 100 - -const state = Vue.observable({ - inErrorState: false -}) - -const errorRpm = Observability.simpleRpmCounter() - -export function isErrorState() { - return !!state.inErrorState -} - -export function registerError() { - const epm = errorRpm.hit() - - if (!isErrorState() && epm >= ENTER_STATE_AT_ERRORS_PER_MIN) { - console.error( - `Too many errors (${epm} errors per minute), entering app error state!` - ) - state.inErrorState = true - } -} diff --git a/packages/frontend/src/main/lib/feed/helpers/activityStream.ts b/packages/frontend/src/main/lib/feed/helpers/activityStream.ts deleted file mode 100644 index e5bed2530..000000000 --- a/packages/frontend/src/main/lib/feed/helpers/activityStream.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Activity stream item action types that shouldn't be displayed in the FE - */ -export const SKIPPABLE_ACTION_TYPES = [ - 'stream_invite_sent', - 'stream_invite_declined', - 'stream_access_request_sent', - 'stream_access_request_declined' -] - -export const STREAM_CREATED_TYPES = ['stream_create', 'stream_clone'] diff --git a/packages/frontend/src/main/lib/stream/composables/branches.ts b/packages/frontend/src/main/lib/stream/composables/branches.ts deleted file mode 100644 index 2fd106e78..000000000 --- a/packages/frontend/src/main/lib/stream/composables/branches.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ref, Ref } from 'vue' -import { computed } from 'vue' - -import { useQuery, useQueryLoading } from '@vue/apollo-composable' -import { StreamAllBranchesDocument } from '@/graphql/generated/graphql' -import { Nullable } from '@speckle/shared' - -export function useAllStreamBranches(streamId: Ref) { - const { - result: branchesResult, - fetchMore: branchesFetchMore, - refetch: refetchBranches, - onResult - } = useQuery( - StreamAllBranchesDocument, - () => ({ streamId: streamId.value, cursor: null as Nullable }), - { fetchPolicy: 'no-cache' } - ) - - const localBranches = computed( - () => branchesResult.value?.stream?.branches?.items || [] - ) - - const totalBranchCount = computed( - () => branchesResult.value?.stream?.branches?.totalCount || 0 - ) - - const branchesLoading = useQueryLoading() - - // Keep fetching until no more branches found - const currentCursor = ref(null as Nullable) - onResult((res) => { - if (res.errors?.length) return - - const newCursor = res.data?.stream?.branches?.cursor || null - const newItems = res.data?.stream?.branches?.items || [] - - if (newItems.length && newCursor && newCursor !== currentCursor.value) { - currentCursor.value = newCursor - branchesFetchMore({ - variables: { cursor: newCursor } - }) - } - }) - - const refetchBranchesWrapper: typeof refetchBranches = (...args) => { - currentCursor.value = null - return refetchBranches(...args) - } - - return { - localBranches, - refetchBranches: refetchBranchesWrapper, - totalBranchCount, - branchesLoading - } -} diff --git a/packages/frontend/src/main/lib/stream/composables/commitMultiActions.ts b/packages/frontend/src/main/lib/stream/composables/commitMultiActions.ts deleted file mode 100644 index 29783f145..000000000 --- a/packages/frontend/src/main/lib/stream/composables/commitMultiActions.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { SetupProps } from '@/helpers/typeHelpers' -import { BatchActionType } from '@/main/lib/stream/services/commitMultiActions' -import { ref, computed, SetupContext } from 'vue' - -export { BatchActionType } - -/** - * Composable for setting up commit multi-select & actions like delete, move etc. - */ -export function useCommitMultiActions() { - const selectedCommitsState = ref({} as Record) - const selectedCommitIds = computed(() => { - const results: string[] = [] - for (const [key, val] of Object.entries(selectedCommitsState.value)) { - if (val) results.push(key) - } - - return results - }) - - const clearSelectedCommits = () => { - selectedCommitsState.value = {} - } - - const hasSelectedCommits = computed(() => selectedCommitIds.value.length > 0) - - return { - /** - * Selected commit IDs (read-only) - */ - selectedCommitIds, - /** - * Object with selected commit keys and bool values - */ - selectedCommitsState, - /** - * Whether there are any selected commit ids - */ - hasSelectedCommits, - /** - * Clear selected commits - */ - clearSelectedCommits - } -} - -/** - * Use inside a component that represents a commit that can be selected (e.g. for batch actions) - */ -export function useSelectableCommit( - props: SetupProps<{ - selectable: boolean - selectDisabled: boolean - selected: boolean - }>, - ctx: SetupContext -) { - const canBeSelected = computed(() => props.selectable && !props.selectDisabled) - - const selectedState = computed({ - get: () => (canBeSelected.value ? props.selected : false), - set: (newVal) => ctx.emit('update:selected', canBeSelected.value ? !!newVal : false) - }) - const highlighted = computed(() => selectedState.value) - const onSelect = () => ctx.emit('select', { value: selectedState.value }) - - return { - highlighted, - onSelect, - selectedState - } -} diff --git a/packages/frontend/src/main/lib/stream/helpers/branches.ts b/packages/frontend/src/main/lib/stream/helpers/branches.ts deleted file mode 100644 index 15f1da673..000000000 --- a/packages/frontend/src/main/lib/stream/helpers/branches.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const formatBranchNameForURL = (branchName: string) => - encodeURIComponent(branchName || '') diff --git a/packages/frontend/src/main/lib/stream/mixins/streamInviteMixin.ts b/packages/frontend/src/main/lib/stream/mixins/streamInviteMixin.ts deleted file mode 100644 index ae31a1861..000000000 --- a/packages/frontend/src/main/lib/stream/mixins/streamInviteMixin.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { - StreamInviteQuery, - StreamInviteDocument, - UserStreamInvitesQuery, - UserStreamInvitesDocument, - UseStreamInviteDocument -} from '@/graphql/generated/graphql' -import { MaybeFalsy, Nullable, vueWithMixins } from '@/helpers/typeHelpers' -import { convertThrowIntoFetchResult } from '@/main/lib/common/apollo/helpers/apolloOperationHelper' -import { StreamEvents } from '@/main/lib/core/helpers/eventHubHelper' -import { IsLoggedInMixin } from '@/main/lib/core/mixins/isLoggedInMixin' -import type { Get } from 'type-fest' -import { PropType } from 'vue' - -export type StreamInviteType = NonNullable> - -/** - * Mixin for getting the invite to the current stream, if any, and accepting/declining it - * - * Extends isLoggedInMixin, so you have access to that as well - */ -export const UsersStreamInviteMixin = vueWithMixins(IsLoggedInMixin).extend({ - props: { - streamInvite: { - type: Object as PropType, - required: true - }, - inviteToken: { - type: String as PropType>, - default: null - }, - autoAccept: { - type: Boolean, - default: false - } - }, - data: () => ({ - streamInviteClosed: false - }), - computed: { - streamId(): string { - return this.streamInvite.streamId - }, - inviteId(): string { - return this.streamInvite.inviteId - }, - token(): Nullable { - return this.streamInvite.token || this.inviteToken || null - }, - streamInviter(): NonNullable> { - return this.streamInvite.invitedBy - }, - hasInvite(): boolean { - return !!(this.streamInvite && !this.streamInviteClosed) - }, - streamName(): string { - return this.streamInvite.streamName - }, - linkToStream(): string { - return `/streams/${this.streamId}` - } - }, - methods: { - acceptInvite() { - return this.processInvite(true) - }, - declineInvite() { - return this.processInvite(false) - }, - rememberInviteAndRedirectToLogin() { - this.$loginAndSetRedirect() - }, - async processInvite(accept: boolean) { - if (!this.token) return - - const { data, errors } = await this.$apollo - .mutate({ - mutation: UseStreamInviteDocument, - variables: { - accept, - streamId: this.streamId, - token: this.token - }, - update: (cache, { data }) => { - if (!data?.streamInviteUse) return - - // It's weird that i'm emitting from inside the update handler, but if I invoke the emit - // at the bottom of `processInvite()`, the event won't be fired because of a race condition - // between the cache updates below and the queries that rely on the cached invites in the parent - // component. Basically - I have to do it this way or the event won't be handled - this.$emit('invite-used', { accept }) - - // Remove invite from various cached queries we might have - // 1. Single stream invite query - const singleStreamInviteCacheFilter = { - query: StreamInviteDocument, - variables: { streamId: this.streamId, token: this.token } - } - let singleStreamInviteQueryData: MaybeFalsy = undefined - try { - singleStreamInviteQueryData = cache.readQuery( - singleStreamInviteCacheFilter - ) - } catch (err) { - // suppressed - } - - if (singleStreamInviteQueryData?.streamInvite) { - cache.writeQuery({ - ...singleStreamInviteCacheFilter, - data: { - streamInvite: null - }, - overwrite: true - }) - } - - // 2. All user's stream invites query - let allUsersStreamInvitesQueryData: MaybeFalsy = - undefined - try { - allUsersStreamInvitesQueryData = cache.readQuery({ - query: UserStreamInvitesDocument - }) - } catch (err) { - // suppressed - } - - if (allUsersStreamInvitesQueryData?.streamInvites) { - const removableInviteIdx = - allUsersStreamInvitesQueryData.streamInvites.findIndex( - (i) => i.inviteId === this.inviteId - ) - if (removableInviteIdx !== -1) { - const newInvites = allUsersStreamInvitesQueryData.streamInvites.slice() - newInvites.splice(removableInviteIdx, 1) - - cache.writeQuery({ - query: UserStreamInvitesDocument, - data: { - ...allUsersStreamInvitesQueryData, - streamInvites: newInvites - }, - overwrite: true - }) - } - } - } - }) - .catch(convertThrowIntoFetchResult) - - if (data?.streamInviteUse) { - this.$triggerNotification({ - text: accept - ? "You've been successfully added as a stream contributor!" - : "You've declined the invite", - type: accept ? 'success' : 'primary' - }) - - // Refetch stream operations, if accepted - if (accept) { - this.$eventHub.$emit(StreamEvents.Refetch) - } - - this.streamInviteClosed = true - } else { - const errMsg = errors?.[0].message || 'An unexpected issue occurred!' - this.$triggerNotification({ - text: errMsg, - type: 'error' - }) - } - } - }, - mounted() { - if (this.autoAccept) { - this.acceptInvite() - } - } -}) diff --git a/packages/frontend/src/main/lib/stream/services/commitMultiActions.ts b/packages/frontend/src/main/lib/stream/services/commitMultiActions.ts deleted file mode 100644 index 85a7604d7..000000000 --- a/packages/frontend/src/main/lib/stream/services/commitMultiActions.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { ApolloCache, Modifier, Reference } from '@apollo/client/cache' - -export const disabledCheckboxMessage = - "To select this commit you must be its or its stream's owner" - -export enum BatchActionType { - Move = 'move', - Delete = 'delete' -} - -export function deleteCommitsFromCachedCommitsQuery( - cache: ApolloCache, - parentObjectCacheId: string, - commitIds: string[] -) { - cache.modify({ - id: parentObjectCacheId, - fields: { - commits: (( - oldCommits: - | { - totalCount: number - items: Array<{ __ref: string }> - } - | Reference, - { isReference } - ) => { - if (isReference(oldCommits)) return oldCommits - - const newTotalCount = Math.max(oldCommits.totalCount - commitIds.length, 0) - - // old items don't hold the ID prop, but a __ref prop like this 'Commit:XXXXX' - const newItems = oldCommits.items.filter( - (c) => !commitIds.includes(c.__ref.split(':')[1]) - ) - - return { - ...oldCommits, - totalCount: newTotalCount, - items: newItems - } - }) as Modifier< - { totalCount: number; items: Array<{ __ref: string }> } | Reference - > - } - }) -} diff --git a/packages/frontend/src/main/lib/viewer/comments/commentsHelper.ts b/packages/frontend/src/main/lib/viewer/comments/commentsHelper.ts deleted file mode 100644 index 9e3487d20..000000000 --- a/packages/frontend/src/main/lib/viewer/comments/commentsHelper.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { UploadFileItem } from '@/main/lib/common/file-upload/fileUploadHelper' -import { SmartTextEditorSchemaOptions } from '@/main/lib/common/text-editor/documentHelper' -import { JSONContent } from '@tiptap/core' - -/** - * Time used for throttling viewer/window resize/etc. updates that trigger comment bubble/thread absolute repositioning - */ -export const VIEWER_UPDATE_THROTTLE_TIME = 50 - -export const SMART_EDITOR_SCHEMA: SmartTextEditorSchemaOptions = { - multiLine: false -} - -export type CommentEditorValue = { - doc: JSONContent - attachments: UploadFileItem[] -} diff --git a/packages/frontend/src/main/lib/viewer/commit-object-viewer/composables/embed.ts b/packages/frontend/src/main/lib/viewer/commit-object-viewer/composables/embed.ts deleted file mode 100644 index 2e2ccff7d..000000000 --- a/packages/frontend/src/main/lib/viewer/commit-object-viewer/composables/embed.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { useRoute } from '@/main/lib/core/composables/router' -import { - buildEmbedUrl, - EmbedParams, - wrapUrlInIFrame -} from '@/main/lib/viewer/commit-object-viewer/services/embed' -import { computed, ref, ComputedRef, unref } from 'vue' - -/** - * Get embed viewer query params - */ -export function useEmbedViewerQuery() { - const route = useRoute() - - /** - * Main url params - */ - const streamId = computed(() => (route.query.stream as string) || null) - const branchName = computed(() => (route.query.branch as string) || null) - const commitId = computed(() => (route.query.commit as string) || null) - const objectId = computed(() => (route.query.object as string) || null) - - /** - * Embed options - */ - const transparent = computed(() => route.query.transparent === 'true') - const autoload = computed(() => route.query.autoload === 'true') - const hideControls = computed(() => route.query.hidecontrols === 'true') - const noScroll = computed(() => route.query.noscroll === 'true') - const hideSidebar = computed(() => route.query.hidesidebar === 'true') - const hideSelectionInfo = computed(() => route.query.hideselectioninfo === 'true') - const hideLogo = computed(() => route.query.ilovespeckleanyway === 'true') - const commentSlideShow = computed(() => route.query.commentslideshow === 'true') - - return { - streamId, - branchName, - commitId, - objectId, - transparent, - autoload, - noScroll, - hideControls, - hideSidebar, - hideSelectionInfo, - hideLogo, - commentSlideShow - } -} - -/** - * Configure a viewer embed URL - */ -export function useEmbedViewerUrlManager(params: { - embedParams: ComputedRef -}) { - const { embedParams } = params - - const transparent = ref(false) - const autoload = ref(false) - const hideControls = ref(false) - const noScroll = ref(false) - const hideSidebar = ref(false) - const hideSelectionInfo = ref(false) - const hideLogo = ref(false) - const commentSlideshow = ref(false) - const options = { - transparent, - autoload, - hideControls, - noScroll, - hideSidebar, - hideSelectionInfo, - hideLogo, - commentSlideshow - } - - const url = computed(() => - buildEmbedUrl(unref(embedParams), { - transparent: transparent.value, - autoload: autoload.value, - hideControls: hideControls.value, - noScroll: noScroll.value, - hideSidebar: hideSidebar.value, - hideSelectionInfo: hideSelectionInfo.value, - hideLogo: hideLogo.value, - commentSlideshow: commentSlideshow.value - }) - ) - - const iFrameUrl = computed(() => wrapUrlInIFrame(url.value)) - - const resetOptions = () => { - for (const optionRef of Object.values(options)) { - optionRef.value = false - } - } - - return { - options: { - transparent, - autoload, - hideControls, - noScroll, - hideSidebar, - hideSelectionInfo, - hideLogo, - commentSlideshow - }, - url, - iFrameUrl, - resetOptions - } -} diff --git a/packages/frontend/src/main/lib/viewer/commit-object-viewer/services/embed.ts b/packages/frontend/src/main/lib/viewer/commit-object-viewer/services/embed.ts deleted file mode 100644 index 918bd4cef..000000000 --- a/packages/frontend/src/main/lib/viewer/commit-object-viewer/services/embed.ts +++ /dev/null @@ -1,157 +0,0 @@ -export type ViewerOptions = { - /** - * Extra objects to overlay on top of the base model - */ - overlay: string - /** - * Camera position - */ - c: string - /** - * Serialized viewer filters - */ - filter: string -} - -export type EmbedParams = Partial & { - /** - * The stream being embedded (required) - */ - streamId: string - - /** - * Stream branch to embed - */ - branchName?: string - - /** - * Stream object to embed - */ - objectId?: string - - /** - * Stream commit to embed - */ - commitId?: string -} - -export type EmbedOptions = { - /** - * Whether the BG of the embed should be transparent - */ - transparent: boolean - - /** - * Whether to eager-load the embed - */ - autoload: boolean - - /** - * Whether to hide viewer controls - */ - hideControls: boolean - - /** - * Whether to prevent scrolling (zooming) - */ - noScroll: boolean - - /** - * Whether to hide sidebar (filters, views, etc.) - */ - hideSidebar: boolean - - /** - * Whether to hide object selection info - */ - hideSelectionInfo: boolean - - /** - * Whether to hide the Speckle logo - */ - hideLogo: boolean - - /** - * Enable comment slideshow mode, where the browser auto-expands the 1st comment and subsequent - * comments can be easily reached by clicking arrow buttons - */ - commentSlideshow: boolean -} - -/** - * Build an embed URL - */ -export function buildEmbedUrl( - params: EmbedParams, - options?: Partial -): string { - const { streamId, branchName, objectId, commitId, overlay, c, filter } = params - const { - transparent, - autoload, - hideControls, - noScroll, - hideSidebar, - hideSelectionInfo, - hideLogo, - commentSlideshow - } = options || {} - - const baseUrl = new URL('/embed', window.location.origin) - - const queryParams = new URLSearchParams() - queryParams.set('stream', streamId) - - // Add main identifier params - if (objectId) { - queryParams.set('object', objectId) - } else if (commitId) { - queryParams.set('commit', commitId) - } else if (branchName) { - queryParams.set('branch', branchName) - } - - // Add viewer options - if (overlay) { - queryParams.set('overlay', overlay) - } - if (c) { - queryParams.set('c', c) - } - if (filter) { - queryParams.set('filter', filter) - } - - // Add embed options - if (transparent) { - queryParams.set('transparent', 'true') - } - if (autoload) { - queryParams.set('autoload', 'true') - } - if (hideControls) { - queryParams.set('hidecontrols', 'true') - } - if (noScroll) { - queryParams.set('noscroll', 'true') - } - if (hideSidebar) { - queryParams.set('hidesidebar', 'true') - } - if (hideSelectionInfo) { - queryParams.set('hideselectioninfo', 'true') - } - if (hideLogo) { - queryParams.set('ilovespeckleanyway', 'true') - } - if (commentSlideshow) { - queryParams.set('commentslideshow', 'true') - } - - baseUrl.search = queryParams.toString() - return baseUrl.toString() -} - -export function wrapUrlInIFrame(url: string) { - return `` -} diff --git a/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManager.ts b/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManager.ts deleted file mode 100644 index 2c12f2e1b..000000000 --- a/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManager.ts +++ /dev/null @@ -1,516 +0,0 @@ -// NOTE: any disabling temporary, most of the filtering stuff will go away - -import { Nullable } from '@/helpers/typeHelpers' -import { setupNewViewerInjection } from '@/main/lib/viewer/core/composables/viewer' -import { - DefaultViewerParams, - Viewer, - SelectionEvent, - PropertyInfo, - NumericPropertyInfo -} from '@speckle/viewer' -import { cloneDeep } from 'lodash' -import { computed, ComputedRef, inject, InjectionKey, provide, Ref } from 'vue' -import { - commitObjectViewerState, - StateType -} from '@/main/lib/viewer/commit-object-viewer/stateManagerCore' - -const ViewerStreamIdKey: InjectionKey> = Symbol( - 'COMMIT_OBJECT_VIEWER_STREAMID' -) -const ViewerResourceIdKey: InjectionKey> = Symbol( - 'COMMIT_OBJECT_VIEWER_RESOURCEID' -) -const ViewerIsEmbedKey: InjectionKey> = Symbol( - 'COMMIT_OBJECT_VIEWER_IS_EMBED' -) - -type UnknownObject = Record - -type GlobalViewerData = { - viewer: Viewer - container: HTMLElement - initialized: Promise -} - -/** - * Global CommitObjectViewer viewer instance & container. It's not held in commitObjectViewerState, because it's a - * complex object that keeps mutating itself (triggering Apollo Client errors) - */ -let globalViewerData: Nullable = null - -export type LocalFilterState = { - hiddenIds?: string[] - isolatedIds?: string[] - propertyInfoKey?: string - passMin?: number | null - passMax?: number | null - sectionBox?: number[] -} - -/** - * Get current global Commit Object Viewer instance or create one - */ -function getOrInitViewerData(): GlobalViewerData { - if (globalViewerData) return globalViewerData - - const container = document.createElement('div') - container.id = 'renderer' - container.className = 'viewer-container' - container.style.display = 'inline-block' - - const viewer = new Viewer(container, DefaultViewerParams) - const initPromise = viewer.init() - - globalViewerData = { - viewer, - container, - initialized: initPromise - } - - return globalViewerData -} - -function getInitializedViewer(): Viewer { - if (!globalViewerData?.viewer) { - throw new Error('Attempting to access viewer before it has been initialized') - } - - return globalViewerData.viewer -} - -/** - * Composable that returns the global Commit Object Viewer instance and injects it into child components - */ -export function setupCommitObjectViewer(reactiveMainProps: { - streamId: Ref - resourceId: Ref - isEmbed: Ref -}) { - const { streamId, resourceId, isEmbed } = reactiveMainProps - - // Set up and inject viewer - const viewerData = getOrInitViewerData() - const { viewer, container, isInitialized, isInitializedPromise } = - setupNewViewerInjection({ - viewer: viewerData.viewer, - container: viewerData.container, - initPromise: viewerData.initialized - }) - - // Inject main parameters into child components - provide(ViewerStreamIdKey, streamId) - provide(ViewerResourceIdKey, resourceId) - provide(ViewerIsEmbedKey, isEmbed) - - return { viewer, container, isInitialized, isInitializedPromise } -} - -/** - * Inject the Commit Object Viewer instance's main parameters - */ -export function useCommitObjectViewerParams() { - const injectedStreamId = inject(ViewerStreamIdKey) - const injectedResourceId = inject(ViewerResourceIdKey) - const injectedIsEmbed = inject(ViewerIsEmbedKey) - - const buildSafeRef = (ref: Ref | undefined): ComputedRef => - computed(() => { - if (!ref) { - throw new Error( - "Couldn't resolve Commit Object Viewer injected state! Is it properly set up??" - ) - } - - return ref.value - }) - - const streamId = buildSafeRef(injectedStreamId) - const resourceId = buildSafeRef(injectedResourceId) - const isEmbed = buildSafeRef(injectedIsEmbed) - - return { streamId, resourceId, isEmbed } -} - -/* - * STATE MODIFICATION FUNCTIONS: - */ - -function updateState(newValues: Partial) { - commitObjectViewerState({ - ...commitObjectViewerState(), - ...newValues - }) -} - -export function setIsViewerBusy(isBusy: boolean) { - updateState({ viewerBusy: isBusy }) -} - -export function setIsAddingComment(isAddingComment: boolean) { - updateState({ addingComment: isAddingComment }) -} - -/** - * Note: We should not set the entire comment here, because we mutate comments in multiple places - * and that would cause a cache mutation - */ -export function setSelectedCommentMetaData( - comment: { id: number; data: { location: Record } } | null -) { - updateState({ - selectedCommentMetaData: comment - ? { - id: comment.id, - // deep cloning to avoid cache mutation - selectionLocation: comment.data.location - ? cloneDeep(comment.data.location) - : {} - } - : null - }) -} - -export function setPreventCommentCollapse(shouldPrevent: boolean) { - updateState({ - preventCommentCollapse: shouldPrevent - }) -} - -// VIEWER - -/** - * - * @returns A bare minimum filtering state object for storing with comments or plopping in the url. - */ -export function getLocalFilterState(): LocalFilterState { - const state = { ...commitObjectViewerState() } - const fs = {} as LocalFilterState - fs.hiddenIds = state.currentFilterState?.hiddenObjects - fs.isolatedIds = state.currentFilterState?.isolatedObjects - fs.propertyInfoKey = state.currentFilterState?.activePropFilterKey - fs.passMax = state.currentFilterState?.passMax - fs.passMin = state.currentFilterState?.passMin - const box = getInitializedViewer().getCurrentSectionBox() - if (box) { - fs.sectionBox = [ - +box.min.x.toFixed(2), - +box.min.y.toFixed(2), - +box.min.z.toFixed(2), - +box.max.x.toFixed(2), - +box.max.y.toFixed(2), - +box.max.z.toFixed(2) - ] - } - return fs -} - -export function setSectionBox( - box?: { - min: { x: number; y: number; z: number } - max: { x: number; y: number; z: number } - }, - offset?: number -) { - getInitializedViewer().setSectionBox(box, offset) -} - -export function setSectionBoxFromObjects(objectIds: string[], offset?: number) { - getInitializedViewer().setSectionBoxFromObjects(objectIds, offset) -} - -export function toggleSectionBox() { - getInitializedViewer().toggleSectionBox() - updateState({ sectionBox: getInitializedViewer().getCurrentSectionBox() !== null }) -} - -export function sectionBoxOff() { - getInitializedViewer().sectionBoxOff() - updateState({ sectionBox: false }) -} - -export function sectionBoxOn() { - getInitializedViewer().sectionBoxOn() - updateState({ sectionBox: true }) -} - -export function loadObjectProperties() { - setIsViewerBusy(true) - const props = getInitializedViewer().getObjectProperties(undefined, true) - setIsViewerBusy(false) - updateState({ objectProperties: props }) -} - -export async function handleViewerSelection(selectionInfo: SelectionEvent) { - const state = { ...commitObjectViewerState() } - const firstVisibleHit = selectionInfo - ? getFirstVisibleSelectionHit(selectionInfo) - : null - - if (!selectionInfo || !firstVisibleHit) { - updateState({ selectedObjects: [] }) - await getInitializedViewer().resetSelection() - return - } - - if (selectionInfo.multiple) { - if (!state.selectedObjects.includes(firstVisibleHit.object)) - state.selectedObjects = [...state.selectedObjects, firstVisibleHit.object] - } else { - state.selectedObjects = [firstVisibleHit.object] - } - - getInitializedViewer().selectObjects( - state.selectedObjects.map((o) => o.id) as string[] - ) - updateState(state) -} - -export async function handleViewerDoubleClick(selectionInfo: SelectionEvent) { - if (!selectionInfo) { - await getInitializedViewer().zoom() - return - } - - const firstVisibleHit = getFirstVisibleSelectionHit(selectionInfo) - if (!firstVisibleHit) return - - await getInitializedViewer().zoom([firstVisibleHit.object.id]) -} - -function getFirstVisibleSelectionHit({ hits }: SelectionEvent) { - const { currentFilterState } = { ...commitObjectViewerState() } - const hasHiddenObjects = - !!currentFilterState?.hiddenObjects && - currentFilterState?.hiddenObjects.length !== 0 - const hasIsolatedObjects = - !!currentFilterState?.isolatedObjects && - currentFilterState?.isolatedObjects.length !== 0 - - for (const hit of hits) { - if (hasHiddenObjects) { - if (!currentFilterState?.hiddenObjects?.includes(hit.object.id)) { - return hit - } - } else if (hasIsolatedObjects) { - if (currentFilterState.isolatedObjects?.includes(hit.object.id)) return hit - } else { - return hit - } - } - return null -} - -export async function clearSelectionDisplay() { - await getInitializedViewer().resetSelection() -} - -export async function resetSelection() { - updateState({ selectedObjects: [] }) - await getInitializedViewer().resetSelection() -} - -export async function highlightObjects(objectIds: string[], ghost = false) { - await getInitializedViewer().highlightObjects(objectIds, ghost) -} - -export async function removeHighlights() { - await getInitializedViewer().resetHighlight() -} - -// FILTERING NEW - -export async function isolateObjects( - objectIds: string[], - stateKey: string, - includeDescendants = false -) { - setIsViewerBusy(true) - const result = await getInitializedViewer().isolateObjects( - objectIds, - stateKey, - includeDescendants - ) - updateState({ currentFilterState: result }) - setIsViewerBusy(false) -} - -export async function unIsolateObjects( - objectIds: string[], - stateKey: string, - includeDescendants = false -) { - setIsViewerBusy(true) - const result = await getInitializedViewer().unIsolateObjects( - objectIds, - stateKey, - includeDescendants - ) - updateState({ currentFilterState: result }) - setIsViewerBusy(false) -} - -export async function hideObjects( - objectIds: string[], - stateKey: string, - includeDescendants = false -) { - setIsViewerBusy(true) - const result = await getInitializedViewer().hideObjects( - objectIds, - stateKey, - includeDescendants - ) - updateState({ currentFilterState: result }) - setIsViewerBusy(false) -} - -export async function showObjects( - objectIds: string[], - stateKey: string, - includeDescendants = false -) { - setIsViewerBusy(true) - const result = await getInitializedViewer().showObjects( - objectIds, - stateKey, - includeDescendants - ) - updateState({ currentFilterState: result }) - setIsViewerBusy(false) -} - -export async function setColorFilter(property: PropertyInfo) { - setIsViewerBusy(true) - const result = await getInitializedViewer().setColorFilter(property) - updateState({ currentFilterState: result, localFilterPropKey: property.key }) - setIsViewerBusy(false) -} - -// FILTERING OLD - -type FilterByValue = - | { - gte: number - lte: number - } - | string[] - | { not: string[] } - -export type Filter = { - filterBy?: { - __parents?: { - includes?: string[] - excludes?: string[] - } - } & { - [by: string]: FilterByValue - } - colorBy?: { - type: string - property: string - } - ghostOthers?: boolean -} - -function isLegacyFilter(obj: UnknownObject) { - const keys = Object.keys(obj) - return ( - keys.includes('filterBy') || - keys.includes('colorBy') || - keys.includes('ghostOhters') - ) -} - -export async function setFilterDirectly(params: { filter: Filter | LocalFilterState }) { - await resetFilter() - - // Minimal support for legacy filters (old viewer filtering api) - if (isLegacyFilter(params.filter)) { - console.warn('Legacy filter type detected. Things might not appear as expected.') - const legacyFilter = params.filter as Filter - if (legacyFilter.colorBy) { - const { objectProperties } = { ...commitObjectViewerState() } - const prop = { - ...objectProperties.find((p) => p.key === legacyFilter.colorBy?.property) - } as PropertyInfo - - if (!prop) return - if ((legacyFilter.colorBy as Record).maxValue) { - ;(prop as NumericPropertyInfo).passMax = ( - legacyFilter.colorBy as Record - ).maxValue as number - } - - if ((legacyFilter.colorBy as Record).minValue) { - ;(prop as NumericPropertyInfo).passMin = ( - legacyFilter.colorBy as Record - ).minValue as number - } - - if (prop) { - setColorFilter(prop) - return - } - } - - if (legacyFilter.filterBy?.__parents?.includes) { - isolateObjects(legacyFilter.filterBy?.__parents?.includes, 'setfilter-direct') - } - - if (legacyFilter.filterBy?.__parents?.excludes) { - hideObjects(legacyFilter.filterBy?.__parents?.excludes, 'setfilter-direct') - } - - return - } - - // Current filters - const lfs = params.filter as LocalFilterState - - if (lfs.hiddenIds) { - hideObjects(lfs.hiddenIds, 'setfilter-direct', false) - } - if (lfs.isolatedIds) { - isolateObjects(lfs.isolatedIds, 'setfilter-direct', false) - } - if (lfs.propertyInfoKey) { - const { objectProperties } = { ...commitObjectViewerState() } - const prop = { ...objectProperties.find((p) => p.key === lfs.propertyInfoKey) } - - if (lfs.passMax) { - ;(prop as NumericPropertyInfo).passMax = lfs.passMax - } - if (lfs.passMin) { - ;(prop as NumericPropertyInfo).passMin = lfs.passMin - } - - if (prop) { - setColorFilter(prop as NumericPropertyInfo) - // TODO: set active filter key or something - } else console.warn(`${lfs.propertyInfoKey} property not found.`) - } - - if (lfs.sectionBox) { - const box = { - min: { x: lfs.sectionBox[0], y: lfs.sectionBox[1], z: lfs.sectionBox[2] }, - max: { x: lfs.sectionBox[3], y: lfs.sectionBox[4], z: lfs.sectionBox[5] } - } - setSectionBox(box) - sectionBoxOn() - } -} - -export async function resetFilter() { - const viewer = getInitializedViewer() - - updateState({ - preventCommentCollapse: true, - currentFilterState: null, - localFilterPropKey: null - }) - - await viewer.resetFilters() - viewer.applyFilter(null) -} diff --git a/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManagerCore.ts b/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManagerCore.ts deleted file mode 100644 index e52606b24..000000000 --- a/packages/frontend/src/main/lib/viewer/commit-object-viewer/stateManagerCore.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { GetReactiveVarType, Nullable } from '@/helpers/typeHelpers' -import { makeVar, TypePolicies } from '@apollo/client/cache' -import type { PropertyInfo, FilteringState } from '@speckle/viewer' -import emojis from '@/main/store/emojis' - -/** - * Actual state from state manager. Extracted here to ensure that we don't bundle the full viewer & three.js - * on every page just to initialize the state. - * - * BE VERY CAREFUL AND KEEP THIS MODULE LIGHTWEIGHT. IMPORTING TYPES FROM VIEWER/THREE IS FINE AS LONG - * AS YOU USE `import type {...}`. - */ - -type UnknownObject = Record - -/** - * Queryable Apollo Client state. - * - * Do not use directly! Use GQL queries to read and stateManager.ts mutators to mutate. - */ -export const commitObjectViewerState = makeVar({ - viewerBusy: false, - selectedCommentMetaData: null as Nullable<{ - id: number - selectionLocation: Record - }>, - addingComment: false, - preventCommentCollapse: false, - commentReactions: ['❤️', '✏️', '🔥', '⚠️'], - emojis, - // New viewer & filter vars - currentFilterState: null as Nullable, - selectedObjects: [] as UnknownObject[], - objectProperties: [] as PropertyInfo[], - localFilterPropKey: null as Nullable, - sectionBox: false -}) - -export type StateType = GetReactiveVarType - -/** - * Merge (through _.merge) these with the rest of your Apollo Client `typePolicies` to set up - * commit object viewer state management - */ -export const statePolicies: TypePolicies = { - Query: { - fields: { - commitObjectViewerState: { - read() { - return commitObjectViewerState() - } - } - } - } -} diff --git a/packages/frontend/src/main/lib/viewer/core/composables/viewer.ts b/packages/frontend/src/main/lib/viewer/core/composables/viewer.ts deleted file mode 100644 index 9c58f0d77..000000000 --- a/packages/frontend/src/main/lib/viewer/core/composables/viewer.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Viewer } from '@speckle/viewer' -import { inject, InjectionKey, Ref, ref, provide } from 'vue' - -// Keys you can use in the Viewer family of components to inject the viewer, its container and its init state -export const ViewerKey: InjectionKey = Symbol('VIEWER_INSTANCE') -export const ViewerInitializedKey: InjectionKey> = Symbol( - 'VIEWER_INSTANCE_INITIALIZED' -) -export const ViewerInitializedPromiseKey: InjectionKey> = Symbol( - 'VIEWER_INSTANCE_INITIALIZED_PROMISE' -) -export const ViewerContainerKey: InjectionKey = Symbol('VIEWER_CONTAINER') - -/** - * Inject viewer instance (it should be provided in an ancestor component using setupViewerInjection()) - */ -export function useInjectedViewer() { - // force casting, cause we know for a fact that these injections won't be undefined - handling the "or undefined" check everywhere - // is going to be a pain in the ass - const viewer = inject(ViewerKey) as Viewer - const container = inject(ViewerContainerKey) as HTMLElement - const isInitialized = inject(ViewerInitializedKey) as Ref - const isInitializedPromise = inject(ViewerInitializedPromiseKey) as Promise - - return { viewer, container, isInitialized, isInitializedPromise } -} - -/** - * Pass in a newly created Viewer instance and its container for injection down into child components - * (through useInjectedViewer() or the injection keys manually). - */ -export function setupNewViewerInjection(params: { - viewer: Viewer - container: HTMLElement - initPromise: Promise -}) { - const viewer = params.viewer - const container = params.container - const isInitialized = ref(false) - const isInitializedPromise = params.initPromise.then( - () => (isInitialized.value = true) - ) - - provide(ViewerKey, viewer) - provide(ViewerContainerKey, container) - provide(ViewerInitializedKey, isInitialized) - provide(ViewerInitializedPromiseKey, isInitializedPromise) - - return { viewer, container, isInitialized, isInitializedPromise } -} diff --git a/packages/frontend/src/main/lib/viewer/core/helpers/cameraHelper.ts b/packages/frontend/src/main/lib/viewer/core/helpers/cameraHelper.ts deleted file mode 100644 index f54e6acfc..000000000 --- a/packages/frontend/src/main/lib/viewer/core/helpers/cameraHelper.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Vector3 } from 'three' -import { Viewer } from '@speckle/viewer' -import { get } from 'lodash' - -export function getCamArray(viewer: Viewer) { - const controls = viewer.cameraHandler.activeCam.controls - const pos = controls.getPosition(new Vector3()) - const target = controls.getTarget(new Vector3()) - const c = [ - parseFloat(pos.x.toFixed(5)), - parseFloat(pos.y.toFixed(5)), - parseFloat(pos.z.toFixed(5)), - parseFloat(target.x.toFixed(5)), - parseFloat(target.y.toFixed(5)), - parseFloat(target.z.toFixed(5)), - viewer.cameraHandler.activeCam.name === 'ortho' ? 1 : 0, - get(controls, '_zoom') as number - ] - return c -} diff --git a/packages/frontend/src/main/lib/viewer/core/helpers/resourceHelper.ts b/packages/frontend/src/main/lib/viewer/core/helpers/resourceHelper.ts deleted file mode 100644 index b04c4f11a..000000000 --- a/packages/frontend/src/main/lib/viewer/core/helpers/resourceHelper.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type ResourceType = 'commit' | 'object' - -export function getResourceType(resourceId: string): ResourceType { - return resourceId.length === 10 ? 'commit' : 'object' -} diff --git a/packages/frontend/src/main/navigation/AdminNav.vue b/packages/frontend/src/main/navigation/AdminNav.vue deleted file mode 100644 index a734f9313..000000000 --- a/packages/frontend/src/main/navigation/AdminNav.vue +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/packages/frontend/src/main/navigation/MainLogo.vue b/packages/frontend/src/main/navigation/MainLogo.vue deleted file mode 100644 index 975d94997..000000000 --- a/packages/frontend/src/main/navigation/MainLogo.vue +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/packages/frontend/src/main/navigation/MainNav.vue b/packages/frontend/src/main/navigation/MainNav.vue deleted file mode 100644 index c9b194246..000000000 --- a/packages/frontend/src/main/navigation/MainNav.vue +++ /dev/null @@ -1,228 +0,0 @@ - - diff --git a/packages/frontend/src/main/navigation/MainNavBottom.vue b/packages/frontend/src/main/navigation/MainNavBottom.vue deleted file mode 100644 index dfc4eaa1d..000000000 --- a/packages/frontend/src/main/navigation/MainNavBottom.vue +++ /dev/null @@ -1,93 +0,0 @@ - - diff --git a/packages/frontend/src/main/navigation/StreamNav.vue b/packages/frontend/src/main/navigation/StreamNav.vue deleted file mode 100644 index 7c81e929b..000000000 --- a/packages/frontend/src/main/navigation/StreamNav.vue +++ /dev/null @@ -1,329 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/TheCommits.vue b/packages/frontend/src/main/pages/TheCommits.vue deleted file mode 100644 index e97d55b53..000000000 --- a/packages/frontend/src/main/pages/TheCommits.vue +++ /dev/null @@ -1,230 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/TheFavoriteStreams.vue b/packages/frontend/src/main/pages/TheFavoriteStreams.vue deleted file mode 100644 index dbfd8d5c5..000000000 --- a/packages/frontend/src/main/pages/TheFavoriteStreams.vue +++ /dev/null @@ -1,112 +0,0 @@ -usePortalState - - diff --git a/packages/frontend/src/main/pages/TheFeed.vue b/packages/frontend/src/main/pages/TheFeed.vue deleted file mode 100644 index 2d21688ff..000000000 --- a/packages/frontend/src/main/pages/TheFeed.vue +++ /dev/null @@ -1,30 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/TheStreams.vue b/packages/frontend/src/main/pages/TheStreams.vue deleted file mode 100644 index ee223498a..000000000 --- a/packages/frontend/src/main/pages/TheStreams.vue +++ /dev/null @@ -1,206 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/admin/Admin.vue b/packages/frontend/src/main/pages/admin/Admin.vue deleted file mode 100644 index 37f482638..000000000 --- a/packages/frontend/src/main/pages/admin/Admin.vue +++ /dev/null @@ -1,61 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/admin/Dashboard.vue b/packages/frontend/src/main/pages/admin/Dashboard.vue deleted file mode 100644 index 3631aa45a..000000000 --- a/packages/frontend/src/main/pages/admin/Dashboard.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/admin/Invites.vue b/packages/frontend/src/main/pages/admin/Invites.vue deleted file mode 100644 index 3b0493360..000000000 --- a/packages/frontend/src/main/pages/admin/Invites.vue +++ /dev/null @@ -1,266 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/admin/ServerSettings.vue b/packages/frontend/src/main/pages/admin/ServerSettings.vue deleted file mode 100644 index 46521ae20..000000000 --- a/packages/frontend/src/main/pages/admin/ServerSettings.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/admin/Streams.vue b/packages/frontend/src/main/pages/admin/Streams.vue deleted file mode 100644 index f998ae0fa..000000000 --- a/packages/frontend/src/main/pages/admin/Streams.vue +++ /dev/null @@ -1,301 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/admin/Users.vue b/packages/frontend/src/main/pages/admin/Users.vue deleted file mode 100644 index 013778d3f..000000000 --- a/packages/frontend/src/main/pages/admin/Users.vue +++ /dev/null @@ -1,326 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/auth/AuthorizeApp.vue b/packages/frontend/src/main/pages/auth/AuthorizeApp.vue deleted file mode 100644 index c53170dd7..000000000 --- a/packages/frontend/src/main/pages/auth/AuthorizeApp.vue +++ /dev/null @@ -1,155 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/auth/ResetPasswordFinalization.vue b/packages/frontend/src/main/pages/auth/ResetPasswordFinalization.vue deleted file mode 100644 index 81de40b86..000000000 --- a/packages/frontend/src/main/pages/auth/ResetPasswordFinalization.vue +++ /dev/null @@ -1,198 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/auth/ResetPasswordRequest.vue b/packages/frontend/src/main/pages/auth/ResetPasswordRequest.vue deleted file mode 100644 index 99baacb9d..000000000 --- a/packages/frontend/src/main/pages/auth/ResetPasswordRequest.vue +++ /dev/null @@ -1,122 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/auth/TheLogin.vue b/packages/frontend/src/main/pages/auth/TheLogin.vue deleted file mode 100644 index 3425ba239..000000000 --- a/packages/frontend/src/main/pages/auth/TheLogin.vue +++ /dev/null @@ -1,305 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/auth/TheRegistration.vue b/packages/frontend/src/main/pages/auth/TheRegistration.vue deleted file mode 100644 index cf5b1dab1..000000000 --- a/packages/frontend/src/main/pages/auth/TheRegistration.vue +++ /dev/null @@ -1,377 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/common/NotFound.vue b/packages/frontend/src/main/pages/common/NotFound.vue deleted file mode 100644 index 0fe461a48..000000000 --- a/packages/frontend/src/main/pages/common/NotFound.vue +++ /dev/null @@ -1,24 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/common/TheError.vue b/packages/frontend/src/main/pages/common/TheError.vue deleted file mode 100644 index 3472e4f2a..000000000 --- a/packages/frontend/src/main/pages/common/TheError.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/onboarding/TheOnboarding.vue b/packages/frontend/src/main/pages/onboarding/TheOnboarding.vue deleted file mode 100644 index 6be5bd530..000000000 --- a/packages/frontend/src/main/pages/onboarding/TheOnboarding.vue +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/CommitObjectViewer.vue b/packages/frontend/src/main/pages/stream/CommitObjectViewer.vue deleted file mode 100644 index 3739acc8b..000000000 --- a/packages/frontend/src/main/pages/stream/CommitObjectViewer.vue +++ /dev/null @@ -1,805 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/stream/TheBranch.vue b/packages/frontend/src/main/pages/stream/TheBranch.vue deleted file mode 100644 index cce80695a..000000000 --- a/packages/frontend/src/main/pages/stream/TheBranch.vue +++ /dev/null @@ -1,357 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/TheCollaborators.vue b/packages/frontend/src/main/pages/stream/TheCollaborators.vue deleted file mode 100644 index e82cad6c5..000000000 --- a/packages/frontend/src/main/pages/stream/TheCollaborators.vue +++ /dev/null @@ -1,444 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/stream/TheComments.vue b/packages/frontend/src/main/pages/stream/TheComments.vue deleted file mode 100644 index ed5847638..000000000 --- a/packages/frontend/src/main/pages/stream/TheComments.vue +++ /dev/null @@ -1,226 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/stream/TheEmbed.vue b/packages/frontend/src/main/pages/stream/TheEmbed.vue deleted file mode 100644 index 84be2799e..000000000 --- a/packages/frontend/src/main/pages/stream/TheEmbed.vue +++ /dev/null @@ -1,328 +0,0 @@ - - - - - diff --git a/packages/frontend/src/main/pages/stream/TheGlobals.vue b/packages/frontend/src/main/pages/stream/TheGlobals.vue deleted file mode 100644 index 1159630ed..000000000 --- a/packages/frontend/src/main/pages/stream/TheGlobals.vue +++ /dev/null @@ -1,252 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/TheSettings.vue b/packages/frontend/src/main/pages/stream/TheSettings.vue deleted file mode 100644 index ae443fd97..000000000 --- a/packages/frontend/src/main/pages/stream/TheSettings.vue +++ /dev/null @@ -1,443 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/TheStream.vue b/packages/frontend/src/main/pages/stream/TheStream.vue deleted file mode 100644 index 0752c81bd..000000000 --- a/packages/frontend/src/main/pages/stream/TheStream.vue +++ /dev/null @@ -1,333 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/TheStreamHome.vue b/packages/frontend/src/main/pages/stream/TheStreamHome.vue deleted file mode 100644 index 4cb52a0c4..000000000 --- a/packages/frontend/src/main/pages/stream/TheStreamHome.vue +++ /dev/null @@ -1,261 +0,0 @@ - - diff --git a/packages/frontend/src/main/pages/stream/TheUploads.vue b/packages/frontend/src/main/pages/stream/TheUploads.vue deleted file mode 100644 index f2b3df05b..000000000 --- a/packages/frontend/src/main/pages/stream/TheUploads.vue +++ /dev/null @@ -1,303 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/stream/TheWebhooks.vue b/packages/frontend/src/main/pages/stream/TheWebhooks.vue deleted file mode 100644 index eb8e3c7dd..000000000 --- a/packages/frontend/src/main/pages/stream/TheWebhooks.vue +++ /dev/null @@ -1,366 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/user/TheProfileSelf.vue b/packages/frontend/src/main/pages/user/TheProfileSelf.vue deleted file mode 100644 index 6d4af76e1..000000000 --- a/packages/frontend/src/main/pages/user/TheProfileSelf.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - diff --git a/packages/frontend/src/main/pages/user/TheProfileUser.vue b/packages/frontend/src/main/pages/user/TheProfileUser.vue deleted file mode 100644 index 64bb35500..000000000 --- a/packages/frontend/src/main/pages/user/TheProfileUser.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - diff --git a/packages/frontend/src/main/router/index.js b/packages/frontend/src/main/router/index.js deleted file mode 100644 index a032449d2..000000000 --- a/packages/frontend/src/main/router/index.js +++ /dev/null @@ -1,437 +0,0 @@ -import { LocalStorageKeys } from '@/helpers/mainConstants' -import { AppLocalStorage } from '@/utils/localStorage' -import { GlobalEvents } from '@/main/lib/core/helpers/eventHubHelper' -import Vue from 'vue' -import VueRouter from 'vue-router' -import { getMixpanel } from '@/mixpanelManager' -import { - deletePostAuthRedirect, - getPostAuthRedirect, - setPostAuthRedirect -} from '@/main/lib/auth/utils/postAuthRedirectManager' -import { reduce } from 'lodash' - -Vue.use(VueRouter) - -const routes = [ - { - path: '/authn', - name: 'Auth', - redirect: '/authn/login', - component: () => import('@/main/layouts/TheAuth.vue'), - beforeEnter: (to, from, next) => { - // If we're in an iframe, we should not render any auth routes. - if (window.self !== window.top) { - return next('/error') - } - next() - }, - children: [ - { - path: 'login', - name: 'Login', - meta: { - title: 'Login | Speckle' - }, - component: () => import('@/main/pages/auth/TheLogin.vue') - }, - { - path: 'register', - name: 'Register', - meta: { - title: 'Register | Speckle' - }, - component: () => import('@/main/pages/auth/TheRegistration.vue') - }, - { - path: 'resetpassword', - name: 'Reset Password', - meta: { - title: 'Reset Password | Speckle' - }, - component: () => import('@/main/pages/auth/ResetPasswordRequest.vue') - }, - { - path: 'resetpassword/finalize', - name: 'Reset Password Finalization', - meta: { - title: 'Reset Password | Speckle' - }, - component: () => import('@/main/pages/auth/ResetPasswordFinalization.vue') - }, - { - path: 'verify/:appId/:challenge', - name: 'Authorize App', - meta: { - title: 'Authorizing App | Speckle' - }, - component: () => import('@/main/pages/auth/AuthorizeApp.vue') - } - ] - }, - { - path: '/', - meta: { - title: 'Home | Speckle' - }, - component: () => import('@/main/layouts/TheMain.vue'), - children: [ - { - path: '', - name: 'home', - meta: { - title: 'Home | Speckle' - }, - component: () => import('@/main/pages/TheFeed.vue') - }, - { - path: '/commits', - name: 'commits', - meta: { - title: 'Commits | Speckle' - }, - component: () => import('@/main/pages/TheCommits.vue') - }, - { - path: 'streams', - name: 'streams', - meta: { - title: 'Streams | Speckle' - }, - component: () => import('@/main/pages/TheStreams.vue') - }, - { - path: 'streams/favorite', - name: 'favorite-streams', - meta: { - title: 'Favorite Streams | Speckle' - }, - component: () => import('@/main/pages/TheFavoriteStreams.vue') - }, - { - path: 'streams/:streamId', - meta: { - title: 'Stream | Speckle' - }, - component: () => import('@/main/pages/stream/TheStream.vue'), - children: [ - { - path: '', - name: 'stream', - meta: { - title: 'Stream | Speckle' - }, - component: () => import('@/main/pages/stream/TheStreamHome.vue') - }, - { - path: 'branches/', - name: 'branches', - redirect: 'branches/main' - }, - { - path: 'branches/:branchName*', - name: 'branch', - meta: { - title: 'Branch | Speckle' - }, - component: () => import('@/main/pages/stream/TheBranch.vue'), - beforeEnter: (to, from, next) => { - if (to.params.branchName.toLowerCase() !== to.params.branchName) - return next( - `/streams/${ - to.params.streamId - }/branches/${to.params.branchName.toLowerCase()}` - ) - else next() - } - }, - { - path: 'comments/', - name: 'comments', - meta: { - title: 'Stream Comments | Speckle', - resizableNavbar: false - }, - component: () => import('@/main/pages/stream/TheComments.vue') - }, - { - path: 'commits/:resourceId*', - name: 'commit', - meta: { - title: 'Commit | Speckle', - resizableNavbar: true, - hideEmailBanner: true - }, - component: () => import('@/main/pages/stream/CommitObjectViewer.vue'), - props: (route) => ({ - streamId: route.params.streamId, - resourceId: route.params.resourceId - }) - }, - { - path: 'objects/:resourceId*', - name: 'objects', - meta: { - title: 'Object | Speckle', - resizableNavbar: true, - hideEmailBanner: true - }, - component: () => import('@/main/pages/stream/CommitObjectViewer.vue'), - props: (route) => ({ - streamId: route.params.streamId, - resourceId: route.params.resourceId - }) - }, - { - path: 'collaborators/', - name: 'collaborators', - meta: { - title: 'Stream Collaborators | Speckle' - }, - props: true, - component: () => import('@/main/pages/stream/TheCollaborators.vue') - }, - { - path: 'settings/', - name: 'settings', - meta: { - title: 'Stream Settings | Speckle' - }, - props: true, - component: () => import('@/main/pages/stream/TheSettings.vue') - }, - { - path: 'webhooks/', - name: 'webhooks', - meta: { - title: 'Webhooks | Speckle' - }, - props: true, - component: () => import('@/main/pages/stream/TheWebhooks.vue') - }, - { - path: 'uploads/', - name: 'uploads', - meta: { - title: 'Stream Uploads | Speckle' - }, - props: true, - component: () => import('@/main/pages/stream/TheUploads.vue') - }, - { - path: 'globals/', - name: 'globals', - meta: { - title: 'Globals | Speckle' - }, - props: true, - component: () => import('@/main/pages/stream/TheGlobals.vue') - }, - { - path: 'globals/:commitId', - name: 'previous globals', - meta: { - title: 'Globals | Speckle' - }, - component: () => import('@/main/pages/stream/TheGlobals.vue') - } - ] - }, - { - path: 'profile', - name: 'profile', - meta: { - title: 'Your Profile | Speckle' - }, - component: () => import('@/main/pages/user/TheProfileSelf.vue') - }, - { - path: 'profile/:userId', - name: 'user profile', - meta: { - title: 'User Profile | Speckle' - }, - component: () => import('@/main/pages/user/TheProfileUser.vue') - }, - { - path: 'admin', - meta: { - title: 'Admin | Overview' - }, - redirect: 'admin/dashboard', - component: () => import('@/main/pages/admin/Admin.vue'), - children: [ - { - name: 'Admin | Overview', - path: 'dashboard', - component: () => import('@/main/pages/admin/Dashboard.vue') - }, - { - name: 'Admin | Users', - path: 'users', - component: () => import('@/main/pages/admin/Users.vue'), - props: (route) => ({ ...route.query }) - }, - { - name: 'Admin | Streams', - path: 'streams', - component: () => import('@/main/pages/admin/Streams.vue'), - props: (route) => ({ ...route.query }) - }, - { - name: 'Admin | Settings', - path: 'settings', - component: () => import('@/main/pages/admin/ServerSettings.vue') - }, - { - name: 'Admin | Invites', - path: 'invites', - component: () => import('@/main/pages/admin/Invites.vue') - } - ] - } - ] - }, - { - path: '/error', - name: 'Error', - meta: { - title: 'Error | Speckle' - }, - component: () => import('@/main/pages/common/TheError.vue') - }, - { - path: '/onboarding', - name: 'Onboarding | Speckle', - meta: { - title: 'Getting Started | Speckle' - }, - component: () => import('@/main/pages/onboarding/TheOnboarding.vue') - }, - { - path: '*', - name: 'notfound', - meta: { - title: 'Not Found | Speckle' - }, - component: () => import('@/main/pages/common/NotFound.vue') - }, - { - path: '/embed', - meta: { - title: 'Embed View | Speckle' - }, - component: () => import('@/main/layouts/TheBasic.vue'), - children: [ - { - path: '/', - name: 'viewer-embed', - meta: { - title: 'Embed View | Speckle' - }, - component: () => import('@/main/pages/stream/TheEmbed.vue') - } - ] - } -] - -const router = new VueRouter({ - mode: 'history', - routes, - scrollBehavior(to, from, savedPosition) { - if (savedPosition) { - return savedPosition - } else { - return { x: 0, y: 0 } - } - } -}) - -function shouldForceToLogin(isLoggedIn, to) { - if (isLoggedIn) return false - - const allowedForUnauthedNames = [ - 'stream', - 'branch', - 'commit', - 'objects', - 'Embedded Viewer', - 'Login', - 'Register', - 'Error', - 'Reset Password', - 'Reset Password Finalization', - 'viewer-embed' - ] - - // Check if any of the new routes (nested or not) is one of the routes that is allowed for unauthed users - // If it is - we shouldnt force a redirect - const isAllowedRoute = to.matched.some( - ({ name }) => name && allowedForUnauthedNames.includes(name) - ) - return !isAllowedRoute -} - -router.beforeEach((to, _from, next) => { - const uuid = AppLocalStorage.get(LocalStorageKeys.Uuid) - const redirect = getPostAuthRedirect() - - router.app.$eventHub.$emit(GlobalEvents.PageLoading, true) - - // Redirect to log in page if not authed and on private pages - if (shouldForceToLogin(!!uuid, to)) { - // Redirect back here afterwards, unless if there's an already pending redirect - if (!redirect?.pathWithQuery) { - // Ignore home page - its already the default redirect - if (to.name !== 'home') { - setPostAuthRedirect({ pathWithQuery: to.fullPath }) - } - } - - return next({ name: 'Login' }) - } - - // Redirect to home if in one of the routes that are guest only - if ((to.name === 'Login' || to.name === 'Register') && uuid) { - return next({ name: 'home' }) - } - - // If we're logged in, we should redirect to the stored redirect path - if (uuid && redirect && redirect?.pathWithQuery) { - deletePostAuthRedirect() - const redirectUrl = new URL(redirect.pathWithQuery, window.location.origin) - return next({ - path: redirectUrl.pathname, - query: reduce( - [...redirectUrl.searchParams.entries()], - (result, entry) => { - result[entry[0]] = entry[1] - return result - }, - {} - ) - }) - } - - return next() -}) - -//TODO: include stream name in page title eg `My Cool Stream | Speckle` -router.afterEach((to) => { - router.app.$eventHub.$emit(GlobalEvents.PageLoading, false) - - Vue.nextTick(() => { - document.title = (to.meta && to.meta.title) || 'Speckle' - }) - - // Report route to mixpanel - const mp = getMixpanel() - const pathDefinition = to.matched[to.matched.length - 1].path - const path = to.path - mp.track('Route Visited', { - path, - pathDefinition - }) -}) - -export default router diff --git a/packages/frontend/src/main/store/emojis.js b/packages/frontend/src/main/store/emojis.js deleted file mode 100644 index 84a9fc888..000000000 --- a/packages/frontend/src/main/store/emojis.js +++ /dev/null @@ -1,2414 +0,0 @@ -export default [ - '😀', - '😁', - '😂', - '🤣', - '😃', - '😄', - '😅', - '😆', - '😉', - '😊', - '😋', - '😎', - '😍', - '😘', - '🥰', - '😗', - '😙', - '😚', - '☺️', - '🙂', - '🤗', - '🤩', - '🤔', - '🤨', - '😐', - '😑', - '😶', - '🙄', - '😏', - '😣', - '😥', - '😮', - '🤐', - '😯', - '😪', - '😫', - '😴', - '😌', - '😛', - '😜', - '😝', - '🤤', - '😒', - '😓', - '😔', - '😕', - '🙃', - '🤑', - '😲', - '☹️', - '🙁', - '😖', - '😞', - '😟', - '😤', - '😢', - '😭', - '😦', - '😧', - '😨', - '😩', - '🤯', - '😬', - '😰', - '😱', - '🥵', - '🥶', - '😳', - '🤪', - '😵', - '😡', - '😠', - '🤬', - '😷', - '🤒', - '🤕', - '🤢', - '🤮', - '🤧', - '😇', - '🤠', - '🤡', - '🥳', - '🥴', - '🥺', - '🤥', - '🤫', - '🤭', - '🧐', - '🤓', - '😈', - '👿', - '👹', - '👺', - '💀', - '👻', - '👽', - '🤖', - '💩', - '😺', - '😸', - '😹', - '😻', - '😼', - '😽', - '🙀', - '😿', - '😾', - '👶', - '👧', - '🧒', - '👦', - '👩', - '🧑', - '👨', - '👵', - '🧓', - '👴', - '👲', - '👳‍♀️', - '👳‍♂️', - '🧕', - '🧔', - '👱‍♂️', - '👱‍♀️', - '👨‍🦰', - '👩‍🦰', - '👨‍🦱', - '👩‍🦱', - '👨‍🦲', - '👩‍🦲', - '👨‍🦳', - '👩‍🦳', - '🦸‍♀️', - '🦸‍♂️', - '🦹‍♀️', - '🦹‍♂️', - '👮‍♀️', - '👮‍♂️', - '👷‍♀️', - '👷‍♂️', - '💂‍♀️', - '💂‍♂️', - '🕵️‍♀️', - '🕵️‍♂️', - '👩‍⚕️', - '👨‍⚕️', - '👩‍🌾', - '👨‍🌾', - '👩‍🍳', - '👨‍🍳', - '👩‍🎓', - '👨‍🎓', - '👩‍🎤', - '👨‍🎤', - '👩‍🏫', - '👨‍🏫', - '👩‍🏭', - '👨‍🏭', - '👩‍💻', - '👨‍💻', - '👩‍💼', - '👨‍💼', - '👩‍🔧', - '👨‍🔧', - '👩‍🔬', - '👨‍🔬', - '👩‍🎨', - '👨‍🎨', - '👩‍🚒', - '👨‍🚒', - '👩‍✈️', - '👨‍✈️', - '👩‍🚀', - '👨‍🚀', - '👩‍⚖️', - '👨‍⚖️', - '👰', - '🤵', - '👸', - '🤴', - '🤶', - '🎅', - '🧙‍♀️', - '🧙‍♂️', - '🧝‍♀️', - '🧝‍♂️', - '🧛‍♀️', - '🧛‍♂️', - '🧟‍♀️', - '🧟‍♂️', - '🧞‍♀️', - '🧞‍♂️', - '🧜‍♀️', - '🧜‍♂️', - '🧚‍♀️', - '🧚‍♂️', - '👼', - '🤰', - '🤱', - '🙇‍♀️', - '🙇‍♂️', - '💁‍♀️', - '💁‍♂️', - '🙅‍♀️', - '🙅‍♂️', - '🙆‍♀️', - '🙆‍♂️', - '🙋‍♀️', - '🙋‍♂️', - '🤦‍♀️', - '🤦‍♂️', - '🤷‍♀️', - '🤷‍♂️', - '🙎‍♀️', - '🙎‍♂️', - '🙍‍♀️', - '🙍‍♂️', - '💇‍♀️', - '💇‍♂️', - '💆‍♀️', - '💆‍♂️', - '🧖‍♀️', - '🧖‍♂️', - '💅', - '🤳', - '💃', - '🕺', - '👯‍♀️', - '👯‍♂️', - '🕴', - '🚶‍♀️', - '🚶‍♂️', - '🏃‍♀️', - '🏃‍♂️', - '👫', - '👭', - '👬', - '💑', - '👩‍❤️‍👩', - '👨‍❤️‍👨', - '💏', - '👩‍❤️‍💋‍👩', - '👨‍❤️‍💋‍👨', - '👪', - '👨‍👩‍👧', - '👨‍👩‍👧‍👦', - '👨‍👩‍👦‍👦', - '👨‍👩‍👧‍👧', - '👩‍👩‍👦', - '👩‍👩‍👧', - '👩‍👩‍👧‍👦', - '👩‍👩‍👦‍👦', - '👩‍👩‍👧‍👧', - '👨‍👨‍👦', - '👨‍👨‍👧', - '👨‍👨‍👧‍👦', - '👨‍👨‍👦‍👦', - '👨‍👨‍👧‍👧', - '👩‍👦', - '👩‍👧', - '👩‍👧‍👦', - '👩‍👦‍👦', - '👩‍👧‍👧', - '👨‍👦', - '👨‍👧', - '👨‍👧‍👦', - '👨‍👦‍👦', - '👨‍👧‍👧', - '🤲', - '👐', - '🙌', - '👏', - '🤝', - '👍', - '👎', - '👊', - '✊', - '🤛', - '🤜', - '🤞', - '✌️', - '🤟', - '🤘', - '👌', - '👈', - '👉', - '👆', - '👇', - '☝️', - '✋', - '🤚', - '🖐', - '🖖', - '👋', - '🤙', - '💪', - '🦵', - '🦶', - '🖕', - '✍️', - '🙏', - '💍', - '💄', - '💋', - '👄', - '👅', - '👂', - '👃', - '👣', - '👁', - '👀', - '🧠', - '🦴', - '🦷', - '🗣', - '👤', - '👥', - '🧥', - '👚', - '👕', - '👖', - '👔', - '👗', - '👙', - '👘', - '👠', - '👡', - '👢', - '👞', - '👟', - '🥾', - '🥿', - '🧦', - '🧤', - '🧣', - '🎩', - '🧢', - '👒', - '🎓', - '⛑', - '👑', - '👝', - '👛', - '👜', - '💼', - '🎒', - '👓', - '🕶', - '🥽', - '🥼', - '🌂', - '🧵', - '🧶', - '👶🏻', - '👦🏻', - '👧🏻', - '👨🏻', - '👩🏻', - '👱🏻‍♀️', - '👱🏻', - '👴🏻', - '👵🏻', - '👲🏻', - '👳🏻‍♀️', - '👳🏻', - '👮🏻‍♀️', - '👮🏻', - '👷🏻‍♀️', - '👷🏻', - '💂🏻‍♀️', - '💂🏻', - '🕵🏻‍♀️', - '🕵🏻', - '👩🏻‍⚕️', - '👨🏻‍⚕️', - '👩🏻‍🌾', - '👨🏻‍🌾', - '👩🏻‍🍳', - '👨🏻‍🍳', - '👩🏻‍🎓', - '👨🏻‍🎓', - '👩🏻‍🎤', - '👨🏻‍🎤', - '👩🏻‍🏫', - '👨🏻‍🏫', - '👩🏻‍🏭', - '👨🏻‍🏭', - '👩🏻‍💻', - '👨🏻‍💻', - '👩🏻‍💼', - '👨🏻‍💼', - '👩🏻‍🔧', - '👨🏻‍🔧', - '👩🏻‍🔬', - '👨🏻‍🔬', - '👩🏻‍🎨', - '👨🏻‍🎨', - '👩🏻‍🚒', - '👨🏻‍🚒', - '👩🏻‍✈️', - '👨🏻‍✈️', - '👩🏻‍🚀', - '👨🏻‍🚀', - '👩🏻‍⚖️', - '👨🏻‍⚖️', - '🤶🏻', - '🎅🏻', - '👸🏻', - '🤴🏻', - '👰🏻', - '🤵🏻', - '👼🏻', - '🤰🏻', - '🙇🏻‍♀️', - '🙇🏻', - '💁🏻', - '💁🏻‍♂️', - '🙅🏻', - '🙅🏻‍♂️', - '🙆🏻', - '🙆🏻‍♂️', - '🙋🏻', - '🙋🏻‍♂️', - '🤦🏻‍♀️', - '🤦🏻‍♂️', - '🤷🏻‍♀️', - '🤷🏻‍♂️', - '🙎🏻', - '🙎🏻‍♂️', - '🙍🏻', - '🙍🏻‍♂️', - '💇🏻', - '💇🏻‍♂️', - '💆🏻', - '💆🏻‍♂️', - '🕴🏻', - '💃🏻', - '🕺🏻', - '🚶🏻‍♀️', - '🚶🏻', - '🏃🏻‍♀️', - '🏃🏻', - '🤲🏻', - '👐🏻', - '🙌🏻', - '👏🏻', - '🙏🏻', - '👍🏻', - '👎🏻', - '👊🏻', - '✊🏻', - '🤛🏻', - '🤜🏻', - '🤞🏻', - '✌🏻', - '🤟🏻', - '🤘🏻', - '👌🏻', - '👈🏻', - '👉🏻', - '👆🏻', - '👇🏻', - '☝🏻', - '✋🏻', - '🤚🏻', - '🖐🏻', - '🖖🏻', - '👋🏻', - '🤙🏻', - '💪🏻', - '🖕🏻', - '✍🏻', - '🤳🏻', - '💅🏻', - '👂🏻', - '👃🏻', - '👶🏼', - '👦🏼', - '👧🏼', - '👨🏼', - '👩🏼', - '👱🏼‍♀️', - '👱🏼', - '👴🏼', - '👵🏼', - '👲🏼', - '👳🏼‍♀️', - '👳🏼', - '👮🏼‍♀️', - '👮🏼', - '👷🏼‍♀️', - '👷🏼', - '💂🏼‍♀️', - '💂🏼', - '🕵🏼‍♀️', - '🕵🏼', - '👩🏼‍⚕️', - '👨🏼‍⚕️', - '👩🏼‍🌾', - '👨🏼‍🌾', - '👩🏼‍🍳', - '👨🏼‍🍳', - '👩🏼‍🎓', - '👨🏼‍🎓', - '👩🏼‍🎤', - '👨🏼‍🎤', - '👩🏼‍🏫', - '👨🏼‍🏫', - '👩🏼‍🏭', - '👨🏼‍🏭', - '👩🏼‍💻', - '👨🏼‍💻', - '👩🏼‍💼', - '👨🏼‍💼', - '👩🏼‍🔧', - '👨🏼‍🔧', - '👩🏼‍🔬', - '👨🏼‍🔬', - '👩🏼‍🎨', - '👨🏼‍🎨', - '👩🏼‍🚒', - '👨🏼‍🚒', - '👩🏼‍✈️', - '👨🏼‍✈️', - '👩🏼‍🚀', - '👨🏼‍🚀', - '👩🏼‍⚖️', - '👨🏼‍⚖️', - '🤶🏼', - '🎅🏼', - '👸🏼', - '🤴🏼', - '👰🏼', - '🤵🏼', - '👼🏼', - '🤰🏼', - '🙇🏼‍♀️', - '🙇🏼', - '💁🏼', - '💁🏼‍♂️', - '🙅🏼', - '🙅🏼‍♂️', - '🙆🏼', - '🙆🏼‍♂️', - '🙋🏼', - '🙋🏼‍♂️', - '🤦🏼‍♀️', - '🤦🏼‍♂️', - '🤷🏼‍♀️', - '🤷🏼‍♂️', - '🙎🏼', - '🙎🏼‍♂️', - '🙍🏼', - '🙍🏼‍♂️', - '💇🏼', - '💇🏼‍♂️', - '💆🏼', - '💆🏼‍♂️', - '🕴🏼', - '💃🏼', - '🕺🏼', - '🚶🏼‍♀️', - '🚶🏼', - '🏃🏼‍♀️', - '🏃🏼', - '🤲🏼', - '👐🏼', - '🙌🏼', - '👏🏼', - '🙏🏼', - '👍🏼', - '👎🏼', - '👊🏼', - '✊🏼', - '🤛🏼', - '🤜🏼', - '🤞🏼', - '✌🏼', - '🤟🏼', - '🤘🏼', - '👌🏼', - '👈🏼', - '👉🏼', - '👆🏼', - '👇🏼', - '☝🏼', - '✋🏼', - '🤚🏼', - '🖐🏼', - '🖖🏼', - '👋🏼', - '🤙🏼', - '💪🏼', - '🖕🏼', - '✍🏼', - '🤳🏼', - '💅🏼', - '👂🏼', - '👃🏼', - '👶🏽', - '👦🏽', - '👧🏽', - '👨🏽', - '👩🏽', - '👱🏽‍♀️', - '👱🏽', - '👴🏽', - '👵🏽', - '👲🏽', - '👳🏽‍♀️', - '👳🏽', - '👮🏽‍♀️', - '👮🏽', - '👷🏽‍♀️', - '👷🏽', - '💂🏽‍♀️', - '💂🏽', - '🕵🏽‍♀️', - '🕵🏽', - '👩🏽‍⚕️', - '👨🏽‍⚕️', - '👩🏽‍🌾', - '👨🏽‍🌾', - '👩🏽‍🍳', - '👨🏽‍🍳', - '👩🏽‍🎓', - '👨🏽‍🎓', - '👩🏽‍🎤', - '👨🏽‍🎤', - '👩🏽‍🏫', - '👨🏽‍🏫', - '👩🏽‍🏭', - '👨🏽‍🏭', - '👩🏽‍💻', - '👨🏽‍💻', - '👩🏽‍💼', - '👨🏽‍💼', - '👩🏽‍🔧', - '👨🏽‍🔧', - '👩🏽‍🔬', - '👨🏽‍🔬', - '👩🏽‍🎨', - '👨🏽‍🎨', - '👩🏽‍🚒', - '👨🏽‍🚒', - '👩🏽‍✈️', - '👨🏽‍✈️', - '👩🏽‍🚀', - '👨🏽‍🚀', - '👩🏽‍⚖️', - '👨🏽‍⚖️', - '🤶🏽', - '🎅🏽', - '👸🏽', - '🤴🏽', - '👰🏽', - '🤵🏽', - '👼🏽', - '🤰🏽', - '🙇🏽‍♀️', - '🙇🏽', - '💁🏽', - '💁🏽‍♂️', - '🙅🏽', - '🙅🏽‍♂️', - '🙆🏽', - '🙆🏽‍♂️', - '🙋🏽', - '🙋🏽‍♂️', - '🤦🏽‍♀️', - '🤦🏽‍♂️', - '🤷🏽‍♀️', - '🤷🏽‍♂️', - '🙎🏽', - '🙎🏽‍♂️', - '🙍🏽', - '🙍🏽‍♂️', - '💇🏽', - '💇🏽‍♂️', - '💆🏽', - '💆🏽‍♂️', - '🕴🏼', - '💃🏽', - '🕺🏽', - '🚶🏽‍♀️', - '🚶🏽', - '🏃🏽‍♀️', - '🏃🏽', - '🤲🏽', - '👐🏽', - '🙌🏽', - '👏🏽', - '🙏🏽', - '👍🏽', - '👎🏽', - '👊🏽', - '✊🏽', - '🤛🏽', - '🤜🏽', - '🤞🏽', - '✌🏽', - '🤟🏽', - '🤘🏽', - '👌🏽', - '👈🏽', - '👉🏽', - '👆🏽', - '👇🏽', - '☝🏽', - '✋🏽', - '🤚🏽', - '🖐🏽', - '🖖🏽', - '👋🏽', - '🤙🏽', - '💪🏽', - '🖕🏽', - '✍🏽', - '🤳🏽', - '💅🏽', - '👂🏽', - '👃🏽', - '👶🏾', - '👦🏾', - '👧🏾', - '👨🏾', - '👩🏾', - '👱🏾‍♀️', - '👱🏾', - '👴🏾', - '👵🏾', - '👲🏾', - '👳🏾‍♀️', - '👳🏾', - '👮🏾‍♀️', - '👮🏾', - '👷🏾‍♀️', - '👷🏾', - '💂🏾‍♀️', - '💂🏾', - '🕵🏾‍♀️', - '🕵🏾', - '👩🏾‍⚕️', - '👨🏾‍⚕️', - '👩🏾‍🌾', - '👨🏾‍🌾', - '👩🏾‍🍳', - '👨🏾‍🍳', - '👩🏾‍🎓', - '👨🏾‍🎓', - '👩🏾‍🎤', - '👨🏾‍🎤', - '👩🏾‍🏫', - '👨🏾‍🏫', - '👩🏾‍🏭', - '👨🏾‍🏭', - '👩🏾‍💻', - '👨🏾‍💻', - '👩🏾‍💼', - '👨🏾‍💼', - '👩🏾‍🔧', - '👨🏾‍🔧', - '👩🏾‍🔬', - '👨🏾‍🔬', - '👩🏾‍🎨', - '👨🏾‍🎨', - '👩🏾‍🚒', - '👨🏾‍🚒', - '👩🏾‍✈️', - '👨🏾‍✈️', - '👩🏾‍🚀', - '👨🏾‍🚀', - '👩🏾‍⚖️', - '👨🏾‍⚖️', - '🤶🏾', - '🎅🏾', - '👸🏾', - '🤴🏾', - '👰🏾', - '🤵🏾', - '👼🏾', - '🤰🏾', - '🙇🏾‍♀️', - '🙇🏾', - '💁🏾', - '💁🏾‍♂️', - '🙅🏾', - '🙅🏾‍♂️', - '🙆🏾', - '🙆🏾‍♂️', - '🙋🏾', - '🙋🏾‍♂️', - '🤦🏾‍♀️', - '🤦🏾‍♂️', - '🤷🏾‍♀️', - '🤷🏾‍♂️', - '🙎🏾', - '🙎🏾‍♂️', - '🙍🏾', - '🙍🏾‍♂️', - '💇🏾', - '💇🏾‍♂️', - '💆🏾', - '💆🏾‍♂️', - '🕴🏾', - '💃🏾', - '🕺🏾', - '🚶🏾‍♀️', - '🚶🏾', - '🏃🏾‍♀️', - '🏃🏾', - '🤲🏾', - '👐🏾', - '🙌🏾', - '👏🏾', - '🙏🏾', - '👍🏾', - '👎🏾', - '👊🏾', - '✊🏾', - '🤛🏾', - '🤜🏾', - '🤞🏾', - '✌🏾', - '🤟🏾', - '🤘🏾', - '👌🏾', - '👈🏾', - '👉🏾', - '👆🏾', - '👇🏾', - '☝🏾', - '✋🏾', - '🤚🏾', - '🖐🏾', - '🖖🏾', - '👋🏾', - '🤙🏾', - '💪🏾', - '🖕🏾', - '✍🏾', - '🤳🏾', - '💅🏾', - '👂🏾', - '👃🏾', - '👶🏿', - '👦🏿', - '👧🏿', - '👨🏿', - '👩🏿', - '👱🏿‍♀️', - '👱🏿', - '👴🏿', - '👵🏿', - '👲🏿', - '👳🏿‍♀️', - '👳🏿', - '👮🏿‍♀️', - '👮🏿', - '👷🏿‍♀️', - '👷🏿', - '💂🏿‍♀️', - '💂🏿', - '🕵🏿‍♀️', - '🕵🏿', - '👩🏿‍⚕️', - '👨🏿‍⚕️', - '👩🏿‍🌾', - '👨🏿‍🌾', - '👩🏿‍🍳', - '👨🏿‍🍳', - '👩🏿‍🎓', - '👨🏿‍🎓', - '👩🏿‍🎤', - '👨🏿‍🎤', - '👩🏿‍🏫', - '👨🏿‍🏫', - '👩🏿‍🏭', - '👨🏿‍🏭', - '👩🏿‍💻', - '👨🏿‍💻', - '👩🏿‍💼', - '👨🏿‍💼', - '👩🏿‍🔧', - '👨🏿‍🔧', - '👩🏿‍🔬', - '👨🏿‍🔬', - '👩🏿‍🎨', - '👨🏿‍🎨', - '👩🏿‍🚒', - '👨🏿‍🚒', - '👩🏿‍✈️', - '👨🏿‍✈️', - '👩🏿‍🚀', - '👨🏿‍🚀', - '👩🏿‍⚖️', - '👨🏿‍⚖️', - '🤶🏿', - '🎅🏿', - '👸🏿', - '🤴🏿', - '👰🏿', - '🤵🏿', - '👼🏿', - '🤰🏿', - '🙇🏿‍♀️', - '🙇🏿', - '💁🏿', - '💁🏿‍♂️', - '🙅🏿', - '🙅🏿‍♂️', - '🙆🏿', - '🙆🏿‍♂️', - '🙋🏿', - '🙋🏿‍♂️', - '🤦🏿‍♀️', - '🤦🏿‍♂️', - '🤷🏿‍♀️', - '🤷🏿‍♂️', - '🙎🏿', - '🙎🏿‍♂️', - '🙍🏿', - '🙍🏿‍♂️', - '💇🏿', - '💇🏿‍♂️', - '💆🏿', - '💆🏿‍♂️', - '🕴🏿', - '💃🏿', - '🕺🏿', - '🚶🏿‍♀️', - '🚶🏿', - '🏃🏿‍♀️', - '🏃🏿', - '🤲🏿', - '👐🏿', - '🙌🏿', - '👏🏿', - '🙏🏿', - '👍🏿', - '👎🏿', - '👊🏿', - '✊🏿', - '🤛🏿', - '🤜🏿', - '🤞🏿', - '✌🏿', - '🤟🏿', - '🤘🏿', - '👌🏿', - '👈🏿', - '👉🏿', - '👆🏿', - '👇🏿', - '☝🏿', - '✋🏿', - '🤚🏿', - '🖐🏿', - '🖖🏿', - '👋🏿', - '🤙🏿', - '💪🏿', - '🖕🏿', - '✍🏿', - '🤳🏿', - '💅🏿', - '👂🏿', - '👃🏿', - '🐶', - '🐱', - '🐭', - '🐹', - '🐰', - '🦊', - '🦝', - '🐻', - '🐼', - '🦘', - '🦡', - '🐨', - '🐯', - '🦁', - '🐮', - '🐷', - '🐽', - '🐸', - '🐵', - '🙈', - '🙉', - '🙊', - '🐒', - '🐔', - '🐧', - '🐦', - '🐤', - '🐣', - '🐥', - '🦆', - '🦢', - '🦅', - '🦉', - '🦚', - '🦜', - '🦇', - '🐺', - '🐗', - '🐴', - '🦄', - '🐝', - '🐛', - '🦋', - '🐌', - '🐚', - '🐞', - '🐜', - '🦗', - '🕷', - '🕸', - '🦂', - '🦟', - '🦠', - '🐢', - '🐍', - '🦎', - '🦖', - '🦕', - '🐙', - '🦑', - '🦐', - '🦀', - '🐡', - '🐠', - '🐟', - '🐬', - '🐳', - '🐋', - '🦈', - '🐊', - '🐅', - '🐆', - '🦓', - '🦍', - '🐘', - '🦏', - '🦛', - '🐪', - '🐫', - '🦙', - '🦒', - '🐃', - '🐂', - '🐄', - '🐎', - '🐖', - '🐏', - '🐑', - '🐐', - '🦌', - '🐕', - '🐩', - '🐈', - '🐓', - '🦃', - '🕊', - '🐇', - '🐁', - '🐀', - '🐿', - '🦔', - '🐾', - '🐉', - '🐲', - '🌵', - '🎄', - '🌲', - '🌳', - '🌴', - '🌱', - '🌿', - '☘️', - '🍀', - '🎍', - '🎋', - '🍃', - '🍂', - '🍁', - '🍄', - '🌾', - '💐', - '🌷', - '🌹', - '🥀', - '🌺', - '🌸', - '🌼', - '🌻', - '🌞', - '🌝', - '🌛', - '🌜', - '🌚', - '🌕', - '🌖', - '🌗', - '🌘', - '🌑', - '🌒', - '🌓', - '🌔', - '🌙', - '🌎', - '🌍', - '🌏', - '💫', - '⭐️', - '🌟', - '✨', - '⚡️', - '☄️', - '💥', - '🔥', - '🌪', - '🌈', - '☀️', - '🌤', - '⛅️', - '🌥', - '☁️', - '🌦', - '🌧', - '⛈', - '🌩', - '🌨', - '❄️', - '☃️', - '⛄️', - '🌬', - '💨', - '💧', - '💦', - '☔️', - '☂️', - '🌊', - '🌫', - '🍏', - '🍎', - '🍐', - '🍊', - '🍋', - '🍌', - '🍉', - '🍇', - '🍓', - '🍈', - '🍒', - '🍑', - '🍍', - '🥭', - '🥥', - '🥝', - '🍅', - '🍆', - '🥑', - '🥦', - '🥒', - '🥬', - '🌶', - '🌽', - '🥕', - '🥔', - '🍠', - '🥐', - '🍞', - '🥖', - '🥨', - '🥯', - '🧀', - '🥚', - '🍳', - '🥞', - '🥓', - '🥩', - '🍗', - '🍖', - '🌭', - '🍔', - '🍟', - '🍕', - '🥪', - '🥙', - '🌮', - '🌯', - '🥗', - '🥘', - '🥫', - '🍝', - '🍜', - '🍲', - '🍛', - '🍣', - '🍱', - '🥟', - '🍤', - '🍙', - '🍚', - '🍘', - '🍥', - '🥮', - '🥠', - '🍢', - '🍡', - '🍧', - '🍨', - '🍦', - '🥧', - '🍰', - '🎂', - '🍮', - '🍭', - '🍬', - '🍫', - '🍿', - '🧂', - '🍩', - '🍪', - '🌰', - '🥜', - '🍯', - '🥛', - '🍼', - '☕️', - '🍵', - '🥤', - '🍶', - '🍺', - '🍻', - '🥂', - '🍷', - '🥃', - '🍸', - '🍹', - '🍾', - '🥄', - '🍴', - '🍽', - '🥣', - '🥡', - '🥢', - '⚽️', - '🏀', - '🏈', - '⚾️', - '🥎', - '🏐', - '🏉', - '🎾', - '🥏', - '🎱', - '🏓', - '🏸', - '🥅', - '🏒', - '🏑', - '🥍', - '🏏', - '⛳️', - '🏹', - '🎣', - '🥊', - '🥋', - '🎽', - '⛸', - '🥌', - '🛷', - '🛹', - '🎿', - '⛷', - '🏂', - '🏋️‍♀️', - '🏋🏻‍♀️', - '🏋🏼‍♀️', - '🏋🏽‍♀️', - '🏋🏾‍♀️', - '🏋🏿‍♀️', - '🏋️‍♂️', - '🏋🏻‍♂️', - '🏋🏼‍♂️', - '🏋🏽‍♂️', - '🏋🏾‍♂️', - '🏋🏿‍♂️', - '🤼‍♀️', - '🤼‍♂️', - '🤸‍♀️', - '🤸🏻‍♀️', - '🤸🏼‍♀️', - '🤸🏽‍♀️', - '🤸🏾‍♀️', - '🤸🏿‍♀️', - '🤸‍♂️', - '🤸🏻‍♂️', - '🤸🏼‍♂️', - '🤸🏽‍♂️', - '🤸🏾‍♂️', - '🤸🏿‍♂️', - '⛹️‍♀️', - '⛹🏻‍♀️', - '⛹🏼‍♀️', - '⛹🏽‍♀️', - '⛹🏾‍♀️', - '⛹🏿‍♀️', - '⛹️‍♂️', - '⛹🏻‍♂️', - '⛹🏼‍♂️', - '⛹🏽‍♂️', - '⛹🏾‍♂️', - '⛹🏿‍♂️', - '🤺', - '🤾‍♀️', - '🤾🏻‍♀️', - '🤾🏼‍♀️', - '🤾🏾‍♀️', - '🤾🏾‍♀️', - '🤾🏿‍♀️', - '🤾‍♂️', - '🤾🏻‍♂️', - '🤾🏼‍♂️', - '🤾🏽‍♂️', - '🤾🏾‍♂️', - '🤾🏿‍♂️', - '🏌️‍♀️', - '🏌🏻‍♀️', - '🏌🏼‍♀️', - '🏌🏽‍♀️', - '🏌🏾‍♀️', - '🏌🏿‍♀️', - '🏌️‍♂️', - '🏌🏻‍♂️', - '🏌🏼‍♂️', - '🏌🏽‍♂️', - '🏌🏾‍♂️', - '🏌🏿‍♂️', - '🏇', - '🏇🏻', - '🏇🏼', - '🏇🏽', - '🏇🏾', - '🏇🏿', - '🧘‍♀️', - '🧘🏻‍♀️', - '🧘🏼‍♀️', - '🧘🏽‍♀️', - '🧘🏾‍♀️', - '🧘🏿‍♀️', - '🧘‍♂️', - '🧘🏻‍♂️', - '🧘🏼‍♂️', - '🧘🏽‍♂️', - '🧘🏾‍♂️', - '🧘🏿‍♂️', - '🏄‍♀️', - '🏄🏻‍♀️', - '🏄🏼‍♀️', - '🏄🏽‍♀️', - '🏄🏾‍♀️', - '🏄🏿‍♀️', - '🏄‍♂️', - '🏄🏻‍♂️', - '🏄🏼‍♂️', - '🏄🏽‍♂️', - '🏄🏾‍♂️', - '🏄🏿‍♂️', - '🏊‍♀️', - '🏊🏻‍♀️', - '🏊🏼‍♀️', - '🏊🏽‍♀️', - '🏊🏾‍♀️', - '🏊🏿‍♀️', - '🏊‍♂️', - '🏊🏻‍♂️', - '🏊🏼‍♂️', - '🏊🏽‍♂️', - '🏊🏾‍♂️', - '🏊🏿‍♂️', - '🤽‍♀️', - '🤽🏻‍♀️', - '🤽🏼‍♀️', - '🤽🏽‍♀️', - '🤽🏾‍♀️', - '🤽🏿‍♀️', - '🤽‍♂️', - '🤽🏻‍♂️', - '🤽🏼‍♂️', - '🤽🏽‍♂️', - '🤽🏾‍♂️', - '🤽🏿‍♂️', - '🚣‍♀️', - '🚣🏻‍♀️', - '🚣🏼‍♀️', - '🚣🏽‍♀️', - '🚣🏾‍♀️', - '🚣🏿‍♀️', - '🚣‍♂️', - '🚣🏻‍♂️', - '🚣🏼‍♂️', - '🚣🏽‍♂️', - '🚣🏾‍♂️', - '🚣🏿‍♂️', - '🧗‍♀️', - '🧗🏻‍♀️', - '🧗🏼‍♀️', - '🧗🏽‍♀️', - '🧗🏾‍♀️', - '🧗🏿‍♀️', - '🧗‍♂️', - '🧗🏻‍♂️', - '🧗🏼‍♂️', - '🧗🏽‍♂️', - '🧗🏾‍♂️', - '🧗🏿‍♂️', - '🚵‍♀️', - '🚵🏻‍♀️', - '🚵🏼‍♀️', - '🚵🏽‍♀️', - '🚵🏾‍♀️', - '🚵🏿‍♀️', - '🚵‍♂️', - '🚵🏻‍♂️', - '🚵🏼‍♂️', - '🚵🏽‍♂️', - '🚵🏾‍♂️', - '🚵🏿‍♂️', - '🚴‍♀️', - '🚴🏻‍♀️', - '🚴🏼‍♀️', - '🚴🏽‍♀️', - '🚴🏾‍♀️', - '🚴🏿‍♀️', - '🚴‍♂️', - '🚴🏻‍♂️', - '🚴🏼‍♂️', - '🚴🏽‍♂️', - '🚴🏾‍♂️', - '🚴🏿‍♂️', - '🏆', - '🥇', - '🥈', - '🥉', - '🏅', - '🎖', - '🏵', - '🎗', - '🎫', - '🎟', - '🎪', - '🤹‍♀️', - '🤹🏻‍♀️', - '🤹🏼‍♀️', - '🤹🏽‍♀️', - '🤹🏾‍♀️', - '🤹🏿‍♀️', - '🤹‍♂️', - '🤹🏻‍♂️', - '🤹🏼‍♂️', - '🤹🏽‍♂️', - '🤹🏾‍♂️', - '🤹🏿‍♂️', - '🎭', - '🎨', - '🎬', - '🎤', - '🎧', - '🎼', - '🎹', - '🥁', - '🎷', - '🎺', - '🎸', - '🎻', - '🎲', - '🧩', - '♟', - '🎯', - '🎳', - '🎮', - '🎰', - '🚗', - '🚕', - '🚙', - '🚌', - '🚎', - '🏎', - '🚓', - '🚑', - '🚒', - '🚐', - '🚚', - '🚛', - '🚜', - '🛴', - '🚲', - '🛵', - '🏍', - '🚨', - '🚔', - '🚍', - '🚘', - '🚖', - '🚡', - '🚠', - '🚟', - '🚃', - '🚋', - '🚞', - '🚝', - '🚄', - '🚅', - '🚈', - '🚂', - '🚆', - '🚇', - '🚊', - '🚉', - '✈️', - '🛫', - '🛬', - '🛩', - '💺', - '🛰', - '🚀', - '🛸', - '🚁', - '🛶', - '⛵️', - '🚤', - '🛥', - '🛳', - '⛴', - '🚢', - '⚓️', - '⛽️', - '🚧', - '🚦', - '🚥', - '🚏', - '🗺', - '🗿', - '🗽', - '🗼', - '🏰', - '🏯', - '🏟', - '🎡', - '🎢', - '🎠', - '⛲️', - '⛱', - '🏖', - '🏝', - '🏜', - '🌋', - '⛰', - '🏔', - '🗻', - '🏕', - '⛺️', - '🏠', - '🏡', - '🏘', - '🏚', - '🏗', - '🏭', - '🏢', - '🏬', - '🏣', - '🏤', - '🏥', - '🏦', - '🏨', - '🏪', - '🏫', - '🏩', - '💒', - '🏛', - '⛪️', - '🕌', - '🕍', - '🕋', - '⛩', - '🛤', - '🛣', - '🗾', - '🎑', - '🏞', - '🌅', - '🌄', - '🌠', - '🎇', - '🎆', - '🌇', - '🌆', - '🏙', - '🌃', - '🌌', - '🌉', - '🌁', - '⌚️', - '📱', - '📲', - '💻', - '⌨️', - '🖥', - '🖨', - '🖱', - '🖲', - '🕹', - '🗜', - '💽', - '💾', - '💿', - '📀', - '📼', - '📷', - '📸', - '📹', - '🎥', - '📽', - '🎞', - '📞', - '☎️', - '📟', - '📠', - '📺', - '📻', - '🎙', - '🎚', - '🎛', - '⏱', - '⏲', - '⏰', - '🕰', - '⌛️', - '⏳', - '📡', - '🔋', - '🔌', - '💡', - '🔦', - '🕯', - '🗑', - '🛢', - '💸', - '💵', - '💴', - '💶', - '💷', - '💰', - '💳', - '🧾', - '💎', - '⚖️', - '🔧', - '🔨', - '⚒', - '🛠', - '⛏', - '🔩', - '⚙️', - '⛓', - '🔫', - '💣', - '🔪', - '🗡', - '⚔️', - '🛡', - '🚬', - '⚰️', - '⚱️', - '🏺', - '🧭', - '🧱', - '🔮', - '🧿', - '🧸', - '📿', - '💈', - '⚗️', - '🔭', - '🧰', - '🧲', - '🧪', - '🧫', - '🧬', - '🧯', - '🔬', - '🕳', - '💊', - '💉', - '🌡', - '🚽', - '🚰', - '🚿', - '🛁', - '🛀', - '🛀🏻', - '🛀🏼', - '🛀🏽', - '🛀🏾', - '🛀🏿', - '🧴', - '🧵', - '🧶', - '🧷', - '🧹', - '🧺', - '🧻', - '🧼', - '🧽', - '🛎', - '🔑', - '🗝', - '🚪', - '🛋', - '🛏', - '🛌', - '🖼', - '🛍', - '🧳', - '🛒', - '🎁', - '🎈', - '🎏', - '🎀', - '🎊', - '🎉', - '🧨', - '🎎', - '🏮', - '🎐', - '🧧', - '✉️', - '📩', - '📨', - '📧', - '💌', - '📥', - '📤', - '📦', - '🏷', - '📪', - '📫', - '📬', - '📭', - '📮', - '📯', - '📜', - '📃', - '📄', - '📑', - '📊', - '📈', - '📉', - '🗒', - '🗓', - '📆', - '📅', - '📇', - '🗃', - '🗳', - '🗄', - '📋', - '📁', - '📂', - '🗂', - '🗞', - '📰', - '📓', - '📔', - '📒', - '📕', - '📗', - '📘', - '📙', - '📚', - '📖', - '🔖', - '🔗', - '📎', - '🖇', - '📐', - '📏', - '📌', - '📍', - '✂️', - '🖊', - '🖋', - '✒️', - '🖌', - '🖍', - '📝', - '✏️', - '🔍', - '🔎', - '🔏', - '🔐', - '🔒', - '🔓', - '❤️', - '🧡', - '💛', - '💚', - '💙', - '💜', - '🖤', - '💔', - '❣️', - '💕', - '💞', - '💓', - '💗', - '💖', - '💘', - '💝', - '💟', - '☮️', - '✝️', - '☪️', - '🕉', - '☸️', - '✡️', - '🔯', - '🕎', - '☯️', - '☦️', - '🛐', - '⛎', - '♈️', - '♉️', - '♊️', - '♋️', - '♌️', - '♍️', - '♎️', - '♏️', - '♐️', - '♑️', - '♒️', - '♓️', - '🆔', - '⚛️', - '🉑', - '☢️', - '☣️', - '📴', - '📳', - '🈶', - '🈚️', - '🈸', - '🈺', - '🈷️', - '✴️', - '🆚', - '💮', - '🉐', - '㊙️', - '㊗️', - '🈴', - '🈵', - '🈹', - '🈲', - '🅰️', - '🅱️', - '🆎', - '🆑', - '🅾️', - '🆘', - '❌', - '⭕️', - '🛑', - '⛔️', - '📛', - '🚫', - '💯', - '💢', - '♨️', - '🚷', - '🚯', - '🚳', - '🚱', - '🔞', - '📵', - '🚭', - '❗️', - '❕', - '❓', - '❔', - '‼️', - '⁉️', - '🔅', - '🔆', - '〽️', - '⚠️', - '🚸', - '🔱', - '⚜️', - '🔰', - '♻️', - '✅', - '🈯️', - '💹', - '❇️', - '✳️', - '❎', - '🌐', - '💠', - 'Ⓜ️', - '🌀', - '💤', - '🏧', - '🚾', - '♿️', - '🅿️', - '🈳', - '🈂️', - '🛂', - '🛃', - '🛄', - '🛅', - '🚹', - '🚺', - '🚼', - '🚻', - '🚮', - '🎦', - '📶', - '🈁', - '🔣', - 'ℹ️', - '🔤', - '🔡', - '🔠', - '🆖', - '🆗', - '🆙', - '🆒', - '🆕', - '🆓', - '0️⃣', - '1️⃣', - '2️⃣', - '3️⃣', - '4️⃣', - '5️⃣', - '6️⃣', - '7️⃣', - '8️⃣', - '9️⃣', - '🔟', - '🔢', - '#️⃣', - '*️⃣', - '⏏️', - '▶️', - '⏸', - '⏯', - '⏹', - '⏺', - '⏭', - '⏮', - '⏩', - '⏪', - '⏫', - '⏬', - '◀️', - '🔼', - '🔽', - '➡️', - '⬅️', - '⬆️', - '⬇️', - '↗️', - '↘️', - '↙️', - '↖️', - '↕️', - '↔️', - '↪️', - '↩️', - '⤴️', - '⤵️', - '🔀', - '🔁', - '🔂', - '🔄', - '🔃', - '🎵', - '🎶', - '➕', - '➖', - '➗', - '✖️', - '♾', - '💲', - '💱', - '™️', - '©️', - '®️', - '〰️', - '➰', - '➿', - '🔚', - '🔙', - '🔛', - '🔝', - '🔜', - '✔️', - '☑️', - '🔘', - '⚪️', - '⚫️', - '🔴', - '🔵', - '🔺', - '🔻', - '🔸', - '🔹', - '🔶', - '🔷', - '🔳', - '🔲', - '▪️', - '▫️', - '◾️', - '◽️', - '◼️', - '◻️', - '⬛️', - '⬜️', - '🔈', - '🔇', - '🔉', - '🔊', - '🔔', - '🔕', - '📣', - '📢', - '👁‍🗨', - '💬', - '💭', - '🗯', - '♠️', - '♣️', - '♥️', - '♦️', - '🃏', - '🎴', - '🀄️', - '🕐', - '🕑', - '🕒', - '🕓', - '🕔', - '🕕', - '🕖', - '🕗', - '🕘', - '🕙', - '🕚', - '🕛', - '🕜', - '🕝', - '🕞', - '🕟', - '🕠', - '🕡', - '🕢', - '🕣', - '🕤', - '🕥', - '🕦', - '🕧', - '🏳️', - '🏴', - '🏁', - '🚩', - '🏳️‍🌈', - '🏴‍☠️', - '🇦🇫', - '🇦🇽', - '🇦🇱', - '🇩🇿', - '🇦🇸', - '🇦🇩', - '🇦🇴', - '🇦🇮', - '🇦🇶', - '🇦🇬', - '🇦🇷', - '🇦🇲', - '🇦🇼', - '🇦🇺', - '🇦🇹', - '🇦🇿', - '🇧🇸', - '🇧🇭', - '🇧🇩', - '🇧🇧', - '🇧🇾', - '🇧🇪', - '🇧🇿', - '🇧🇯', - '🇧🇲', - '🇧🇹', - '🇧🇴', - '🇧🇦', - '🇧🇼', - '🇧🇷', - '🇮🇴', - '🇻🇬', - '🇧🇳', - '🇧🇬', - '🇧🇫', - '🇧🇮', - '🇰🇭', - '🇨🇲', - '🇨🇦', - '🇮🇨', - '🇨🇻', - '🇧🇶', - '🇰🇾', - '🇨🇫', - '🇹🇩', - '🇨🇱', - '🇨🇳', - '🇨🇽', - '🇨🇨', - '🇨🇴', - '🇰🇲', - '🇨🇬', - '🇨🇩', - '🇨🇰', - '🇨🇷', - '🇨🇮', - '🇭🇷', - '🇨🇺', - '🇨🇼', - '🇨🇾', - '🇨🇿', - '🇩🇰', - '🇩🇯', - '🇩🇲', - '🇩🇴', - '🇪🇨', - '🇪🇬', - '🇸🇻', - '🇬🇶', - '🇪🇷', - '🇪🇪', - '🇪🇹', - '🇪🇺', - '🇫🇰', - '🇫🇴', - '🇫🇯', - '🇫🇮', - '🇫🇷', - '🇬🇫', - '🇵🇫', - '🇹🇫', - '🇬🇦', - '🇬🇲', - '🇬🇪', - '🇩🇪', - '🇬🇭', - '🇬🇮', - '🇬🇷', - '🇬🇱', - '🇬🇩', - '🇬🇵', - '🇬🇺', - '🇬🇹', - '🇬🇬', - '🇬🇳', - '🇬🇼', - '🇬🇾', - '🇭🇹', - '🇭🇳', - '🇭🇰', - '🇭🇺', - '🇮🇸', - '🇮🇳', - '🇮🇩', - '🇮🇷', - '🇮🇶', - '🇮🇪', - '🇮🇲', - '🇮🇱', - '🇮🇹', - '🇯🇲', - '🇯🇵', - '🎌', - '🇯🇪', - '🇯🇴', - '🇰🇿', - '🇰🇪', - '🇰🇮', - '🇽🇰', - '🇰🇼', - '🇰🇬', - '🇱🇦', - '🇱🇻', - '🇱🇧', - '🇱🇸', - '🇱🇷', - '🇱🇾', - '🇱🇮', - '🇱🇹', - '🇱🇺', - '🇲🇴', - '🇲🇰', - '🇲🇬', - '🇲🇼', - '🇲🇾', - '🇲🇻', - '🇲🇱', - '🇲🇹', - '🇲🇭', - '🇲🇶', - '🇲🇷', - '🇲🇺', - '🇾🇹', - '🇲🇽', - '🇫🇲', - '🇲🇩', - '🇲🇨', - '🇲🇳', - '🇲🇪', - '🇲🇸', - '🇲🇦', - '🇲🇿', - '🇲🇲', - '🇳🇦', - '🇳🇷', - '🇳🇵', - '🇳🇱', - '🇳🇨', - '🇳🇿', - '🇳🇮', - '🇳🇪', - '🇳🇬', - '🇳🇺', - '🇳🇫', - '🇰🇵', - '🇲🇵', - '🇳🇴', - '🇴🇲', - '🇵🇰', - '🇵🇼', - '🇵🇸', - '🇵🇦', - '🇵🇬', - '🇵🇾', - '🇵🇪', - '🇵🇭', - '🇵🇳', - '🇵🇱', - '🇵🇹', - '🇵🇷', - '🇶🇦', - '🇷🇪', - '🇷🇴', - '🇷🇺', - '🇷🇼', - '🇼🇸', - '🇸🇲', - '🇸🇦', - '🇸🇳', - '🇷🇸', - '🇸🇨', - '🇸🇱', - '🇸🇬', - '🇸🇽', - '🇸🇰', - '🇸🇮', - '🇬🇸', - '🇸🇧', - '🇸🇴', - '🇿🇦', - '🇰🇷', - '🇸🇸', - '🇪🇸', - '🇱🇰', - '🇧🇱', - '🇸🇭', - '🇰🇳', - '🇱🇨', - '🇵🇲', - '🇻🇨', - '🇸🇩', - '🇸🇷', - '🇸🇿', - '🇸🇪', - '🇨🇭', - '🇸🇾', - '🇹🇼', - '🇹🇯', - '🇹🇿', - '🇹🇭', - '🇹🇱', - '🇹🇬', - '🇹🇰', - '🇹🇴', - '🇹🇹', - '🇹🇳', - '🇹🇷', - '🇹🇲', - '🇹🇨', - '🇹🇻', - '🇻🇮', - '🇺🇬', - '🇺🇦', - '🇦🇪', - '🇬🇧', - '🏴󠁧󠁢󠁥󠁮󠁧󠁿', - '🏴󠁧󠁢󠁳󠁣󠁴󠁿', - '🏴󠁧󠁢󠁷󠁬󠁳󠁿', - '🇺🇳', - '🇺🇸', - '🇺🇾', - '🇺🇿', - '🇻🇺', - '🇻🇦', - '🇻🇪', - '🇻🇳', - '🇼🇫', - '🇪🇭', - '🇾🇪', - '🇿🇲', - '🇿🇼', - '🥱', - '🤏', - '🦾', - '🦿', - '🦻', - '🧏', - '🧏‍♂️', - '🧏‍♀️', - '🧍', - '🧍‍♂️', - '🧍‍♀️', - '🧎', - '🧎‍♂️', - '🧎‍♀️', - '👨‍🦯', - '👩‍🦯', - '👨‍🦼', - '👩‍🦼', - '👨‍🦽', - '👩‍🦽', - '🦧', - '🦮', - '🐕‍🦺', - '🦥', - '🦦', - '🦨', - '🦩', - '🧄', - '🧅', - '🧇', - '🧆', - '🧈', - '🦪', - '🧃', - '🧉', - '🧊', - '🛕', - '🦽', - '🦼', - '🛺', - '🪂', - '🪐', - '🤿', - '🪀', - '🪁', - '🦺', - '🥻', - '🩱', - '🩲', - '🩳', - '🩰', - '🪕', - '🪔', - '🪓', - '🦯', - '🩸', - '🩹', - '🩺', - '🪑', - '🪒', - '🤎', - '🤍', - '🟠', - '🟡', - '🟢', - '🟣', - '🟤', - '🟥', - '🟧', - '🟨', - '🟩', - '🟦', - '🟪', - '🟫' -] diff --git a/packages/frontend/src/main/toolbars/BranchToolbar.vue b/packages/frontend/src/main/toolbars/BranchToolbar.vue deleted file mode 100644 index 0559971ae..000000000 --- a/packages/frontend/src/main/toolbars/BranchToolbar.vue +++ /dev/null @@ -1,119 +0,0 @@ - - diff --git a/packages/frontend/src/main/toolbars/CommitToolbar.vue b/packages/frontend/src/main/toolbars/CommitToolbar.vue deleted file mode 100644 index b211496d5..000000000 --- a/packages/frontend/src/main/toolbars/CommitToolbar.vue +++ /dev/null @@ -1,187 +0,0 @@ - - diff --git a/packages/frontend/src/main/toolbars/MultipleResourcesToolbar.vue b/packages/frontend/src/main/toolbars/MultipleResourcesToolbar.vue deleted file mode 100644 index eef934856..000000000 --- a/packages/frontend/src/main/toolbars/MultipleResourcesToolbar.vue +++ /dev/null @@ -1,48 +0,0 @@ - - diff --git a/packages/frontend/src/main/toolbars/ObjectToolbar.vue b/packages/frontend/src/main/toolbars/ObjectToolbar.vue deleted file mode 100644 index e3df38601..000000000 --- a/packages/frontend/src/main/toolbars/ObjectToolbar.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/packages/frontend/src/main/toolbars/StreamToolbar.vue b/packages/frontend/src/main/toolbars/StreamToolbar.vue deleted file mode 100644 index fa556c34b..000000000 --- a/packages/frontend/src/main/toolbars/StreamToolbar.vue +++ /dev/null @@ -1,94 +0,0 @@ - - diff --git a/packages/frontend/src/main/utils/portalStateManager.ts b/packages/frontend/src/main/utils/portalStateManager.ts deleted file mode 100644 index c44fe7c8d..000000000 --- a/packages/frontend/src/main/utils/portalStateManager.ts +++ /dev/null @@ -1,213 +0,0 @@ -import Vue, { computed, onMounted, onBeforeUnmount } from 'vue' -import { camelCase, upperFirst, reduce } from 'lodash' -import { Optional, CombinedVueInstance, ExtendedVue } from '@/helpers/typeHelpers' - -export const STANDARD_PORTAL_KEYS = { - Toolbar: 'toolbar', - Actions: 'actions', - Nav: 'nav', - SubnavAdmin: 'subnav-admin' -} - -/** - * We currently have multiple sources trying to use the same destination, which usually - * results in the source being chosen at random. To solve this, we're using this custom portal state - * manager which manages multiple claims to the same portal space and only allows one source to use it at a time. - */ - -const claims: Record> = {} - -const portalsState = Vue.observable({ - currentPortals: {} as Record -}) - -function recalculateState() { - const newPortals: Record = {} - for (const [portalKey, portalClaims] of Object.entries(claims)) { - let highestPriority: Optional<{ - identity: string - priority: number - }> = undefined - for (const [identity, data] of Object.entries(portalClaims)) { - if (!highestPriority || data.priority > highestPriority.priority) { - highestPriority = { priority: data.priority, identity } - } else if ( - highestPriority.priority === data.priority && - highestPriority.identity === identity - ) { - console.error( - 'Multiple portals with the same priority encountered, your portals might not act deterministically' - ) - } - } - - if (highestPriority?.identity) { - newPortals[portalKey] = highestPriority.identity - } - } - - Vue.set(portalsState, 'currentPortals', newPortals) -} - -/** - * Claim access to a specific toolbar - */ -export function claimPortal(portal: string, identity: string, priority: number) { - // Register claim - if (!claims[portal]) { - claims[portal] = {} - } - - claims[portal][identity] = { priority } - - recalculateState() -} - -/** - * Claim access to multiple toolbars - */ -export function claimPortals(portals: string[], identity: string, priority: number) { - for (const portal of portals) { - claimPortal(portal, identity, priority) - } -} - -/** - * Remove claim to a specific toolbar - */ -export function unclaimPortal(portal: string, identity: string) { - if (claims[portal]) { - delete claims[portal][identity] - } - recalculateState() -} - -/** - * Remove claims to multiple toolbars - */ -export function unclaimPortals(portals: string[], identity: string) { - for (const portal of portals) { - unclaimPortal(portal, identity) - } -} - -/** - * Check if portal source is allowed to render in the target portal - */ -export function canRenderPortalSource(portal: string, identity: string): boolean { - return portalsState.currentPortals[portal] === identity -} - -/** - * Build mixin for tracking whether portal targets can be rendered to - * @param portals Portal identifier keys - * @param identity The unique identity of the portal source - * @param priority Priority starting from 0. Higher priorities will take precedence - * over other portal sources. - */ -export function buildPortalStateMixin( - portals: string[], - identity: string, - priority: number -): ExtendedVue< - Vue, - unknown, - unknown, - { - allowedPortals: Record - canRenderToolbarPortal?: boolean - canRenderActionsPortal?: boolean - canRenderNavPortal?: boolean - canRenderSubnavPortal?: boolean - } -> { - return Vue.extend({ - computed: { - /** - * Object with keys of portal names and values representing if the component - * is allowed to use those portals - */ - allowedPortals() { - const res: Record = {} - for (const portal of portals) { - res[portal] = portalsState.currentPortals[portal] === identity - } - return res - }, - - /** - * Dynamically generates `canRenderXPortal` computeds - */ - ...reduce( - portals, - (res, portal) => { - const computedKey = `canRender${upperFirst(camelCase(portal))}Portal` - res[computedKey] = function ( - this: CombinedVueInstance< - Vue, - unknown, - unknown, - { allowedPortals: Record } - > - ) { - return !!this.allowedPortals[portal] - } - return res - }, - {} as Record boolean> - ) - }, - mounted() { - claimPortals(portals, identity, priority) - }, - beforeDestroy() { - unclaimPortals(portals, identity) - } - }) -} - -/** - * Composition API version of the portal state mixin - tracks whether portal targets can be rendered to - * @param portals Portal identifier keys - * @param identity The unique identity of the portal source - * @param priority Priority starting from 0. Higher priorities will take precedence - * over other portal sources. - */ -export function usePortalState(portals: string[], identity: string, priority: number) { - const allowedPortals = computed(() => { - const res: Record = {} - for (const portal of portals) { - res[portal] = portalsState.currentPortals[portal] === identity - } - return res - }) - - const canRenderToolbarPortal = computed( - () => !!allowedPortals.value[STANDARD_PORTAL_KEYS.Toolbar] - ) - const canRenderActionsPortal = computed( - () => !!allowedPortals.value[STANDARD_PORTAL_KEYS.Actions] - ) - const canRenderNavPortal = computed( - () => !!allowedPortals.value[STANDARD_PORTAL_KEYS.Nav] - ) - const canRenderSubnavPortal = computed( - () => !!allowedPortals.value[STANDARD_PORTAL_KEYS.SubnavAdmin] - ) - - onMounted(() => { - claimPortals(portals, identity, priority) - }) - - onBeforeUnmount(() => { - unclaimPortals(portals, identity) - }) - - return { - allowedPortals, - canRenderToolbarPortal, - canRenderActionsPortal, - canRenderNavPortal, - canRenderSubnavPortal - } -} diff --git a/packages/frontend/src/main/utils/themeStateManager.js b/packages/frontend/src/main/utils/themeStateManager.js deleted file mode 100644 index e70d3b0c0..000000000 --- a/packages/frontend/src/main/utils/themeStateManager.js +++ /dev/null @@ -1,39 +0,0 @@ -import { AppLocalStorage } from '@/utils/localStorage' -import Vue from 'vue' - -/** - * Global theme state manager with persistance to localStorage - */ - -const LOCAL_STORAGE_KEY = 'darkModeEnabled' -const THEME_DARK = 'dark' -const THEME_LIGHT = 'light' - -const themeState = Vue.observable({ - dark: false -}) - -export function setDarkTheme(val, save = false) { - themeState.dark = !!val - - if (!save) return - AppLocalStorage.set(LOCAL_STORAGE_KEY, val ? THEME_DARK : THEME_LIGHT) -} - -export function isDarkTheme() { - return !!themeState.dark -} - -export function initialize() { - const storageSetting = AppLocalStorage.get(LOCAL_STORAGE_KEY) - if (storageSetting) { - setDarkTheme(storageSetting === THEME_DARK) - return - } - - const darkMediaQuery = window.matchMedia('(prefers-color-scheme: dark)').matches - if (darkMediaQuery) { - setDarkTheme(true) - return - } -} diff --git a/packages/frontend/src/mixpanelManager.ts b/packages/frontend/src/mixpanelManager.ts deleted file mode 100644 index 04e2e993d..000000000 --- a/packages/frontend/src/mixpanelManager.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* eslint-disable camelcase */ -import mixpanel, { OverridedMixpanel } from 'mixpanel-browser' -import { Optional } from '@/helpers/typeHelpers' -import { AppLocalStorage } from '@/utils/localStorage' -import * as ThemeStateManager from '@/main/utils/themeStateManager' -import { intersection, mapKeys } from 'lodash' -import { resolveMixpanelServerId } from '@speckle/shared' - -let mixpanelInitialized = false - -const campaignKeywords = [ - 'utm_source', - 'utm_medium', - 'utm_campaign', - 'utm_content', - 'utm_term' -] - -function collectUtmTags() { - const currentUrl = new URL(window.location.href) - const foundParams = intersection( - [...currentUrl.searchParams.keys()], - campaignKeywords - ) - - const result: Record = {} - for (const campaignParam of foundParams) { - const value = currentUrl.searchParams.get(campaignParam) - if (!value) continue - result[campaignParam] = value - } - - return result -} - -/** - * Get mixpanel user ID, if user is authenticated and can be identified, or undefined otherwise - */ -export function getMixpanelUserId(): Optional { - return AppLocalStorage.get('distinct_id') || undefined -} - -/** - * Get mixpanel server identifier - */ -export function getMixpanelServerId(): string { - return resolveMixpanelServerId(window.location.hostname) -} - -/** - * Get current mixpanel instance - */ -export function getMixpanel(): OverridedMixpanel { - if (!mixpanelInitialized) { - throw new Error('Attempting to use uninitialized mixpanel instance') - } - - return mixpanel -} - -/** - * Initialize MixPanel & identify user - */ -export function initialize(params: { - hostApp: string - hostAppDisplayName: string -}): void { - const mp = mixpanel - const { hostApp, hostAppDisplayName } = params - - // Register session - const serverId = getMixpanelServerId() - mp.register({ - server_id: serverId, - hostApp - }) - - // Identify user, if any - const userId = getMixpanelUserId() - if (userId) { - mp.identify(userId) - mp.people.set('Identified', true) - mp.people.set('Theme Web', ThemeStateManager.isDarkTheme() ? 'dark' : 'light') - mp.add_group('server_id', serverId) - } - - // Track UTM - const utmParams = collectUtmTags() - if (Object.values(utmParams).length) { - const firstTouch = mapKeys(utmParams, (_val, key) => `${key} [first touch]`) - const lastTouch = mapKeys(utmParams, (_val, key) => `${key} [last touch]`) - - mp.people.set(lastTouch) - mp.people.set_once(firstTouch) - mp.register(lastTouch) - } - - // Track app visit - mp.track(`Visit ${hostAppDisplayName}`) - - mixpanelInitialized = true -} diff --git a/packages/frontend/src/plugins/authHelpers.js b/packages/frontend/src/plugins/authHelpers.js deleted file mode 100644 index 83f807bf9..000000000 --- a/packages/frontend/src/plugins/authHelpers.js +++ /dev/null @@ -1,146 +0,0 @@ -import { mainUserDataQuery } from '@/graphql/user' -import { LocalStorageKeys } from '@/helpers/mainConstants' -import { InvalidAuthTokenError } from '@/main/lib/auth/errors' -import { VALID_EMAIL_REGEX } from '@/main/lib/common/vuetify/validators' -import { AppLocalStorage } from '@/utils/localStorage' -import { has } from 'lodash' -import { deletePostAuthRedirect } from '@/main/lib/auth/utils/postAuthRedirectManager' -import { resolveMixpanelUserId } from '@speckle/shared' -import { convertThrowIntoFetchResult } from '@/main/lib/common/apollo/helpers/apolloOperationHelper' - -const appId = 'spklwebapp' -const appSecret = 'spklwebapp' - -export function getAuthToken() { - return AppLocalStorage.get(LocalStorageKeys.AuthToken) -} - -/** - * Checks for an access token in the url and tries to exchange it for a token/refresh pair. - * @return {Promise} true if everything is ok, otherwise throws an error. - */ -export async function checkAccessCodeAndGetTokens() { - const accessCode = new URLSearchParams(window.location.search).get('access_code') - if (!accessCode) return false - - const response = await getTokenFromAccessCode(accessCode) - if (has(response, 'token')) { - AppLocalStorage.set(LocalStorageKeys.AuthToken, response.token) - AppLocalStorage.set(LocalStorageKeys.RefreshToken, response.refreshToken) - return true - } -} - -/** - * Gets the user id and sets it in localStorage - * @param {import('@apollo/client/core').ApolloClient} apolloClient - * @return {Promise} The full graphql response. - */ -export async function prefetchUserAndSetID(apolloClient) { - const token = AppLocalStorage.get(LocalStorageKeys.AuthToken) - if (!token) return - - // Pull user info (& remember it in the Apollo cache) - const { data } = await apolloClient - .query({ - query: mainUserDataQuery - }) - .catch(convertThrowIntoFetchResult) - - const user = data?.activeUser - if (user) { - const distinctId = resolveMixpanelUserId(user.email) - AppLocalStorage.set('distinct_id', distinctId) - AppLocalStorage.set('uuid', user.id) - AppLocalStorage.set('stcount', user.streams.totalCount) - return data - } else { - await signOut().catch(console.error) - throw new InvalidAuthTokenError() - } -} - -export async function getTokenFromAccessCode(accessCode) { - const response = await fetch('/auth/token', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - accessCode, - appId, - appSecret, - challenge: AppLocalStorage.get('appChallenge') - }) - }) - - const data = await response.json() - return data -} - -/** - * Signs out the current session - * @return {null} - */ -export async function signOut(mixpanelInstance) { - const logoutBody = JSON.stringify({ - token: AppLocalStorage.get(LocalStorageKeys.AuthToken), - refreshToken: AppLocalStorage.get(LocalStorageKeys.RefreshToken) - }) - - await fetch('/auth/logout', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: logoutBody - }) - // Catching it cause we want to continue with logout even if tokens are invalid - .catch(console.error) - - AppLocalStorage.remove(LocalStorageKeys.AuthToken) - AppLocalStorage.remove(LocalStorageKeys.RefreshToken) - AppLocalStorage.remove('uuid') - AppLocalStorage.remove('distinct_id') - AppLocalStorage.remove('stcount') - AppLocalStorage.remove('onboarding') - deletePostAuthRedirect() - - window.location = '/' - - if (mixpanelInstance) { - mixpanelInstance.track('Log Out', { type: 'action' }) - mixpanelInstance.reset() - } -} - -export async function refreshToken() { - const refreshToken = AppLocalStorage.get(LocalStorageKeys.RefreshToken) - if (!refreshToken) throw new Error('No refresh token found') - - const refreshResponse = await fetch('/auth/token', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - refreshToken, - appId, - appSecret - }) - }) - - const data = await refreshResponse.json() - - // eslint-disable-next-line no-prototype-builtins - if (data.hasOwnProperty('token')) { - AppLocalStorage.set(LocalStorageKeys.AuthToken, data.token) - AppLocalStorage.set(LocalStorageKeys.RefreshToken, data.refreshToken) - await prefetchUserAndSetID() - return true - } -} - -export function isEmailValid(email) { - return VALID_EMAIL_REGEX.test(email) -} diff --git a/packages/frontend/src/plugins/formatNumber.js b/packages/frontend/src/plugins/formatNumber.js deleted file mode 100644 index 61da78aec..000000000 --- a/packages/frontend/src/plugins/formatNumber.js +++ /dev/null @@ -1,15 +0,0 @@ -import numeral from 'numeral' - -export function formatNumber(value, max) { - const num = numeral(value) - const abs = Math.abs(max || num.value()) - - switch (abs) { - case abs < 1000: - return num.value() - case abs >= 1000 && abs <= 10000: - return num.format('0.0a') - default: - return num.format('0a') - } -} diff --git a/packages/frontend/src/plugins/helpers.ts b/packages/frontend/src/plugins/helpers.ts deleted file mode 100644 index 590286fb6..000000000 --- a/packages/frontend/src/plugins/helpers.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-argument */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import Vue from 'vue' -import { getMixpanelUserId, getMixpanelServerId } from '@/mixpanelManager' -import { NotificationEventPayload } from '@/main/lib/core/helpers/eventHubHelper' -import { AppLocalStorage } from '@/utils/localStorage' -import { LocalStorageKeys } from '@/helpers/mainConstants' -import { getInviteTokenFromURL } from '@/main/lib/auth/services/authService' -import { triggerToastNotification } from '@/main/lib/core/composables/notifications' -import { getResourceType } from '@/main/lib/viewer/core/helpers/resourceHelper' -import { setPostAuthRedirect } from '@/main/lib/auth/utils/postAuthRedirectManager' - -Vue.prototype.$userId = function () { - return AppLocalStorage.get(LocalStorageKeys.Uuid) -} - -Vue.prototype.$mixpanelId = function () { - return getMixpanelUserId() -} - -Vue.prototype.$mixpanelServerId = function () { - return getMixpanelServerId() -} - -Vue.prototype.$loggedIn = function () { - return !!AppLocalStorage.get(LocalStorageKeys.Uuid) -} - -Vue.prototype.$isMobile = function () { - return window.matchMedia('(any-hover: none)').matches -} - -Vue.prototype.$resourceType = function (resourceId: string) { - return getResourceType(resourceId) -} - -/** - * Redirect to log in and redirect back to current page post-login - */ -Vue.prototype.$loginAndSetRedirect = function () { - if (this.$loggedIn()) return - - // Store current path with all of the query params and everything - const relativePath = window.location.href.replace(window.location.origin, '') - setPostAuthRedirect({ pathWithQuery: relativePath }) - - // Carry inviteId over - const token = getInviteTokenFromURL() - this.$router.push(token ? { path: '/authn/login', query: { token } } : '/authn/login') -} - -/** - * Trigger a toast notification from anywhere - */ -Vue.prototype.$triggerNotification = function (args: NotificationEventPayload) { - triggerToastNotification(this.$eventHub, args) -} diff --git a/packages/frontend/src/plugins/vuetify.js b/packages/frontend/src/plugins/vuetify.js deleted file mode 100644 index 6b7759567..000000000 --- a/packages/frontend/src/plugins/vuetify.js +++ /dev/null @@ -1,43 +0,0 @@ -import * as ThemeStateManager from '@/main/utils/themeStateManager' -import '@mdi/font/css/materialdesignicons.css' -import Vue from 'vue' -import Vuetify from 'vuetify/lib' - -Vue.use(Vuetify) - -ThemeStateManager.initialize() -const isDarkMode = ThemeStateManager.isDarkTheme() - -export default new Vuetify({ - icons: { - iconfont: 'mdi' - }, - theme: { - options: { customProperties: true }, - dark: isDarkMode, - themes: { - light: { - primary: '#047EFB', //blue - secondary: '#7BBCFF', //light blue - accent: '#FCF25E', //yellow - error: '#FF5555', //red - warning: '#FF9100', //orange - info: '#313BCF', //dark blue - success: '#4caf50', // green - text: '#000000', // black - background: '#f5f6f7' // white - }, - dark: { - primary: '#047EFB', //blue - secondary: '#7BBCFF', //light blue - accent: '#FCF25E', //yellow - error: '#FF5555', //red - warning: '#FF9100', //orange - info: '#9298f0', //dark blue - success: '#4caf50', // green - text: '#FFFFFF', // white - background: '#1a1a1a' // black / dark grey - } - } - } -}) diff --git a/packages/frontend/src/sass/variables.scss b/packages/frontend/src/sass/variables.scss deleted file mode 100644 index a93e26371..000000000 --- a/packages/frontend/src/sass/variables.scss +++ /dev/null @@ -1,285 +0,0 @@ -// $heading-font-family: 'Space Grotesk'; - -$primary-base: var(--v-primary-base); -$primary-darken: var(--v-secondary-base); -$primary-gradient: linear-gradient(0deg, $primary-darken 0%, $primary-base 40%); - -// By default Vuetify shows a scrollbar on all pages even the ones that don't need it, which is quite ugly -// https://github.com/vuetifyjs/vuetify/issues/1197 -html { - overflow-y: auto !important; -} - -@mixin speckle-gradient-bg { - background: $primary-base; - background: $primary-gradient; -} - -@mixin speckle-gradient-txt { - @include speckle-gradient-bg; - -webkit-background-clip: text; -} - -.background-light { - background: #8e9eab; - background: -webkit-linear-gradient(to top right, #eeeeee, #c8e8ff) !important; - background: linear-gradient(to top right, #ffffff, #c8e8ff) !important; -} - -.background-dark { - background: #141e30; - background: -webkit-linear-gradient(to top left, #243b55, #141e30) !important; - background: linear-gradient(to top left, #243b55, #141e30) !important; -} - -// TADAs -.tada-infinte { - -webkit-animation-name: tada; - animation-name: tada; - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - animation-iteration-count: infinite; -} - -.tada-once { - -webkit-animation-name: tada; - animation-name: tada; - -webkit-animation-duration: 1s; - animation-duration: 1s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; - animation-iteration-count: 2; -} - -@-webkit-keyframes tada { - 0% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - 10%, - 20% { - -webkit-transform: scale3d(0.8, 0.8, 0.8) rotate3d(0, 0, 1, -3deg); - transform: scale3d(0.8, 0.8, 0.8) rotate3d(0, 0, 1, -3deg); - } - 30%, - 50%, - 70%, - 90% { - -webkit-transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, 3deg); - transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, 3deg); - } - 40%, - 60%, - 80% { - -webkit-transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, -3deg); - transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, -3deg); - } - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} -@keyframes tada { - 0% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } - 10%, - 20% { - -webkit-transform: scale3d(0.8, 0.8, 0.8) rotate3d(0, 0, 1, -3deg); - transform: scale3d(0.8, 0.8, 0.8) rotate3d(0, 0, 1, -3deg); - } - 30%, - 50%, - 70%, - 90% { - -webkit-transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, 3deg); - transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, 3deg); - } - 40%, - 60%, - 80% { - -webkit-transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, -3deg); - transform: scale3d(1.4, 1.4, 1.4) rotate3d(0, 0, 1, -3deg); - } - 100% { - -webkit-transform: scale3d(1, 1, 1); - transform: scale3d(1, 1, 1); - } -} - -/* TOOLTIPs */ - -.tooltip { - display: block !important; - z-index: 10000; - font-family: 'Roboto', sans-serif !important; - font-size: 0.75rem !important; - pointer-events: none; -} - -.tooltip .tooltip-inner { - background: rgba(0, 0, 0, 1); - color: white; - border-radius: 16px; - padding: 5px 10px 4px; -} - -.tooltip .tooltip-arrow { - width: 0; - height: 0; - border-style: solid; - position: absolute; - margin: 5px; - border-color: rgba(0, 0, 0, 0.5); - z-index: 1; -} - -.tooltip[x-placement^='top'] { - margin-bottom: 5px; -} - -.tooltip[x-placement^='top'] .tooltip-arrow { - border-width: 5px 5px 0 5px; - border-left-color: transparent !important; - border-right-color: transparent !important; - border-bottom-color: transparent !important; - bottom: -5px; - left: calc(50% - 5px); - margin-top: 0; - margin-bottom: 0; -} - -.tooltip[x-placement^='bottom'] { - margin-top: 5px; -} - -.tooltip[x-placement^='bottom'] .tooltip-arrow { - border-width: 0 5px 5px 5px; - border-left-color: transparent !important; - border-right-color: transparent !important; - border-top-color: transparent !important; - top: -5px; - left: calc(50% - 5px); - margin-top: 0; - margin-bottom: 0; -} - -.tooltip[x-placement^='right'] { - margin-left: 5px; -} - -.tooltip[x-placement^='right'] .tooltip-arrow { - border-width: 5px 5px 5px 0; - border-left-color: transparent !important; - border-top-color: transparent !important; - border-bottom-color: transparent !important; - left: -5px; - top: calc(50% - 5px); - margin-left: 0; - margin-right: 0; -} - -.tooltip[x-placement^='left'] { - margin-right: 5px; -} - -.tooltip[x-placement^='left'] .tooltip-arrow { - border-width: 5px 0 5px 5px; - border-top-color: transparent !important; - border-right-color: transparent !important; - border-bottom-color: transparent !important; - right: -5px; - top: calc(50% - 5px); - margin-left: 0; - margin-right: 0; -} - -.tooltip.popover .popover-inner { - background: #f9f9f9; - color: black; - padding: 24px; - border-radius: 5px; - box-shadow: 0 5px 30px rgba(black, 0.1); -} - -.tooltip.popover .popover-arrow { - border-color: #f9f9f9; -} - -.tooltip[aria-hidden='true'] { - visibility: hidden; - opacity: 0; - transition: opacity 0.15s, visibility 0.15s; -} - -.tooltip[aria-hidden='false'] { - visibility: visible; - opacity: 1; - transition: opacity 0.15s; -} - -// Simple scrollbar (OSX-like) to use instead of the ugly browser one -@mixin simple-scrollbar { - $sb-width: 6px; - $sb-color: rgb(142, 142, 142); - - &::-webkit-scrollbar { - width: $sb-width; - height: 6px; - } - &::-webkit-scrollbar-track { - border-radius: 10px; - background: rgba(0, 0, 0, 0.1); - } - &::-webkit-scrollbar-thumb { - border-radius: 10px; - background: $sb-color; - } - &::-webkit-scrollbar-thumb:hover { - background: rgb(101, 101, 101); - } - &::-webkit-scrollbar-thumb:active { - background: rgba(90, 90, 90, 101); - } - - & { - scrollbar-width: $sb-width; - scrollbar-color: $sb-color; - } -} - -.simple-scrollbar { - @include simple-scrollbar; -} - -// Globally changing v-navigation-drawer scrollbar to the simple-scrollbar one -.v-navigation-drawer__content { - @include simple-scrollbar; -} - -// v-navigation-drawer resizer global restyle -.nav-resizer { - position: absolute; - top: 0; - right: 0; - width: 0px; - height: 100%; - z-index: 100000; - transition: all 0.6s ease; - opacity: 0.01; - border: 4px solid royalblue; -} -.nav-resizer:hover { - opacity: 0.5; - width: 0px; -} - -.no-mouse { - pointer-events: none; -} -.mouse { - pointer-events: auto; -} diff --git a/packages/frontend/src/type-augmentations/apollo.d.ts b/packages/frontend/src/type-augmentations/apollo.d.ts deleted file mode 100644 index f817f6b5b..000000000 --- a/packages/frontend/src/type-augmentations/apollo.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare module '@apollo/client/core' { - interface ApolloClient { - wsClient?: - | import('subscriptions-transport-ws').SubscriptionClient - | null - | undefined - } -} - -export {} diff --git a/packages/frontend/src/type-augmentations/css.d.ts b/packages/frontend/src/type-augmentations/css.d.ts deleted file mode 100644 index f60a02a5b..000000000 --- a/packages/frontend/src/type-augmentations/css.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.css' { - const src: string - export default src -} diff --git a/packages/frontend/src/type-augmentations/mixpanel.d.ts b/packages/frontend/src/type-augmentations/mixpanel.d.ts deleted file mode 100644 index cdcd74920..000000000 --- a/packages/frontend/src/type-augmentations/mixpanel.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module 'vue-mixpanel' { - declare const test: string - declare const plugin: import('vue').PluginFunction - export default plugin - export { test } -} diff --git a/packages/frontend/src/type-augmentations/shims-gql.ts b/packages/frontend/src/type-augmentations/shims-gql.ts deleted file mode 100644 index a33ad43d3..000000000 --- a/packages/frontend/src/type-augmentations/shims-gql.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.gql' { - import { DocumentNode } from '@apollo/client/core' - - const operation: DocumentNode - export default operation -} diff --git a/packages/frontend/src/type-augmentations/unplugin-components.d.ts b/packages/frontend/src/type-augmentations/unplugin-components.d.ts deleted file mode 100644 index 0e4c0c8ff..000000000 --- a/packages/frontend/src/type-augmentations/unplugin-components.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint-disable */ -/* prettier-ignore */ -// @ts-nocheck -// Generated by unplugin-vue-components -// Read more: https://github.com/vuejs/core/pull/3399 -export {} - -declare module 'vue' { - export interface GlobalComponents { - RouterLink: typeof import('vue-router')['RouterLink'] - RouterView: typeof import('vue-router')['RouterView'] - VAlert: typeof import('vuetify/lib')['VAlert'] - VApp: typeof import('vuetify/lib')['VApp'] - VAppBar: typeof import('vuetify/lib')['VAppBar'] - VAppBarNavIcon: typeof import('vuetify/lib')['VAppBarNavIcon'] - VAutocomplete: typeof import('vuetify/lib')['VAutocomplete'] - VAvatar: typeof import('vuetify/lib')['VAvatar'] - VBadge: typeof import('vuetify/lib')['VBadge'] - VBtn: typeof import('vuetify/lib')['VBtn'] - VBtnToggle: typeof import('vuetify/lib')['VBtnToggle'] - VCard: typeof import('vuetify/lib')['VCard'] - VCardActions: typeof import('vuetify/lib')['VCardActions'] - VCardSubtitle: typeof import('vuetify/lib')['VCardSubtitle'] - VCardText: typeof import('vuetify/lib')['VCardText'] - VCardTitle: typeof import('vuetify/lib')['VCardTitle'] - VCheckbox: typeof import('vuetify/lib')['VCheckbox'] - VChip: typeof import('vuetify/lib')['VChip'] - VCol: typeof import('vuetify/lib')['VCol'] - VCombobox: typeof import('vuetify/lib')['VCombobox'] - VContainer: typeof import('vuetify/lib')['VContainer'] - VDialog: typeof import('vuetify/lib')['VDialog'] - VDivider: typeof import('vuetify/lib')['VDivider'] - VExpandTransition: typeof import('vuetify/lib')['VExpandTransition'] - VExpansionPanel: typeof import('vuetify/lib')['VExpansionPanel'] - VExpansionPanelContent: typeof import('vuetify/lib')['VExpansionPanelContent'] - VExpansionPanelHeader: typeof import('vuetify/lib')['VExpansionPanelHeader'] - VExpansionPanels: typeof import('vuetify/lib')['VExpansionPanels'] - VFadeTransition: typeof import('vuetify/lib')['VFadeTransition'] - VForm: typeof import('vuetify/lib')['VForm'] - VHover: typeof import('vuetify/lib')['VHover'] - VIcon: typeof import('vuetify/lib')['VIcon'] - VImg: typeof import('vuetify/lib')['VImg'] - VItem: typeof import('vuetify/lib')['VItem'] - VItemGroup: typeof import('vuetify/lib')['VItemGroup'] - VList: typeof import('vuetify/lib')['VList'] - VListGroup: typeof import('vuetify/lib')['VListGroup'] - VListItem: typeof import('vuetify/lib')['VListItem'] - VListItemAction: typeof import('vuetify/lib')['VListItemAction'] - VListItemAvatar: typeof import('vuetify/lib')['VListItemAvatar'] - VListItemContent: typeof import('vuetify/lib')['VListItemContent'] - VListItemGroup: typeof import('vuetify/lib')['VListItemGroup'] - VListItemIcon: typeof import('vuetify/lib')['VListItemIcon'] - VListItemSubtitle: typeof import('vuetify/lib')['VListItemSubtitle'] - VListItemTitle: typeof import('vuetify/lib')['VListItemTitle'] - VMain: typeof import('vuetify/lib')['VMain'] - VMenu: typeof import('vuetify/lib')['VMenu'] - VNavigationDrawer: typeof import('vuetify/lib')['VNavigationDrawer'] - VOverlay: typeof import('vuetify/lib')['VOverlay'] - VPagination: typeof import('vuetify/lib')['VPagination'] - VProgressCircular: typeof import('vuetify/lib')['VProgressCircular'] - VProgressLinear: typeof import('vuetify/lib')['VProgressLinear'] - VRow: typeof import('vuetify/lib')['VRow'] - VScrollXTransition: typeof import('vuetify/lib')['VScrollXTransition'] - VScrollYTransition: typeof import('vuetify/lib')['VScrollYTransition'] - VSelect: typeof import('vuetify/lib')['VSelect'] - VSheet: typeof import('vuetify/lib')['VSheet'] - VSimpleTable: typeof import('vuetify/lib')['VSimpleTable'] - VSkeletonLoader: typeof import('vuetify/lib')['VSkeletonLoader'] - VSlider: typeof import('vuetify/lib')['VSlider'] - VSlideXTransition: typeof import('vuetify/lib')['VSlideXTransition'] - VSlideYTransition: typeof import('vuetify/lib')['VSlideYTransition'] - VSnackbar: typeof import('vuetify/lib')['VSnackbar'] - VSpacer: typeof import('vuetify/lib')['VSpacer'] - VSubheader: typeof import('vuetify/lib')['VSubheader'] - VSwitch: typeof import('vuetify/lib')['VSwitch'] - VTextarea: typeof import('vuetify/lib')['VTextarea'] - VTextField: typeof import('vuetify/lib')['VTextField'] - VThemeProvider: typeof import('vuetify/lib')['VThemeProvider'] - VTimeline: typeof import('vuetify/lib')['VTimeline'] - VTimelineItem: typeof import('vuetify/lib')['VTimelineItem'] - VToolbar: typeof import('vuetify/lib')['VToolbar'] - VToolbarItems: typeof import('vuetify/lib')['VToolbarItems'] - VToolbarTitle: typeof import('vuetify/lib')['VToolbarTitle'] - VTooltip: typeof import('vuetify/lib')['VTooltip'] - VWindow: typeof import('vuetify/lib')['VWindow'] - VWindowItem: typeof import('vuetify/lib')['VWindowItem'] - } -} diff --git a/packages/frontend/src/type-augmentations/vue-apollo-options.d.ts b/packages/frontend/src/type-augmentations/vue-apollo-options.d.ts deleted file mode 100644 index f065b8dbb..000000000 --- a/packages/frontend/src/type-augmentations/vue-apollo-options.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import Vue from 'vue' -import { CombinedVueInstance } from 'vue/types/vue' - -import { ApolloProvider } from '@vue/apollo-option' -import { DollarApollo } from '@vue/apollo-option/types/vue-apollo' -import { VueApolloComponentOptions } from '@vue/apollo-option/types/options' - -type DataDef = Data | ((this: Readonly & V) => Data) - -declare module 'vue/types/options' { - interface ComponentOptions { - apolloProvider?: ApolloProvider - apollo?: VueApolloComponentOptions< - Data extends DataDef - ? CombinedVueInstance - : CombinedVueInstance - > - } -} - -declare module 'vue/types/vue' { - interface Vue { - $apolloProvider: ApolloProvider - $apollo: DollarApollo - } -} diff --git a/packages/frontend/src/type-augmentations/vue-histogram-slider.d.ts b/packages/frontend/src/type-augmentations/vue-histogram-slider.d.ts deleted file mode 100644 index b678e5046..000000000 --- a/packages/frontend/src/type-augmentations/vue-histogram-slider.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'vue-histogram-slider' { - import { Component } from 'vue' - declare const comp: Component - export default comp -} diff --git a/packages/frontend/src/type-augmentations/vue-shim.d.ts b/packages/frontend/src/type-augmentations/vue-shim.d.ts deleted file mode 100644 index d9f24faa4..000000000 --- a/packages/frontend/src/type-augmentations/vue-shim.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.vue' { - import Vue from 'vue' - export default Vue -} diff --git a/packages/frontend/src/type-augmentations/vue.d.ts b/packages/frontend/src/type-augmentations/vue.d.ts deleted file mode 100644 index 487042638..000000000 --- a/packages/frontend/src/type-augmentations/vue.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -declare module 'vue/types/vue' { - import { Nullable } from '@/helpers/typeHelpers' - - export interface Vue { - /** - * Mixpanel instance - */ - $mixpanel: import('mixpanel-browser').OverridedMixpanel - /** - * Event bus, for sending & receiving events across the app - */ - $eventHub: Vue - - /** - * Trigger a toast notification - */ - $triggerNotification( - args: import('@/main/lib/core/helpers/eventHubHelper').NotificationEventPayload - ): void - - $userId: () => Nullable - - /** - * Whether the client seems to be a mobile device. Note that this doesn't check for screen size, only - * whether this is a mobile device. - */ - $isMobile: () => boolean - - /** - * Redirect to log in and redirect back to current page post-login - */ - $loginAndSetRedirect: () => void - - /** - * Check if auth token is stored in localStorage - * @deprecated Use `isLoggedInQuery`/`isLoggedInMixin`/`useIsLoggedIn` instead - */ - $loggedIn: () => boolean - - /** - * Resolve a resourceId's type - */ - $resourceType: typeof import('@/main/lib/viewer/core/helpers/resourceHelper').getResourceType - } - - export interface VueConfiguration { - /** - * To enable VueApollov4 to work - */ - globalProperties?: Record - } -} - -export {} diff --git a/packages/frontend/src/type-augmentations/window.d.ts b/packages/frontend/src/type-augmentations/window.d.ts deleted file mode 100644 index 75100d78f..000000000 --- a/packages/frontend/src/type-augmentations/window.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export {} - -declare global { - interface Window { - /** - * Used in some layout components - */ - __lastNavSize?: number - } -} diff --git a/packages/frontend/src/utils/localStorage.ts b/packages/frontend/src/utils/localStorage.ts deleted file mode 100644 index c344f2482..000000000 --- a/packages/frontend/src/utils/localStorage.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { SafeLocalStorage } from '@speckle/shared' -export const AppLocalStorage = SafeLocalStorage diff --git a/packages/frontend/tsconfig.eslint.json b/packages/frontend/tsconfig.eslint.json deleted file mode 100644 index 21d89f262..000000000 --- a/packages/frontend/tsconfig.eslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": "./tsconfig.json", - "exclude": ["node_modules", "dist"], - "include": ["**/*", "**/*.vue"] -} diff --git a/packages/frontend/tsconfig.json b/packages/frontend/tsconfig.json deleted file mode 100644 index 38a9e9e32..000000000 --- a/packages/frontend/tsconfig.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "compilerOptions": { - "target": "es6", - "module": "es2020", - "strict": true, - "jsx": "preserve", - "importHelpers": true, - "moduleResolution": "node", - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "sourceMap": true, - "allowJs": true, - "noEmit": true, - "baseUrl": ".", - "paths": { - "@/*": ["src/*"] - }, - "lib": ["esnext", "dom", "dom.iterable", "scripthost"], - "types": [ - "vue-infinite-loading", - "type-fest", - "vue", - "@types/node", - "@types/mixpanel-browser", - "vuetify", - "@types/dompurify", - "vite/client" - ] - }, - "vueCompilerOptions": { - "target": 2.7 - }, - "ts-node": { - "swc": true - }, - "include": [ - "src/**/*.ts", - "src/**/*.js", - "src/**/*.tsx", - "src/**/*.vue", - "tests/**/*.ts", - "tests/**/*.tsx" - ], - "exclude": ["node_modules", "dist"] -} diff --git a/packages/frontend/vite.config.js b/packages/frontend/vite.config.js deleted file mode 100644 index 3264de7db..000000000 --- a/packages/frontend/vite.config.js +++ /dev/null @@ -1,65 +0,0 @@ -import path from 'path' -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue2' -import Components from 'unplugin-vue-components/vite' -import { VuetifyResolver } from 'unplugin-vue-components/resolvers' -import gql from 'vite-plugin-simple-gql' - -const port = '8080' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [ - vue({ - template: { - transformAssetUrls: { - // defaults - video: ['src', 'poster'], - source: ['src'], - img: ['src'], - image: ['xlink:href', 'href'], - use: ['xlink:href', 'href'], - // support for vuetify components - 'v-img': ['src'] - } - } - }), - Components({ - resolvers: [VuetifyResolver()], - dts: './src/type-augmentations/unplugin-components.d.ts' - }), - gql() - ], - server: { - host: '127.0.0.1', - port, - hmr: { - port - } - }, - resolve: { - alias: { - // eslint-disable-next-line no-undef - '@': path.resolve(__dirname, './src'), - // redirects lodash to lodash-es in prod build, for a reduced & tree-shaked bundle - lodash: 'lodash-es' - }, - extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] - }, - css: { - // https://vitejs.dev/config/#css-preprocessoroptions - preprocessorOptions: { - sass: { - additionalData: [ - // vuetify variable overrides - '@import "@/sass/variables.scss"', - '' - ].join('\n') - } - } - }, - - optimizeDeps: { - include: ['vuetify', 'vuetify/lib'] - } -}) diff --git a/packages/objectloader/src/index.js b/packages/objectloader/src/index.js index 878ed40e9..395096fd8 100644 --- a/packages/objectloader/src/index.js +++ b/packages/objectloader/src/index.js @@ -107,12 +107,9 @@ class ObjectLoader { } } - static createFromJSON(json) { - const start = performance.now() - const jsonObj = JSON.parse(json) - console.warn('JSON Parse Time -> ', performance.now() - start) + static createFromObjects(objects) { + const rootObject = objects[0] - const rootObject = jsonObj[0] const loader = new (class extends ObjectLoader { constructor() { super({ @@ -136,7 +133,7 @@ class ObjectLoader { async *getObjectIterator() { const t0 = Date.now() let count = 0 - for await (const { id, obj } of this.getRawObjectIterator(jsonObj)) { + for await (const { id, obj } of this.getRawObjectIterator(objects)) { this.buffer[id] = obj count += 1 yield obj @@ -170,6 +167,14 @@ class ObjectLoader { return loader } + static createFromJSON(json) { + const start = performance.now() + const jsonObj = JSON.parse(json) + console.warn('JSON Parse Time -> ', performance.now() - start) + + return this.createFromObjects(jsonObj) + } + async asyncPause() { // Don't freeze the UI // while ( this.existingAsyncPause ) { diff --git a/packages/objectloader/types/index.d.ts b/packages/objectloader/types/index.d.ts index 5a1bee220..2a97b9586 100644 --- a/packages/objectloader/types/index.d.ts +++ b/packages/objectloader/types/index.d.ts @@ -41,6 +41,7 @@ class ObjectLoader { }> }) + static createFromObjects(objects: object[]): ObjectLoader static createFromJSON(input: string): ObjectLoader async getRootObject(): Promise async getTotalObjectCount(): Promise diff --git a/packages/server/.env-example b/packages/server/.env-example index b59e45160..e259a5a49 100644 --- a/packages/server/.env-example +++ b/packages/server/.env-example @@ -22,8 +22,6 @@ MOCKED_API_MODULES= # Settings for making the server work with Frontend 2.0 ############################################################ -# Whether server is meant to be used with Frontend 2.0 -USE_FRONTEND_2=true FRONTEND_ORIGIN="http://127.0.0.1:8081" # URL of a project on any FE2 speckle server that will be pulled in and used as the onboarding stream diff --git a/packages/server/.env.test-example b/packages/server/.env.test-example index 106f853bd..429987d08 100644 --- a/packages/server/.env.test-example +++ b/packages/server/.env.test-example @@ -5,6 +5,8 @@ PORT=0 POSTGRES_URL=postgres://speckle:speckle@127.0.0.1/speckle2_test POSTGRES_USER='' +FRONTEND_ORIGIN="http://127.0.0.1:8081" + MULTI_REGION_CONFIG_PATH="multiregion.test.json" #RUN_TESTS_IN_MULTIREGION_MODE=true RATELIMITER_ENABLED='false' diff --git a/packages/server/app.ts b/packages/server/app.ts index 8367d53fd..4ec8c69c0 100644 --- a/packages/server/app.ts +++ b/packages/server/app.ts @@ -7,7 +7,6 @@ import express, { Express } from 'express' // `express-async-errors` patches express to catch errors in async handlers. no variable needed import 'express-async-errors' -import compression from 'compression' import cookieParser from 'cookie-parser' import { createTerminus } from '@godaddy/terminus' @@ -24,7 +23,7 @@ import { sanitizeHeaders } from '@/logging/expressLogging' -import { errorLoggingMiddleware } from '@/logging/errorLogging' +import { errorMetricsMiddleware } from '@/logging/errorMetrics' import prometheusClient from 'prom-client' import { ApolloServer } from '@apollo/server' @@ -44,25 +43,28 @@ import { getFileSizeLimitMB, isDevEnv, isTestEnv, - useNewFrontend, isApolloMonitoringEnabled, enableMixpanel, getPort, getBindAddress, shutdownTimeoutSeconds, - asyncRequestContextEnabled + asyncRequestContextEnabled, + getMaximumRequestBodySizeMB, + isCompressionEnabled } from '@/modules/shared/helpers/envHelper' import * as ModulesSetup from '@/modules' import { GraphQLContext, Optional } from '@/modules/shared/helpers/typeHelper' import { createRateLimiterMiddleware } from '@/modules/core/services/ratelimiter' import { get, has, isString } from 'lodash' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { authContextMiddleware, buildContext, + compressionMiddlewareFactory, determineClientIpAddressMiddleware, - mixpanelTrackerHelperMiddlewareFactory + mixpanelTrackerHelperMiddlewareFactory, + requestBodyParsingMiddlewareFactory } from '@/modules/shared/middleware' import { GraphQLError } from 'graphql' import { redactSensitiveVariables } from '@/logging/loggingHelper' @@ -420,9 +422,7 @@ export async function buildApolloServer(options?: { * Initialises all server (express/subscription/http) instances */ export async function init() { - if (useNewFrontend()) { - startupLogger.info('🖼️ Serving for frontend-2...') - } + startupLogger.info('🖼️ Serving for frontend-2...') const app = express() app.disable('x-powered-by') @@ -441,27 +441,22 @@ export async function init() { startupLogger.info('Async request context tracking enabled 👀') } - if (process.env.COMPRESSION) { - app.use(compression()) - } + app.use( + compressionMiddlewareFactory({ isCompressionEnabled: isCompressionEnabled() }) + ) - app.use(corsMiddleware()) - // there are some paths, that need the raw body - app.use((req, res, next) => { - const rawPaths = ['/api/v1/billing/webhooks', '/api/thirdparty/gendo/'] - if (rawPaths.some((p) => req.path.startsWith(p))) { - express.raw({ type: 'application/json', limit: '100mb' })(req, res, next) - } else { - express.json({ limit: '100mb' })(req, res, next) - } - }) + app.use(corsMiddlewareFactory()) + + app.use( + requestBodyParsingMiddlewareFactory({ + maximumRequestBodySizeMb: getMaximumRequestBodySizeMB() + }) + ) // there are some paths that need the raw body, not a parsed body app.use(express.urlencoded({ limit: `${getFileSizeLimitMB()}mb`, extended: false })) // Trust X-Forwarded-* headers (for https protocol detection) app.enable('trust proxy') - // Log errors - app.use(errorLoggingMiddleware) app.use(createRateLimiterMiddleware()) // Rate limiting by IP address for all users app.use(authContextMiddleware) app.use( @@ -503,17 +498,8 @@ export async function init() { }) ) - // Expose prometheus metrics - app.get('/metrics', async (req, res) => { - try { - res.set('Content-Type', prometheusClient.register.contentType) - res.end(await prometheusClient.register.metrics()) - } catch (ex: unknown) { - res.status(500).end(ex instanceof Error ? ex.message : `${ex}`) - } - }) - // At the very end adding default error handler middleware + app.use(errorMetricsMiddleware) app.use(defaultErrorHandler) return { @@ -532,12 +518,11 @@ export async function shutdown(params: { await ModulesSetup.shutdown() } -const shouldUseFrontendProxy = () => - process.env.NODE_ENV === 'development' && process.env.USE_FRONTEND_PROXY === 'true' +const shouldUseFrontendProxy = () => isDevEnv() async function createFrontendProxy() { const frontendHost = process.env.FRONTEND_HOST || '127.0.0.1' - const frontendPort = process.env.FRONTEND_PORT || 8080 + const frontendPort = process.env.FRONTEND_PORT || 8081 const { createProxyMiddleware } = await import('http-proxy-middleware') // even tho it has default values, it fixes http-proxy setting `Connection: close` on each request diff --git a/packages/server/assets/emails/templates/components/footer.mjml b/packages/server/assets/emails/templates/components/footer.mjml index 40b35e764..efb333941 100644 --- a/packages/server/assets/emails/templates/components/footer.mjml +++ b/packages/server/assets/emails/templates/components/footer.mjml @@ -18,7 +18,7 @@ - + Brought to you by Speckle , the Open Source Data Platform for 3D Data. Follow Us diff --git a/packages/server/assets/emails/templates/components/headerLogo.mjml b/packages/server/assets/emails/templates/components/headerLogo.mjml index 0bf3640f5..383d1750f 100644 --- a/packages/server/assets/emails/templates/components/headerLogo.mjml +++ b/packages/server/assets/emails/templates/components/headerLogo.mjml @@ -1,13 +1,8 @@ - - - - - diff --git a/packages/server/assets/public/speckle-email-logo.png b/packages/server/assets/public/speckle-email-logo.png new file mode 100644 index 000000000..79aef8d15 Binary files /dev/null and b/packages/server/assets/public/speckle-email-logo.png differ diff --git a/packages/server/logging/errorLogging.ts b/packages/server/logging/errorMetrics.ts similarity index 56% rename from packages/server/logging/errorLogging.ts rename to packages/server/logging/errorMetrics.ts index de705e7ba..93cc64547 100644 --- a/packages/server/logging/errorLogging.ts +++ b/packages/server/logging/errorMetrics.ts @@ -1,5 +1,4 @@ /* istanbul ignore file */ -import { logger } from '@/logging/logging' import type { Nullable } from '@speckle/shared' import prometheusClient from 'prom-client' import type express from 'express' @@ -7,7 +6,7 @@ import type express from 'express' // eslint-disable-next-line @typescript-eslint/no-explicit-any let metricErrorCount: Nullable> = null -export const errorLoggingMiddleware: express.ErrorRequestHandler = ( +export const errorMetricsMiddleware: express.ErrorRequestHandler = ( err, req, res, @@ -21,17 +20,6 @@ export const errorLoggingMiddleware: express.ErrorRequestHandler = ( }) } - if (!('statusCode' in err) || err.statusCode >= 500) { - logger.error({ err }, `Error when handling ${req.originalUrl} from ${req.ip}`) - } else if (err.statusCode >= 400) { - logger.info({ err }, `Error when handling ${req.originalUrl} from ${req.ip}`) - } else { - logger.warn( - { err }, - `Error when handling ${req.originalUrl} from ${req.ip}. Error has a statusCode but it is not 4xx or 5xx.` - ) - } - let route = 'unknown' if (req.route && req.route.path) route = req.route.path metricErrorCount.labels(route).inc() diff --git a/packages/server/logging/index.ts b/packages/server/logging/index.ts index c1020813e..148bb54ef 100644 --- a/packages/server/logging/index.ts +++ b/packages/server/logging/index.ts @@ -34,14 +34,26 @@ export default async function (app: express.Express) { getAllDbClients: getAllRegisteredDbClients, logger }) - const expressMetricsMiddleware = promBundle({ - includeMethod: true, - includePath: true, - httpDurationMetricName: 'speckle_server_request_duration', - metricType: 'summary', - autoregister: false - }) - app.use(expressMetricsMiddleware) + app.use( + promBundle({ + includeMethod: true, + includePath: true, + httpDurationMetricName: 'speckle_server_request_duration', + metricType: 'summary', + autoregister: false + }) + ) } + + // Expose prometheus metrics + app.get('/metrics', async (req, res, next) => { + try { + res.set('Content-Type', prometheusClient.register.contentType) + res.end(await prometheusClient.register.metrics()) + } catch (ex: unknown) { + res.status(500).end(ex instanceof Error ? ex.message : `${ex}`) + next(ex) + } + }) } diff --git a/packages/server/logging/logging.ts b/packages/server/logging/logging.ts index 3878375d2..1ab0b98fa 100644 --- a/packages/server/logging/logging.ts +++ b/packages/server/logging/logging.ts @@ -32,6 +32,7 @@ export const automateLogger = extendLoggerComponent(logger, 'automate') export const subscriptionLogger = extendLoggerComponent(logger, 'subscription') export const healthCheckLogger = extendLoggerComponent(logger, 'healthcheck') export const testLogger = extendLoggerComponent(logger, 'test') +export const fileUploadsLogger = extendLoggerComponent(logger, 'file-uploads') export type Logger = typeof logger export { extendLoggerComponent, Observability } diff --git a/packages/server/modules/accessrequests/graph/resolvers/index.ts b/packages/server/modules/accessrequests/graph/resolvers/index.ts index 33b0e509e..e65f35144 100644 --- a/packages/server/modules/accessrequests/graph/resolvers/index.ts +++ b/packages/server/modules/accessrequests/graph/resolvers/index.ts @@ -17,10 +17,7 @@ import { requestStreamAccessFactory } from '@/modules/accessrequests/services/stream' import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { Resolvers } from '@/modules/core/graph/generated/graphql' import { mapStreamRoleToValue } from '@/modules/core/helpers/graphTypes' import { Roles } from '@/modules/core/helpers/mainConstants' @@ -75,10 +72,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/accessrequests/tests/projectAccessRequests.spec.ts b/packages/server/modules/accessrequests/tests/projectAccessRequests.spec.ts index 299ddc074..d5051c20c 100644 --- a/packages/server/modules/accessrequests/tests/projectAccessRequests.spec.ts +++ b/packages/server/modules/accessrequests/tests/projectAccessRequests.spec.ts @@ -14,7 +14,6 @@ import { import { ActionTypes } from '@/modules/activitystream/helpers/types' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory } from '@/modules/activitystream/services/streamActivity' @@ -97,10 +96,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/accessrequests/tests/streamAccessRequests.spec.ts b/packages/server/modules/accessrequests/tests/streamAccessRequests.spec.ts index e9f9a2266..93f236b56 100644 --- a/packages/server/modules/accessrequests/tests/streamAccessRequests.spec.ts +++ b/packages/server/modules/accessrequests/tests/streamAccessRequests.spec.ts @@ -15,7 +15,6 @@ import { import { ActionTypes } from '@/modules/activitystream/helpers/types' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory } from '@/modules/activitystream/services/streamActivity' @@ -100,10 +99,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/activitystream/domain/operations.ts b/packages/server/modules/activitystream/domain/operations.ts index 8bdcce5ec..506725804 100644 --- a/packages/server/modules/activitystream/domain/operations.ts +++ b/packages/server/modules/activitystream/domain/operations.ts @@ -176,21 +176,6 @@ export type AddStreamCommentMentionActivity = (params: { threadId: string }) => Promise -export type AddStreamInviteDeclinedActivity = (params: { - streamId: string - inviteTargetId: string - inviterId: string - stream: StreamRecord -}) => Promise - -export type AddStreamInviteSentOutActivity = (params: { - streamId: string - inviteTargetId: string | null - inviterId: string - inviteTargetEmail: string | null - stream: StreamRecord -}) => Promise - export type AddStreamDeletedActivity = (params: { streamId: string deleterId: string @@ -253,26 +238,20 @@ export type AddCommitDeletedActivity = (params: { branchId: string }) => Promise -export type AddCommentCreatedActivity = (params: { - streamId: string - userId: string +export type AddThreadCreatedActivity = (params: { input: CommentCreatedActivityInput comment: CommentRecord }) => Promise export type AddCommentArchivedActivity = (params: { - streamId: string - commentId: string userId: string input: MutationCommentArchiveArgs comment: CommentRecord }) => Promise export type AddReplyAddedActivity = (params: { - streamId: string input: ReplyCreatedActivityInput reply: CommentRecord - userId: string }) => Promise export type AddBranchCreatedActivity = (params: { diff --git a/packages/server/modules/activitystream/events/accessRequestListeners.ts b/packages/server/modules/activitystream/events/accessRequestListeners.ts new file mode 100644 index 000000000..7237afc3b --- /dev/null +++ b/packages/server/modules/activitystream/events/accessRequestListeners.ts @@ -0,0 +1,128 @@ +import { EventBusListen, EventPayload } from '@/modules/shared/services/eventBus' +import { + AddStreamAccessRequestDeclinedActivity, + AddStreamAccessRequestedActivity, + SaveActivity +} from '@/modules/activitystream/domain/operations' +import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' +import { AccessRequestEvents } from '@/modules/accessrequests/domain/events' +import { + AccessRequestType, + isStreamAccessRequest +} from '@/modules/accessrequests/repositories' + +/** + * Save a "stream access requested" activity + */ +const addStreamAccessRequestedActivityFactory = + ({ + saveActivity + }: { + saveActivity: SaveActivity + }): AddStreamAccessRequestedActivity => + async (params: { streamId: string; requesterId: string }) => { + const { streamId, requesterId } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Stream, + resourceId: streamId, + userId: requesterId, + actionType: ActionTypes.Stream.AccessRequestSent, + message: `User ${requesterId} has requested access to stream ${streamId}`, + info: { requesterId } + }) + } + +/** + * Save a "stream acccess request declined/denied" activity + */ +const addStreamAccessRequestDeclinedActivityFactory = + ({ + saveActivity + }: { + saveActivity: SaveActivity + }): AddStreamAccessRequestDeclinedActivity => + async (params: { streamId: string; requesterId: string; declinerId: string }) => { + const { streamId, requesterId, declinerId } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Stream, + resourceId: streamId, + userId: declinerId, + actionType: ActionTypes.Stream.AccessRequestDeclined, + message: `User ${declinerId} declined access to stream ${streamId} for user ${requesterId}`, + info: { requesterId, declinerId } + }) + } + +const onServerAccessRequestCreatedFactory = + ({ + addStreamAccessRequestedActivity + }: { + addStreamAccessRequestedActivity: AddStreamAccessRequestedActivity + }) => + async (payload: EventPayload) => { + const { + request: { resourceId, requesterId } + } = payload.payload + if (!isStreamAccessRequest(payload.payload.request)) return + if (!resourceId) return + + await addStreamAccessRequestedActivity({ + streamId: resourceId, + requesterId + }) + } + +const onServerAccessRequestFinalizedFactory = + ({ + addStreamAccessRequestDeclinedActivity + }: { + addStreamAccessRequestDeclinedActivity: AddStreamAccessRequestDeclinedActivity + }) => + async (payload: EventPayload) => { + const { + approved, + finalizedBy, + request: { resourceId, resourceType, requesterId } + } = payload.payload + if (!resourceId) return + + if (resourceType === AccessRequestType.Stream) { + // If user was added to stream, an activity stream item was already added from 'addOrUpdateStreamCollaborator' + if (approved) return + + await addStreamAccessRequestDeclinedActivity({ + streamId: resourceId, + requesterId, + declinerId: finalizedBy + }) + } + } + +export const reportAccessRequestActivityFactory = + (deps: { eventListen: EventBusListen; saveActivity: SaveActivity }) => () => { + const addStreamAccessRequestedActivity = + addStreamAccessRequestedActivityFactory(deps) + const addStreamAccessRequestDeclinedActivity = + addStreamAccessRequestDeclinedActivityFactory(deps) + const onServerAccessRequestCreated = onServerAccessRequestCreatedFactory({ + addStreamAccessRequestedActivity + }) + const onServerAccessRequestFinalized = onServerAccessRequestFinalizedFactory({ + addStreamAccessRequestDeclinedActivity + }) + + const quitters = [ + deps.eventListen(AccessRequestEvents.Created, async (payload) => { + if (!isStreamAccessRequest(payload.payload.request)) return + return await onServerAccessRequestCreated(payload) + }), + deps.eventListen(AccessRequestEvents.Finalized, async (payload) => { + if (!isStreamAccessRequest(payload.payload.request)) return + await onServerAccessRequestFinalized(payload) + }) + ] + + return () => quitters.forEach((quit) => quit()) + } diff --git a/packages/server/modules/activitystream/events/branchListeners.ts b/packages/server/modules/activitystream/events/branchListeners.ts new file mode 100644 index 000000000..193e9d736 --- /dev/null +++ b/packages/server/modules/activitystream/events/branchListeners.ts @@ -0,0 +1,97 @@ +import { + AddBranchCreatedActivity, + AddBranchDeletedActivity, + AddBranchUpdatedActivity, + SaveActivity +} from '@/modules/activitystream/domain/operations' +import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' +import { ModelEvents } from '@/modules/core/domain/branches/events' +import { isBranchDeleteInput, isBranchUpdateInput } from '@/modules/core/helpers/branch' +import { EventBusListen } from '@/modules/shared/services/eventBus' + +/** + * Save "branch created" activity + */ +const addBranchCreatedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddBranchCreatedActivity => + async (params) => { + const { branch } = params + + await saveActivity({ + streamId: branch.streamId, + resourceType: ResourceTypes.Branch, + resourceId: branch.id, + actionType: ActionTypes.Branch.Create, + userId: branch.authorId, + info: { branch }, + message: `Branch created: ${branch.name} (${branch.id})` + }) + } + +const addBranchUpdatedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddBranchUpdatedActivity => + async (params) => { + const { update, userId, oldBranch } = params + + const streamId = isBranchUpdateInput(update) ? update.streamId : update.projectId + await saveActivity({ + streamId, + resourceType: ResourceTypes.Branch, + resourceId: update.id, + actionType: ActionTypes.Branch.Update, + userId, + info: { old: oldBranch, new: update }, + message: `Branch metadata changed for branch ${update.id}` + }) + } + +const addBranchDeletedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddBranchDeletedActivity => + async (params) => { + const { input, userId, branchName } = params + + const streamId = isBranchDeleteInput(input) ? input.streamId : input.projectId + await Promise.all([ + saveActivity({ + streamId, + resourceType: ResourceTypes.Branch, + resourceId: input.id, + actionType: ActionTypes.Branch.Delete, + userId, + info: { branch: { ...input, name: branchName } }, + message: `Branch deleted: '${branchName}' (${input.id})` + }) + ]) + } + +export const reportBranchActivityFactory = + (deps: { eventListen: EventBusListen; saveActivity: SaveActivity }) => () => { + const addBranchCreatedActivity = addBranchCreatedActivityFactory(deps) + const addBranchUpdatedActivity = addBranchUpdatedActivityFactory(deps) + const addBranchDeletedActivity = addBranchDeletedActivityFactory(deps) + + const quitters = [ + deps.eventListen(ModelEvents.Created, async (payload) => { + await addBranchCreatedActivity({ branch: payload.payload.model }) + }), + deps.eventListen(ModelEvents.Updated, async ({ payload }) => { + await addBranchUpdatedActivity({ + update: payload.update, + userId: payload.userId, + oldBranch: payload.oldModel, + newBranch: payload.newModel + }) + }), + deps.eventListen(ModelEvents.Deleted, async ({ payload }) => { + await addBranchDeletedActivity({ + userId: payload.userId, + input: payload.input, + branchName: payload.model.name + }) + }) + ] + + return () => { + quitters.forEach((quit) => quit()) + } + } diff --git a/packages/server/modules/activitystream/events/commentListeners.ts b/packages/server/modules/activitystream/events/commentListeners.ts new file mode 100644 index 000000000..dc03d12f3 --- /dev/null +++ b/packages/server/modules/activitystream/events/commentListeners.ts @@ -0,0 +1,120 @@ +import { + AddThreadCreatedActivity, + AddReplyAddedActivity, + SaveActivity, + AddCommentArchivedActivity +} from '@/modules/activitystream/domain/operations' +import { + CommentCreatedActivityInput, + ReplyCreatedActivityInput +} from '@/modules/activitystream/domain/types' +import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' +import { CommentEvents, CommentEventsPayloads } from '@/modules/comments/domain/events' +import { ReplyCreateInput } from '@/modules/core/graph/generated/graphql' +import { EventBusListen } from '@/modules/shared/services/eventBus' +import { has } from 'lodash' +import { OverrideProperties } from 'type-fest' + +const addThreadCreatedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddThreadCreatedActivity => + async (params) => { + const { input, comment } = params + + await saveActivity({ + resourceId: comment.id, + streamId: comment.streamId, + resourceType: ResourceTypes.Comment, + actionType: ActionTypes.Comment.Create, + userId: comment.authorId, + info: { input }, + message: `Comment added: ${comment.id} (${input})` + }) + } + +const isLegacyReplyCreateInput = ( + i: ReplyCreatedActivityInput +): i is ReplyCreateInput => has(i, 'streamId') + +const addReplyAddedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddReplyAddedActivity => + async (params) => { + const { input, reply } = params + + const parentCommentId = isLegacyReplyCreateInput(input) + ? input.parentComment + : input.threadId + await saveActivity({ + streamId: reply.streamId, + resourceType: ResourceTypes.Comment, + resourceId: parentCommentId, + actionType: ActionTypes.Comment.Reply, + userId: reply.authorId, + info: { input }, + message: `Comment reply #${reply.id} created` + }) + } + +const addCommentArchivedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddCommentArchivedActivity => + async (params) => { + const { userId, input, comment } = params + + await saveActivity({ + streamId: comment.streamId, + resourceType: ResourceTypes.Comment, + resourceId: comment.id, + actionType: ActionTypes.Comment.Archive, + userId, + info: { input }, + message: `Comment #${comment.id} archived` + }) + } + +const isReplyCreatedPayload = ( + payload: CommentEventsPayloads[typeof CommentEvents.Created] +): payload is OverrideProperties< + CommentEventsPayloads[typeof CommentEvents.Created], + { + input: ReplyCreatedActivityInput + } +> => { + return payload.isThread === false +} + +const isThreadCreatedPayload = ( + payload: CommentEventsPayloads[typeof CommentEvents.Created] +): payload is OverrideProperties< + CommentEventsPayloads[typeof CommentEvents.Created], + { + input: CommentCreatedActivityInput + } +> => { + return payload.isThread +} + +export const reportCommentActivityFactory = + (deps: { eventListen: EventBusListen; saveActivity: SaveActivity }) => () => { + const addThreadCreatedActivity = addThreadCreatedActivityFactory(deps) + const addReplyAddedActivity = addReplyAddedActivityFactory(deps) + const addCommentArchivedActivity = addCommentArchivedActivityFactory(deps) + + const quitters = [ + deps.eventListen(CommentEvents.Created, async ({ payload }) => { + if (isReplyCreatedPayload(payload)) { + await addReplyAddedActivity({ + reply: payload.comment, + input: payload.input + }) + } else if (isThreadCreatedPayload(payload)) { + await addThreadCreatedActivity(payload) + } + }), + deps.eventListen(CommentEvents.Archived, async ({ payload }) => { + await addCommentArchivedActivity(payload) + }) + ] + + return () => { + quitters.forEach((quit) => quit()) + } + } diff --git a/packages/server/modules/activitystream/events/commitListeners.ts b/packages/server/modules/activitystream/events/commitListeners.ts new file mode 100644 index 000000000..4a96909e9 --- /dev/null +++ b/packages/server/modules/activitystream/events/commitListeners.ts @@ -0,0 +1,195 @@ +import { + AddCommitCreatedActivity, + AddCommitDeletedActivity, + AddCommitUpdatedActivity, + SaveActivity +} from '@/modules/activitystream/domain/operations' +import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' +import { VersionEvents } from '@/modules/core/domain/commits/events' +import { CommitCreateInput } from '@/modules/core/graph/generated/graphql' +import { CommitRecord } from '@/modules/core/helpers/types' +import { EventBusListen } from '@/modules/shared/services/eventBus' +import { MaybeNullOrUndefined } from '@speckle/shared' + +/** + * Save "new commit created" activity item + */ +const addCommitCreatedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddCommitCreatedActivity => + async (params: { + commitId: string + streamId: string + userId: string + input: CommitCreateInput + branchName: string + modelId: string + commit: CommitRecord + }) => { + const { commitId, input, streamId, userId, branchName, commit, modelId } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Commit, + resourceId: commitId, + actionType: ActionTypes.Commit.Create, + userId, + info: { + id: commitId, + commit: { + ...input, + projectId: streamId, + modelId, + versionId: commit.id + } + }, + message: `Commit created on branch ${branchName}: ${commitId} (${input.message})` + }) + } + +const addCommitUpdatedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddCommitUpdatedActivity => + async (params) => { + const { commitId, streamId, userId, originalCommit, update } = params + + await saveActivity({ + streamId, + resourceType: ResourceTypes.Commit, + resourceId: commitId, + actionType: ActionTypes.Commit.Update, + userId, + info: { old: originalCommit, new: update }, + message: `Commit updated: ${commitId}` + }) + } + +const addCommitMovedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }) => + async (params: { + commitId: string + streamId: string + userId: string + originalBranchId: string + newBranchId: string + commit: CommitRecord + }) => { + const { commitId, streamId, userId, originalBranchId, newBranchId } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Commit, + resourceId: commitId, + actionType: ActionTypes.Commit.Move, + userId, + info: { originalBranchId, newBranchId }, + message: `Commit moved: ${commitId}` + }) + } + +const addCommitDeletedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }): AddCommitDeletedActivity => + async (params: { + commitId: string + streamId: string + userId: string + commit: CommitRecord + branchId: string + }) => { + const { commitId, streamId, userId, commit } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Commit, + resourceId: commitId, + actionType: ActionTypes.Commit.Delete, + userId, + info: { commit }, + message: `Commit deleted: ${commitId}` + }) + } + +const addCommitReceivedActivityFactory = + ({ saveActivity }: { saveActivity: SaveActivity }) => + async (params: { + streamId: string + commitId: string + userId: string + sourceApplication: string + message: MaybeNullOrUndefined + }) => { + const { streamId, commitId, userId, sourceApplication, message } = params + await saveActivity({ + streamId, + resourceType: ResourceTypes.Commit, + resourceId: commitId, + actionType: ActionTypes.Commit.Receive, + userId, + info: { + sourceApplication, + message + }, + message: `Commit $commitId} was received by user ${userId}` + }) + } + +export const reportCommitActivityFactory = + (deps: { eventListen: EventBusListen; saveActivity: SaveActivity }) => () => { + const addCommitCreatedActivity = addCommitCreatedActivityFactory(deps) + const addCommitUpdatedActivity = addCommitUpdatedActivityFactory(deps) + const addCommitMovedActivity = addCommitMovedActivityFactory(deps) + const addCommitDeletedActivity = addCommitDeletedActivityFactory(deps) + const addCommitReceivedActivity = addCommitReceivedActivityFactory(deps) + + const quitters = [ + deps.eventListen(VersionEvents.Created, async ({ payload }) => { + await addCommitCreatedActivity({ + commitId: payload.version.id, + streamId: payload.projectId, + userId: payload.userId, + input: payload.input, + branchName: payload.modelName, + modelId: payload.modelId, + commit: payload.version + }) + }), + deps.eventListen(VersionEvents.Updated, async ({ payload }) => { + await addCommitUpdatedActivity({ + commitId: payload.versionId, + streamId: payload.projectId, + userId: payload.userId, + originalCommit: payload.oldVersion, + update: payload.update, + newCommit: payload.newVersion, + branchId: payload.modelId + }) + }), + deps.eventListen(VersionEvents.MovedModel, async ({ payload }) => { + await addCommitMovedActivity({ + commitId: payload.version.id, + streamId: payload.projectId, + userId: payload.userId, + originalBranchId: payload.originalModelId, + newBranchId: payload.newModelId, + commit: payload.version + }) + }), + deps.eventListen(VersionEvents.Deleted, async ({ payload }) => { + await addCommitDeletedActivity({ + commitId: payload.versionId, + streamId: payload.projectId, + userId: payload.userId, + commit: payload.version, + branchId: payload.modelId + }) + }), + deps.eventListen(VersionEvents.Received, async ({ payload }) => { + await addCommitReceivedActivity({ + streamId: payload.projectId, + commitId: payload.versionId, + userId: payload.userId, + sourceApplication: payload.sourceApplication, + message: payload.message + }) + }) + ] + + return () => { + quitters.forEach((q) => q()) + } + } diff --git a/packages/server/modules/activitystream/events/streamInviteListeners.ts b/packages/server/modules/activitystream/events/streamInviteListeners.ts new file mode 100644 index 000000000..f8317c15b --- /dev/null +++ b/packages/server/modules/activitystream/events/streamInviteListeners.ts @@ -0,0 +1,122 @@ +import { SaveActivity } from '@/modules/activitystream/domain/operations' +import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' +import { ProjectInviteResourceType } from '@/modules/serverinvites/domain/constants' +import { ServerInvitesEvents } from '@/modules/serverinvites/domain/events' +import { + getResourceTypeRole, + resolveTarget +} from '@/modules/serverinvites/helpers/core' +import { GetProjectInviteProject } from '@/modules/serverinvites/services/operations' +import { EventBusListen, EventPayload } from '@/modules/shared/services/eventBus' +import { Roles } from '@speckle/shared' + +/** + * Save "user invited another user to stream" activity item + */ +const addStreamInviteSentOutActivityFactory = + (deps: { + saveActivity: SaveActivity + getProjectInviteProject: GetProjectInviteProject + }) => + async (payload: EventPayload) => { + const { invite } = payload.payload + const project = await deps.getProjectInviteProject({ invite }) + if (!project) return + + const userTarget = resolveTarget(invite.target) + const targetDisplay = userTarget.userId || userTarget.userEmail + + await deps.saveActivity({ + streamId: project.id, + resourceType: ResourceTypes.Stream, + resourceId: project.id, + actionType: ActionTypes.Stream.InviteSent, + userId: invite.inviterId, + message: `User ${invite.inviterId} has invited ${targetDisplay} to stream ${project.id}`, + info: { + targetId: userTarget.userId || null, + targetEmail: userTarget.userEmail || null + } + }) + } + +/** + * Save "user accepted stream invite" activity item + */ +const addStreamInviteAcceptedActivityFactory = + (deps: { + saveActivity: SaveActivity + getProjectInviteProject: GetProjectInviteProject + }) => + async (payload: EventPayload) => { + const { invite } = payload.payload + const project = await deps.getProjectInviteProject({ invite }) + if (!project) return + + const userTarget = resolveTarget(invite.target) + const role = + getResourceTypeRole(invite.resource, ProjectInviteResourceType) || + Roles.Stream.Contributor + + await deps.saveActivity({ + streamId: project.id, + resourceType: ResourceTypes.Stream, + resourceId: project.id, + actionType: ActionTypes.Stream.InviteAccepted, + userId: userTarget.userId!, + info: { inviterUser: invite.inviterId, role }, + message: `User ${userTarget.userId!} has accepted an invitation to become a ${role}` + }) + } + +/** + * Save "user declined an invite" activity item + */ +const addStreamInviteDeclinedActivityFactory = + (deps: { + saveActivity: SaveActivity + getProjectInviteProject: GetProjectInviteProject + }) => + async (payload: EventPayload) => { + const { invite } = payload.payload + const project = await deps.getProjectInviteProject({ invite }) + if (!project) return + + const userTarget = resolveTarget(invite.target) + await deps.saveActivity({ + streamId: project.id, + resourceType: ResourceTypes.Stream, + resourceId: project.id, + actionType: ActionTypes.Stream.InviteDeclined, + userId: userTarget.userId!, + message: `User ${userTarget.userId!} declined to join the stream ${project.id}`, + info: { targetId: userTarget!, inviterId: invite.inviterId } + }) + } + +export const reportStreamInviteActivityFactory = + (deps: { + eventListen: EventBusListen + saveActivity: SaveActivity + getProjectInviteProject: GetProjectInviteProject + }) => + () => { + const addStreamInviteSentOutActivity = addStreamInviteSentOutActivityFactory(deps) + const addStreamInviteAcceptedActivity = addStreamInviteAcceptedActivityFactory(deps) + const addStreamInviteDeclinedActivity = addStreamInviteDeclinedActivityFactory(deps) + + const quitters = [ + deps.eventListen(ServerInvitesEvents.Created, addStreamInviteSentOutActivity), + deps.eventListen(ServerInvitesEvents.Finalized, async (payload) => { + if (payload.payload.accept) { + await addStreamInviteAcceptedActivity(payload) + } else { + await addStreamInviteDeclinedActivity(payload) + } + }) + ] + + return () => { + quitters.forEach((quit) => quit()) + } + } diff --git a/packages/server/modules/activitystream/index.ts b/packages/server/modules/activitystream/index.ts index 1aebbc331..4cfdba7ec 100644 --- a/packages/server/modules/activitystream/index.ts +++ b/packages/server/modules/activitystream/index.ts @@ -1,6 +1,6 @@ import { Optional, SpeckleModule } from '@/modules/shared/helpers/typeHelper' import { publishNotification } from '@/modules/notifications/services/publication' -import { activitiesLogger, logger, moduleLogger } from '@/logging/logging' +import { activitiesLogger, moduleLogger } from '@/logging/logging' import { weeklyEmailDigestEnabled } from '@/modules/shared/helpers/envHelper' import { EventBus, getEventBus } from '@/modules/shared/services/eventBus' import { sendActivityNotificationsFactory } from '@/modules/activitystream/services/summary' @@ -9,15 +9,8 @@ import { saveActivityFactory } from '@/modules/activitystream/repositories' import { db } from '@/db/knex' -import { - addStreamCreatedActivityFactory, - addStreamInviteSentOutActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamCreatedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { getStreamFactory } from '@/modules/core/repositories/streams' -import { - addStreamAccessRequestDeclinedActivityFactory, - addStreamAccessRequestedActivityFactory -} from '@/modules/activitystream/services/accessRequestActivity' import { ScheduleExecution } from '@/modules/core/domain/scheduledTasks/operations' import { scheduleExecutionFactory } from '@/modules/core/services/taskScheduler' import { @@ -25,18 +18,15 @@ import { releaseTaskLockFactory } from '@/modules/core/repositories/scheduledTasks' import { Knex } from 'knex' -import { - onServerAccessRequestCreatedFactory, - onServerAccessRequestFinalizedFactory, - onServerInviteCreatedFactory -} from '@/modules/activitystream/services/eventListener' -import { isProjectResourceTarget } from '@/modules/serverinvites/helpers/core' import { publish } from '@/modules/shared/utils/subscriptions' -import { isStreamAccessRequest } from '@/modules/accessrequests/repositories' -import { ServerInvitesEvents } from '@/modules/serverinvites/domain/events' import { ProjectEvents } from '@/modules/core/domain/projects/events' -import { AccessRequestEvents } from '@/modules/accessrequests/domain/events' import { reportUserActivityFactory } from '@/modules/activitystream/events/userListeners' +import { reportAccessRequestActivityFactory } from '@/modules/activitystream/events/accessRequestListeners' +import { reportBranchActivityFactory } from '@/modules/activitystream/events/branchListeners' +import { reportCommitActivityFactory } from '@/modules/activitystream/events/commitListeners' +import { reportCommentActivityFactory } from '@/modules/activitystream/events/commentListeners' +import { reportStreamInviteActivityFactory } from '@/modules/activitystream/events/streamInviteListeners' +import { getProjectInviteProjectFactory } from '@/modules/serverinvites/services/projectInviteManagement' let scheduledTask: ReturnType | null = null let quitEventListeners: Optional<() => void> = undefined @@ -57,36 +47,37 @@ const initializeEventListeners = ({ eventListen: eventBus.listen, saveActivity }) + const reportAccessRequestActivity = reportAccessRequestActivityFactory({ + eventListen: eventBus.listen, + saveActivity + }) + const reportBranchActivity = reportBranchActivityFactory({ + eventListen: eventBus.listen, + saveActivity + }) + const reportCommitActivity = reportCommitActivityFactory({ + eventListen: eventBus.listen, + saveActivity + }) + const reportCommentActivity = reportCommentActivityFactory({ + eventListen: eventBus.listen, + saveActivity + }) + const reportStreamInviteActivity = reportStreamInviteActivityFactory({ + eventListen: eventBus.listen, + saveActivity, + getProjectInviteProject: getProjectInviteProjectFactory({ + getStream: getStreamFactory({ db }) + }) + }) + const quitCbs = [ reportUserActivity(), - eventBus.listen(AccessRequestEvents.Created, async (payload) => { - if (!isStreamAccessRequest(payload.payload.request)) return - return await onServerAccessRequestCreatedFactory({ - addStreamAccessRequestedActivity: addStreamAccessRequestedActivityFactory({ - saveActivity: saveActivityFactory({ db }) - }) - })(payload) - }), - eventBus.listen(AccessRequestEvents.Finalized, async (payload) => { - if (!isStreamAccessRequest(payload.payload.request)) return - await onServerAccessRequestFinalizedFactory({ - addStreamAccessRequestDeclinedActivity: - addStreamAccessRequestDeclinedActivityFactory({ - saveActivity: saveActivityFactory({ db }) - }) - })(payload) - }), - eventBus.listen(ServerInvitesEvents.Created, async ({ payload }) => { - if (!isProjectResourceTarget(payload.invite.resource)) return - await onServerInviteCreatedFactory({ - addStreamInviteSentOutActivity: addStreamInviteSentOutActivityFactory({ - publish, - saveActivity: saveActivityFactory({ db }) - }), - logger, - getStream: getStreamFactory({ db }) - })(payload) - }), + reportAccessRequestActivity(), + reportBranchActivity(), + reportCommitActivity(), + reportCommentActivity(), + reportStreamInviteActivity(), eventBus.listen( ProjectEvents.Created, async ({ payload: { ownerId, project } }) => { diff --git a/packages/server/modules/activitystream/services/accessRequestActivity.ts b/packages/server/modules/activitystream/services/accessRequestActivity.ts deleted file mode 100644 index 3963d7c9a..000000000 --- a/packages/server/modules/activitystream/services/accessRequestActivity.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - AddStreamAccessRequestedActivity, - SaveActivity -} from '@/modules/activitystream/domain/operations' -import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' - -/** - * Save a "stream access requested" activity - */ -export const addStreamAccessRequestedActivityFactory = - ({ - saveActivity - }: { - saveActivity: SaveActivity - }): AddStreamAccessRequestedActivity => - async (params: { streamId: string; requesterId: string }) => { - const { streamId, requesterId } = params - await saveActivity({ - streamId, - resourceType: ResourceTypes.Stream, - resourceId: streamId, - userId: requesterId, - actionType: ActionTypes.Stream.AccessRequestSent, - message: `User ${requesterId} has requested access to stream ${streamId}`, - info: { requesterId } - }) - } - -/** - * Save a "stream acccess request declined/denied" activity - */ -export const addStreamAccessRequestDeclinedActivityFactory = - ({ saveActivity }: { saveActivity: SaveActivity }) => - async (params: { streamId: string; requesterId: string; declinerId: string }) => { - const { streamId, requesterId, declinerId } = params - await saveActivity({ - streamId, - resourceType: ResourceTypes.Stream, - resourceId: streamId, - userId: declinerId, - actionType: ActionTypes.Stream.AccessRequestDeclined, - message: `User ${declinerId} declined access to stream ${streamId} for user ${requesterId}`, - info: { requesterId, declinerId } - }) - } diff --git a/packages/server/modules/activitystream/services/branchActivity.ts b/packages/server/modules/activitystream/services/branchActivity.ts deleted file mode 100644 index 22ef8c0a2..000000000 --- a/packages/server/modules/activitystream/services/branchActivity.ts +++ /dev/null @@ -1,128 +0,0 @@ -import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' -import { - BranchSubscriptions as BranchPubsubEvents, - PublishSubscription -} from '@/modules/shared/utils/subscriptions' -import { ProjectModelsUpdatedMessageType } from '@/modules/core/graph/generated/graphql' -import { ProjectSubscriptions } from '@/modules/shared/utils/subscriptions' -import { isBranchDeleteInput, isBranchUpdateInput } from '@/modules/core/helpers/branch' -import { - AddBranchCreatedActivity, - AddBranchDeletedActivity, - AddBranchUpdatedActivity, - SaveActivity -} from '@/modules/activitystream/domain/operations' - -/** - * Save "branch created" activity - */ -export const addBranchCreatedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddBranchCreatedActivity => - async (params) => { - const { branch } = params - - await Promise.all([ - saveActivity({ - streamId: branch.streamId, - resourceType: ResourceTypes.Branch, - resourceId: branch.id, - actionType: ActionTypes.Branch.Create, - userId: branch.authorId, - info: { branch }, - message: `Branch created: ${branch.name} (${branch.id})` - }), - publish(BranchPubsubEvents.BranchCreated, { - branchCreated: { ...branch }, - streamId: branch.streamId - }), - publish(ProjectSubscriptions.ProjectModelsUpdated, { - projectId: branch.streamId, - projectModelsUpdated: { - id: branch.id, - type: ProjectModelsUpdatedMessageType.Created, - model: branch - } - }) - ]) - } - -export const addBranchUpdatedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddBranchUpdatedActivity => - async (params) => { - const { update, userId, oldBranch, newBranch } = params - - const streamId = isBranchUpdateInput(update) ? update.streamId : update.projectId - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Branch, - resourceId: update.id, - actionType: ActionTypes.Branch.Update, - userId, - info: { old: oldBranch, new: update }, - message: `Branch metadata changed for branch ${update.id}` - }), - publish(BranchPubsubEvents.BranchUpdated, { - branchUpdated: { ...update }, - streamId, - branchId: update.id - }), - publish(ProjectSubscriptions.ProjectModelsUpdated, { - projectId: streamId, - projectModelsUpdated: { - model: newBranch, - id: newBranch.id, - type: ProjectModelsUpdatedMessageType.Updated - } - }) - ]) - } - -export const addBranchDeletedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddBranchDeletedActivity => - async (params) => { - const { input, userId, branchName } = params - - const streamId = isBranchDeleteInput(input) ? input.streamId : input.projectId - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Branch, - resourceId: input.id, - actionType: ActionTypes.Branch.Delete, - userId, - info: { branch: { ...input, name: branchName } }, - message: `Branch deleted: '${branchName}' (${input.id})` - }), - publish(BranchPubsubEvents.BranchDeleted, { - branchDeleted: input, - streamId - }), - publish(ProjectSubscriptions.ProjectModelsUpdated, { - projectId: streamId, - projectModelsUpdated: { - id: input.id, - type: ProjectModelsUpdatedMessageType.Deleted, - model: null - } - }) - ]) - } diff --git a/packages/server/modules/activitystream/services/commentActivity.ts b/packages/server/modules/activitystream/services/commentActivity.ts deleted file mode 100644 index 7b9807318..000000000 --- a/packages/server/modules/activitystream/services/commentActivity.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { - AddCommentArchivedActivity, - AddCommentCreatedActivity, - AddReplyAddedActivity, - SaveActivity -} from '@/modules/activitystream/domain/operations' -import { - CommentCreatedActivityInput, - ReplyCreatedActivityInput -} from '@/modules/activitystream/domain/types' -import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' -import { - GetViewerResourceItemsUngrouped, - GetViewerResourcesForComment, - GetViewerResourcesFromLegacyIdentifiers -} from '@/modules/comments/domain/operations' -import { ViewerResourceItem } from '@/modules/comments/domain/types' -import { - CommentCreateInput, - ProjectCommentsUpdatedMessageType, - ReplyCreateInput -} from '@/modules/core/graph/generated/graphql' -import { PublishSubscription, pubsub } from '@/modules/shared/utils/subscriptions' -import { - CommentSubscriptions, - ProjectSubscriptions -} from '@/modules/shared/utils/subscriptions' -import { has } from 'lodash' - -const isLegacyCommentCreateInput = ( - i: CommentCreatedActivityInput -): i is CommentCreateInput => has(i, 'streamId') - -export const addCommentCreatedActivityFactory = - ({ - getViewerResourceItemsUngrouped, - getViewerResourcesFromLegacyIdentifiers, - saveActivity, - publish - }: { - getViewerResourceItemsUngrouped: GetViewerResourceItemsUngrouped - getViewerResourcesFromLegacyIdentifiers: GetViewerResourcesFromLegacyIdentifiers - saveActivity: SaveActivity - publish: PublishSubscription - }): AddCommentCreatedActivity => - async (params) => { - const { streamId, userId, input, comment } = params - - let resourceIds: string - let resourceItems: ViewerResourceItem[] - if (isLegacyCommentCreateInput(input)) { - resourceIds = input.resources.map((res) => res?.resourceId).join(',') - - const validResources = input.resources.filter( - (r): r is NonNullable => !!r - ) - resourceItems = await getViewerResourcesFromLegacyIdentifiers( - streamId, - validResources - ) - } else { - resourceItems = - input.resolvedResourceItems || - (await getViewerResourceItemsUngrouped({ - projectId: streamId, - resourceIdString: input.resourceIdString - })) - resourceIds = resourceItems.map((i) => i.versionId || i.objectId).join(',') - } - - await Promise.all([ - saveActivity({ - resourceId: comment.id, - streamId, - resourceType: ResourceTypes.Comment, - actionType: ActionTypes.Comment.Create, - userId, - info: { input }, - message: `Comment added: ${comment.id} (${input})` - }), - // @deprecated unused in FE2 - pubsub.publish(CommentSubscriptions.CommentActivity, { - commentActivity: { - type: 'comment-added', - comment - }, - streamId, - resourceIds - }), - publish(ProjectSubscriptions.ProjectCommentsUpdated, { - projectCommentsUpdated: { - id: comment.id, - type: ProjectCommentsUpdatedMessageType.Created, - comment - }, - projectId: streamId, - resourceItems - }) - ]) - } - -/** - * Add comment archived/unarchived activity - */ -export const addCommentArchivedActivityFactory = - ({ - getViewerResourcesForComment, - saveActivity, - publish - }: { - getViewerResourcesForComment: GetViewerResourcesForComment - publish: PublishSubscription - saveActivity: SaveActivity - }): AddCommentArchivedActivity => - async (params) => { - const { streamId, commentId, userId, input, comment } = params - const isArchiving = !!input.archived - - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Comment, - resourceId: commentId, - actionType: ActionTypes.Comment.Archive, - userId, - info: { input }, - message: `Comment #${commentId} archived` - }), - // @deprecated not used in FE2 - pubsub.publish(CommentSubscriptions.CommentThreadActivity, { - commentThreadActivity: { - type: isArchiving ? 'comment-archived' : 'comment-added' - }, - streamId: input.streamId, - commentId: input.commentId - }), - publish(ProjectSubscriptions.ProjectCommentsUpdated, { - projectCommentsUpdated: { - id: commentId, - type: isArchiving - ? ProjectCommentsUpdatedMessageType.Archived - : ProjectCommentsUpdatedMessageType.Created, - comment: isArchiving ? null : comment - }, - projectId: streamId, - resourceItems: await getViewerResourcesForComment(streamId, comment.id) - }) - ]) - } - -const isLegacyReplyCreateInput = ( - i: ReplyCreatedActivityInput -): i is ReplyCreateInput => has(i, 'streamId') - -export const addReplyAddedActivityFactory = - ({ - getViewerResourcesForComment, - saveActivity, - publish - }: { - getViewerResourcesForComment: GetViewerResourcesForComment - publish: PublishSubscription - saveActivity: SaveActivity - }): AddReplyAddedActivity => - async (params) => { - const { streamId, input, reply, userId } = params - - const parentCommentId = isLegacyReplyCreateInput(input) - ? input.parentComment - : input.threadId - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Comment, - resourceId: parentCommentId, - actionType: ActionTypes.Comment.Reply, - userId, - info: { input }, - message: `Comment reply #${reply.id} created` - }), - // @deprecated - pubsub.publish(CommentSubscriptions.CommentThreadActivity, { - commentThreadActivity: { - type: 'reply-added', - reply - }, - streamId, - commentId: parentCommentId - }), - publish(ProjectSubscriptions.ProjectCommentsUpdated, { - projectCommentsUpdated: { - id: reply.id, - type: ProjectCommentsUpdatedMessageType.Created, - comment: reply - }, - projectId: streamId, - resourceItems: await getViewerResourcesForComment(streamId, reply.id) - }) - ]) - } diff --git a/packages/server/modules/activitystream/services/commitActivity.ts b/packages/server/modules/activitystream/services/commitActivity.ts deleted file mode 100644 index 1415b8d57..000000000 --- a/packages/server/modules/activitystream/services/commitActivity.ts +++ /dev/null @@ -1,214 +0,0 @@ -import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' -import { - CommitSubscriptions as CommitPubsubEvents, - PublishSubscription -} from '@/modules/shared/utils/subscriptions' -import { - CommitCreateInput, - CommitUpdateInput, - ProjectVersionsUpdatedMessageType, - UpdateVersionInput -} from '@/modules/core/graph/generated/graphql' -import { CommitRecord } from '@/modules/core/helpers/types' -import { ProjectSubscriptions } from '@/modules/shared/utils/subscriptions' -import { has } from 'lodash' -import { - AddCommitCreatedActivity, - AddCommitDeletedActivity, - AddCommitUpdatedActivity, - SaveActivity -} from '@/modules/activitystream/domain/operations' - -/** - * Save "new commit created" activity item - */ -export const addCommitCreatedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddCommitCreatedActivity => - async (params: { - commitId: string - streamId: string - userId: string - input: CommitCreateInput - branchName: string - modelId: string - commit: CommitRecord - }) => { - const { commitId, input, streamId, userId, branchName, commit, modelId } = params - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Commit, - resourceId: commitId, - actionType: ActionTypes.Commit.Create, - userId, - info: { - id: commitId, - commit: { - ...input, - projectId: streamId, - modelId, - versionId: commit.id - } - }, - message: `Commit created on branch ${branchName}: ${commitId} (${input.message})` - }), - publish(CommitPubsubEvents.CommitCreated, { - commitCreated: { ...input, id: commitId, authorId: userId }, - streamId - }), - publish(ProjectSubscriptions.ProjectVersionsUpdated, { - projectId: streamId, - projectVersionsUpdated: { - id: commit.id, - version: { ...commit, streamId }, - type: ProjectVersionsUpdatedMessageType.Created, - modelId - } - }) - ]) - } - -const isOldVersionUpdateInput = ( - i: CommitUpdateInput | UpdateVersionInput -): i is CommitUpdateInput => has(i, 'streamId') - -export const addCommitUpdatedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddCommitUpdatedActivity => - async (params: { - commitId: string - streamId: string - userId: string - originalCommit: CommitRecord - update: CommitUpdateInput | UpdateVersionInput - newCommit: CommitRecord - branchId: string - }) => { - const { commitId, streamId, userId, originalCommit, update, newCommit, branchId } = - params - const legacyUpdateStruct: CommitUpdateInput = isOldVersionUpdateInput(update) - ? update - : { - id: update.versionId, - message: update.message, - streamId - } - - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Commit, - resourceId: commitId, - actionType: ActionTypes.Commit.Update, - userId, - info: { old: originalCommit, new: update }, - message: `Commit updated: ${commitId}` - }), - publish(CommitPubsubEvents.CommitUpdated, { - commitUpdated: { ...legacyUpdateStruct }, - streamId, - commitId - }), - publish(ProjectSubscriptions.ProjectVersionsUpdated, { - projectId: streamId, - projectVersionsUpdated: { - id: commitId, - version: { ...newCommit, streamId }, - type: ProjectVersionsUpdatedMessageType.Updated, - modelId: branchId - } - }) - ]) - } - -export const addCommitMovedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }) => - async (params: { - commitId: string - streamId: string - userId: string - originalBranchId: string - newBranchId: string - commit: CommitRecord - }) => { - const { commitId, streamId, userId, originalBranchId, newBranchId, commit } = params - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Commit, - resourceId: commitId, - actionType: ActionTypes.Commit.Move, - userId, - info: { originalBranchId, newBranchId }, - message: `Commit moved: ${commitId}` - }), - publish(ProjectSubscriptions.ProjectVersionsUpdated, { - projectId: streamId, - projectVersionsUpdated: { - id: commitId, - version: { ...commit, streamId }, - type: ProjectVersionsUpdatedMessageType.Updated, - modelId: newBranchId - } - }) - ]) - } - -export const addCommitDeletedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddCommitDeletedActivity => - async (params: { - commitId: string - streamId: string - userId: string - commit: CommitRecord - branchId: string - }) => { - const { commitId, streamId, userId, commit, branchId } = params - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Commit, - resourceId: commitId, - actionType: ActionTypes.Commit.Delete, - userId, - info: { commit }, - message: `Commit deleted: ${commitId}` - }), - publish(CommitPubsubEvents.CommitDeleted, { - commitDeleted: { ...commit, streamId, branchId }, - streamId - }), - publish(ProjectSubscriptions.ProjectVersionsUpdated, { - projectId: streamId, - projectVersionsUpdated: { - id: commitId, - type: ProjectVersionsUpdatedMessageType.Deleted, - version: null, - modelId: branchId - } - }) - ]) - } diff --git a/packages/server/modules/activitystream/services/eventListener.ts b/packages/server/modules/activitystream/services/eventListener.ts deleted file mode 100644 index 3dd878b91..000000000 --- a/packages/server/modules/activitystream/services/eventListener.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Logger } from '@/logging/logging' -import { AccessRequestEvents } from '@/modules/accessrequests/domain/events' -import { - AccessRequestType, - isStreamAccessRequest -} from '@/modules/accessrequests/repositories' -import { - AddStreamAccessRequestDeclinedActivity, - AddStreamAccessRequestedActivity, - AddStreamInviteSentOutActivity -} from '@/modules/activitystream/domain/operations' -import { GetStream } from '@/modules/core/domain/streams/operations' -import { - ServerInvitesEvents, - ServerInvitesEventsPayloads -} from '@/modules/serverinvites/domain/events' -import { - isProjectResourceTarget, - resolveTarget -} from '@/modules/serverinvites/helpers/core' -import { EventPayload } from '@/modules/shared/services/eventBus' - -export const onServerAccessRequestCreatedFactory = - ({ - addStreamAccessRequestedActivity - }: { - addStreamAccessRequestedActivity: AddStreamAccessRequestedActivity - }) => - async (payload: EventPayload) => { - const { - request: { resourceId, requesterId } - } = payload.payload - if (!isStreamAccessRequest(payload.payload.request)) return - if (!resourceId) return - - await addStreamAccessRequestedActivity({ - streamId: resourceId, - requesterId - }) - } - -export const onServerAccessRequestFinalizedFactory = - ({ - addStreamAccessRequestDeclinedActivity - }: { - addStreamAccessRequestDeclinedActivity: AddStreamAccessRequestDeclinedActivity - }) => - async (payload: EventPayload) => { - const { - approved, - finalizedBy, - request: { resourceId, resourceType, requesterId } - } = payload.payload - if (!resourceId) return - - if (resourceType === AccessRequestType.Stream) { - // If user was added to stream, an activity stream item was already added from 'addOrUpdateStreamCollaborator' - if (approved) return - - await addStreamAccessRequestDeclinedActivity({ - streamId: resourceId, - requesterId, - declinerId: finalizedBy - }) - } - } - -export const onServerInviteCreatedFactory = - ({ - getStream, - logger, - addStreamInviteSentOutActivity - }: { - getStream: GetStream - logger: Logger - addStreamInviteSentOutActivity: AddStreamInviteSentOutActivity - }) => - async (payload: ServerInvitesEventsPayloads[typeof ServerInvitesEvents.Created]) => { - const { invite } = payload - const primaryResourceTarget = invite.resource - - if (!isProjectResourceTarget(primaryResourceTarget)) return - - const userTarget = resolveTarget(invite.target) - const project = await getStream({ streamId: primaryResourceTarget.resourceId }) - if (!project) { - logger.warn('No project found for project invite', { invite }) - return - } - - await addStreamInviteSentOutActivity({ - streamId: project.id, - inviterId: invite.inviterId, - inviteTargetEmail: userTarget.userEmail, - inviteTargetId: userTarget.userId, - stream: project - }) - } diff --git a/packages/server/modules/activitystream/services/streamActivity.ts b/packages/server/modules/activitystream/services/streamActivity.ts index a216ab8a1..238c23d53 100644 --- a/packages/server/modules/activitystream/services/streamActivity.ts +++ b/packages/server/modules/activitystream/services/streamActivity.ts @@ -24,8 +24,6 @@ import { import { AddStreamCommentMentionActivity, AddStreamDeletedActivity, - AddStreamInviteDeclinedActivity, - AddStreamInviteSentOutActivity, AddStreamUpdatedActivity, SaveActivity } from '@/modules/activitystream/domain/operations' @@ -334,60 +332,6 @@ export const addStreamPermissionsAddedActivityFactory = ]) } -/** - * Save "user accepted stream invite" activity item - */ -export const addStreamInviteAcceptedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }) => - async (params: { - streamId: string - inviteTargetId: string - inviterId: string - role: StreamRoles - stream: StreamRecord - }) => { - const { streamId, inviteTargetId, inviterId, role, stream } = params - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Stream, - resourceId: streamId, - actionType: ActionTypes.Stream.InviteAccepted, - userId: inviteTargetId, - info: { inviterUser: inviterId, role }, - message: `User ${inviteTargetId} has accepted an invitation to become a ${role}` - }), - publish(StreamPubsubEvents.UserStreamAdded, { - userStreamAdded: { - id: streamId, - sharedBy: inviterId - }, - ownerId: inviteTargetId - }), - publish(UserSubscriptions.UserProjectsUpdated, { - userProjectsUpdated: { - id: streamId, - type: UserProjectsUpdatedMessageType.Added, - project: stream - }, - ownerId: inviteTargetId - }), - publish(ProjectSubscriptions.ProjectUpdated, { - projectUpdated: { - id: streamId, - type: ProjectUpdatedMessageType.Updated, - project: stream - } - }) - ]) - } - /** * Save "stream permissions revoked for user" activity item */ @@ -445,75 +389,6 @@ export const addStreamPermissionsRevokedActivityFactory = ]) } -/** - * Save "user invited another user to stream" activity item - */ -export const addStreamInviteSentOutActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddStreamInviteSentOutActivity => - async ({ streamId, inviteTargetId, inviterId, inviteTargetEmail, stream }) => { - const targetDisplay = inviteTargetId || inviteTargetEmail - - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Stream, - resourceId: streamId, - actionType: ActionTypes.Stream.InviteSent, - userId: inviterId, - message: `User ${inviterId} has invited ${targetDisplay} to stream ${streamId}`, - info: { - targetId: inviteTargetId || null, - targetEmail: inviteTargetEmail || null - } - }), - publish(ProjectSubscriptions.ProjectUpdated, { - projectUpdated: { - id: streamId, - type: ProjectUpdatedMessageType.Updated, - project: stream - } - }) - ]) - } - -/** - * Save "user declined an invite" activity item - */ -export const addStreamInviteDeclinedActivityFactory = - ({ - saveActivity, - publish - }: { - saveActivity: SaveActivity - publish: PublishSubscription - }): AddStreamInviteDeclinedActivity => - async ({ streamId, inviteTargetId, inviterId, stream }) => { - await Promise.all([ - saveActivity({ - streamId, - resourceType: ResourceTypes.Stream, - resourceId: streamId, - actionType: ActionTypes.Stream.InviteDeclined, - userId: inviteTargetId, - message: `User ${inviteTargetId} declined to join the stream ${streamId}`, - info: { targetId: inviteTargetId, inviterId } - }), - publish(ProjectSubscriptions.ProjectUpdated, { - projectUpdated: { - id: streamId, - type: ProjectUpdatedMessageType.Updated, - project: stream - } - }) - ]) - } - /** * Save "user mentioned in stream comment" activity item */ diff --git a/packages/server/modules/activitystream/tests/activity.spec.js b/packages/server/modules/activitystream/tests/activity.spec.js index 83c2bcb4d..7ed8ecd3b 100644 --- a/packages/server/modules/activitystream/tests/activity.spec.js +++ b/packages/server/modules/activitystream/tests/activity.spec.js @@ -17,7 +17,6 @@ const { const { authorizeResolver } = require('@/modules/shared') const { grantStreamPermissionsFactory } = require('@/modules/core/repositories/streams') const { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory } = require('@/modules/activitystream/services/streamActivity') const { publish } = require('@/modules/shared/utils/subscriptions') @@ -73,10 +72,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/auth/defaultApps.ts b/packages/server/modules/auth/defaultApps.ts index b8a8748ad..9e7c9b9c4 100644 --- a/packages/server/modules/auth/defaultApps.ts +++ b/packages/server/modules/auth/defaultApps.ts @@ -12,6 +12,7 @@ export enum DefaultAppIds { Explorer = 'explorer', DesktopManager = 'sdm', Connector = 'sca', + SpeckleDesktopAuthService = 'sdas', Excel = 'spklexcel', PowerBI = 'spklpwerbi', Automate = 'spklautoma' @@ -77,6 +78,26 @@ const SpeckleConnectorApp = { ] } +/** Next gen connectors */ +const SpeckleDesktopAuthService = { + id: DefaultAppIds.SpeckleDesktopAuthService, + secret: DefaultAppIds.SpeckleDesktopAuthService, + name: 'Speckle Connector', + description: + 'Speckle desktop authentication service. This application helps link your Speckle account with all host application connectors, like Revit, Rhino etc.', + trustByDefault: true, + public: true, + redirectUrl: 'http://localhost:29364', + scopes: [ + Scopes.Streams.Read, + Scopes.Streams.Write, + Scopes.Profile.Read, + Scopes.Profile.Email, + Scopes.Users.Read, + Scopes.Users.Invite + ] +} + const SpeckleExcel = { id: DefaultAppIds.Excel, secret: DefaultAppIds.Excel, @@ -140,6 +161,7 @@ const defaultApps = [ SpeckleApiExplorer, SpeckleDesktopApp, SpeckleConnectorApp, + SpeckleDesktopAuthService, SpeckleExcel, SpecklePowerBi, SpeckleAutomate diff --git a/packages/server/modules/auth/index.ts b/packages/server/modules/auth/index.ts index 3aaefe2d8..9ed05608d 100644 --- a/packages/server/modules/auth/index.ts +++ b/packages/server/modules/auth/index.ts @@ -54,38 +54,24 @@ import { } from '@/modules/core/repositories/userEmails' import { validateAndCreateUserEmailFactory } from '@/modules/core/services/userEmails' import { requestNewEmailVerificationFactory } from '@/modules/emails/services/verification/request' -import { requestNewEmailVerificationFactory as requestNewEmailVerificationFactoryOld } from '@/modules/emails/services/verification/request.old' import { deleteOldAndInsertNewVerificationFactory } from '@/modules/emails/repositories' import { renderEmail } from '@/modules/emails/services/emailRendering' import { sendEmail } from '@/modules/emails/services/sending' import { getServerInfoFactory } from '@/modules/core/repositories/server' import { initializeEventListenerFactory } from '@/modules/auth/services/postAuth' import { getEventBus } from '@/modules/shared/services/eventBus' -import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' -const { FF_FORCE_EMAIL_VERIFICATION } = getFeatureFlags() const findEmail = findEmailFactory({ db }) -const requestNewEmailVerification = FF_FORCE_EMAIL_VERIFICATION - ? requestNewEmailVerificationFactory({ - findEmail, - getUser: getUserFactory({ db }), - getServerInfo: getServerInfoFactory({ db }), - deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ - db - }), - renderEmail, - sendEmail - }) - : requestNewEmailVerificationFactoryOld({ - findEmail, - getUser: getUserFactory({ db }), - getServerInfo: getServerInfoFactory({ db }), - deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ - db - }), - renderEmail, - sendEmail - }) +const requestNewEmailVerification = requestNewEmailVerificationFactory({ + findEmail, + getUser: getUserFactory({ db }), + getServerInfo: getServerInfoFactory({ db }), + deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ + db + }), + renderEmail, + sendEmail +}) const createUser = createUserFactory({ getServerInfo: getServerInfoFactory({ db }), diff --git a/packages/server/modules/auth/rest/index.ts b/packages/server/modules/auth/rest/index.ts index 3733b9ae7..926e5707e 100644 --- a/packages/server/modules/auth/rest/index.ts +++ b/packages/server/modules/auth/rest/index.ts @@ -1,4 +1,3 @@ -import cors from 'cors' import { createBareToken, createAppTokenFactory, @@ -37,6 +36,7 @@ import { updateApiTokenFactory } from '@/modules/core/repositories/tokens' import { getUserRoleFactory } from '@/modules/core/repositories/users' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' // TODO: Secure these endpoints! export default function (app: Express) { @@ -109,8 +109,8 @@ export default function (app: Express) { /* Generates a new api token: (1) either via a valid refresh token or (2) via a valid access token */ - app.options('/auth/token', cors()) - app.post('/auth/token', cors(), async (req, res) => { + app.options('/auth/token', corsMiddlewareFactory()) + app.post('/auth/token', corsMiddlewareFactory(), async (req, res) => { try { const createRefreshToken = createRefreshTokenFactory({ db }) const getApp = getAppFactory({ db }) diff --git a/packages/server/modules/auth/services/passportService.ts b/packages/server/modules/auth/services/passportService.ts index 8c89f0e71..fe26c1a3a 100644 --- a/packages/server/modules/auth/services/passportService.ts +++ b/packages/server/modules/auth/services/passportService.ts @@ -1,6 +1,6 @@ import passport, { Strategy, AuthenticateOptions } from 'passport' import { logger } from '@/logging/logging' -import { useNewFrontend, getFrontendOrigin } from '@/modules/shared/helpers/envHelper' +import { getFrontendOrigin } from '@/modules/shared/helpers/envHelper' import { UnverifiedEmailSSOLoginError, UserInputError @@ -66,9 +66,7 @@ export const passportAuthenticateHandlerBuilderFactory = errPath = `/error-email-verify?email=${email}` } - return useNewFrontend() - ? res.redirect(new URL(errPath, getFrontendOrigin()).toString()) - : res.redirect(errPath) + res.redirect(new URL(errPath, getFrontendOrigin()).toString()) } req.user = user diff --git a/packages/server/modules/auth/strategies/github.ts b/packages/server/modules/auth/strategies/github.ts index b70905edf..962c643f4 100644 --- a/packages/server/modules/auth/strategies/github.ts +++ b/packages/server/modules/auth/strategies/github.ts @@ -164,11 +164,12 @@ const githubStrategyBuilderFactory = case InviteNotFoundError: case UnverifiedEmailSSOLoginError: logger.info(err) - break + return done(null, false, { message: e.message }) default: logger.error(err) + // Only when the server is operating abnormally should err be set, to indicate an internal error. + return done(err, false, { message: e.message }) } - return done(err, false, { message: e.message }) } } ) diff --git a/packages/server/modules/auth/strategies/google.ts b/packages/server/modules/auth/strategies/google.ts index 84d2fd1b0..aac6f43f2 100644 --- a/packages/server/modules/auth/strategies/google.ts +++ b/packages/server/modules/auth/strategies/google.ts @@ -147,11 +147,12 @@ const googleStrategyBuilderFactory = case UserInputError: case InviteNotFoundError: logger.info({ err: e }) - break + return done(null, false, { message: e.message }) default: logger.error({ err: e }) + // Only when the server is operating abnormally should err be set, to indicate an internal error. + return done(e, false, { message: e.message }) } - return done(e, false, { message: e.message }) } } ) diff --git a/packages/server/modules/auth/strategies/local.ts b/packages/server/modules/auth/strategies/local.ts index 5fb92c777..1bc363ea7 100644 --- a/packages/server/modules/auth/strategies/local.ts +++ b/packages/server/modules/auth/strategies/local.ts @@ -23,6 +23,7 @@ import { ValidateUserPassword } from '@/modules/core/domain/users/operations' import { GetServerInfo } from '@/modules/core/domain/server/operations' +import { UserValidationError } from '@/modules/core/errors/user' const localStrategyBuilderFactory = (deps: { @@ -69,7 +70,16 @@ const localStrategyBuilderFactory = return next() } catch (err) { - req.log.info({ err }, 'Error while logging in.') + const e = ensureError(err, 'Unexpected issue occured while logging in') + switch (e.constructor) { + case UserInputError: + case UserValidationError: + req.log.info({ err }, 'Error while logging in.') + break + default: + req.log.error({ err }, 'Error while logging in.') + break + } return res.status(401).send({ err: true, message: 'Invalid credentials.' }) } }, diff --git a/packages/server/modules/auth/strategies/oidc.ts b/packages/server/modules/auth/strategies/oidc.ts index f456b5563..6d075e576 100644 --- a/packages/server/modules/auth/strategies/oidc.ts +++ b/packages/server/modules/auth/strategies/oidc.ts @@ -162,11 +162,12 @@ const oidcStrategyBuilderFactory = case UserInputError: case InviteNotFoundError: logger.info({ err: e }) - break + return done(null, undefined) default: logger.error({ err: e }) + // Only when the server is operating abnormally should err be set, to indicate an internal error. + return done(e, undefined) } - return done(e, undefined) } } ) diff --git a/packages/server/modules/auth/tests/apps.graphql.spec.js b/packages/server/modules/auth/tests/apps.graphql.spec.js index 4e90f06f8..5f03b216d 100644 --- a/packages/server/modules/auth/tests/apps.graphql.spec.js +++ b/packages/server/modules/auth/tests/apps.graphql.spec.js @@ -232,7 +232,7 @@ describe('GraphQL @apps-api', () => { expect(res).to.be.json expect(res.body.errors).to.not.exist expect(res.body.data.apps).to.be.an('array') - expect(res.body.data.apps.length).to.equal(8) + expect(res.body.data.apps.length).to.equal(9) }) it('Should get app info without secret if not authenticated and owner', async () => { diff --git a/packages/server/modules/auth/tests/apps.spec.js b/packages/server/modules/auth/tests/apps.spec.js index 47b583ab6..2d25a612d 100644 --- a/packages/server/modules/auth/tests/apps.spec.js +++ b/packages/server/modules/auth/tests/apps.spec.js @@ -189,7 +189,7 @@ describe('Services @apps-services', () => { it('Should get all the public apps on this server', async () => { const apps = await getAllPublicApps() expect(apps).to.be.an('array') - expect(apps.length).to.equal(8) + expect(apps.length).to.equal(9) }) it('Should fail to register an app with no scopes', async () => { diff --git a/packages/server/modules/automate/domain/operations.ts b/packages/server/modules/automate/domain/operations.ts index 4e795d195..ccf8cbcf4 100644 --- a/packages/server/modules/automate/domain/operations.ts +++ b/packages/server/modules/automate/domain/operations.ts @@ -202,7 +202,7 @@ export type TriggerAutomationRevisionRun = < >(params: { revisionId: string manifest: M - source?: RunTriggerSource + source: RunTriggerSource }) => Promise<{ automationRunId: string }> export type GetProjectAutomationCount = (params: { diff --git a/packages/server/modules/automate/graph/resolvers/automate.ts b/packages/server/modules/automate/graph/resolvers/automate.ts index ea6e081e5..e4dc15f9a 100644 --- a/packages/server/modules/automate/graph/resolvers/automate.ts +++ b/packages/server/modules/automate/graph/resolvers/automate.ts @@ -718,6 +718,7 @@ export = (FF_AUTOMATE_MODULE_ENABLED getBranchLatestCommits: getBranchLatestCommitsFactory({ db: projectDb }), + emitEvent: getEventBus().emit, validateStreamAccess }) diff --git a/packages/server/modules/automate/helpers/types.ts b/packages/server/modules/automate/helpers/types.ts index 7881385d6..eb95f5d22 100644 --- a/packages/server/modules/automate/helpers/types.ts +++ b/packages/server/modules/automate/helpers/types.ts @@ -74,8 +74,12 @@ export type AutomationRevisionFunctionRecord = { } export enum RunTriggerSource { + /** Triggered in response to an external event like a new version. */ Automatic = 'automatic', - Manual = 'manual' + /** Requested directly by the user in-app. */ + Manual = 'manual', + /** Requested as part of a test automation. */ + Test = 'test' } export const VersionCreationTriggerType = 'versionCreation' diff --git a/packages/server/modules/automate/index.ts b/packages/server/modules/automate/index.ts index 5fa95234f..6d0d5f904 100644 --- a/packages/server/modules/automate/index.ts +++ b/packages/server/modules/automate/index.ts @@ -14,9 +14,12 @@ import { getFullAutomationRunByIdFactory, upsertAutomationRunFactory } from '@/modules/automate/repositories/automations' -import { isNonNullable, Scopes, throwUncoveredError } from '@speckle/shared' +import { isNonNullable, Scopes } from '@speckle/shared' import { registerOrUpdateScopeFactory } from '@/modules/shared/repositories/scopes' -import { triggerAutomationRun } from '@/modules/automate/clients/executionEngine' +import { + getFunction, + triggerAutomationRun +} from '@/modules/automate/clients/executionEngine' import logStreamRest from '@/modules/automate/rest/logStream' import { getEncryptionKeyPairFor, @@ -25,7 +28,7 @@ import { import { buildDecryptor } from '@/modules/shared/utils/libsodium' import { getUserEmailFromAutomationRunFactory } from '@/modules/automate/services/tracking' import authGithubAppRest from '@/modules/automate/rest/authGithubApp' -import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' +import { getFeatureFlags, isTestEnv } from '@/modules/shared/helpers/envHelper' import { TokenScopeData } from '@/modules/shared/domain/rolesAndScopes/types' import { db } from '@/db/knex' import { ProjectSubscriptions, publish } from '@/modules/shared/utils/subscriptions' @@ -46,7 +49,6 @@ import { } from '@/modules/core/graph/generated/graphql' import { isVersionCreatedTriggerManifest, - RunTriggerSource, VersionCreationTriggerType } from '@/modules/automate/helpers/types' import { isFinished } from '@/modules/automate/domain/logic' @@ -285,6 +287,10 @@ const initializeEventListeners = () => { return } + const fn = isTestEnv() + ? null + : await getFunction({ functionId: functionRun.functionId }) + const userEmail = await getUserEmailFromAutomationRunFactory({ getFullAutomationRevisionMetadata: getFullAutomationRevisionMetadataFactory({ db: projectDb @@ -300,6 +306,9 @@ const initializeEventListeners = () => { automationRevisionId: automationWithRevision.id, automationName: automationWithRevision.name, runId: run.id, + functionId: fn?.functionId, + functionName: fn?.functionName, + functionType: fn?.isFeatured ? 'public' : 'private', functionRunId: functionRun.id, status: functionRun.status, durationInSeconds: functionRun.elapsed / 1000, @@ -328,36 +337,27 @@ const initializeEventListeners = () => { projectId: manifest.projectId }) - // all triggers, that are automatic result of an action are in a need to be tracked - switch (source) { - case RunTriggerSource.Automatic: { - const userEmail = await getUserEmailFromAutomationRunFactory({ - getFullAutomationRevisionMetadata: - getFullAutomationRevisionMetadataFactory({ db: projectDb }), - getFullAutomationRunById: getFullAutomationRunByIdFactory({ - db: projectDb - }), - getCommit: getCommitFactory({ db: projectDb }), - getUser: legacyGetUserFactory({ db: projectDb }) - })(automationRun, automation.projectId) - const mp = mixpanel({ userEmail, req: undefined }) - await mp.track('Automation Run Triggered', { - automationId: automation.id, - automationName: automation.name, - automationRunId: automationRun.id, - projectId: automation.projectId, - source, - /* eslint-disable-next-line camelcase */ - workspace_id: project?.workspaceId - }) - break - } - // runs created from a user interaction are tracked in the frontend - case RunTriggerSource.Manual: - return - default: - throwUncoveredError(source) - } + const userEmail = await getUserEmailFromAutomationRunFactory({ + getFullAutomationRevisionMetadata: getFullAutomationRevisionMetadataFactory({ + db: projectDb + }), + getFullAutomationRunById: getFullAutomationRunByIdFactory({ + db: projectDb + }), + getCommit: getCommitFactory({ db: projectDb }), + getUser: legacyGetUserFactory({ db: projectDb }) + })(automationRun, automation.projectId) + + const mp = mixpanel({ userEmail, req: undefined }) + await mp.track('Automation Run Triggered', { + automationId: automation.id, + automationName: automation.name, + automationRunId: automationRun.id, + projectId: automation.projectId, + source, + /* eslint-disable-next-line camelcase */ + workspace_id: project?.workspaceId + }) } ) ] diff --git a/packages/server/modules/automate/rest/authGithubApp.ts b/packages/server/modules/automate/rest/authGithubApp.ts index 7afc4c8cd..4fa5cd9d0 100644 --- a/packages/server/modules/automate/rest/authGithubApp.ts +++ b/packages/server/modules/automate/rest/authGithubApp.ts @@ -5,7 +5,7 @@ import { startAutomateFunctionCreatorAuthFactory } from '@/modules/automate/services/functionManagement' import { getGenericRedis } from '@/modules/shared/redis/redis' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { validateScope, validateServerRoleBuilderFactory } from '@/modules/shared/authz' import { authMiddlewareCreator } from '@/modules/shared/middleware' import { getRolesFactory } from '@/modules/shared/repositories/roles' @@ -19,7 +19,7 @@ export default (app: Application) => { app.get( '/api/automate/auth/githubapp', sessionMiddlewareFactory(), - corsMiddleware(), + corsMiddlewareFactory(), authMiddlewareCreator([ validateServerRoleBuilderFactory({ getRoles: getRolesFactory({ db }) @@ -46,7 +46,7 @@ export default (app: Application) => { app.get( '/api/automate/ghAuthComplete', sessionMiddlewareFactory(), - corsMiddleware(), + corsMiddlewareFactory(), authMiddlewareCreator([ validateServerRoleBuilderFactory({ getRoles: getRolesFactory({ db }) diff --git a/packages/server/modules/automate/rest/logStream.ts b/packages/server/modules/automate/rest/logStream.ts index 46a9f4d56..066815b8c 100644 --- a/packages/server/modules/automate/rest/logStream.ts +++ b/packages/server/modules/automate/rest/logStream.ts @@ -2,7 +2,7 @@ import { db } from '@/db/knex' import { getAutomationRunLogs } from '@/modules/automate/clients/executionEngine' import { ExecutionEngineFailedResponseError } from '@/modules/automate/errors/executionEngine' import { getAutomationRunWithTokenFactory } from '@/modules/automate/repositories/automations' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { getStreamFactory } from '@/modules/core/repositories/streams' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { @@ -21,7 +21,7 @@ import { FunctionRunNotFoundError } from '@/modules/automate/errors/runs' export default (app: Application) => { app.get( '/api/v1/projects/:streamId/automations/:automationId/runs/:runId/logs', - corsMiddleware(), + corsMiddlewareFactory(), authMiddlewareCreator([ validateServerRoleBuilderFactory({ getRoles: getRolesFactory({ db }) diff --git a/packages/server/modules/automate/services/trigger.ts b/packages/server/modules/automate/services/trigger.ts index 289ee9aa6..f40ff924c 100644 --- a/packages/server/modules/automate/services/trigger.ts +++ b/packages/server/modules/automate/services/trigger.ts @@ -106,7 +106,8 @@ export const onModelVersionCreateFactory = projectId, modelId: triggeringId, triggerType - } + }, + source: RunTriggerSource.Automatic }) } catch (error) { // TODO: this error should be persisted for automation status display somehow @@ -227,7 +228,7 @@ export const triggerAutomationRevisionRunFactory = async (params: { revisionId: string manifest: M - source?: RunTriggerSource + source: RunTriggerSource }): Promise<{ automationRunId: string }> => { const { automateRunTrigger, @@ -238,7 +239,7 @@ export const triggerAutomationRevisionRunFactory = getFullAutomationRevisionMetadata, getCommit } = deps - const { revisionId, manifest, source = RunTriggerSource.Automatic } = params + const { revisionId, manifest, source } = params if (!isVersionCreatedTriggerManifest(manifest)) { throw new AutomateInvalidTriggerError( @@ -546,6 +547,7 @@ export type CreateTestAutomationRunDeps = { upsertAutomationRun: UpsertAutomationRun validateStreamAccess: ValidateStreamAccess getBranchLatestCommits: GetBranchLatestCommits + emitEvent: EventBusEmit } & CreateAutomationRunDataDeps & ComposeTriggerDataDeps @@ -561,7 +563,8 @@ export const createTestAutomationRunFactory = getFullAutomationRevisionMetadata, upsertAutomationRun, validateStreamAccess, - getBranchLatestCommits + getBranchLatestCommits, + emitEvent } = deps const { projectId, automationId, userId } = params @@ -625,6 +628,17 @@ export const createTestAutomationRunFactory = }) await upsertAutomationRun(automationRunRecord) + await emitEvent({ + eventName: 'automationRuns.created', + payload: { + automation: automationRevisionRecord, + run: automationRunRecord, + source: RunTriggerSource.Test, + manifests: triggerManifests, + triggerType: VersionCreationTriggerType + } + }) + // TODO: Test functions only support one function run per automation const functionRunId = automationRunRecord.functionRuns[0].id diff --git a/packages/server/modules/automate/tests/automations.spec.ts b/packages/server/modules/automate/tests/automations.spec.ts index a0cf32e0e..2ad7b4d30 100644 --- a/packages/server/modules/automate/tests/automations.spec.ts +++ b/packages/server/modules/automate/tests/automations.spec.ts @@ -48,10 +48,7 @@ import { } from '@/modules/core/services/streams/access' import { authorizeResolver } from '@/modules/shared' import { grantStreamPermissionsFactory } from '@/modules/core/repositories/streams' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { publish } from '@/modules/shared/utils/subscriptions' import { getUserFactory } from '@/modules/core/repositories/users' @@ -73,10 +70,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/cli/commands/download/commit.ts b/packages/server/modules/cli/commands/download/commit.ts index 3b9c7d8ac..e04394ae5 100644 --- a/packages/server/modules/cli/commands/download/commit.ts +++ b/packages/server/modules/cli/commands/download/commit.ts @@ -45,20 +45,13 @@ import { markCommentUpdatedFactory, markCommentViewedFactory } from '@/modules/comments/repositories/comments' -import { - addCommentCreatedActivityFactory, - addReplyAddedActivityFactory -} from '@/modules/activitystream/services/commentActivity' import { validateInputAttachmentsFactory } from '@/modules/comments/services/commentTextService' import { getBlobsFactory } from '@/modules/blobstorage/repositories' import { createCommitByBranchIdFactory } from '@/modules/core/services/commit/management' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' import { getUserFactory } from '@/modules/core/repositories/users' import { createObjectFactory } from '@/modules/core/services/objects/management' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' -import { db, mainDb } from '@/db/knex' +import { db } from '@/db/knex' import { getEventBus } from '@/modules/shared/services/eventBus' const command: CommandModule< @@ -142,13 +135,7 @@ const command: CommandModule< insertComments, insertCommentLinks, markCommentViewed, - emitEvent: getEventBus().emit, - addCommentCreatedActivity: addCommentCreatedActivityFactory({ - getViewerResourcesFromLegacyIdentifiers, - getViewerResourceItemsUngrouped, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + emitEvent: getEventBus().emit }) const createCommentReplyAndNotify = createCommentReplyAndNotifyFactory({ @@ -158,13 +145,9 @@ const command: CommandModule< insertCommentLinks, markCommentUpdated: markCommentUpdatedFactory({ db: projectDb }), emitEvent: getEventBus().emit, - addReplyAddedActivity: addReplyAddedActivityFactory({ - getViewerResourcesForComment: getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), - getViewerResourcesFromLegacyIdentifiers - }), - saveActivity: saveActivityFactory({ db: mainDb }), - publish + getViewerResourcesForComment: getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), + getViewerResourcesFromLegacyIdentifiers }) }) @@ -176,11 +159,7 @@ const command: CommandModule< insertBranchCommits: insertBranchCommitsFactory({ db: projectDb }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + emitEvent: getEventBus().emit }) const createObject = createObjectFactory({ diff --git a/packages/server/modules/cli/commands/download/project.ts b/packages/server/modules/cli/commands/download/project.ts index 15dfb82ff..8faf71097 100644 --- a/packages/server/modules/cli/commands/download/project.ts +++ b/packages/server/modules/cli/commands/download/project.ts @@ -26,10 +26,6 @@ import { createCommentThreadAndNotifyFactory } from '@/modules/comments/services/management' import { createBranchAndNotifyFactory } from '@/modules/core/services/branch/management' -import { - addCommentCreatedActivityFactory, - addReplyAddedActivityFactory -} from '@/modules/activitystream/services/commentActivity' import { createCommitFactory, getAllBranchCommitsFactory, @@ -45,7 +41,7 @@ import { getViewerResourcesForCommentsFactory, getViewerResourcesFromLegacyIdentifiersFactory } from '@/modules/core/services/commit/viewerResources' -import { db, mainDb } from '@/db/knex' +import { db } from '@/db/knex' import { getCommentFactory, getCommentsResourcesFactory, @@ -56,12 +52,8 @@ import { } from '@/modules/comments/repositories/comments' import { getBlobsFactory } from '@/modules/blobstorage/repositories' import { validateInputAttachmentsFactory } from '@/modules/comments/services/commentTextService' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getUserFactory } from '@/modules/core/repositories/users' import { createObjectFactory } from '@/modules/core/services/objects/management' -import { addBranchCreatedActivityFactory } from '@/modules/activitystream/services/branchActivity' import { authorizeResolver } from '@/modules/shared' import { Roles } from '@speckle/shared' import { getDefaultRegionFactory } from '@/modules/workspaces/repositories/regions' @@ -168,13 +160,7 @@ const command: CommandModule< insertComments, insertCommentLinks, markCommentViewed, - emitEvent: getEventBus().emit, - addCommentCreatedActivity: addCommentCreatedActivityFactory({ - getViewerResourcesFromLegacyIdentifiers, - getViewerResourceItemsUngrouped, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + emitEvent: getEventBus().emit }) const createCommentReplyAndNotify = createCommentReplyAndNotifyFactory({ getComment: getCommentFactory({ db: projectDb }), @@ -183,13 +169,9 @@ const command: CommandModule< insertCommentLinks, markCommentUpdated: markCommentUpdatedFactory({ db: projectDb }), emitEvent: getEventBus().emit, - addReplyAddedActivity: addReplyAddedActivityFactory({ - getViewerResourcesForComment: getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), - getViewerResourcesFromLegacyIdentifiers - }), - saveActivity: saveActivityFactory({ db: mainDb }), - publish + getViewerResourcesForComment: getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), + getViewerResourcesFromLegacyIdentifiers }) }) @@ -201,11 +183,7 @@ const command: CommandModule< insertBranchCommits: insertBranchCommitsFactory({ db: projectDb }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + emitEvent: getEventBus().emit }) const getUser = getUserFactory({ db }) @@ -245,10 +223,7 @@ const command: CommandModule< createBranchAndNotify: createBranchAndNotifyFactory({ getStreamBranchByName, createBranch: createBranchFactory({ db: projectDb }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + eventEmit: getEventBus().emit }) }) await downloadProject({ ...argv, regionKey }, { logger: cliLogger }) diff --git a/packages/server/modules/cli/commands/workspaces/set-plan.ts b/packages/server/modules/cli/commands/workspaces/set-plan.ts index 534205304..d63f4e6b4 100644 --- a/packages/server/modules/cli/commands/workspaces/set-plan.ts +++ b/packages/server/modules/cli/commands/workspaces/set-plan.ts @@ -2,9 +2,11 @@ import { CommandModule } from 'yargs' import { cliLogger } from '@/logging/logging' import { getWorkspaceBySlugOrIdFactory } from '@/modules/workspaces/repositories/workspaces' import { db } from '@/db/knex' -import { PaidWorkspacePlanStatuses } from '@/modules/gatekeeper/domain/billing' import { upsertPaidWorkspacePlanFactory } from '@/modules/gatekeeper/repositories/billing' -import { PaidWorkspacePlans } from '@/modules/gatekeeper/domain/workspacePricing' +import { + PaidWorkspacePlans, + PaidWorkspacePlanStatuses +} from '@/modules/gatekeeperCore/domain/billing' import { WorkspaceNotFoundError } from '@/modules/workspaces/errors/workspace' const command: CommandModule< diff --git a/packages/server/modules/comments/domain/events.ts b/packages/server/modules/comments/domain/events.ts index 30f73395e..6e19679d8 100644 --- a/packages/server/modules/comments/domain/events.ts +++ b/packages/server/modules/comments/domain/events.ts @@ -1,16 +1,33 @@ +import { + CommentCreatedActivityInput, + ReplyCreatedActivityInput +} from '@/modules/activitystream/domain/types' +import { ViewerResourceItem } from '@/modules/comments/domain/types' import { CommentRecord } from '@/modules/comments/helpers/types' +import { MutationCommentArchiveArgs } from '@/modules/core/graph/generated/graphql' export const commentEventsNamespace = 'comments' as const export const CommentEvents = { Created: `${commentEventsNamespace}.created`, - Updated: `${commentEventsNamespace}.updated` + Updated: `${commentEventsNamespace}.updated`, + Archived: `${commentEventsNamespace}.archived` } as const export type CommentEventsPayloads = { - [CommentEvents.Created]: { comment: CommentRecord } + [CommentEvents.Created]: { + comment: CommentRecord + isThread: boolean + input: CommentCreatedActivityInput | ReplyCreatedActivityInput + resourceItems: ViewerResourceItem[] + } [CommentEvents.Updated]: { previousComment: CommentRecord newComment: CommentRecord } + [CommentEvents.Archived]: { + userId: string + input: MutationCommentArchiveArgs + comment: CommentRecord + } } diff --git a/packages/server/modules/comments/events/subscriptionListeners.ts b/packages/server/modules/comments/events/subscriptionListeners.ts new file mode 100644 index 000000000..f6368aa20 --- /dev/null +++ b/packages/server/modules/comments/events/subscriptionListeners.ts @@ -0,0 +1,90 @@ +import { CommentEvents } from '@/modules/comments/domain/events' +import { GetViewerResourcesForComment } from '@/modules/comments/domain/operations' +import { ProjectCommentsUpdatedMessageType } from '@/modules/core/graph/generated/graphql' +import { DependenciesOf } from '@/modules/shared/helpers/factory' +import { EventBusListen, EventPayload } from '@/modules/shared/services/eventBus' +import { + CommentSubscriptions, + ProjectSubscriptions, + PublishSubscription +} from '@/modules/shared/utils/subscriptions' + +const reportCommentCreatedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { comment, resourceItems } = payload.payload + + await Promise.all([ + // @deprecated unused in FE2 + deps.publish(CommentSubscriptions.CommentActivity, { + commentActivity: { + type: 'comment-added', + comment + }, + streamId: comment.streamId, + resourceIds: resourceItems.map((i) => i.versionId || i.objectId).join(',') + }), + deps.publish(ProjectSubscriptions.ProjectCommentsUpdated, { + projectCommentsUpdated: { + id: comment.id, + type: ProjectCommentsUpdatedMessageType.Created, + comment + }, + projectId: comment.streamId, + resourceItems + }) + ]) + } + +const reportCommentArchivedFactory = + (deps: { + publish: PublishSubscription + getViewerResourcesForComment: GetViewerResourcesForComment + }) => + async (payload: EventPayload) => { + const { + comment, + input: { archived, streamId } + } = payload.payload + + await Promise.all([ + deps.publish(CommentSubscriptions.CommentThreadActivity, { + commentThreadActivity: { + type: archived ? 'comment-archived' : 'comment-added' + }, + streamId, + commentId: comment.id + }), + deps.publish(ProjectSubscriptions.ProjectCommentsUpdated, { + projectCommentsUpdated: { + id: comment.id, + type: archived + ? ProjectCommentsUpdatedMessageType.Archived + : ProjectCommentsUpdatedMessageType.Created, + comment: archived ? null : comment + }, + projectId: streamId, + resourceItems: await deps.getViewerResourcesForComment(streamId, comment.id) + }) + ]) + } + +export const reportSubscriptionEventsFactory = + ( + deps: { + eventListen: EventBusListen + publish: PublishSubscription + } & DependenciesOf & + DependenciesOf + ) => + () => { + const reportCommentCreated = reportCommentCreatedFactory(deps) + const reportCommentArchived = reportCommentArchivedFactory(deps) + + const quitters = [ + deps.eventListen(CommentEvents.Created, reportCommentCreated), + deps.eventListen(CommentEvents.Archived, reportCommentArchived) + ] + + return () => quitters.forEach((q) => q()) + } diff --git a/packages/server/modules/comments/graph/resolvers/comments.ts b/packages/server/modules/comments/graph/resolvers/comments.ts index f6f97da06..fa59df8a2 100644 --- a/packages/server/modules/comments/graph/resolvers/comments.ts +++ b/packages/server/modules/comments/graph/resolvers/comments.ts @@ -49,11 +49,6 @@ import { filteredSubscribe, ProjectSubscriptions } from '@/modules/shared/utils/subscriptions' -import { - addCommentArchivedActivityFactory, - addCommentCreatedActivityFactory, - addReplyAddedActivityFactory -} from '@/modules/activitystream/services/commentActivity' import { doViewerResourcesFit, getViewerResourcesForCommentFactory, @@ -95,7 +90,6 @@ import { } from '@/modules/core/repositories/branches' import { getStreamObjectsFactory } from '@/modules/core/repositories/objects' import { getStreamFactory } from '@/modules/core/repositories/streams' -import { saveActivityFactory } from '@/modules/activitystream/repositories' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { Knex } from 'knex' import { getEventBus } from '@/modules/shared/services/eventBus' @@ -533,8 +527,6 @@ export = { const getViewerResourceItemsUngrouped = buildGetViewerResourceItemsUngrouped({ db: projectDb }) - const getViewerResourcesFromLegacyIdentifiers = - buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) const validateInputAttachments = validateInputAttachmentsFactory({ getBlobs: getBlobsFactory({ db: projectDb }) @@ -549,13 +541,7 @@ export = { insertComments, insertCommentLinks, markCommentViewed, - emitEvent: getEventBus().emit, - addCommentCreatedActivity: addCommentCreatedActivityFactory({ - getViewerResourcesFromLegacyIdentifiers, - getViewerResourceItemsUngrouped, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + emitEvent: getEventBus().emit }) return await createCommentThreadAndNotify(args.input, ctx.userId!) @@ -588,13 +574,9 @@ export = { insertCommentLinks, markCommentUpdated: markCommentUpdatedFactory({ db: projectDb }), emitEvent: getEventBus().emit, - addReplyAddedActivity: addReplyAddedActivityFactory({ - getViewerResourcesForComment: getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), - getViewerResourcesFromLegacyIdentifiers - }), - saveActivity: saveActivityFactory({ db: mainDb }), - publish + getViewerResourcesForComment: getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), + getViewerResourcesFromLegacyIdentifiers }) }) @@ -656,11 +638,8 @@ export = { getComment, getStream, updateComment, - addCommentArchivedActivity: addCommentArchivedActivityFactory({ - getViewerResourcesForComment, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - }) + getViewerResourcesForComment, + emitEvent: getEventBus().emit }) await archiveCommentAndNotify( @@ -740,6 +719,8 @@ export = { throw new ForbiddenError('You are not authorized.') const projectDb = await getProjectDbClient({ projectId: args.input.streamId }) + const getViewerResourcesFromLegacyIdentifiers = + buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) const createComment = createCommentFactory({ checkStreamResourcesAccess: streamResourceCheckFactory({ @@ -752,31 +733,14 @@ export = { insertCommentLinks: insertCommentLinksFactory({ db: projectDb }), deleteComment: deleteCommentFactory({ db: projectDb }), markCommentViewed: markCommentViewedFactory({ db: projectDb }), - emitEvent: getEventBus().emit + emitEvent: getEventBus().emit, + getViewerResourcesFromLegacyIdentifiers }) const comment = await createComment({ userId: context.userId, input: args.input }) - const getViewerResourceItemsUngrouped = buildGetViewerResourceItemsUngrouped({ - db: projectDb - }) - const getViewerResourcesFromLegacyIdentifiers = - buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) - - await addCommentCreatedActivityFactory({ - getViewerResourceItemsUngrouped, - getViewerResourcesFromLegacyIdentifiers, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - })({ - streamId: args.input.streamId, - userId: context.userId, - input: args.input, - comment - }) - return comment.id }, @@ -828,27 +792,10 @@ export = { const archiveComment = archiveCommentFactory({ getComment: getCommentFactory({ db: projectDb }), getStream, - updateComment: updateCommentFactory({ db: projectDb }) - }) - const updatedComment = await archiveComment({ ...args, userId: context.userId! }) // NOTE: permissions check inside service - - const getViewerResourcesFromLegacyIdentifiers = - buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) - const getViewerResourcesForComment = getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), - getViewerResourcesFromLegacyIdentifiers - }) - await addCommentArchivedActivityFactory({ - getViewerResourcesForComment, - saveActivity: saveActivityFactory({ db: mainDb }), - publish - })({ - streamId: args.streamId, - commentId: args.commentId, - userId: context.userId!, - input: args, - comment: updatedComment + updateComment: updateCommentFactory({ db: projectDb }), + emitEvent: getEventBus().emit }) + await archiveComment({ ...args, userId: context.userId! }) // NOTE: permissions check inside service return true }, @@ -878,7 +825,12 @@ export = { }), deleteComment: deleteCommentFactory({ db: projectDb }), markCommentUpdated: markCommentUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit + emitEvent: getEventBus().emit, + getViewerResourcesForComment: getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), + getViewerResourcesFromLegacyIdentifiers: + buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) + }) }) const reply = await createCommentReply({ authorId: context.userId, @@ -889,22 +841,6 @@ export = { blobIds: args.input.blobIds }) - const getViewerResourcesFromLegacyIdentifiers = - buildGetViewerResourcesFromLegacyIdentifiers({ db: projectDb }) - await addReplyAddedActivityFactory({ - getViewerResourcesForComment: getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db: projectDb }), - getViewerResourcesFromLegacyIdentifiers - }), - saveActivity: saveActivityFactory({ db: mainDb }), - publish - })({ - streamId: args.input.streamId, - input: args.input, - reply, - userId: context.userId - }) - return reply.id } }, diff --git a/packages/server/modules/comments/index.ts b/packages/server/modules/comments/index.ts index 0f495fa4c..39cba0970 100644 --- a/packages/server/modules/comments/index.ts +++ b/packages/server/modules/comments/index.ts @@ -2,10 +2,20 @@ import { db } from '@/db/knex' import { moduleLogger } from '@/logging/logging' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { addStreamCommentMentionActivityFactory } from '@/modules/activitystream/services/streamActivity' +import { reportSubscriptionEventsFactory } from '@/modules/comments/events/subscriptionListeners' +import { getCommentsResourcesFactory } from '@/modules/comments/repositories/comments' import { notifyUsersOnCommentEventsFactory } from '@/modules/comments/services/notifications' +import { getCommitsAndTheirBranchIdsFactory } from '@/modules/core/repositories/commits' +import { getStreamObjectsFactory } from '@/modules/core/repositories/objects' +import { + getViewerResourcesForCommentFactory, + getViewerResourcesForCommentsFactory, + getViewerResourcesFromLegacyIdentifiersFactory +} from '@/modules/core/services/commit/viewerResources' import { publishNotification } from '@/modules/notifications/services/publication' import { Optional, SpeckleModule } from '@/modules/shared/helpers/typeHelper' import { getEventBus } from '@/modules/shared/services/eventBus' +import { publish } from '@/modules/shared/utils/subscriptions' let unsubFromEvents: Optional<() => void> = undefined @@ -22,6 +32,28 @@ const commentsModule: SpeckleModule = { }) }) unsubFromEvents = await notifyUsersOnCommentEvents() + + const getViewerResourcesFromLegacyIdentifiers = + getViewerResourcesFromLegacyIdentifiersFactory({ + getViewerResourcesForComments: getViewerResourcesForCommentsFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers: (...args) => + getViewerResourcesFromLegacyIdentifiers(...args) // recursive dep + }), + getCommitsAndTheirBranchIds: getCommitsAndTheirBranchIdsFactory({ db }), + getStreamObjects: getStreamObjectsFactory({ db }) + }) + const getViewerResourcesForComment = getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers: (...args) => + getViewerResourcesFromLegacyIdentifiers(...args) // recursive dep + }) + + reportSubscriptionEventsFactory({ + eventListen: getEventBus().listen, + publish, + getViewerResourcesForComment + })() } }, async finalize() {}, diff --git a/packages/server/modules/comments/services/index.ts b/packages/server/modules/comments/services/index.ts index 6fff95514..e99e37345 100644 --- a/packages/server/modules/comments/services/index.ts +++ b/packages/server/modules/comments/services/index.ts @@ -14,6 +14,8 @@ import { CheckStreamResourcesAccess, DeleteComment, GetComment, + GetViewerResourcesForComment, + GetViewerResourcesFromLegacyIdentifiers, InsertCommentLinks, InsertComments, MarkCommentUpdated, @@ -58,6 +60,7 @@ export const createCommentFactory = deleteComment: DeleteComment markCommentViewed: MarkCommentViewed emitEvent: EventBusEmit + getViewerResourcesFromLegacyIdentifiers: GetViewerResourcesFromLegacyIdentifiers }) => async ({ userId, input }: { userId: string; input: CommentCreateInput }) => { if (input.resources.length < 1) @@ -123,10 +126,17 @@ export const createCommentFactory = await deps.markCommentViewed(id, userId) // so we don't self mark a comment as unread the moment it's created + const resourceItems = await deps.getViewerResourcesFromLegacyIdentifiers( + input.streamId, + input.resources.filter(isNonNullable) + ) await deps.emitEvent({ eventName: CommentEvents.Created, payload: { - comment: newComment + comment: newComment, + input, + isThread: true, + resourceItems } }) @@ -145,6 +155,7 @@ export const createCommentReplyFactory = deleteComment: DeleteComment markCommentUpdated: MarkCommentUpdated emitEvent: EventBusEmit + getViewerResourcesForComment: GetViewerResourcesForComment }) => async ({ authorId, @@ -195,10 +206,24 @@ export const createCommentReplyFactory = await deps.markCommentUpdated(parentCommentId) + const resourceItems = await deps.getViewerResourcesForComment( + newComment.streamId, + newComment.id + ) await deps.emitEvent({ eventName: CommentEvents.Created, payload: { - comment: newComment + comment: newComment, + isThread: false, + input: { + threadId: parentCommentId, + projectId: streamId, + content: { + blobIds, + doc: text + } + }, + resourceItems } }) @@ -256,6 +281,7 @@ export const archiveCommentFactory = getComment: GetComment getStream: GetStream updateComment: UpdateComment + emitEvent: EventBusEmit }) => async ({ commentId, @@ -282,5 +308,15 @@ export const archiveCommentFactory = } const updatedComment = await deps.updateComment(commentId, { archived }) + + await deps.emitEvent({ + eventName: CommentEvents.Archived, + payload: { + userId, + input: { archived, commentId, streamId }, + comment: updatedComment! + } + }) + return updatedComment! } diff --git a/packages/server/modules/comments/services/management.ts b/packages/server/modules/comments/services/management.ts index 0836579b4..a28c19f31 100644 --- a/packages/server/modules/comments/services/management.ts +++ b/packages/server/modules/comments/services/management.ts @@ -26,6 +26,7 @@ import { EditCommentAndNotify, GetComment, GetViewerResourceItemsUngrouped, + GetViewerResourcesForComment, InsertCommentLinks, InsertCommentPayload, InsertComments, @@ -35,11 +36,6 @@ import { ValidateInputAttachments } from '@/modules/comments/domain/operations' import { GetStream } from '@/modules/core/domain/streams/operations' -import { - AddCommentArchivedActivity, - AddCommentCreatedActivity, - AddReplyAddedActivity -} from '@/modules/activitystream/domain/operations' import { EventBusEmit } from '@/modules/shared/services/eventBus' import { CommentEvents } from '@/modules/comments/domain/events' @@ -118,7 +114,6 @@ export const createCommentThreadAndNotifyFactory = insertCommentLinks: InsertCommentLinks markCommentViewed: MarkCommentViewed emitEvent: EventBusEmit - addCommentCreatedActivity: AddCommentCreatedActivity }): CreateCommentThreadAndNotify => async (input: CreateCommentInput, userId: string) => { const [resources] = await Promise.all([ @@ -180,17 +175,11 @@ export const createCommentThreadAndNotifyFactory = deps.emitEvent({ eventName: CommentEvents.Created, payload: { - comment + comment, + input, + isThread: true, + resourceItems: resources } - }), - deps.addCommentCreatedActivity({ - streamId: input.projectId, - userId, - input: { - ...input, - resolvedResourceItems: resources - }, - comment }) ]) @@ -205,7 +194,7 @@ export const createCommentReplyAndNotifyFactory = insertCommentLinks: InsertCommentLinks markCommentUpdated: MarkCommentUpdated emitEvent: EventBusEmit - addReplyAddedActivity: AddReplyAddedActivity + getViewerResourcesForComment: GetViewerResourcesForComment }): CreateCommentReplyAndNotify => async (input: CreateCommentReplyInput, userId: string) => { const thread = await deps.getComment({ id: input.threadId, userId }) @@ -239,19 +228,20 @@ export const createCommentReplyAndNotifyFactory = } // Mark parent comment updated and emit events + const resourceItems = await deps.getViewerResourcesForComment( + reply.streamId, + reply.id + ) await Promise.all([ deps.markCommentUpdated(thread.id), deps.emitEvent({ eventName: CommentEvents.Created, payload: { - comment: reply + comment: reply, + input, + isThread: false, + resourceItems } - }), - deps.addReplyAddedActivity({ - streamId: thread.streamId, - input, - reply, - userId }) ]) @@ -298,7 +288,8 @@ export const archiveCommentAndNotifyFactory = getComment: GetComment getStream: GetStream updateComment: UpdateComment - addCommentArchivedActivity: AddCommentArchivedActivity + emitEvent: EventBusEmit + getViewerResourcesForComment: GetViewerResourcesForComment }): ArchiveCommentAndNotify => async (commentId: string, userId: string, archived = true) => { const comment = await deps.getComment({ id: commentId, userId }) @@ -321,16 +312,13 @@ export const archiveCommentAndNotifyFactory = archived }) - await deps.addCommentArchivedActivity({ - streamId: stream.id, - commentId, - userId, - input: { - archived, - streamId: stream.id, - commentId - }, - comment: updatedComment! + await deps.emitEvent({ + eventName: CommentEvents.Archived, + payload: { + userId, + input: { archived, commentId, streamId: stream.id }, + comment: updatedComment! + } }) return updatedComment diff --git a/packages/server/modules/comments/tests/comments.graph.spec.js b/packages/server/modules/comments/tests/comments.graph.spec.js index 40cb320b9..1fcf5b104 100644 --- a/packages/server/modules/comments/tests/comments.graph.spec.js +++ b/packages/server/modules/comments/tests/comments.graph.spec.js @@ -22,7 +22,8 @@ const { markCommentViewedFactory, insertCommentsFactory, insertCommentLinksFactory, - deleteCommentFactory + deleteCommentFactory, + getCommentsResourcesFactory } = require('@/modules/comments/repositories/comments') const { db } = require('@/db/knex') const { @@ -36,7 +37,8 @@ const { const { createCommitFactory, insertStreamCommitsFactory, - insertBranchCommitsFactory + insertBranchCommitsFactory, + getCommitsAndTheirBranchIdsFactory } = require('@/modules/core/repositories/commits') const { getBranchByIdFactory, @@ -53,7 +55,8 @@ const { } = require('@/modules/core/repositories/streams') const { getObjectFactory, - storeSingleObjectIfNotFoundFactory + storeSingleObjectIfNotFoundFactory, + getStreamObjectsFactory } = require('@/modules/core/repositories/objects') const { legacyCreateStreamFactory, @@ -79,11 +82,6 @@ const { buildCoreInviteEmailContentsFactory } = require('@/modules/serverinvites/services/coreEmailContents') const { getEventBus } = require('@/modules/shared/services/eventBus') -const { saveActivityFactory } = require('@/modules/activitystream/repositories') -const { publish } = require('@/modules/shared/utils/subscriptions') -const { - addCommitCreatedActivityFactory -} = require('@/modules/activitystream/services/commitActivity') const { getUsersFactory, getUserFactory, @@ -113,6 +111,10 @@ const { } = require('@/modules/serverinvites/services/processing') const { getServerInfoFactory } = require('@/modules/core/repositories/server') const { createObjectFactory } = require('@/modules/core/services/objects/management') +const { + getViewerResourcesFromLegacyIdentifiersFactory, + getViewerResourcesForCommentsFactory +} = require('@/modules/core/services/commit/viewerResources') const getServerInfo = getServerInfoFactory({ db }) const getUser = getUserFactory({ db }) @@ -122,6 +124,18 @@ const streamResourceCheck = streamResourceCheckFactory({ checkStreamResourceAccess: checkStreamResourceAccessFactory({ db }) }) const markCommentViewed = markCommentViewedFactory({ db }) + +const getViewerResourcesFromLegacyIdentifiers = + getViewerResourcesFromLegacyIdentifiersFactory({ + getViewerResourcesForComments: getViewerResourcesForCommentsFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers: (...args) => + getViewerResourcesFromLegacyIdentifiers(...args) // recursive dep + }), + getCommitsAndTheirBranchIds: getCommitsAndTheirBranchIdsFactory({ db }), + getStreamObjects: getStreamObjectsFactory({ db }) + }) + const createComment = createCommentFactory({ checkStreamResourcesAccess: streamResourceCheck, validateInputAttachments: validateInputAttachmentsFactory({ @@ -131,7 +145,8 @@ const createComment = createCommentFactory({ insertCommentLinks: insertCommentLinksFactory({ db }), deleteComment: deleteCommentFactory({ db }), markCommentViewed, - emitEvent: getEventBus().emit + emitEvent: getEventBus().emit, + getViewerResourcesFromLegacyIdentifiers }) const getObject = getObjectFactory({ db }) @@ -143,11 +158,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/modules/comments/tests/comments.spec.ts b/packages/server/modules/comments/tests/comments.spec.ts index e9b77b1a6..199aa4763 100644 --- a/packages/server/modules/comments/tests/comments.spec.ts +++ b/packages/server/modules/comments/tests/comments.spec.ts @@ -43,7 +43,8 @@ import { updateCommentFactory, getCommentsLegacyFactory, getResourceCommentCountFactory, - getStreamCommentCountFactory + getStreamCommentCountFactory, + getCommentsResourcesFactory } from '@/modules/comments/repositories/comments' import { db } from '@/db/knex' import { getBlobsFactory } from '@/modules/blobstorage/repositories' @@ -59,7 +60,8 @@ import { import { createCommitFactory, insertStreamCommitsFactory, - insertBranchCommitsFactory + insertBranchCommitsFactory, + getCommitsAndTheirBranchIdsFactory } from '@/modules/core/repositories/commits' import { getBranchByIdFactory, @@ -69,7 +71,8 @@ import { } from '@/modules/core/repositories/branches' import { getObjectFactory, - storeSingleObjectIfNotFoundFactory + storeSingleObjectIfNotFoundFactory, + getStreamObjectsFactory } from '@/modules/core/repositories/objects' import { legacyCreateStreamFactory, @@ -86,9 +89,6 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getUsersFactory, getUserFactory, @@ -120,6 +120,11 @@ import { import { CommentRecord } from '@/modules/comments/helpers/types' import { MaybeNullOrUndefined } from '@speckle/shared' import { CommentEvents } from '@/modules/comments/domain/events' +import { + getViewerResourcesForCommentFactory, + getViewerResourcesForCommentsFactory, + getViewerResourcesFromLegacyIdentifiersFactory +} from '@/modules/core/services/commit/viewerResources' type LegacyCommentRecord = CommentRecord & { total_count: string @@ -140,6 +145,17 @@ const validateInputAttachments = validateInputAttachmentsFactory({ const insertComments = insertCommentsFactory({ db }) const insertCommentLinks = insertCommentLinksFactory({ db }) const deleteComment = deleteCommentFactory({ db }) + +const getViewerResourcesFromLegacyIdentifiers = + getViewerResourcesFromLegacyIdentifiersFactory({ + getViewerResourcesForComments: getViewerResourcesForCommentsFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers: (...args) => + getViewerResourcesFromLegacyIdentifiers(...args) // recursive dep + }), + getCommitsAndTheirBranchIds: getCommitsAndTheirBranchIdsFactory({ db }), + getStreamObjects: getStreamObjectsFactory({ db }) + }) const createComment = createCommentFactory({ checkStreamResourcesAccess: streamResourceCheck, validateInputAttachments, @@ -147,7 +163,13 @@ const createComment = createCommentFactory({ insertCommentLinks, deleteComment, markCommentViewed, - emitEvent: getEventBus().emit + emitEvent: getEventBus().emit, + getViewerResourcesFromLegacyIdentifiers +}) +const getViewerResourcesForComment = getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers: (...args) => + getViewerResourcesFromLegacyIdentifiers(...args) // recursive dep }) const createCommentReply = createCommentReplyFactory({ validateInputAttachments, @@ -156,7 +178,8 @@ const createCommentReply = createCommentReplyFactory({ checkStreamResourcesAccess: streamResourceCheck, deleteComment, markCommentUpdated: markCommentUpdatedFactory({ db }), - emitEvent: getEventBus().emit + emitEvent: getEventBus().emit, + getViewerResourcesForComment }) const getComment = getCommentFactory({ db }) const updateComment = updateCommentFactory({ db }) @@ -169,7 +192,8 @@ const editComment = editCommentFactory({ const archiveComment = archiveCommentFactory({ getComment, getStream, - updateComment + updateComment, + emitEvent: getEventBus().emit }) const getComments = getCommentsLegacyFactory({ db }) const getResourceCommentCount = getResourceCommentCountFactory({ db }) @@ -185,11 +209,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/modules/core/configs/cors.ts b/packages/server/modules/core/configs/cors.ts index 2936ff73e..f0e92f30a 100644 --- a/packages/server/modules/core/configs/cors.ts +++ b/packages/server/modules/core/configs/cors.ts @@ -1,13 +1,17 @@ import cors, { CorsOptions } from 'cors' +import { RequestHandler } from 'express' /** * Main CORS config to use everywhere + * (NB. Default config for 'cors' module is to allow all origins https://github.com/expressjs/cors/blob/1cfb3709dec33dfa7ae95a3a554f2dd10498c7f9/lib/index.js#L8-L13) */ -export const corsConfig: CorsOptions = { +const defaultCorsConfig: CorsOptions = { origin: '*' } -/** - * CORS express middleware with our CORS config applied - */ -export const corsMiddleware = () => cors(corsConfig) +export const corsMiddlewareFactory = (deps?: { + corsConfig: CorsOptions +}): RequestHandler => { + const { corsConfig } = deps || { corsConfig: defaultCorsConfig } + return cors(corsConfig) +} diff --git a/packages/server/modules/core/domain/branches/events.ts b/packages/server/modules/core/domain/branches/events.ts index a76bc7cda..a1880d32e 100644 --- a/packages/server/modules/core/domain/branches/events.ts +++ b/packages/server/modules/core/domain/branches/events.ts @@ -1,11 +1,32 @@ import { Model } from '@/modules/core/domain/branches/types' +import { + BranchDeleteInput, + BranchUpdateInput, + DeleteModelInput, + UpdateModelInput +} from '@/modules/core/graph/generated/graphql' export const modelEventsNamespace = 'models' as const export const ModelEvents = { - Deleted: `${modelEventsNamespace}.deleted` + Deleted: `${modelEventsNamespace}.deleted`, + Created: `${modelEventsNamespace}.created`, + Updated: `${modelEventsNamespace}.updated` } as const export type ModelEventsPayloads = { - [ModelEvents.Deleted]: { projectId: string; modelId: string; model: Model } + [ModelEvents.Deleted]: { + projectId: string + modelId: string + model: Model + userId: string + input: BranchDeleteInput | DeleteModelInput + } + [ModelEvents.Created]: { projectId: string; model: Model } + [ModelEvents.Updated]: { + update: BranchUpdateInput | UpdateModelInput + userId: string + oldModel: Model + newModel: Model + } } diff --git a/packages/server/modules/core/domain/commits/events.ts b/packages/server/modules/core/domain/commits/events.ts index a5534f7a3..696b57bb7 100644 --- a/packages/server/modules/core/domain/commits/events.ts +++ b/packages/server/modules/core/domain/commits/events.ts @@ -1,11 +1,59 @@ import { Version } from '@/modules/core/domain/commits/types' +import { + CommitCreateInput, + CommitUpdateInput, + UpdateVersionInput +} from '@/modules/core/graph/generated/graphql' +import { MaybeNullOrUndefined } from '@speckle/shared' export const versionEventsNamespace = 'versions' as const export const VersionEvents = { - Created: `${versionEventsNamespace}.created` + Created: `${versionEventsNamespace}.created`, + Updated: `${versionEventsNamespace}.updated`, + MovedModel: `${versionEventsNamespace}.movedModel`, + Deleted: `${versionEventsNamespace}.deleted`, + Received: `${versionEventsNamespace}.received` } as const export type VersionEventsPayloads = { - [VersionEvents.Created]: { projectId: string; modelId: string; version: Version } + [VersionEvents.Created]: { + projectId: string + modelId: string + version: Version + userId: string + modelName: string + input: CommitCreateInput + } + [VersionEvents.Updated]: { + projectId: string + modelId: string + versionId: string + newVersion: Version + oldVersion: Version + userId: string + update: CommitUpdateInput | UpdateVersionInput + } + [VersionEvents.MovedModel]: { + projectId: string + versionId: string + userId: string + version: Version + originalModelId: string + newModelId: string + } + [VersionEvents.Deleted]: { + projectId: string + versionId: string + modelId: string + userId: string + version: Version + } + [VersionEvents.Received]: { + projectId: string + versionId: string + userId: string + sourceApplication: string + message: MaybeNullOrUndefined + } } diff --git a/packages/server/modules/core/domain/commits/operations.ts b/packages/server/modules/core/domain/commits/operations.ts index bbb221f64..574bc0254 100644 --- a/packages/server/modules/core/domain/commits/operations.ts +++ b/packages/server/modules/core/domain/commits/operations.ts @@ -70,9 +70,6 @@ export type CreateCommitByBranchId = ( sourceApplication: Nullable totalChildrenCount?: MaybeNullOrUndefined parents: Nullable - }>, - options?: Partial<{ - notify: boolean }> ) => Promise @@ -86,9 +83,6 @@ export type CreateCommitByBranchName = ( sourceApplication: Nullable totalChildrenCount?: MaybeNullOrUndefined parents: Nullable - }>, - options?: Partial<{ - notify: boolean }> ) => Promise diff --git a/packages/server/modules/core/domain/streams/operations.ts b/packages/server/modules/core/domain/streams/operations.ts index 1ee312395..c6064ca48 100644 --- a/packages/server/modules/core/domain/streams/operations.ts +++ b/packages/server/modules/core/domain/streams/operations.ts @@ -21,6 +21,7 @@ import { MaybeNullOrUndefined, Nullable, Optional, StreamRoles } from '@speckle/ import { Knex } from 'knex' import type express from 'express' import { ProjectCreateArgs } from '@/modules/core/domain/projects/operations' +import { ServerInviteRecord } from '@/modules/serverinvites/domain/types' import type { Logger } from 'pino' export type LegacyGetStreams = (params: { @@ -309,7 +310,7 @@ export type AddOrUpdateStreamCollaborator = ( addedById: string, adderResourceAccessRules?: MaybeNullOrUndefined, options?: Partial<{ - fromInvite: boolean + fromInvite: ServerInviteRecord }> ) => Promise diff --git a/packages/server/modules/core/events/subscriptionListeners.ts b/packages/server/modules/core/events/subscriptionListeners.ts new file mode 100644 index 000000000..11d1ec164 --- /dev/null +++ b/packages/server/modules/core/events/subscriptionListeners.ts @@ -0,0 +1,212 @@ +import { ModelEvents } from '@/modules/core/domain/branches/events' +import { VersionEvents } from '@/modules/core/domain/commits/events' +import { + CommitUpdateInput, + ProjectModelsUpdatedMessageType, + ProjectVersionsUpdatedMessageType +} from '@/modules/core/graph/generated/graphql' +import { isOldVersionUpdateInput } from '@/modules/core/services/commit/management' +import { BranchPubsubEvents, CommitPubsubEvents } from '@/modules/shared' +import { DependenciesOf } from '@/modules/shared/helpers/factory' +import { EventBusListen, EventPayload } from '@/modules/shared/services/eventBus' +import { + ProjectSubscriptions, + PublishSubscription +} from '@/modules/shared/utils/subscriptions' + +const reportModelCreatedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { model } = payload.payload + + await Promise.all([ + deps.publish(BranchPubsubEvents.BranchCreated, { + branchCreated: { ...model }, + streamId: model.streamId + }), + deps.publish(ProjectSubscriptions.ProjectModelsUpdated, { + projectId: model.streamId, + projectModelsUpdated: { + id: model.id, + type: ProjectModelsUpdatedMessageType.Created, + model + } + }) + ]) + } + +const reportModelUpdatedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { newModel, update } = payload.payload + + await Promise.all([ + deps.publish(BranchPubsubEvents.BranchUpdated, { + branchUpdated: { ...update }, + streamId: newModel.streamId, + branchId: newModel.id + }), + deps.publish(ProjectSubscriptions.ProjectModelsUpdated, { + projectId: newModel.streamId, + projectModelsUpdated: { + model: newModel, + id: newModel.id, + type: ProjectModelsUpdatedMessageType.Updated + } + }) + ]) + } + +const reportModelDeletedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { input, projectId } = payload.payload + + await Promise.all([ + deps.publish(BranchPubsubEvents.BranchDeleted, { + branchDeleted: input, + streamId: projectId + }), + deps.publish(ProjectSubscriptions.ProjectModelsUpdated, { + projectId, + projectModelsUpdated: { + id: input.id, + type: ProjectModelsUpdatedMessageType.Deleted, + model: null + } + }) + ]) + } + +const reportVersionMovedModelFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { version, projectId, newModelId } = payload.payload + + await deps.publish(ProjectSubscriptions.ProjectVersionsUpdated, { + projectId, + projectVersionsUpdated: { + id: version.id, + version: { ...version, streamId: projectId }, + type: ProjectVersionsUpdatedMessageType.Updated, + modelId: newModelId + } + }) + } + +const reportVersionDeletedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { version, projectId, modelId } = payload.payload + + await Promise.all([ + deps.publish(CommitPubsubEvents.CommitDeleted, { + commitDeleted: { + ...version, + streamId: projectId, + branchId: modelId + }, + streamId: projectId + }), + deps.publish(ProjectSubscriptions.ProjectVersionsUpdated, { + projectId, + projectVersionsUpdated: { + id: version.id, + type: ProjectVersionsUpdatedMessageType.Deleted, + version: null, + modelId + } + }) + ]) + } + +const reportVersionCreatedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { version, projectId, modelId, input, userId } = payload.payload + + await Promise.all([ + deps.publish(CommitPubsubEvents.CommitCreated, { + commitCreated: { ...input, id: version.id, authorId: userId }, + streamId: projectId + }), + deps.publish(ProjectSubscriptions.ProjectVersionsUpdated, { + projectId, + projectVersionsUpdated: { + id: version.id, + version: { ...version, streamId: projectId }, + type: ProjectVersionsUpdatedMessageType.Created, + modelId + } + }) + ]) + } + +const reportVersionUpdatedFactory = + (deps: { publish: PublishSubscription }) => + async (payload: EventPayload) => { + const { projectId, newVersion, update, modelId } = payload.payload + + const legacyUpdateStruct: CommitUpdateInput = isOldVersionUpdateInput(update) + ? update + : { + id: update.versionId, + message: update.message, + streamId: projectId + } + + await Promise.all([ + deps.publish(CommitPubsubEvents.CommitUpdated, { + commitUpdated: { ...legacyUpdateStruct }, + streamId: projectId, + commitId: newVersion.id + }), + deps.publish(ProjectSubscriptions.ProjectVersionsUpdated, { + projectId, + projectVersionsUpdated: { + id: newVersion.id, + version: { ...newVersion, streamId: projectId }, + type: ProjectVersionsUpdatedMessageType.Updated, + modelId + } + }) + ]) + } + +export const reportSubscriptionEventsFactory = + ( + deps: { + eventListen: EventBusListen + publish: PublishSubscription + } & DependenciesOf & + DependenciesOf & + DependenciesOf & + DependenciesOf & + DependenciesOf & + DependenciesOf & + DependenciesOf + ) => + () => { + const reportModelCreated = reportModelCreatedFactory(deps) + const reportModelUpdated = reportModelUpdatedFactory(deps) + const reportModelDeleted = reportModelDeletedFactory(deps) + + const reportVersionMovedModel = reportVersionMovedModelFactory(deps) + const reportVersionDeleted = reportVersionDeletedFactory(deps) + const reportVersionCreated = reportVersionCreatedFactory(deps) + const reportVersionUpdated = reportVersionUpdatedFactory(deps) + + const quitCbs = [ + // Models + deps.eventListen(ModelEvents.Created, reportModelCreated), + deps.eventListen(ModelEvents.Updated, reportModelUpdated), + deps.eventListen(ModelEvents.Deleted, reportModelDeleted), + // Versions + deps.eventListen(VersionEvents.MovedModel, reportVersionMovedModel), + deps.eventListen(VersionEvents.Deleted, reportVersionDeleted), + deps.eventListen(VersionEvents.Created, reportVersionCreated), + deps.eventListen(VersionEvents.Updated, reportVersionUpdated) + ] + + return () => quitCbs.forEach((quit) => quit()) + } diff --git a/packages/server/modules/core/graph/resolvers/branches.ts b/packages/server/modules/core/graph/resolvers/branches.ts index 1da138c84..509c39566 100644 --- a/packages/server/modules/core/graph/resolvers/branches.ts +++ b/packages/server/modules/core/graph/resolvers/branches.ts @@ -4,7 +4,6 @@ import { updateBranchAndNotifyFactory, deleteBranchAndNotifyFactory } from '@/modules/core/services/branch/management' - import { Roles } from '@speckle/shared' import { getBranchByIdFactory, @@ -16,11 +15,6 @@ import { getStreamBranchCountFactory } from '@/modules/core/repositories/branches' import { db } from '@/db/knex' -import { - addBranchCreatedActivityFactory, - addBranchDeletedActivityFactory, - addBranchUpdatedActivityFactory -} from '@/modules/activitystream/services/branchActivity' import { getStreamFactory, markBranchStreamUpdatedFactory @@ -28,8 +22,7 @@ import { import { legacyGetUserFactory } from '@/modules/core/repositories/users' import { Resolvers } from '@/modules/core/graph/generated/graphql' import { getPaginatedStreamBranchesFactory } from '@/modules/core/services/branch/retrieval' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { filteredSubscribe, publish } from '@/modules/shared/utils/subscriptions' +import { filteredSubscribe } from '@/modules/shared/utils/subscriptions' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { getEventBus } from '@/modules/shared/services/eventBus' @@ -89,10 +82,7 @@ export = { const createBranchAndNotify = createBranchAndNotifyFactory({ getStreamBranchByName, createBranch: createBranchFactory({ db: projectDB }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) const { id } = await createBranchAndNotify(args.branch, context.userId!) @@ -112,10 +102,7 @@ export = { const updateBranchAndNotify = updateBranchAndNotifyFactory({ getBranchById, updateBranch: updateBranchFactory({ db: projectDB }), - addBranchUpdatedActivity: addBranchUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) const newBranch = await updateBranchAndNotify(args.branch, context.userId!) return !!newBranch @@ -137,10 +124,6 @@ export = { getBranchById: getBranchByIdFactory({ db: projectDB }), emitEvent: getEventBus().emit, markBranchStreamUpdated, - addBranchDeletedActivity: addBranchDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), deleteBranchById: deleteBranchByIdFactory({ db: projectDB }) }) const deleted = await deleteBranchAndNotify(args.branch, context.userId!) diff --git a/packages/server/modules/core/graph/resolvers/commits.ts b/packages/server/modules/core/graph/resolvers/commits.ts index 34ee339f4..1a8711637 100644 --- a/packages/server/modules/core/graph/resolvers/commits.ts +++ b/packages/server/modules/core/graph/resolvers/commits.ts @@ -1,8 +1,7 @@ import { CommitNotFoundError } from '@/modules/core/errors/commit' import { CommitSubscriptions, - filteredSubscribe, - publish + filteredSubscribe } from '@/modules/shared/utils/subscriptions' import { authorizeResolver } from '@/modules/shared' import { Knex } from 'knex' @@ -65,15 +64,8 @@ import { getStreamBranchByNameFactory, createBranchFactory } from '@/modules/core/repositories/branches' -import { - addCommitCreatedActivityFactory, - addCommitUpdatedActivityFactory, - addCommitMovedActivityFactory, - addCommitDeletedActivityFactory -} from '@/modules/activitystream/services/commitActivity' import { getObjectFactory } from '@/modules/core/repositories/objects' import { validateStreamAccessFactory } from '@/modules/core/services/streams/access' -import { saveActivityFactory } from '@/modules/activitystream/repositories' import { Resolvers } from '@/modules/core/graph/generated/graphql' import { CommitGraphQLReturn } from '@/modules/core/helpers/graphTypes' import { @@ -361,11 +353,7 @@ export = { insertBranchCommits: insertBranchCommitsFactory({ db: projectDb }), markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ @@ -400,10 +388,7 @@ export = { getCommitBranch: getCommitBranchFactory({ db: projectDb }), switchCommitBranch: switchCommitBranchFactory({ db: projectDb }), updateCommit: updateCommitFactory({ db: projectDb }), - addCommitUpdatedActivity: addCommitUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), + emitEvent: getEventBus().emit, markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }) }) @@ -422,7 +407,7 @@ export = { const projectDb = await getProjectDbClient({ projectId: args.input.streamId }) await markCommitReceivedAndNotifyFactory({ getCommit: getCommitFactory({ db: projectDb }), - saveActivity: saveActivityFactory({ db }) + emitEvent: getEventBus().emit })({ input: args.input, userId: context.userId! @@ -445,10 +430,7 @@ export = { markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), deleteCommit: deleteCommitFactory({ db: projectDb }), - addCommitDeletedActivity: addCommitDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const deleted = await deleteCommitAndNotify( args.commit.id, @@ -467,10 +449,7 @@ export = { getStreamBranchByName: getStreamBranchByNameFactory({ db: projectDb }), createBranch: createBranchFactory({ db: projectDb }), moveCommitsToBranch: moveCommitsToBranchFactory({ db: projectDb }), - addCommitMovedActivity: addCommitMovedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) await batchMoveCommits(args.input, ctx.userId!) return true @@ -483,10 +462,7 @@ export = { getCommits: getCommitsFactory({ db: projectDb }), getStreams, deleteCommits: deleteCommitsFactory({ db: projectDb }), - addCommitDeletedActivity: addCommitDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) await batchDeleteCommits(args.input, ctx.userId!) return true diff --git a/packages/server/modules/core/graph/resolvers/models.ts b/packages/server/modules/core/graph/resolvers/models.ts index 1d74bad0a..91c40dee9 100644 --- a/packages/server/modules/core/graph/resolvers/models.ts +++ b/packages/server/modules/core/graph/resolvers/models.ts @@ -20,8 +20,7 @@ import { } from '@/modules/core/services/commit/retrieval' import { filteredSubscribe, - ProjectSubscriptions, - publish + ProjectSubscriptions } from '@/modules/shared/utils/subscriptions' import { createBranchFactory, @@ -50,16 +49,10 @@ import { legacyGetPaginatedStreamCommitsPageFactory } from '@/modules/core/repositories/commits' import { db } from '@/db/knex' -import { - addBranchCreatedActivityFactory, - addBranchDeletedActivityFactory, - addBranchUpdatedActivityFactory -} from '@/modules/activitystream/services/branchActivity' import { getStreamFactory, markBranchStreamUpdatedFactory } from '@/modules/core/repositories/streams' -import { saveActivityFactory } from '@/modules/activitystream/repositories' import { getProjectDbClient, getRegisteredRegionClients @@ -310,15 +303,23 @@ export = { ctx.resourceAccessRules ) const projectDB = await getProjectDbClient({ projectId: args.input.projectId }) + + // Sanitize model name by trimming spaces around slashes + const sanitizedInput = { + ...args.input, + name: args.input.name + .split('/') + .map((part) => part.trim()) + .filter((part) => part.length > 0) + .join('/') + } + const createBranchAndNotify = createBranchAndNotifyFactory({ getStreamBranchByName: getStreamBranchByNameFactory({ db: projectDB }), createBranch: createBranchFactory({ db: projectDB }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) - return await createBranchAndNotify(args.input, ctx.userId!) + return await createBranchAndNotify(sanitizedInput, ctx.userId!) }, async update(_parent, args, ctx) { await authorizeResolver( @@ -331,10 +332,7 @@ export = { const updateBranchAndNotify = updateBranchAndNotifyFactory({ getBranchById: getBranchByIdFactory({ db: projectDB }), updateBranch: updateBranchFactory({ db: projectDB }), - addBranchUpdatedActivity: addBranchUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) return await updateBranchAndNotify(args.input, ctx.userId!) }, @@ -353,10 +351,6 @@ export = { getBranchById: getBranchByIdFactory({ db: projectDB }), emitEvent: getEventBus().emit, markBranchStreamUpdated, - addBranchDeletedActivity: addBranchDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), deleteBranchById: deleteBranchByIdFactory({ db: projectDB }) }) return await deleteBranchAndNotify(args.input, ctx.userId!) diff --git a/packages/server/modules/core/graph/resolvers/projects.ts b/packages/server/modules/core/graph/resolvers/projects.ts index 4246a2b18..34df2b857 100644 --- a/packages/server/modules/core/graph/resolvers/projects.ts +++ b/packages/server/modules/core/graph/resolvers/projects.ts @@ -3,7 +3,6 @@ import { saveActivityFactory } from '@/modules/activitystream/repositories' import { addStreamClonedActivityFactory, addStreamDeletedActivityFactory, - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory, addStreamUpdatedActivityFactory @@ -150,10 +149,7 @@ const updateStreamRoleAndNotify = updateStreamRoleAndNotifyFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/graph/resolvers/streams.ts b/packages/server/modules/core/graph/resolvers/streams.ts index e43ce82c5..c244be87b 100644 --- a/packages/server/modules/core/graph/resolvers/streams.ts +++ b/packages/server/modules/core/graph/resolvers/streams.ts @@ -64,7 +64,6 @@ import { getEventBus } from '@/modules/shared/services/eventBus' import { createBranchFactory } from '@/modules/core/repositories/branches' import { addStreamDeletedActivityFactory, - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory, addStreamUpdatedActivityFactory @@ -155,10 +154,7 @@ const updateStreamRoleAndNotify = updateStreamRoleAndNotifyFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/graph/resolvers/userEmails.ts b/packages/server/modules/core/graph/resolvers/userEmails.ts index 83e0ef441..74439855c 100644 --- a/packages/server/modules/core/graph/resolvers/userEmails.ts +++ b/packages/server/modules/core/graph/resolvers/userEmails.ts @@ -10,7 +10,6 @@ import { } from '@/modules/core/repositories/userEmails' import { db } from '@/db/knex' import { requestNewEmailVerificationFactory } from '@/modules/emails/services/verification/request' -import { requestNewEmailVerificationFactory as requestNewEmailVerificationFactoryOld } from '@/modules/emails/services/verification/request.old' import { finalizeInvitedServerRegistrationFactory } from '@/modules/serverinvites/services/processing' import { deleteServerOnlyInvitesFactory, @@ -31,32 +30,18 @@ import { verifyUserEmailFactory } from '@/modules/core/services/users/emailVerification' import { commandFactory } from '@/modules/shared/command' -import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' - -const { FF_FORCE_EMAIL_VERIFICATION } = getFeatureFlags() const getUser = getUserFactory({ db }) -const requestNewEmailVerification = FF_FORCE_EMAIL_VERIFICATION - ? requestNewEmailVerificationFactory({ - findEmail: findEmailFactory({ db }), - getUser, - getServerInfo: getServerInfoFactory({ db }), - deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ - db - }), - renderEmail, - sendEmail - }) - : requestNewEmailVerificationFactoryOld({ - findEmail: findEmailFactory({ db }), - getUser, - getServerInfo: getServerInfoFactory({ db }), - deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ - db - }), - renderEmail, - sendEmail - }) +const requestNewEmailVerification = requestNewEmailVerificationFactory({ + findEmail: findEmailFactory({ db }), + getUser, + getServerInfo: getServerInfoFactory({ db }), + deleteOldAndInsertNewVerification: deleteOldAndInsertNewVerificationFactory({ + db + }), + renderEmail, + sendEmail +}) export = { ActiveUserMutations: { diff --git a/packages/server/modules/core/graph/resolvers/versions.ts b/packages/server/modules/core/graph/resolvers/versions.ts index 53750c068..475a039fc 100644 --- a/packages/server/modules/core/graph/resolvers/versions.ts +++ b/packages/server/modules/core/graph/resolvers/versions.ts @@ -3,8 +3,7 @@ import { Resolvers } from '@/modules/core/graph/generated/graphql' import { authorizeResolver } from '@/modules/shared' import { filteredSubscribe, - ProjectSubscriptions, - publish + ProjectSubscriptions } from '@/modules/shared/utils/subscriptions' import { getServerOrigin } from '@/modules/shared/helpers/envHelper' import { @@ -34,7 +33,6 @@ import { switchCommitBranchFactory, updateCommitFactory } from '@/modules/core/repositories/commits' -import { db } from '@/db/knex' import { createBranchFactory, getBranchByIdFactory, @@ -47,14 +45,7 @@ import { getStreamsFactory, markCommitStreamUpdatedFactory } from '@/modules/core/repositories/streams' -import { - addCommitCreatedActivityFactory, - addCommitDeletedActivityFactory, - addCommitMovedActivityFactory, - addCommitUpdatedActivityFactory -} from '@/modules/activitystream/services/commitActivity' import { getObjectFactory } from '@/modules/core/repositories/objects' -import { saveActivityFactory } from '@/modules/activitystream/repositories' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import coreModule from '@/modules/core' import { getEventBus } from '@/modules/shared/services/eventBus' @@ -118,10 +109,7 @@ export = { getStreamBranchByName: getStreamBranchByNameFactory({ db: projectDb }), createBranch: createBranchFactory({ db: projectDb }), moveCommitsToBranch: moveCommitsToBranchFactory({ db: projectDb }), - addCommitMovedActivity: addCommitMovedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) return await batchMoveCommits(args.input, ctx.userId!) }, @@ -133,10 +121,7 @@ export = { getCommits: getCommitsFactory({ db: projectDb }), getStreams: getStreamsFactory({ db: projectDb }), deleteCommits: deleteCommitsFactory({ db: projectDb }), - addCommitDeletedActivity: addCommitDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) await batchDeleteCommits(args.input, ctx.userId!) return true @@ -166,10 +151,7 @@ export = { getCommitBranch: getCommitBranchFactory({ db: projectDb }), switchCommitBranch: switchCommitBranchFactory({ db: projectDb }), updateCommit: updateCommitFactory({ db: projectDb }), - addCommitUpdatedActivity: addCommitUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), + emitEvent: getEventBus().emit, markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }) }) @@ -202,11 +184,7 @@ export = { insertBranchCommits: insertBranchCommitsFactory({ db: projectDb }), markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const commit = await createCommitByBranchId({ @@ -233,7 +211,7 @@ export = { await markCommitReceivedAndNotifyFactory({ getCommit: getCommitFactory({ db: projectDb }), - saveActivity: saveActivityFactory({ db }) + emitEvent: getEventBus().emit })({ input: args.input, userId: ctx.userId! diff --git a/packages/server/modules/core/helpers/routeHelper.ts b/packages/server/modules/core/helpers/routeHelper.ts index 5960f7d20..b51fc5ca6 100644 --- a/packages/server/modules/core/helpers/routeHelper.ts +++ b/packages/server/modules/core/helpers/routeHelper.ts @@ -1,5 +1,5 @@ import { InvalidArgumentError } from '@/modules/shared/errors' -import { getFrontendOrigin, useNewFrontend } from '@/modules/shared/helpers/envHelper' +import { getFrontendOrigin } from '@/modules/shared/helpers/envHelper' import { MaybeNullOrUndefined } from '@/modules/shared/helpers/typeHelper' /** @@ -8,21 +8,15 @@ import { MaybeNullOrUndefined } from '@/modules/shared/helpers/typeHelper' */ export function getWorkspaceRoute(workspaceSlug: string): string { - if (!useNewFrontend()) { - // TODO: This should throw, but tests run in FE1 mode, and if we switch FE2 mode on, a bunch of old auth tests fail - return '/' - // throw new LogicError('Workspaces are not supported in the old frontend') - } - return `/workspaces/${workspaceSlug}` } export function getStreamRoute(streamId: string): string { - return useNewFrontend() ? `/projects/${streamId}` : `/streams/${streamId}` + return `/projects/${streamId}` } export function getRegistrationRoute(): string { - return useNewFrontend() ? `/authn/register` : '/authn/register' + return '/authn/register' } export function getCommentRoute( @@ -43,9 +37,7 @@ export function getCommentRoute( } export function getPasswordResetFinalizationRoute(tokenId: string): string { - return useNewFrontend() - ? `/authn/reset-password?token=${tokenId}` - : `/authn/resetpassword/finalize?t=${tokenId}` + return `/authn/reset-password?token=${tokenId}` } export function getEmailVerificationFinalizationRoute(tokenId: string): string { diff --git a/packages/server/modules/core/index.ts b/packages/server/modules/core/index.ts index e45cc5569..700b25009 100644 --- a/packages/server/modules/core/index.ts +++ b/packages/server/modules/core/index.ts @@ -19,6 +19,9 @@ import db from '@/db/knex' import { registerOrUpdateRole } from '@/modules/shared/repositories/roles' import { isTestEnv } from '@/modules/shared/helpers/envHelper' import { HooksConfig, Hook, ExecuteHooks } from '@/modules/core/hooks' +import { reportSubscriptionEventsFactory } from '@/modules/core/events/subscriptionListeners' +import { getEventBus } from '@/modules/shared/services/eventBus' +import { publish } from '@/modules/shared/utils/subscriptions' let stopTestSubs: (() => void) | undefined = undefined @@ -75,6 +78,12 @@ const coreModule: SpeckleModule<{ const { startEmittingTestSubs } = await import('@/test/graphqlHelper') stopTestSubs = await startEmittingTestSubs() } + + // Setup GQL sub emits + reportSubscriptionEventsFactory({ + eventListen: getEventBus().listen, + publish + })() } }, async shutdown() { diff --git a/packages/server/modules/core/repositories/userEmails.ts b/packages/server/modules/core/repositories/userEmails.ts index a3e09f61c..30e5b5c1c 100644 --- a/packages/server/modules/core/repositories/userEmails.ts +++ b/packages/server/modules/core/repositories/userEmails.ts @@ -141,12 +141,8 @@ export const findEmailFactory = export const findEmailsByUserIdFactory = ({ db }: { db: Knex }): FindEmailsByUserId => - async ({ userId }) => { - if (!userId) return [] - return db(UserEmails.name).where({ - [UserEmails.col.userId]: userId - }) - } + async ({ userId }) => + userId ? db(UserEmails.name).where({ userId }) : [] export const setPrimaryUserEmailFactory = ({ db }: { db: Knex }): SetPrimaryUserEmail => diff --git a/packages/server/modules/core/rest/defaultErrorHandler.ts b/packages/server/modules/core/rest/defaultErrorHandler.ts index 2c808e430..59fcc3de4 100644 --- a/packages/server/modules/core/rest/defaultErrorHandler.ts +++ b/packages/server/modules/core/rest/defaultErrorHandler.ts @@ -5,6 +5,7 @@ import { Optional, ensureError } from '@speckle/shared' import { ErrorRequestHandler } from 'express' import { get, isNumber } from 'lodash' import { VError } from 'verror' +import { logger as defaultLogger } from '@/logging/logging' const resolveStatusCode = (e: Error): number => { if (e instanceof BaseError) { @@ -53,6 +54,16 @@ export const defaultErrorHandler: ErrorRequestHandler = (err, req, res, next) => return next() } + const logger = req.log || defaultLogger + + // Log unexpected types of errors which are not instances of BaseError + if (!(err instanceof BaseError)) { + logger.warn( + { err }, + `Unexpected type of error when handling ${req.originalUrl} from ${req.ip}. Please raise a bug report to the developers.` + ) + } + const e = ensureError(err) // Add the error to the request context, this allows it to be logged by pino-http if (!req.context) req.context = { auth: false } diff --git a/packages/server/modules/core/rest/diffDownload.ts b/packages/server/modules/core/rest/diffDownload.ts index 309bd93c1..ecb3ac78d 100644 --- a/packages/server/modules/core/rest/diffDownload.ts +++ b/packages/server/modules/core/rest/diffDownload.ts @@ -1,5 +1,5 @@ import zlib from 'zlib' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import type { Application } from 'express' import { SpeckleObjectsStream } from '@/modules/core/rest/speckleObjectsStream' import { pipeline, PassThrough } from 'stream' @@ -20,9 +20,9 @@ export default (app: Application) => { authorizeResolver }) - app.options('/api/getobjects/:streamId', corsMiddleware()) + app.options('/api/getobjects/:streamId', corsMiddlewareFactory()) - app.post('/api/getobjects/:streamId', corsMiddleware(), async (req, res) => { + app.post('/api/getobjects/:streamId', corsMiddlewareFactory(), async (req, res) => { req.log = req.log.child({ userId: req.context.userId || '-', streamId: req.params.streamId diff --git a/packages/server/modules/core/rest/diffUpload.ts b/packages/server/modules/core/rest/diffUpload.ts index 5a00893b7..e3b738419 100644 --- a/packages/server/modules/core/rest/diffUpload.ts +++ b/packages/server/modules/core/rest/diffUpload.ts @@ -1,5 +1,5 @@ import zlib from 'zlib' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { chunk } from 'lodash' import type { Application } from 'express' import { hasObjectsFactory } from '@/modules/core/repositories/objects' @@ -15,9 +15,9 @@ export default (app: Application) => { authorizeResolver }) - app.options('/api/diff/:streamId', corsMiddleware()) + app.options('/api/diff/:streamId', corsMiddlewareFactory()) - app.post('/api/diff/:streamId', corsMiddleware(), async (req, res) => { + app.post('/api/diff/:streamId', corsMiddlewareFactory(), async (req, res) => { req.log = req.log.child({ userId: req.context.userId || '-', streamId: req.params.streamId diff --git a/packages/server/modules/core/rest/download.ts b/packages/server/modules/core/rest/download.ts index e77e0bd83..fc55e99c4 100644 --- a/packages/server/modules/core/rest/download.ts +++ b/packages/server/modules/core/rest/download.ts @@ -1,5 +1,5 @@ import zlib from 'zlib' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { SpeckleObjectsStream } from '@/modules/core/rest/speckleObjectsStream' import { pipeline, PassThrough } from 'stream' @@ -22,9 +22,9 @@ export default (app: express.Express) => { authorizeResolver }) - app.options('/objects/:streamId/:objectId', corsMiddleware()) + app.options('/objects/:streamId/:objectId', corsMiddlewareFactory()) - app.get('/objects/:streamId/:objectId', corsMiddleware(), async (req, res) => { + app.get('/objects/:streamId/:objectId', corsMiddlewareFactory(), async (req, res) => { const boundLogger = (req.log || logger).child({ requestId: req.id, userId: req.context.userId || '-', @@ -107,37 +107,41 @@ export default (app: express.Express) => { ) }) - app.options('/objects/:streamId/:objectId/single', corsMiddleware()) - app.get('/objects/:streamId/:objectId/single', corsMiddleware(), async (req, res) => { - const boundLogger = (req.log || logger).child({ - requestId: req.id, - userId: req.context.userId || '-', - streamId: req.params.streamId, - objectId: req.params.objectId - }) - const hasStreamAccess = await validatePermissionsReadStream( - req.params.streamId, - req - ) - if (!hasStreamAccess.result) { - return res.status(hasStreamAccess.status).end() + app.options('/objects/:streamId/:objectId/single', corsMiddlewareFactory()) + app.get( + '/objects/:streamId/:objectId/single', + corsMiddlewareFactory(), + async (req, res) => { + const boundLogger = (req.log || logger).child({ + requestId: req.id, + userId: req.context.userId || '-', + streamId: req.params.streamId, + objectId: req.params.objectId + }) + const hasStreamAccess = await validatePermissionsReadStream( + req.params.streamId, + req + ) + if (!hasStreamAccess.result) { + return res.status(hasStreamAccess.status).end() + } + + const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) + const getObject = getFormattedObjectFactory({ db: projectDb }) + + const obj = await getObject({ + streamId: req.params.streamId, + objectId: req.params.objectId + }) + + if (!obj) { + boundLogger.warn('Failed to find object.') + return res.status(404).send('Failed to find object.') + } + + boundLogger.info('Downloaded single object.') + + res.send(obj.data) } - - const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) - const getObject = getFormattedObjectFactory({ db: projectDb }) - - const obj = await getObject({ - streamId: req.params.streamId, - objectId: req.params.objectId - }) - - if (!obj) { - boundLogger.warn('Failed to find object.') - return res.status(404).send('Failed to find object.') - } - - boundLogger.info('Downloaded single object.') - - res.send(obj.data) - }) + ) } diff --git a/packages/server/modules/core/rest/upload.ts b/packages/server/modules/core/rest/upload.ts index fff2f94c5..22ac35cb2 100644 --- a/packages/server/modules/core/rest/upload.ts +++ b/packages/server/modules/core/rest/upload.ts @@ -1,5 +1,5 @@ import zlib from 'zlib' -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import Busboy from 'busboy' import { maximumObjectUploadFileSizeMb } from '@/modules/shared/helpers/envHelper' import { ObjectHandlingError } from '@/modules/core/errors/object' @@ -21,9 +21,9 @@ export default (app: Router, { executeHooks }: { executeHooks: ExecuteHooks }) = authorizeResolver }) - app.options('/objects/:streamId', corsMiddleware()) + app.options('/objects/:streamId', corsMiddlewareFactory()) - app.post('/objects/:streamId', corsMiddleware(), async (req, res) => { + app.post('/objects/:streamId', corsMiddlewareFactory(), async (req, res) => { const calculateLogMetadata = (params: { batchSizeMb: number start: number diff --git a/packages/server/modules/core/services/branch/management.ts b/packages/server/modules/core/services/branch/management.ts index 3b7aa7641..144313d1c 100644 --- a/packages/server/modules/core/services/branch/management.ts +++ b/packages/server/modules/core/services/branch/management.ts @@ -29,11 +29,6 @@ import { GetStream, MarkBranchStreamUpdated } from '@/modules/core/domain/streams/operations' -import { - AddBranchCreatedActivity, - AddBranchDeletedActivity, - AddBranchUpdatedActivity -} from '@/modules/activitystream/domain/operations' import { EventBusEmit } from '@/modules/shared/services/eventBus' import { ModelEvents } from '@/modules/core/domain/branches/events' @@ -45,7 +40,7 @@ export const createBranchAndNotifyFactory = (deps: { getStreamBranchByName: GetStreamBranchByName createBranch: StoreBranch - addBranchCreatedActivity: AddBranchCreatedActivity + eventEmit: EventBusEmit }): CreateBranchAndNotify => async (input: BranchCreateInput | CreateModelInput, creatorId: string) => { const streamId = isBranchCreateInput(input) ? input.streamId : input.projectId @@ -60,7 +55,11 @@ export const createBranchAndNotifyFactory = streamId: isBranchCreateInput(input) ? input.streamId : input.projectId, authorId: creatorId }) - await deps.addBranchCreatedActivity({ branch }) + + await deps.eventEmit({ + eventName: ModelEvents.Created, + payload: { model: branch, projectId: branch.streamId } + }) return branch } @@ -69,7 +68,7 @@ export const updateBranchAndNotifyFactory = (deps: { getBranchById: GetBranchById updateBranch: UpdateBranch - addBranchUpdatedActivity: AddBranchUpdatedActivity + eventEmit: EventBusEmit }): UpdateBranchAndNotify => async (input: BranchUpdateInput | UpdateModelInput, userId: string) => { const streamId = isBranchUpdateInput(input) ? input.streamId : input.projectId @@ -113,11 +112,14 @@ export const updateBranchAndNotifyFactory = } if (newBranch) { - await deps.addBranchUpdatedActivity({ - update: input, - userId, - oldBranch: existingBranch, - newBranch + await deps.eventEmit({ + eventName: ModelEvents.Updated, + payload: { + update: input, + userId, + oldModel: existingBranch, + newModel: newBranch + } }) } @@ -130,7 +132,6 @@ export const deleteBranchAndNotifyFactory = getBranchById: GetBranchById emitEvent: EventBusEmit markBranchStreamUpdated: MarkBranchStreamUpdated - addBranchDeletedActivity: AddBranchDeletedActivity deleteBranchById: DeleteBranchById }): DeleteBranchAndNotify => async (input: BranchDeleteInput | DeleteModelInput, userId: string) => { @@ -167,18 +168,15 @@ export const deleteBranchAndNotifyFactory = const isDeleted = !!(await deps.deleteBranchById(existingBranch.id)) if (isDeleted) { await Promise.all([ - deps.addBranchDeletedActivity({ - input, - userId, - branchName: existingBranch.name - }), deps.markBranchStreamUpdated(input.id), deps.emitEvent({ eventName: ModelEvents.Deleted, payload: { modelId: existingBranch.id, model: existingBranch, - projectId: streamId + projectId: streamId, + input, + userId } }) ]) diff --git a/packages/server/modules/core/services/commit/batchCommitActions.ts b/packages/server/modules/core/services/commit/batchCommitActions.ts index d7ba95934..66f41fa86 100644 --- a/packages/server/modules/core/services/commit/batchCommitActions.ts +++ b/packages/server/modules/core/services/commit/batchCommitActions.ts @@ -1,11 +1,8 @@ -import { - AddCommitDeletedActivity, - AddCommitMovedActivity -} from '@/modules/activitystream/domain/operations' import { GetStreamBranchByName, StoreBranch } from '@/modules/core/domain/branches/operations' +import { VersionEvents } from '@/modules/core/domain/commits/events' import { DeleteCommits, GetCommits, @@ -26,6 +23,7 @@ import { } from '@/modules/core/graph/generated/graphql' import { Roles } from '@/modules/core/helpers/mainConstants' import { ensureError } from '@/modules/shared/helpers/errorHelper' +import { EventBusEmit } from '@/modules/shared/services/eventBus' import { difference, groupBy, has, keyBy } from 'lodash' type OldBatchInput = CommitsMoveInput | CommitsDeleteInput @@ -153,7 +151,7 @@ export const batchMoveCommitsFactory = deps: ValidateCommitsMoveDeps & { createBranch: StoreBranch moveCommitsToBranch: MoveCommitsToBranch - addCommitMovedActivity: AddCommitMovedActivity + emitEvent: EventBusEmit } ): ValidateAndBatchMoveCommits => async (params: CommitsMoveInput | MoveVersionsInput, userId: string) => { @@ -177,16 +175,19 @@ export const batchMoveCommitsFactory = await deps.moveCommitsToBranch(commitIds, finalBranch.id) await Promise.all( - commitsWithStreams.map(({ commit, stream }) => - deps.addCommitMovedActivity({ - commitId: commit.id, - streamId: stream.id, - userId, - commit, - originalBranchId: commit.branchId, - newBranchId: finalBranch.id + commitsWithStreams.map(async ({ commit, stream }) => { + await deps.emitEvent({ + eventName: VersionEvents.MovedModel, + payload: { + versionId: commit.id, + projectId: stream.id, + userId, + originalModelId: commit.branchId, + newModelId: finalBranch.id, + version: commit + } }) - ) + }) ) return finalBranch } catch (e) { @@ -202,7 +203,7 @@ export const batchDeleteCommitsFactory = ( deps: ValidateBatchBaseRulesDeps & { deleteCommits: DeleteCommits - addCommitDeletedActivity: AddCommitDeletedActivity + emitEvent: EventBusEmit } ): ValidateAndBatchDeleteCommits => async (params: CommitsDeleteInput | DeleteVersionsInput, userId: string) => { @@ -216,15 +217,20 @@ export const batchDeleteCommitsFactory = try { await deps.deleteCommits(commitIds) await Promise.all( - commitsWithStreams.map(({ commit, stream }) => - deps.addCommitDeletedActivity({ - commitId: commit.id, - streamId: stream.id, - userId, - commit, - branchId: commit.branchId - }) - ) + commitsWithStreams.map(async ({ commit, stream }) => { + await Promise.all([ + deps.emitEvent({ + eventName: VersionEvents.Deleted, + payload: { + projectId: stream.id, + modelId: commit.branchId, + versionId: commit.id, + userId, + version: commit + } + }) + ]) + }) ) } catch (e) { const err = ensureError(e) diff --git a/packages/server/modules/core/services/commit/management.ts b/packages/server/modules/core/services/commit/management.ts index e70546244..cd6d2963a 100644 --- a/packages/server/modules/core/services/commit/management.ts +++ b/packages/server/modules/core/services/commit/management.ts @@ -1,10 +1,3 @@ -import { - AddCommitCreatedActivity, - AddCommitDeletedActivity, - AddCommitUpdatedActivity, - SaveActivity -} from '@/modules/activitystream/domain/operations' -import { ActionTypes, ResourceTypes } from '@/modules/activitystream/helpers/types' import { GetBranchById, GetStreamBranchByName, @@ -51,7 +44,7 @@ import { has } from 'lodash' import { BranchNotFoundError } from '@/modules/core/errors/branch' export const markCommitReceivedAndNotifyFactory = - ({ getCommit, saveActivity }: { getCommit: GetCommit; saveActivity: SaveActivity }) => + ({ getCommit, emitEvent }: { getCommit: GetCommit; emitEvent: EventBusEmit }) => async (params: { input: MarkReceivedVersionInput | CommitReceivedInput userId: string @@ -77,17 +70,15 @@ export const markCommitReceivedAndNotifyFactory = ) } - await saveActivity({ - streamId: oldInput.streamId, - resourceType: ResourceTypes.Commit, - resourceId: oldInput.commitId, - actionType: ActionTypes.Commit.Receive, - userId, - info: { - sourceApplication: input.sourceApplication, - message: input.message - }, - message: `Commit ${oldInput.commitId} was received by user ${userId}` + await emitEvent({ + eventName: VersionEvents.Received, + payload: { + projectId: oldInput.streamId, + versionId: oldInput.commitId, + userId, + sourceApplication: oldInput.sourceApplication, + message: oldInput.message + } }) } @@ -100,10 +91,9 @@ export const createCommitByBranchIdFactory = insertBranchCommits: InsertBranchCommits markCommitStreamUpdated: MarkCommitStreamUpdated markCommitBranchUpdated: MarkCommitBranchUpdated - addCommitCreatedActivity: AddCommitCreatedActivity emitEvent: EventBusEmit }): CreateCommitByBranchId => - async (params, options) => { + async (params) => { const { streamId, branchId, @@ -113,7 +103,6 @@ export const createCommitByBranchIdFactory = sourceApplication, parents } = params - const { notify = true } = options || {} // If no total children count is passed in, get it from the original object // that this commit references. @@ -150,6 +139,10 @@ export const createCommitByBranchIdFactory = deps.insertStreamCommits([{ streamId, commitId: id }]) ]) + const input = { + ...params, + branchName: branch.name + } await Promise.all([ deps.markCommitStreamUpdated(id), deps.markCommitBranchUpdated(id), @@ -158,27 +151,12 @@ export const createCommitByBranchIdFactory = payload: { projectId: streamId, modelId: branchId, - version: commit + version: commit, + input, + modelName: branch.name, + userId: authorId } - }), - ...(notify - ? [ - deps.addCommitCreatedActivity({ - commitId: commit.id, - streamId, - userId: authorId, - branchName: branch.name, - input: { - ...commit, - branchName: branch.name, - objectId, - streamId - }, - modelId: branch.id, - commit - }) - ] - : []) + }) ]) return { ...commit, streamId, branchId } @@ -190,7 +168,7 @@ export const createCommitByBranchNameFactory = getStreamBranchByName: GetStreamBranchByName getBranchById: GetBranchById }): CreateCommitByBranchName => - async (params, options) => { + async (params) => { const { streamId, objectId, @@ -200,9 +178,6 @@ export const createCommitByBranchNameFactory = parents, totalChildrenCount } = params - - const { notify = true } = options || {} - const branchName = params.branchName.toLowerCase() let myBranch = await deps.getStreamBranchByName(streamId, branchName) if (!myBranch) { @@ -217,24 +192,21 @@ export const createCommitByBranchNameFactory = ) } - const commit = await deps.createCommitByBranchId( - { - streamId, - branchId: myBranch.id, - objectId, - authorId, - message, - sourceApplication, - totalChildrenCount, - parents - }, - { notify } - ) + const commit = await deps.createCommitByBranchId({ + streamId, + branchId: myBranch.id, + objectId, + authorId, + message, + sourceApplication, + totalChildrenCount, + parents + }) return commit } -const isOldVersionUpdateInput = ( +export const isOldVersionUpdateInput = ( i: CommitUpdateInput | UpdateVersionInput ): i is CommitUpdateInput => has(i, 'streamId') @@ -247,9 +219,9 @@ export const updateCommitAndNotifyFactory = getCommitBranch: GetCommitBranch switchCommitBranch: SwitchCommitBranch updateCommit: UpdateCommit - addCommitUpdatedActivity: AddCommitUpdatedActivity markCommitStreamUpdated: MarkCommitStreamUpdated markCommitBranchUpdated: MarkCommitBranchUpdated + emitEvent: EventBusEmit }): UpdateCommitAndNotify => async (params: CommitUpdateInput | UpdateVersionInput, userId: string) => { const { @@ -325,19 +297,21 @@ export const updateCommitAndNotifyFactory = } if (commit) { - await deps.addCommitUpdatedActivity({ - commitId, - streamId: stream.id, - userId, - originalCommit: commit, - update: params, - newCommit, - branchId: branch!.id - }) - const [updatedBranch] = await Promise.all([ deps.markCommitBranchUpdated(commit.id), - deps.markCommitStreamUpdated(commit.id) + deps.markCommitStreamUpdated(commit.id), + deps.emitEvent({ + eventName: VersionEvents.Updated, + payload: { + projectId: stream.id, + modelId: branch!.id, + versionId: commitId, + newVersion: newCommit, + oldVersion: commit, + userId, + update: params + } + }) ]) branch = updatedBranch } @@ -351,7 +325,7 @@ export const deleteCommitAndNotifyFactory = markCommitStreamUpdated: MarkCommitStreamUpdated markCommitBranchUpdated: MarkCommitBranchUpdated deleteCommit: DeleteCommit - addCommitDeletedActivity: AddCommitDeletedActivity + emitEvent: EventBusEmit }): DeleteCommitAndNotify => async (commitId: string, streamId: string, userId: string) => { const commit = await deps.getCommit(commitId) @@ -374,12 +348,15 @@ export const deleteCommitAndNotifyFactory = const isDeleted = await deps.deleteCommit(commitId) if (isDeleted) { - await deps.addCommitDeletedActivity({ - commitId, - streamId, - userId, - commit, - branchId: updatedBranch.id + await deps.emitEvent({ + eventName: VersionEvents.Deleted, + payload: { + projectId: streamId, + modelId: updatedBranch.id, + versionId: commitId, + userId, + version: commit + } }) } diff --git a/packages/server/modules/core/services/ratelimiter.ts b/packages/server/modules/core/services/ratelimiter.ts index cea48b51c..fd490118f 100644 --- a/packages/server/modules/core/services/ratelimiter.ts +++ b/packages/server/modules/core/services/ratelimiter.ts @@ -276,6 +276,7 @@ export const sendRateLimitResponse = ( res: express.Response, rateLimitBreached: RateLimitBreached ): express.Response => { + if (res.headersSent) return res res.setHeader('Retry-After', rateLimitBreached.msBeforeNext / 1000) res.removeHeader('X-RateLimit-Remaining') res.setHeader( @@ -325,6 +326,7 @@ export const createRateLimiterMiddleware = ( return sendRateLimitResponse(res, rateLimitResult) } else { try { + if (res.headersSent) return res res.setHeader('X-RateLimit-Remaining', rateLimitResult.remainingPoints) return next() } catch (err) { diff --git a/packages/server/modules/core/services/streams/access.ts b/packages/server/modules/core/services/streams/access.ts index 32ca4bd78..59158de6a 100644 --- a/packages/server/modules/core/services/streams/access.ts +++ b/packages/server/modules/core/services/streams/access.ts @@ -1,5 +1,4 @@ import { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory } from '@/modules/activitystream/services/streamActivity' @@ -18,8 +17,10 @@ import { StreamInvalidAccessError } from '@/modules/core/errors/stream' import { StreamRecord } from '@/modules/core/helpers/types' +import { ServerInvitesEvents } from '@/modules/serverinvites/domain/events' import { AuthorizeResolver } from '@/modules/shared/domain/operations' import { BadRequestError, ForbiddenError, LogicError } from '@/modules/shared/errors' +import { EventBusEmit } from '@/modules/shared/services/eventBus' import { ensureError, Roles, StreamRoles } from '@speckle/shared' /** @@ -144,9 +145,7 @@ export const addOrUpdateStreamCollaboratorFactory = validateStreamAccess: ValidateStreamAccess getUser: GetUser grantStreamPermissions: GrantStreamPermissions - addStreamInviteAcceptedActivity: ReturnType< - typeof addStreamInviteAcceptedActivityFactory - > + emitEvent: EventBusEmit addStreamPermissionsAddedActivity: ReturnType< typeof addStreamPermissionsAddedActivityFactory > @@ -191,12 +190,13 @@ export const addOrUpdateStreamCollaboratorFactory = })) as StreamRecord // validateStreamAccess already checked that it exists if (fromInvite) { - await deps.addStreamInviteAcceptedActivity({ - streamId, - inviterId: addedById, - inviteTargetId: userId, - role: role as StreamRoles, - stream + await deps.emitEvent({ + eventName: ServerInvitesEvents.Finalized, + payload: { + invite: fromInvite, + finalizerUserId: addedById, + accept: true + } }) } else { await deps.addStreamPermissionsAddedActivity({ diff --git a/packages/server/modules/core/tests/batchCommits.spec.ts b/packages/server/modules/core/tests/batchCommits.spec.ts index 6c3059b88..24062ecdb 100644 --- a/packages/server/modules/core/tests/batchCommits.spec.ts +++ b/packages/server/modules/core/tests/batchCommits.spec.ts @@ -1,10 +1,7 @@ import { buildApolloServer } from '@/app' import { db } from '@/db/knex' import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { Commits, Streams, Users } from '@/modules/core/dbSchema' import { Roles } from '@/modules/core/helpers/mainConstants' import { createBranchFactory } from '@/modules/core/repositories/branches' @@ -16,6 +13,7 @@ import { validateStreamAccessFactory } from '@/modules/core/services/streams/access' import { authorizeResolver } from '@/modules/shared' +import { getEventBus } from '@/modules/shared/services/eventBus' import { publish } from '@/modules/shared/utils/subscriptions' import { BasicTestUser, createTestUsers } from '@/test/authHelper' import { deleteCommits, moveCommits } from '@/test/graphql/commits' @@ -45,10 +43,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/tests/branches.spec.ts b/packages/server/modules/core/tests/branches.spec.ts index e4e53922a..eccb96686 100644 --- a/packages/server/modules/core/tests/branches.spec.ts +++ b/packages/server/modules/core/tests/branches.spec.ts @@ -23,10 +23,6 @@ import { getPaginatedStreamBranchesPageFactory, getStreamBranchCountFactory } from '@/modules/core/repositories/branches' -import { - addBranchUpdatedActivityFactory, - addBranchDeletedActivityFactory -} from '@/modules/activitystream/services/branchActivity' import { getStreamFactory, createStreamFactory, @@ -61,9 +57,6 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getUsersFactory, getUserFactory, @@ -103,20 +96,13 @@ const createBranch = createBranchFactory({ db: knex }) const updateBranchAndNotify = updateBranchAndNotifyFactory({ getBranchById: getBranchByIdFactory({ db: knex }), updateBranch: updateBranchFactory({ db: knex }), - addBranchUpdatedActivity: addBranchUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) const deleteBranchAndNotify = deleteBranchAndNotifyFactory({ getStream, getBranchById: getBranchByIdFactory({ db: knex }), emitEvent: getEventBus().emit, markBranchStreamUpdated, - addBranchDeletedActivity: addBranchDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), deleteBranchById: deleteBranchByIdFactory({ db: knex }) }) @@ -130,11 +116,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/modules/core/tests/commits.spec.ts b/packages/server/modules/core/tests/commits.spec.ts index 3ff7b6313..38de3a446 100644 --- a/packages/server/modules/core/tests/commits.spec.ts +++ b/packages/server/modules/core/tests/commits.spec.ts @@ -39,11 +39,6 @@ import { createStreamFactory, markCommitStreamUpdatedFactory } from '@/modules/core/repositories/streams' -import { - addCommitUpdatedActivityFactory, - addCommitDeletedActivityFactory, - addCommitCreatedActivityFactory -} from '@/modules/activitystream/services/commitActivity' import { getObjectFactory, storeSingleObjectIfNotFoundFactory @@ -63,8 +58,6 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' import { getUsersFactory, getUserFactory, @@ -90,7 +83,6 @@ import { getPaginatedBranchCommitsItemsByNameFactory } from '@/modules/core/services/commit/retrieval' import { createObjectFactory } from '@/modules/core/services/objects/management' -import { addBranchCreatedActivityFactory } from '@/modules/activitystream/services/branchActivity' import { ensureError } from '@speckle/shared' import { VersionEvents } from '@/modules/core/domain/commits/events' @@ -104,10 +96,7 @@ const createBranch = createBranchFactory({ db }) const createBranchAndNotify = createBranchAndNotifyFactory({ createBranch, getStreamBranchByName: getStreamBranchByNameFactory({ db }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) const getCommit = getCommitFactory({ db }) const deleteCommitAndNotify = deleteCommitAndNotifyFactory({ @@ -115,10 +104,7 @@ const deleteCommitAndNotify = deleteCommitAndNotifyFactory({ markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), deleteCommit: deleteCommitFactory({ db }), - addCommitDeletedActivity: addCommitDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const getObject = getObjectFactory({ db }) @@ -130,11 +116,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ @@ -151,10 +133,7 @@ const updateCommitAndNotify = updateCommitAndNotifyFactory({ getCommitBranch: getCommitBranchFactory({ db }), switchCommitBranch: switchCommitBranchFactory({ db }), updateCommit: updateCommitFactory({ db }), - addCommitUpdatedActivity: addCommitUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), + emitEvent: getEventBus().emit, markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }) }) diff --git a/packages/server/modules/core/tests/commitsGraphql.spec.ts b/packages/server/modules/core/tests/commitsGraphql.spec.ts index 2c0eacfbc..24de8e7ce 100644 --- a/packages/server/modules/core/tests/commitsGraphql.spec.ts +++ b/packages/server/modules/core/tests/commitsGraphql.spec.ts @@ -1,10 +1,7 @@ import { buildApolloServer } from '@/app' import { db } from '@/db/knex' import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { Commits, Streams, Users } from '@/modules/core/dbSchema' import { Roles } from '@/modules/core/helpers/mainConstants' import { grantStreamPermissionsFactory } from '@/modules/core/repositories/streams' @@ -15,6 +12,7 @@ import { } from '@/modules/core/services/streams/access' import { authorizeResolver } from '@/modules/shared' import { Nullable } from '@/modules/shared/helpers/typeHelper' +import { getEventBus } from '@/modules/shared/services/eventBus' import { publish } from '@/modules/shared/utils/subscriptions' import { BasicTestUser, createTestUsers } from '@/test/authHelper' import { readOtherUsersCommits, readOwnCommits } from '@/test/graphql/commits' @@ -31,10 +29,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/tests/graph.spec.js b/packages/server/modules/core/tests/graph.spec.js index 528056052..42b26801f 100644 --- a/packages/server/modules/core/tests/graph.spec.js +++ b/packages/server/modules/core/tests/graph.spec.js @@ -23,7 +23,6 @@ const { } = require('@/modules/core/repositories/streams') const { addStreamPermissionsRevokedActivityFactory, - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory } = require('@/modules/activitystream/services/streamActivity') const { publish } = require('@/modules/shared/utils/subscriptions') @@ -94,10 +93,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/tests/integration/subs.graph.spec.ts b/packages/server/modules/core/tests/integration/subs.graph.spec.ts index 2ea983940..8da8d527c 100644 --- a/packages/server/modules/core/tests/integration/subs.graph.spec.ts +++ b/packages/server/modules/core/tests/integration/subs.graph.spec.ts @@ -1,17 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { db } from '@/db/knex' import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { - addBranchDeletedActivityFactory, - addBranchUpdatedActivityFactory -} from '@/modules/activitystream/services/branchActivity' -import { - addCommitDeletedActivityFactory, - addCommitUpdatedActivityFactory -} from '@/modules/activitystream/services/commitActivity' import { addStreamDeletedActivityFactory, - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory, addStreamUpdatedActivityFactory @@ -159,10 +150,7 @@ const buildUpdateModel = async (params: { projectId: string }) => { const updateBranchAndNotify = updateBranchAndNotifyFactory({ getBranchById: getBranchByIdFactory({ db: projectDB }), updateBranch: updateBranchFactory({ db: projectDB }), - addBranchUpdatedActivity: addBranchUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) return updateBranchAndNotify } @@ -179,10 +167,6 @@ const buildDeleteModel = async (params: { projectId: string }) => { getBranchById: getBranchByIdFactory({ db: projectDB }), emitEvent: getEventBus().emit, markBranchStreamUpdated, - addBranchDeletedActivity: addBranchDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), deleteBranchById: deleteBranchByIdFactory({ db: projectDB }) }) return deleteBranchAndNotify @@ -196,10 +180,7 @@ const buildDeleteVersion = async (params: { projectId: string }) => { getCommits: getCommitsFactory({ db: projectDb }), getStreams: getStreamsFactory({ db: projectDb }), deleteCommits: deleteCommitsFactory({ db: projectDb }), - addCommitDeletedActivity: addCommitDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) return batchDeleteCommits } @@ -215,10 +196,7 @@ const buildUpdateVersion = async (params: { projectId: string }) => { getCommitBranch: getCommitBranchFactory({ db: projectDb }), switchCommitBranch: switchCommitBranchFactory({ db: projectDb }), updateCommit: updateCommitFactory({ db: projectDb }), - addCommitUpdatedActivity: addCommitUpdatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), + emitEvent: getEventBus().emit, markCommitStreamUpdated: markCommitStreamUpdatedFactory({ db: projectDb }), markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }) }) @@ -229,10 +207,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser: getUserFactory({ db }), grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/tests/integration/userEmails.graph.spec.ts b/packages/server/modules/core/tests/integration/userEmails.graph.spec.ts index ce2d5a574..110f2c375 100644 --- a/packages/server/modules/core/tests/integration/userEmails.graph.spec.ts +++ b/packages/server/modules/core/tests/integration/userEmails.graph.spec.ts @@ -41,9 +41,7 @@ import { getEventBus } from '@/modules/shared/services/eventBus' import { createTestUser, login } from '@/test/authHelper' import { EmailVerificationFinalizationError } from '@/modules/emails/errors' import { Roles } from '@speckle/shared' -import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' -const { FF_FORCE_EMAIL_VERIFICATION } = getFeatureFlags() const getServerInfo = getServerInfoFactory({ db }) const getUser = legacyGetUserFactory({ db }) const requestNewEmailVerification = requestNewEmailVerificationFactory({ @@ -178,91 +176,89 @@ describe('User emails graphql @core', () => { ).to.eq(email.toLowerCase()) }) }) - ;(FF_FORCE_EMAIL_VERIFICATION ? describe : describe.skip)( - 'verify user email mutation', - () => { - it('should throw an error if there is no pending verification for the email', async () => { - const email = createRandomEmail() - const user = await createTestUser({ - email, - role: Roles.Server.User - }) - const session = await login(user) - // Delete email verification - await db(EmailVerifications.name).where({ email }).delete() - - const res = await session.execute(VerifyUserEmailDocument, { - input: { email, code: '123456' } - }) - - expect(res).to.haveGraphQLErrors({ - code: EmailVerificationFinalizationError.code - }) + describe('verify user email mutation', () => { + it('should throw an error if there is no pending verification for the email', async () => { + const email = createRandomEmail() + const user = await createTestUser({ + email, + role: Roles.Server.User }) - it('should throw an error if verification is expired', async () => { - const email = createRandomEmail() - const user = await createTestUser({ - email, - role: Roles.Server.User - }) - const session = await login(user) + const session = await login(user) - // Manually reset email verification code - const verificationCode = await deleteOldAndInsertNewVerificationFactory({ db })( - email - ) - // Manually expire email verification - await db(EmailVerifications.name) - .where({ email }) - .update({ createdAt: new Date('2020-01-01') }) + // Delete email verification + await db(EmailVerifications.name).where({ email }).delete() - const res = await session.execute(VerifyUserEmailDocument, { - input: { email, code: verificationCode } - }) - - expect(res).to.haveGraphQLErrors({ - code: EmailVerificationFinalizationError.code - }) + const res = await session.execute(VerifyUserEmailDocument, { + input: { email, code: '123456' } }) - it('should throw an error if code is not correct', async () => { - const email = createRandomEmail() - const user = await createTestUser({ - email, - role: Roles.Server.User - }) - const session = await login(user) - const res = await session.execute(VerifyUserEmailDocument, { - input: { email, code: '123456' } - }) - - expect(res).to.haveGraphQLErrors({ - code: EmailVerificationFinalizationError.code - }) + expect(res).to.haveGraphQLErrors({ + code: EmailVerificationFinalizationError.code }) - it('should mark user email as verified', async () => { - const email = createRandomEmail() - const user = await createTestUser({ - email, - role: Roles.Server.User - }) - const session = await login(user) - - // Manually reset email verification code - const verificationCode = await deleteOldAndInsertNewVerificationFactory({ db })( - email - ) - - const res = await session.execute(VerifyUserEmailDocument, { - input: { email, code: verificationCode } - }) - - expect(res).to.not.haveGraphQLErrors() - - const userEmail = await findEmailFactory({ db })({ email, userId: user.id }) - expect(userEmail?.verified).to.be.true + }) + it('should throw an error if verification is expired', async () => { + const email = createRandomEmail() + const user = await createTestUser({ + email, + role: Roles.Server.User }) - } - ) + const session = await login(user) + + // Manually reset email verification code + const verificationCode = await deleteOldAndInsertNewVerificationFactory({ db })( + email + ) + // Manually expire email verification + await db(EmailVerifications.name) + .where({ email }) + .update({ createdAt: new Date('2020-01-01') }) + + const res = await session.execute(VerifyUserEmailDocument, { + input: { email, code: verificationCode } + }) + + expect(res).to.haveGraphQLErrors({ + code: EmailVerificationFinalizationError.code + }) + }) + it('should throw an error if code is not correct', async () => { + const email = createRandomEmail() + const user = await createTestUser({ + email, + role: Roles.Server.User + }) + const session = await login(user) + + const res = await session.execute(VerifyUserEmailDocument, { + input: { email, code: '123456' } + }) + + expect(res).to.haveGraphQLErrors({ + code: EmailVerificationFinalizationError.code + }) + }) + it('should mark user email as verified', async () => { + const email = createRandomEmail() + const user = await createTestUser({ + email, + role: Roles.Server.User + }) + const session = await login(user) + + // Manually reset email verification code + const verificationCode = await deleteOldAndInsertNewVerificationFactory({ db })( + email + ) + + const res = await session.execute(VerifyUserEmailDocument, { + input: { email, code: verificationCode } + }) + + expect(res).to.not.haveGraphQLErrors() + + const userEmail = await findEmailFactory({ db })({ email, userId: user.id }) + expect(userEmail?.verified).to.be.true + }) + }) }) diff --git a/packages/server/modules/core/tests/rest.spec.js b/packages/server/modules/core/tests/rest.spec.js index 229ca8a49..b0eab607a 100644 --- a/packages/server/modules/core/tests/rest.spec.js +++ b/packages/server/modules/core/tests/rest.spec.js @@ -573,3 +573,14 @@ describe('Upload/Download Routes @api-rest', () => { expect(response).to.have.status(400) }) }) + +describe('Express @core-rest', () => { + let app + before(async () => { + ;({ app } = await beforeEachContext()) + }) + it('Should return 400 for broken JSON', async () => { + const res = await request(app).post('/graphql').send('{b0rken json}') + expect(res).to.have.status(400) + }) +}) diff --git a/packages/server/modules/core/tests/streams.spec.ts b/packages/server/modules/core/tests/streams.spec.ts index ec004d00a..8e5c511db 100644 --- a/packages/server/modules/core/tests/streams.spec.ts +++ b/packages/server/modules/core/tests/streams.spec.ts @@ -59,7 +59,6 @@ import { insertBranchCommitsFactory, insertStreamCommitsFactory } from '@/modules/core/repositories/commits' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getObjectFactory, storeSingleObjectIfNotFoundFactory @@ -78,10 +77,7 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { publish } from '@/modules/shared/utils/subscriptions' import { @@ -99,7 +95,6 @@ import { import { changeUserRoleFactory } from '@/modules/core/services/users/management' import { getServerInfoFactory } from '@/modules/core/repositories/server' import { createObjectFactory } from '@/modules/core/services/objects/management' -import { addBranchDeletedActivityFactory } from '@/modules/activitystream/services/branchActivity' const getServerInfo = getServerInfoFactory({ db }) const getUser = getUserFactory({ db }) @@ -114,10 +109,6 @@ const deleteBranchAndNotify = deleteBranchAndNotifyFactory({ getBranchById: getBranchByIdFactory({ db }), emitEvent: getEventBus().emit, markBranchStreamUpdated, - addBranchDeletedActivity: addBranchDeletedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), deleteBranchById: deleteBranchByIdFactory({ db }) }) @@ -130,11 +121,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ @@ -184,10 +171,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/core/tests/users.spec.ts b/packages/server/modules/core/tests/users.spec.ts index 3055a16c9..7918767e0 100644 --- a/packages/server/modules/core/tests/users.spec.ts +++ b/packages/server/modules/core/tests/users.spec.ts @@ -59,9 +59,6 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getUsersFactory, getUserFactory, @@ -135,11 +132,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/modules/cross-server-sync/index.ts b/packages/server/modules/cross-server-sync/index.ts index 3856c7bf2..7e964e8f8 100644 --- a/packages/server/modules/cross-server-sync/index.ts +++ b/packages/server/modules/cross-server-sync/index.ts @@ -1,12 +1,5 @@ import { db } from '@/db/knex' import { moduleLogger, crossServerSyncLogger } from '@/logging/logging' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { addBranchCreatedActivityFactory } from '@/modules/activitystream/services/branchActivity' -import { - addCommentCreatedActivityFactory, - addReplyAddedActivityFactory -} from '@/modules/activitystream/services/commentActivity' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getBlobsFactory } from '@/modules/blobstorage/repositories' import { getCommentFactory, @@ -73,7 +66,6 @@ import { ensureOnboardingProjectFactory } from '@/modules/cross-server-sync/serv import { downloadProjectFactory } from '@/modules/cross-server-sync/services/project' import { SpeckleModule } from '@/modules/shared/helpers/typeHelper' import { getEventBus } from '@/modules/shared/services/eventBus' -import { publish } from '@/modules/shared/utils/subscriptions' const crossServerSyncModule: SpeckleModule = { init() { @@ -120,13 +112,7 @@ const crossServerSyncModule: SpeckleModule = { insertComments, insertCommentLinks, markCommentViewed, - emitEvent: getEventBus().emit, - addCommentCreatedActivity: addCommentCreatedActivityFactory({ - getViewerResourcesFromLegacyIdentifiers, - getViewerResourceItemsUngrouped, - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommentReplyAndNotify = createCommentReplyAndNotifyFactory({ getComment: getCommentFactory({ db }), @@ -135,13 +121,9 @@ const crossServerSyncModule: SpeckleModule = { insertCommentLinks, markCommentUpdated: markCommentUpdatedFactory({ db }), emitEvent: getEventBus().emit, - addReplyAddedActivity: addReplyAddedActivityFactory({ - getViewerResourcesForComment: getViewerResourcesForCommentFactory({ - getCommentsResources: getCommentsResourcesFactory({ db }), - getViewerResourcesFromLegacyIdentifiers - }), - saveActivity: saveActivityFactory({ db }), - publish + getViewerResourcesForComment: getViewerResourcesForCommentFactory({ + getCommentsResources: getCommentsResourcesFactory({ db }), + getViewerResourcesFromLegacyIdentifiers }) }) const getStreamBranchByName = getStreamBranchByNameFactory({ db }) @@ -153,11 +135,7 @@ const crossServerSyncModule: SpeckleModule = { insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createObject = createObjectFactory({ @@ -194,10 +172,7 @@ const crossServerSyncModule: SpeckleModule = { createBranchAndNotify: createBranchAndNotifyFactory({ createBranch: createBranchFactory({ db }), getStreamBranchByName, - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) }), markOnboardingBaseStream diff --git a/packages/server/modules/cross-server-sync/services/commit.ts b/packages/server/modules/cross-server-sync/services/commit.ts index a7fce52de..e85743da9 100644 --- a/packages/server/modules/cross-server-sync/services/commit.ts +++ b/packages/server/modules/cross-server-sync/services/commit.ts @@ -473,19 +473,16 @@ const saveNewCommitFactory = const sourceApplication = commit.sourceApplication || null const totalChildrenCount = commit.totalChildrenCount - const newCommit = await deps.createCommitByBranchId( - { - streamId, - branchId: targetBranch.id, - objectId, - authorId: owner.id, - message, - sourceApplication, - totalChildrenCount, - parents: parents.length ? parents : null - }, - { notify: true } - ) + const newCommit = await deps.createCommitByBranchId({ + streamId, + branchId: targetBranch.id, + objectId, + authorId: owner.id, + message, + sourceApplication, + totalChildrenCount, + parents: parents.length ? parents : null + }) const id = newCommit.id return id @@ -662,11 +659,10 @@ export const downloadCommitFactory = await saveNewThreadsFactory(deps)(threads, newResources, { logger }) } - const linkToNewCommit = parsedCommitUrl.isFe2 - ? `${getFrontendOrigin(true)}/projects/${targetStreamId}/models/${ - localResources.targetBranch.id - }@${newCommitId}` - : `${getFrontendOrigin()}/streams/${targetStreamId}/commits/${newCommitId}` + const linkToNewCommit = `${getFrontendOrigin()}/projects/${targetStreamId}/models/${ + localResources.targetBranch.id + }@${newCommitId}` + logger.debug(`All done! Find your commit here: ${linkToNewCommit}`) return { diff --git a/packages/server/modules/cross-server-sync/services/project.ts b/packages/server/modules/cross-server-sync/services/project.ts index 545d8dff0..d9ffb02e1 100644 --- a/packages/server/modules/cross-server-sync/services/project.ts +++ b/packages/server/modules/cross-server-sync/services/project.ts @@ -239,7 +239,7 @@ export const downloadProjectFactory = const newProjectUrl = new URL( `/projects/${project.id}`, - getFrontendOrigin(true) + getFrontendOrigin() ).toString() logger.info(`New Project URL: ${newProjectUrl}`) diff --git a/packages/server/modules/emails/repositories/index.ts b/packages/server/modules/emails/repositories/index.ts index 67b98cfff..95a96abc0 100644 --- a/packages/server/modules/emails/repositories/index.ts +++ b/packages/server/modules/emails/repositories/index.ts @@ -11,7 +11,6 @@ import dayjs from 'dayjs' import { Knex } from 'knex' import { hash } from 'bcrypt' import { EmailVerification } from '@/modules/emails/domain/types' -import { getFeatureFlags } from '@/modules/shared/helpers/envHelper' const tables = { emailVerifications: (db: Knex) => db(EmailVerifications.name) @@ -64,7 +63,6 @@ function generateEmailVerificationCode() { return cryptoRandomString({ length: 6, type: 'numeric' }) } -const { FF_FORCE_EMAIL_VERIFICATION } = getFeatureFlags() /** * Delete all previous verification entries and create a new one */ @@ -81,15 +79,14 @@ export const deleteOldAndInsertNewVerificationFactory = withoutTablePrefix: true }).col - const newId = cryptoRandomString({ length: 20 }) const code = generateEmailVerificationCode() await tables.emailVerifications(deps.db).insert({ - [EmailVerificationCols.id]: newId, + [EmailVerificationCols.id]: cryptoRandomString({ length: 20 }), [EmailVerificationCols.email]: email, [EmailVerificationCols.code]: await hashEmailVerificationCode(code) }) - return FF_FORCE_EMAIL_VERIFICATION ? code : newId + return code } export const getPendingVerificationByEmailFactory = diff --git a/packages/server/modules/emails/services/verification/request.old.ts b/packages/server/modules/emails/services/verification/request.old.ts deleted file mode 100644 index 3c6f3a9d8..000000000 --- a/packages/server/modules/emails/services/verification/request.old.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { - FindEmail, - FindPrimaryEmailForUser -} from '@/modules/core/domain/userEmails/operations' -import { UserEmail } from '@/modules/core/domain/userEmails/types' -import { getEmailVerificationFinalizationRoute } from '@/modules/core/helpers/routeHelper' -import { ServerInfo, UserRecord } from '@/modules/core/helpers/types' -import { EmailVerificationRequestError } from '@/modules/emails/errors' -import { getServerOrigin } from '@/modules/shared/helpers/envHelper' -import { - DeleteOldAndInsertNewVerification, - EmailTemplateParams, - RenderEmail, - RequestEmailVerification, - RequestNewEmailVerification, - SendEmail -} from '@/modules/emails/domain/operations' -import { GetUser } from '@/modules/core/domain/users/operations' -import { GetServerInfo } from '@/modules/core/domain/server/operations' - -const EMAIL_SUBJECT = 'Speckle Account E-mail Verification' - -type CreateNewVerificationDeps = { - getUser: GetUser - findPrimaryEmailForUser: FindPrimaryEmailForUser - getServerInfo: GetServerInfo - deleteOldAndInsertNewVerification: DeleteOldAndInsertNewVerification -} - -const createNewVerificationFactory = - (deps: CreateNewVerificationDeps) => - async (userId: string): Promise => { - if (!userId) - throw new EmailVerificationRequestError('User for verification not specified') - - const [user, email, serverInfo] = await Promise.all([ - deps.getUser(userId), - deps.findPrimaryEmailForUser({ userId }), - deps.getServerInfo() - ]) - - if (!user || !email) - throw new EmailVerificationRequestError( - 'Unable to resolve verification target user' - ) - - if (user.verified) - throw new EmailVerificationRequestError("User's email is already verified") - - const verificationId = await deps.deleteOldAndInsertNewVerification(user.email) - - return { - user, - email, - verificationId, - serverInfo - } - } - -type VerificationRequestContext = { - user: UserRecord - verificationId: string - serverInfo: ServerInfo - email: UserEmail -} - -type CreateNewEmailVerificationFactoryDeps = { - findEmail: FindEmail - getUser: GetUser - getServerInfo: GetServerInfo - deleteOldAndInsertNewVerification: DeleteOldAndInsertNewVerification -} - -const createNewEmailVerificationFactory = - (deps: CreateNewEmailVerificationFactoryDeps) => - async (emailId: string): Promise => { - const emailRecord = await deps.findEmail({ id: emailId }) - - if (!emailRecord) throw new EmailVerificationRequestError('Email not found') - - if (emailRecord.verified) - throw new EmailVerificationRequestError('Email is already verified') - - const [user, serverInfo] = await Promise.all([ - deps.getUser(emailRecord.userId), - deps.getServerInfo() - ]) - - if (!user) - throw new EmailVerificationRequestError( - 'Unable to resolve verification target user' - ) - - const verificationId = await deps.deleteOldAndInsertNewVerification( - emailRecord.email - ) - return { - user, - email: emailRecord, - verificationId, - serverInfo - } - } - -function buildMjmlBody() { - const bodyStart = `Hello,

You have just registered to the Speckle server, or initiated the email verification process manually. To finalize the verification process, click the button below:
` - const bodyEnd = `This link expires in 1 week.
- If the link does not work, please proceed by

- - Logging in with your e-mail address and password - Clicking on the Notification icon - Selecting "Send Verification" - Verifying your e-mail address by clicking on the link in the e-mail you will receive -
- - See you soon,
- Speckle -
- ` - - return { bodyStart, bodyEnd } -} - -function buildTextBody() { - const bodyStart = `Hello,\n\nYou have just registered to the Speckle server, or initiated the email verification process manually. To finalize the verification process, open the link below:` - const bodyEnd = `This link expires in 1 week. If the link does not work, please proceed by logging in to your Speckle account with your e-mail address and password, clicking the Notification icon, selecting "Send Verification" and verifying your e-mail address by clicking on the link in the e-mail you will receive.\n\nSee you soon,\nSpeckle - ` - - return { bodyStart, bodyEnd } -} - -function buildEmailLink(verificationId: string): string { - return new URL( - getEmailVerificationFinalizationRoute(verificationId), - getServerOrigin() - ).toString() -} - -function buildEmailTemplateParams(verificationId: string): EmailTemplateParams { - return { - mjml: buildMjmlBody(), - text: buildTextBody(), - cta: { - title: 'Verify your E-mail', - url: buildEmailLink(verificationId) - } - } -} - -type SendVerificationEmailDeps = { - sendEmail: SendEmail - renderEmail: RenderEmail -} - -const sendVerificationEmailFactory = - (deps: SendVerificationEmailDeps) => async (state: VerificationRequestContext) => { - const emailTemplateParams = buildEmailTemplateParams(state.verificationId) - const { html, text } = await deps.renderEmail( - emailTemplateParams, - state.serverInfo, - // im deliberately setting this to null, so that the email will not show the unsubscribe bit - null - ) - await deps.sendEmail({ - to: state.email.email, - subject: EMAIL_SUBJECT, - text, - html - }) - } - -/** - * Request email verification (send out verification message) for user with specified ID - */ -export const requestEmailVerificationFactory = - ( - deps: CreateNewVerificationDeps & SendVerificationEmailDeps - ): RequestEmailVerification => - async (userId) => { - const newVerificationState = await createNewVerificationFactory(deps)(userId) - await sendVerificationEmailFactory(deps)(newVerificationState) - } - -type RequestNewEmailVerificationDeps = CreateNewEmailVerificationFactoryDeps - -/** - * Request email verification for email with specified ID - */ -export const requestNewEmailVerificationFactory = - ( - deps: RequestNewEmailVerificationDeps & SendVerificationEmailDeps - ): RequestNewEmailVerification => - async (emailId) => { - const createNewEmailVerification = createNewEmailVerificationFactory(deps) - const newVerificationState = await createNewEmailVerification(emailId) - - await sendVerificationEmailFactory(deps)(newVerificationState) - } diff --git a/packages/server/modules/emails/services/verification/request.ts b/packages/server/modules/emails/services/verification/request.ts index 87347ac28..5547b33cb 100644 --- a/packages/server/modules/emails/services/verification/request.ts +++ b/packages/server/modules/emails/services/verification/request.ts @@ -101,33 +101,17 @@ const createNewEmailVerificationFactory = } function buildMjmlBody(verificationCode: string) { - const bodyStart = `Hello,

You have just registered to the Speckle server, or initiated the email verification process manually. To finalize the verification process, use the code below.
` - const bodyEnd = `This code expires in 5 minutes:
-${verificationCode} -
- If the code does not work, please proceed by

- - Logging in with your e-mail address and password - Clicking on the Notification icon - Selecting "Send Verification" - Verifying your e-mail address by using the new code -
- - See you soon,
- Speckle -
- ` - - return { bodyStart, bodyEnd } + const bodyStart = `

You have just registered to the Speckle server, or initiated the email verification process manually. To finalize the verification process, use the code below.

+ ${verificationCode} +

This code will expire in 5 minutes. Please do not disclose this code to others.

+

If you did not make this request, please disregard this email.

+

See you soon,
Speckle

` + return { bodyStart } } -function buildTextBody(verificationCode: string) { - const bodyStart = `Hello,\n\nYou have just registered to the Speckle server, or initiated the email verification process manually. To finalize the verification process, use the code below:` - const bodyEnd = `This code expires in 5 minutes: -${verificationCode} -\r\n -If the code does not work, please proceed by logging in to your Speckle account with your e-mail address and password, clicking the Notification icon, selecting "Send Verification" and verifying your e-mail address by new code.\n\nSee you soon,\nSpeckle - ` +function buildTextBody() { + const bodyStart = `` + const bodyEnd = `` return { bodyStart, bodyEnd } } @@ -135,7 +119,7 @@ If the code does not work, please proceed by logging in to your Speckle account function buildEmailTemplateParams(verificationCode: string): EmailTemplateParams { return { mjml: buildMjmlBody(verificationCode), - text: buildTextBody(verificationCode) + text: buildTextBody() } } diff --git a/packages/server/modules/fileuploads/helpers/errors.ts b/packages/server/modules/fileuploads/helpers/errors.ts new file mode 100644 index 000000000..29895a767 --- /dev/null +++ b/packages/server/modules/fileuploads/helpers/errors.ts @@ -0,0 +1,8 @@ +import { BaseError } from '@/modules/shared/errors' + +//TODO this represents an internal server error and not a client/user error (e.g. error in a file content) +export class FileUploadInternalError extends BaseError { + static defaultMessage = 'A file upload error occurred.' + static code = 'FILE_UPLOAD_ERROR' + static statusCode = 500 +} diff --git a/packages/server/modules/fileuploads/index.ts b/packages/server/modules/fileuploads/index.ts index 619f2cc2f..fed58356d 100644 --- a/packages/server/modules/fileuploads/index.ts +++ b/packages/server/modules/fileuploads/index.ts @@ -19,11 +19,10 @@ import { streamWritePermissionsPipelineFactory } from '@/modules/shared/authz' import { getRolesFactory } from '@/modules/shared/repositories/roles' import { getStreamBranchByNameFactory } from '@/modules/core/repositories/branches' import { getStreamFactory } from '@/modules/core/repositories/streams' -import { addBranchCreatedActivityFactory } from '@/modules/activitystream/services/branchActivity' -import { saveActivityFactory } from '@/modules/activitystream/repositories' import { getPort } from '@/modules/shared/helpers/envHelper' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { listenFor } from '@/modules/core/utils/dbNotificationListener' +import { getEventBus } from '@/modules/shared/services/eventBus' export const init: SpeckleModule['init'] = async (app, isInitial) => { if (process.env.DISABLE_FILE_UPLOADS) { @@ -133,10 +132,7 @@ export const init: SpeckleModule['init'] = async (app, isInitial) => { getFileInfo: getFileInfoFactory({ db: projectDb }), publish, getStreamBranchByName: getStreamBranchByNameFactory({ db: projectDb }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - publish, - saveActivity: saveActivityFactory({ db }) - }) + eventEmit: getEventBus().emit })(parsedMessage) }) listenFor('file_import_started', async (msg) => { diff --git a/packages/server/modules/fileuploads/services/resultListener.ts b/packages/server/modules/fileuploads/services/resultListener.ts index 8dfbad4a8..527e5ac9a 100644 --- a/packages/server/modules/fileuploads/services/resultListener.ts +++ b/packages/server/modules/fileuploads/services/resultListener.ts @@ -10,13 +10,17 @@ import { } from '@/modules/core/graph/generated/graphql' import { GetFileInfo } from '@/modules/fileuploads/domain/operations' import { GetStreamBranchByName } from '@/modules/core/domain/branches/operations' -import { AddBranchCreatedActivity } from '@/modules/activitystream/domain/operations' +import { EventBusEmit } from '@/modules/shared/services/eventBus' +import { ModelEvents } from '@/modules/core/domain/branches/events' +import { fileUploadsLogger as logger } from '@/logging/logging' +import { FileUploadConvertedStatus } from '@/modules/fileuploads/helpers/types' +import { FileUploadInternalError } from '@/modules/fileuploads/helpers/errors' type OnFileImportProcessedDeps = { getFileInfo: GetFileInfo getStreamBranchByName: GetStreamBranchByName publish: PublishSubscription - addBranchCreatedActivity: AddBranchCreatedActivity + eventEmit: EventBusEmit } type ParsedMessage = { @@ -45,6 +49,19 @@ export const onFileImportProcessedFactory = ]) if (!upload) return + if (upload.convertedStatus === FileUploadConvertedStatus.Error) { + //TODO in future differentiate between internal server errors and user errors + const err = new FileUploadInternalError( + upload.convertedMessage || 'Unknown error while uploading file.' + ) + logger.error( + { err, fileImportDetails: upload }, + 'Error while processing file upload.' + ) + } else { + logger.info({ fileImportDetails: upload }, 'File upload processed.') + } + if (isNewBranch) { await publish(FileImportSubscriptions.ProjectPendingModelsUpdated, { projectPendingModelsUpdated: { @@ -55,7 +72,12 @@ export const onFileImportProcessedFactory = projectId: upload.streamId }) - if (branch) await deps.addBranchCreatedActivity({ branch }) + if (branch) { + await deps.eventEmit({ + eventName: ModelEvents.Created, + payload: { model: branch, projectId: branch.streamId } + }) + } } else { await deps.publish(FileImportSubscriptions.ProjectPendingVersionsUpdated, { projectPendingVersionsUpdated: { diff --git a/packages/server/modules/gatekeeper/clients/stripe.ts b/packages/server/modules/gatekeeper/clients/stripe.ts index d4decae0f..cd1f602f1 100644 --- a/packages/server/modules/gatekeeper/clients/stripe.ts +++ b/packages/server/modules/gatekeeper/clients/stripe.ts @@ -8,7 +8,7 @@ import { import { WorkspacePlanBillingIntervals, WorkspacePricingPlans -} from '@/modules/gatekeeper/domain/workspacePricing' +} from '@/modules/gatekeeperCore/domain/billing' import { EnvironmentResourceError, LogicError } from '@/modules/shared/errors' import { Stripe } from 'stripe' diff --git a/packages/server/modules/gatekeeper/domain/billing.ts b/packages/server/modules/gatekeeper/domain/billing.ts index 2d88b428f..d76568051 100644 --- a/packages/server/modules/gatekeeper/domain/billing.ts +++ b/packages/server/modules/gatekeeper/domain/billing.ts @@ -1,51 +1,15 @@ import { - TrialWorkspacePlans, + PaidWorkspacePlan, PaidWorkspacePlans, - UnpaidWorkspacePlans, + TrialWorkspacePlan, + UnpaidWorkspacePlan, + WorkspacePlan, WorkspacePlanBillingIntervals, WorkspacePricingPlans -} from '@/modules/gatekeeper/domain/workspacePricing' +} from '@/modules/gatekeeperCore/domain/billing' import { OverrideProperties } from 'type-fest' import { z } from 'zod' -export type UnpaidWorkspacePlanStatuses = 'valid' - -export type PaidWorkspacePlanStatuses = - | UnpaidWorkspacePlanStatuses - // | 'paymentNeeded' // unsure if this is needed - | 'paymentFailed' - | 'cancelationScheduled' - | 'canceled' - -export type TrialWorkspacePlanStatuses = 'trial' | 'expired' - -export type PlanStatuses = - | PaidWorkspacePlanStatuses - | TrialWorkspacePlanStatuses - | UnpaidWorkspacePlanStatuses - -type BaseWorkspacePlan = { - workspaceId: string - createdAt: Date -} - -export type PaidWorkspacePlan = BaseWorkspacePlan & { - name: PaidWorkspacePlans - status: PaidWorkspacePlanStatuses -} - -export type TrialWorkspacePlan = BaseWorkspacePlan & { - name: TrialWorkspacePlans - status: TrialWorkspacePlanStatuses -} - -export type UnpaidWorkspacePlan = BaseWorkspacePlan & { - name: UnpaidWorkspacePlans - status: UnpaidWorkspacePlanStatuses -} - -export type WorkspacePlan = PaidWorkspacePlan | TrialWorkspacePlan | UnpaidWorkspacePlan - export type GetWorkspacePlan = (args: { workspaceId: string }) => Promise diff --git a/packages/server/modules/gatekeeper/domain/operations.ts b/packages/server/modules/gatekeeper/domain/operations.ts index 6d19a84a4..80139ead6 100644 --- a/packages/server/modules/gatekeeper/domain/operations.ts +++ b/packages/server/modules/gatekeeper/domain/operations.ts @@ -1,8 +1,9 @@ -import { PlanStatuses, WorkspacePlan } from '@/modules/gatekeeper/domain/billing' +import { WorkspaceFeatureName } from '@/modules/gatekeeper/domain/workspacePricing' import { - WorkspaceFeatureName, + PlanStatuses, + WorkspacePlan, WorkspacePlans -} from '@/modules/gatekeeper/domain/workspacePricing' +} from '@/modules/gatekeeperCore/domain/billing' import { Workspace } from '@/modules/workspacesCore/domain/types' export type CanWorkspaceAccessFeature = (args: { diff --git a/packages/server/modules/gatekeeper/domain/workspacePricing.ts b/packages/server/modules/gatekeeper/domain/workspacePricing.ts index b75c26b25..6b29861ab 100644 --- a/packages/server/modules/gatekeeper/domain/workspacePricing.ts +++ b/packages/server/modules/gatekeeper/domain/workspacePricing.ts @@ -1,4 +1,8 @@ -import { z } from 'zod' +import { + PaidWorkspacePlans, + UnpaidWorkspacePlans, + WorkspacePlans +} from '@/modules/gatekeeperCore/domain/billing' import type { MaybeNullOrUndefined } from '@speckle/shared' export type WorkspaceFeatureName = @@ -73,47 +77,6 @@ const baseFeatures = { workspace: true } -// team -export const trialWorkspacePlans = z.literal('starter') - -export type TrialWorkspacePlans = z.infer - -export const paidWorkspacePlans = z.union([ - trialWorkspacePlans, - // pro - z.literal('plus'), - z.literal('business') -]) - -export type PaidWorkspacePlans = z.infer - -// these are not publicly exposed for general use on billing enabled servers -export const unpaidWorkspacePlans = z.union([ - z.literal('unlimited'), - z.literal('academia'), - z.literal('starterInvoiced'), - z.literal('plusInvoiced'), - z.literal('businessInvoiced') -]) - -export type UnpaidWorkspacePlans = z.infer - -export const workspacePlans = z.union([paidWorkspacePlans, unpaidWorkspacePlans]) - -// this includes the plans your workspace can be on -export type WorkspacePlans = z.infer - -// this includes the pricing plans a customer can sub to -export type WorkspacePricingPlans = PaidWorkspacePlans | 'guest' - -export const workspacePlanBillingIntervals = z.union([ - z.literal('monthly'), - z.literal('yearly') -]) -export type WorkspacePlanBillingIntervals = z.infer< - typeof workspacePlanBillingIntervals -> - const starter: WorkspacePlanFeaturesAndLimits = { ...baseFeatures, name: 'starter', diff --git a/packages/server/modules/gatekeeper/graph/resolvers/index.ts b/packages/server/modules/gatekeeper/graph/resolvers/index.ts index 10ed138a2..5df129137 100644 --- a/packages/server/modules/gatekeeper/graph/resolvers/index.ts +++ b/packages/server/modules/gatekeeper/graph/resolvers/index.ts @@ -36,7 +36,8 @@ import { calculateSubscriptionSeats } from '@/modules/gatekeeper/domain/billing' import { WorkspacePaymentMethod } from '@/test/graphql/generated/graphql' import { LogicError } from '@/modules/shared/errors' -const { FF_GATEKEEPER_MODULE_ENABLED } = getFeatureFlags() +const { FF_GATEKEEPER_MODULE_ENABLED, FF_BILLING_INTEGRATION_ENABLED } = + getFeatureFlags() const getWorkspacePlan = getWorkspacePlanFactory({ db }) @@ -116,6 +117,7 @@ export = FF_GATEKEEPER_MODULE_ENABLED return hasAccess }, readOnly: async (parent) => { + if (!FF_BILLING_INTEGRATION_ENABLED) return false return await isWorkspaceReadOnlyFactory({ getWorkspacePlan })({ workspaceId: parent.id }) diff --git a/packages/server/modules/gatekeeper/repositories/billing.ts b/packages/server/modules/gatekeeper/repositories/billing.ts index ec76b42cc..1cc772846 100644 --- a/packages/server/modules/gatekeeper/repositories/billing.ts +++ b/packages/server/modules/gatekeeper/repositories/billing.ts @@ -8,7 +8,6 @@ import { UpsertWorkspacePlan, UpsertWorkspaceSubscription, WorkspaceSubscription, - WorkspacePlan, UpsertPaidWorkspacePlan, DeleteCheckoutSession, GetWorkspaceCheckoutSession, @@ -23,6 +22,7 @@ import { GetWorkspacesByPlanDaysTillExpiry, GetWorkspacePlanByProjectId } from '@/modules/gatekeeper/domain/operations' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' import { Workspace } from '@/modules/workspacesCore/domain/types' import { Workspaces } from '@/modules/workspacesCore/helpers/db' import { Knex } from 'knex' @@ -47,7 +47,7 @@ export const getWorkspacePlanFactory = return workspacePlan ?? null } -const upsertWorkspacePlanFactory = +export const upsertWorkspacePlanFactory = ({ db }: { db: Knex }): UpsertWorkspacePlan => async ({ workspacePlan }) => { await tables diff --git a/packages/server/modules/gatekeeper/rest/billing.ts b/packages/server/modules/gatekeeper/rest/billing.ts index a042d9c12..5aefe102e 100644 --- a/packages/server/modules/gatekeeper/rest/billing.ts +++ b/packages/server/modules/gatekeeper/rest/billing.ts @@ -21,6 +21,7 @@ import { WorkspaceAlreadyPaidError } from '@/modules/gatekeeper/errors/billing' import { withTransaction } from '@/modules/shared/helpers/dbHelper' import { getStripeClient } from '@/modules/gatekeeper/stripe' import { handleSubscriptionUpdateFactory } from '@/modules/gatekeeper/services/subscriptions' +import { getEventBus } from '@/modules/shared/services/eventBus' export const getBillingRouter = (): Router => { const router = Router() @@ -96,7 +97,8 @@ export const getBillingRouter = (): Router => { }), getSubscriptionData: getSubscriptionDataFactory({ stripe - }) + }), + emitEvent: getEventBus().emit }) try { diff --git a/packages/server/modules/gatekeeper/services/checkout.ts b/packages/server/modules/gatekeeper/services/checkout.ts index a5bd6f377..4ea57a446 100644 --- a/packages/server/modules/gatekeeper/services/checkout.ts +++ b/packages/server/modules/gatekeeper/services/checkout.ts @@ -11,15 +11,16 @@ import { GetWorkspaceCheckoutSession, DeleteCheckoutSession } from '@/modules/gatekeeper/domain/billing' -import { - PaidWorkspacePlans, - WorkspacePlanBillingIntervals -} from '@/modules/gatekeeper/domain/workspacePricing' import { CheckoutSessionNotFoundError, WorkspaceAlreadyPaidError, WorkspaceCheckoutSessionInProgressError } from '@/modules/gatekeeper/errors/billing' +import { + PaidWorkspacePlans, + WorkspacePlanBillingIntervals +} from '@/modules/gatekeeperCore/domain/billing' +import { EventBusEmit } from '@/modules/shared/services/eventBus' import { CountWorkspaceRoleWithOptionalProjectRole } from '@/modules/workspaces/domain/operations' import { Roles, throwUncoveredError } from '@speckle/shared' @@ -135,13 +136,15 @@ export const completeCheckoutSessionFactory = updateCheckoutSessionStatus, upsertWorkspaceSubscription, upsertPaidWorkspacePlan, - getSubscriptionData + getSubscriptionData, + emitEvent }: { getCheckoutSession: GetCheckoutSession updateCheckoutSessionStatus: UpdateCheckoutSessionStatus upsertWorkspaceSubscription: UpsertWorkspaceSubscription upsertPaidWorkspacePlan: UpsertPaidWorkspacePlan getSubscriptionData: GetSubscriptionData + emitEvent: EventBusEmit }) => /** * Complete a paid checkout session @@ -169,13 +172,14 @@ export const completeCheckoutSessionFactory = await updateCheckoutSessionStatus({ sessionId, paymentStatus: 'paid' }) // a plan determines the workspace feature set + const workspacePlan = { + createdAt: new Date(), + workspaceId: checkoutSession.workspaceId, + name: checkoutSession.workspacePlan, + status: 'valid' + } as const await upsertPaidWorkspacePlan({ - workspacePlan: { - createdAt: new Date(), - workspaceId: checkoutSession.workspaceId, - name: checkoutSession.workspacePlan, - status: 'valid' - } + workspacePlan }) const subscriptionData = await getSubscriptionData({ subscriptionId @@ -205,4 +209,14 @@ export const completeCheckoutSessionFactory = await upsertWorkspaceSubscription({ workspaceSubscription }) + await emitEvent({ + eventName: 'gatekeeper.workspace-plan-updated', + payload: { + workspacePlan: { + workspaceId: workspacePlan.workspaceId, + status: workspacePlan.status, + name: workspacePlan.name + } + } + }) } diff --git a/packages/server/modules/gatekeeper/services/readOnly.ts b/packages/server/modules/gatekeeper/services/readOnly.ts index eda0359e2..827f8c12d 100644 --- a/packages/server/modules/gatekeeper/services/readOnly.ts +++ b/packages/server/modules/gatekeeper/services/readOnly.ts @@ -1,5 +1,6 @@ -import { GetWorkspacePlan, WorkspacePlan } from '@/modules/gatekeeper/domain/billing' +import { GetWorkspacePlan } from '@/modules/gatekeeper/domain/billing' import { GetWorkspacePlanByProjectId } from '@/modules/gatekeeper/domain/operations' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' import { Workspace } from '@/modules/workspacesCore/domain/types' import { throwUncoveredError } from '@speckle/shared' diff --git a/packages/server/modules/gatekeeper/services/subscriptions.ts b/packages/server/modules/gatekeeper/services/subscriptions.ts index ba1daf151..eb2e7f9ca 100644 --- a/packages/server/modules/gatekeeper/services/subscriptions.ts +++ b/packages/server/modules/gatekeeper/services/subscriptions.ts @@ -6,7 +6,6 @@ import { GetWorkspaceSubscription, GetWorkspaceSubscriptionBySubscriptionId, GetWorkspaceSubscriptions, - PaidWorkspacePlanStatuses, ReconcileSubscriptionData, SubscriptionData, SubscriptionDataInput, @@ -14,11 +13,6 @@ import { UpsertWorkspaceSubscription, WorkspaceSubscription } from '@/modules/gatekeeper/domain/billing' -import { - PaidWorkspacePlans, - WorkspacePlanBillingIntervals, - WorkspacePricingPlans -} from '@/modules/gatekeeper/domain/workspacePricing' import { WorkspaceNotPaidPlanError, WorkspacePlanDowngradeError, @@ -26,6 +20,12 @@ import { WorkspacePlanNotFoundError, WorkspaceSubscriptionNotFoundError } from '@/modules/gatekeeper/errors/billing' +import { + PaidWorkspacePlans, + PaidWorkspacePlanStatuses, + WorkspacePlanBillingIntervals, + WorkspacePricingPlans +} from '@/modules/gatekeeperCore/domain/billing' import { LogicError } from '@/modules/shared/errors' import { CountWorkspaceRoleWithOptionalProjectRole } from '@/modules/workspaces/domain/operations' import { throwUncoveredError, WorkspaceRoles } from '@speckle/shared' diff --git a/packages/server/modules/gatekeeper/services/workspacePlans.ts b/packages/server/modules/gatekeeper/services/workspacePlans.ts new file mode 100644 index 000000000..06915d3b1 --- /dev/null +++ b/packages/server/modules/gatekeeper/services/workspacePlans.ts @@ -0,0 +1,95 @@ +import { UpsertWorkspacePlan } from '@/modules/gatekeeper/domain/billing' +import { InvalidWorkspacePlanStatus } from '@/modules/gatekeeper/errors/billing' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' +import { EventBusEmit } from '@/modules/shared/services/eventBus' +import { GetWorkspace } from '@/modules/workspaces/domain/operations' +import { WorkspaceNotFoundError } from '@/modules/workspaces/errors/workspace' +import { throwUncoveredError } from '@speckle/shared' + +export const updateWorkspacePlanFactory = + ({ + getWorkspace, + upsertWorkspacePlan, + emitEvent + }: { + getWorkspace: GetWorkspace + // im using the generic function here, cause the service is + // responsible for protecting the permutations + upsertWorkspacePlan: UpsertWorkspacePlan + emitEvent: EventBusEmit + }) => + async ({ + workspaceId, + name, + status + }: Pick): Promise => { + const workspace = await getWorkspace({ + workspaceId + }) + if (!workspace) throw new WorkspaceNotFoundError() + const createdAt = new Date() + switch (name) { + case 'starter': + switch (status) { + case 'trial': + case 'expired': + case 'valid': + case 'cancelationScheduled': + case 'canceled': + case 'paymentFailed': + await upsertWorkspacePlan({ + workspacePlan: { workspaceId, status, name, createdAt } + }) + break + default: + throwUncoveredError(status) + } + break + case 'business': + case 'plus': + switch (status) { + case 'trial': + case 'expired': + throw new InvalidWorkspacePlanStatus() + case 'valid': + case 'cancelationScheduled': + case 'canceled': + case 'paymentFailed': + await upsertWorkspacePlan({ + workspacePlan: { workspaceId, status, name, createdAt } + }) + break + default: + throwUncoveredError(status) + } + break + + case 'academia': + case 'unlimited': + case 'starterInvoiced': + case 'plusInvoiced': + case 'businessInvoiced': + switch (status) { + case 'valid': + await upsertWorkspacePlan({ + workspacePlan: { workspaceId, status, name, createdAt } + }) + break + case 'cancelationScheduled': + case 'canceled': + case 'expired': + case 'paymentFailed': + case 'trial': + throw new InvalidWorkspacePlanStatus() + default: + throwUncoveredError(status) + } + break + default: + throwUncoveredError(name) + } + await emitEvent({ + eventName: 'gatekeeper.workspace-plan-updated', + payload: { workspacePlan: { name, status, workspaceId } } + }) + } diff --git a/packages/server/modules/gatekeeper/stripe.ts b/packages/server/modules/gatekeeper/stripe.ts index 694e03048..c753c8fac 100644 --- a/packages/server/modules/gatekeeper/stripe.ts +++ b/packages/server/modules/gatekeeper/stripe.ts @@ -5,7 +5,7 @@ import { import { WorkspacePlanBillingIntervals, WorkspacePricingPlans -} from '@/modules/gatekeeper/domain/workspacePricing' +} from '@/modules/gatekeeperCore/domain/billing' import { getStringFromEnv, getStripeApiKey } from '@/modules/shared/helpers/envHelper' import { Stripe } from 'stripe' diff --git a/packages/server/modules/gatekeeper/tests/unit/checkout.spec.ts b/packages/server/modules/gatekeeper/tests/unit/checkout.spec.ts index 86de6ece3..eb6879f22 100644 --- a/packages/server/modules/gatekeeper/tests/unit/checkout.spec.ts +++ b/packages/server/modules/gatekeeper/tests/unit/checkout.spec.ts @@ -12,15 +12,15 @@ import { expect } from 'chai' import cryptoRandomString from 'crypto-random-string' import { CheckoutSession, - PaidWorkspacePlan, SubscriptionData, WorkspaceSubscription } from '@/modules/gatekeeper/domain/billing' +import { omit } from 'lodash' import { + PaidWorkspacePlan, PaidWorkspacePlans, WorkspacePlanBillingIntervals -} from '@/modules/gatekeeper/domain/workspacePricing' -import { omit } from 'lodash' +} from '@/modules/gatekeeperCore/domain/billing' describe('checkout @gatekeeper', () => { describe('startCheckoutSessionFactory creates a function, that', () => { @@ -509,6 +509,9 @@ describe('checkout @gatekeeper', () => { getSubscriptionData: async () => { expect.fail() }, + emitEvent: async () => { + expect.fail() + }, upsertWorkspaceSubscription: async () => { expect.fail() } @@ -541,6 +544,9 @@ describe('checkout @gatekeeper', () => { getSubscriptionData: async () => { expect.fail() }, + emitEvent: async () => { + expect.fail() + }, upsertWorkspaceSubscription: async () => { expect.fail() } @@ -585,6 +591,10 @@ describe('checkout @gatekeeper', () => { let storedWorkspaceSubscriptionData: WorkspaceSubscription | undefined = undefined + let emittedEventName: string | undefined = undefined + + let eventWorkspacePlan: unknown + await completeCheckoutSessionFactory({ getCheckoutSession: async () => storedCheckoutSession, updateCheckoutSessionStatus: async ({ paymentStatus }) => { @@ -596,6 +606,10 @@ describe('checkout @gatekeeper', () => { getSubscriptionData: async () => subscriptionData, upsertWorkspaceSubscription: async ({ workspaceSubscription }) => { storedWorkspaceSubscriptionData = workspaceSubscription + }, + emitEvent: async ({ eventName, payload }) => { + emittedEventName = eventName + eventWorkspacePlan = payload } })({ sessionId, subscriptionId }) @@ -605,6 +619,14 @@ describe('checkout @gatekeeper', () => { name: storedCheckoutSession.workspacePlan, status: 'valid' }) + expect(emittedEventName).to.equal('gatekeeper.workspace-plan-updated') + expect(eventWorkspacePlan).to.deep.equal({ + workspacePlan: { + workspaceId, + name: storedCheckoutSession.workspacePlan, + status: 'valid' + } + }) expect(storedWorkspaceSubscriptionData!.billingInterval).to.equal( storedCheckoutSession.billingInterval ) diff --git a/packages/server/modules/gatekeeper/tests/unit/featureAuthorization.spec.ts b/packages/server/modules/gatekeeper/tests/unit/featureAuthorization.spec.ts index a64890998..b32a3c597 100644 --- a/packages/server/modules/gatekeeper/tests/unit/featureAuthorization.spec.ts +++ b/packages/server/modules/gatekeeper/tests/unit/featureAuthorization.spec.ts @@ -1,5 +1,5 @@ -import { WorkspacePlan } from '@/modules/gatekeeper/domain/billing' import { canWorkspaceAccessFeatureFactory } from '@/modules/gatekeeper/services/featureAuthorization' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' import { expect } from 'chai' import cryptoRandomString from 'crypto-random-string' diff --git a/packages/server/modules/gatekeeper/tests/unit/subscriptions.spec.ts b/packages/server/modules/gatekeeper/tests/unit/subscriptions.spec.ts index 795ab5a07..9cddbb4ef 100644 --- a/packages/server/modules/gatekeeper/tests/unit/subscriptions.spec.ts +++ b/packages/server/modules/gatekeeper/tests/unit/subscriptions.spec.ts @@ -2,7 +2,6 @@ import { logger } from '@/logging/logging' import { SubscriptionData, SubscriptionDataInput, - WorkspacePlan, WorkspaceSubscription } from '@/modules/gatekeeper/domain/billing' import { @@ -23,6 +22,7 @@ import { createTestSubscriptionData, createTestWorkspaceSubscription } from '@/modules/gatekeeper/tests/helpers' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' import { expectToThrow } from '@/test/assertionHelper' import { throwUncoveredError } from '@speckle/shared' import { expect } from 'chai' diff --git a/packages/server/modules/gatekeeper/tests/unit/workspacePlans.spec.ts b/packages/server/modules/gatekeeper/tests/unit/workspacePlans.spec.ts new file mode 100644 index 000000000..97dd5f897 --- /dev/null +++ b/packages/server/modules/gatekeeper/tests/unit/workspacePlans.spec.ts @@ -0,0 +1,201 @@ +import { InvalidWorkspacePlanStatus } from '@/modules/gatekeeper/errors/billing' +import { updateWorkspacePlanFactory } from '@/modules/gatekeeper/services/workspacePlans' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' +import { EventBusEmit } from '@/modules/shared/services/eventBus' +import { WorkspaceNotFoundError } from '@/modules/workspaces/errors/workspace' +import { WorkspaceWithOptionalRole } from '@/modules/workspacesCore/domain/types' +import { expectToThrow } from '@/test/assertionHelper' +import { expect } from 'chai' +import cryptoRandomString from 'crypto-random-string' +import { omit } from 'lodash' + +describe('workspacePlan services @gatekeeper', () => { + describe('updateWorkspacePlanFactory creates a function, that', () => { + it('throws if the workspace is not found', async () => { + const updateWorkspacePlan = updateWorkspacePlanFactory({ + getWorkspace: async () => null, + upsertWorkspacePlan: () => { + expect.fail() + }, + emitEvent: () => { + expect.fail() + } + }) + const err = await expectToThrow(async () => { + await updateWorkspacePlan({ + workspaceId: cryptoRandomString({ length: 10 }), + name: 'business', + status: 'expired' + }) + }) + expect(err.message).to.equal(new WorkspaceNotFoundError().message) + }) + const uncoveredErrorMessage = 'Uncovered error case' + const invalidPlanMessage = new InvalidWorkspacePlanStatus().message + ;( + [ + { planName: 'foobar', cases: [['trial', uncoveredErrorMessage]] }, + { + planName: 'starter', + cases: [ + ['trial', null], + ['expired', null], + ['valid', null], + ['cancelationScheduled', null], + ['canceled', null], + ['paymentFailed', null], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'business', + cases: [ + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['valid', null], + ['cancelationScheduled', null], + ['canceled', null], + ['paymentFailed', null], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'plus', + cases: [ + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['valid', null], + ['cancelationScheduled', null], + ['canceled', null], + ['paymentFailed', null], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'academia', + cases: [ + ['valid', null], + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['cancelationScheduled', invalidPlanMessage], + ['canceled', invalidPlanMessage], + ['paymentFailed', invalidPlanMessage], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'unlimited', + cases: [ + ['valid', null], + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['cancelationScheduled', invalidPlanMessage], + ['canceled', invalidPlanMessage], + ['paymentFailed', invalidPlanMessage], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'starterInvoiced', + cases: [ + ['valid', null], + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['cancelationScheduled', invalidPlanMessage], + ['canceled', invalidPlanMessage], + ['paymentFailed', invalidPlanMessage], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'plusInvoiced', + cases: [ + ['valid', null], + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['cancelationScheduled', invalidPlanMessage], + ['canceled', invalidPlanMessage], + ['paymentFailed', invalidPlanMessage], + ['foobar', uncoveredErrorMessage] + ] + }, + { + planName: 'businessInvoiced', + cases: [ + ['valid', null], + ['trial', invalidPlanMessage], + ['expired', invalidPlanMessage], + ['cancelationScheduled', invalidPlanMessage], + ['canceled', invalidPlanMessage], + ['paymentFailed', invalidPlanMessage], + ['foobar', uncoveredErrorMessage] + ] + } + ] as const + ).forEach(({ planName, cases }) => { + return cases.forEach(([status, expectedErrorMessage]) => + it(`${ + expectedErrorMessage ? 'Throws an error' : 'Succeeds' + } when changing to plan ${planName} with status ${status}`, async () => { + const fail = () => { + expect.fail() + } + const workspaceId = cryptoRandomString({ length: 10 }) + if (expectedErrorMessage) { + const err = await expectToThrow(async () => { + const updateWorkspacePlan = updateWorkspacePlanFactory({ + getWorkspace: async () => { + return { id: workspaceId } as WorkspaceWithOptionalRole + }, + upsertWorkspacePlan: fail, + emitEvent: fail + }) + await updateWorkspacePlan({ + workspaceId, + //@ts-expect-error we need to test the runtime error checks too + name: planName, + //@ts-expect-error we need to test the runtime error checks too + status + }) + }) + expect(err.message.startsWith(expectedErrorMessage)).to.be.true + } else { + let storedWorkspacePlan: WorkspacePlan | undefined = undefined + let emittedEventName: string | undefined = undefined + let eventPayload: unknown = undefined + + const upsertWorkspacePlan = async ({ + workspacePlan + }: { + workspacePlan: WorkspacePlan + }) => { + storedWorkspacePlan = workspacePlan + } + const emitEvent: EventBusEmit = async ({ eventName, payload }) => { + emittedEventName = eventName + eventPayload = payload + } + const updateWorkspacePlan = updateWorkspacePlanFactory({ + getWorkspace: async () => { + return { id: workspaceId } as WorkspaceWithOptionalRole + }, + upsertWorkspacePlan, + emitEvent + }) + await updateWorkspacePlan({ + workspaceId, + //@ts-expect-error we need to test the runtime error checks too + name: planName, + //@ts-expect-error we need to test the runtime error checks too + status + }) + const expectedPlan = { workspaceId, name: planName, status } + expect(omit(storedWorkspacePlan, 'createdAt')).to.deep.equal(expectedPlan) + expect(emittedEventName).to.equal('gatekeeper.workspace-plan-updated') + expect(eventPayload).to.deep.equal({ workspacePlan: expectedPlan }) + } + }) + ) + }) + }) +}) diff --git a/packages/server/modules/gatekeeperCore/domain/billing.ts b/packages/server/modules/gatekeeperCore/domain/billing.ts new file mode 100644 index 000000000..422e2d2bb --- /dev/null +++ b/packages/server/modules/gatekeeperCore/domain/billing.ts @@ -0,0 +1,86 @@ +import { z } from 'zod' + +// team +export const trialWorkspacePlans = z.literal('starter') + +export type TrialWorkspacePlans = z.infer + +export const paidWorkspacePlans = z.union([ + trialWorkspacePlans, + // pro + z.literal('plus'), + z.literal('business') +]) + +export type PaidWorkspacePlans = z.infer + +// these are not publicly exposed for general use on billing enabled servers +export const unpaidWorkspacePlans = z.union([ + z.literal('unlimited'), + z.literal('academia'), + z.literal('starterInvoiced'), + z.literal('plusInvoiced'), + z.literal('businessInvoiced') +]) + +// export const freeWorkspacePlans = z + +// export const newPaidWorkspacePlans = z.union([ +// z.literal('starter2'), +// z.literal('business2') +// ]) + +export type UnpaidWorkspacePlans = z.infer + +export const workspacePlans = z.union([paidWorkspacePlans, unpaidWorkspacePlans]) + +// this includes the plans your workspace can be on +export type WorkspacePlans = z.infer + +// this includes the pricing plans a customer can sub to +export type WorkspacePricingPlans = PaidWorkspacePlans | 'guest' + +export const workspacePlanBillingIntervals = z.union([ + z.literal('monthly'), + z.literal('yearly') +]) +export type WorkspacePlanBillingIntervals = z.infer< + typeof workspacePlanBillingIntervals +> + +export type UnpaidWorkspacePlanStatuses = 'valid' + +export type PaidWorkspacePlanStatuses = + | UnpaidWorkspacePlanStatuses + // | 'paymentNeeded' // unsure if this is needed + | 'paymentFailed' + | 'cancelationScheduled' + | 'canceled' + +export type TrialWorkspacePlanStatuses = 'trial' | 'expired' + +export type PlanStatuses = + | PaidWorkspacePlanStatuses + | TrialWorkspacePlanStatuses + | UnpaidWorkspacePlanStatuses + +type BaseWorkspacePlan = { + workspaceId: string + createdAt: Date +} + +export type PaidWorkspacePlan = BaseWorkspacePlan & { + name: PaidWorkspacePlans + status: PaidWorkspacePlanStatuses +} + +export type TrialWorkspacePlan = BaseWorkspacePlan & { + name: TrialWorkspacePlans + status: TrialWorkspacePlanStatuses +} + +export type UnpaidWorkspacePlan = BaseWorkspacePlan & { + name: UnpaidWorkspacePlans + status: UnpaidWorkspacePlanStatuses +} +export type WorkspacePlan = PaidWorkspacePlan | TrialWorkspacePlan | UnpaidWorkspacePlan diff --git a/packages/server/modules/gatekeeperCore/domain/events.ts b/packages/server/modules/gatekeeperCore/domain/events.ts index 4f7511bdc..b9da15e84 100644 --- a/packages/server/modules/gatekeeperCore/domain/events.ts +++ b/packages/server/modules/gatekeeperCore/domain/events.ts @@ -1,11 +1,17 @@ +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' + export const gatekeeperEventNamespace = 'gatekeeper' as const const eventPrefix = `${gatekeeperEventNamespace}.` as const export const GatekeeperEvents = { - WorkspaceTrialExpired: `${eventPrefix}workspace-trial-expired` + WorkspaceTrialExpired: `${eventPrefix}workspace-trial-expired`, + WorkspacePlanUpdated: `${eventPrefix}workspace-plan-updated` } as const export type GatekeeperEventPayloads = { [GatekeeperEvents.WorkspaceTrialExpired]: { workspaceId: string } + [GatekeeperEvents.WorkspacePlanUpdated]: { + workspacePlan: Pick + } } diff --git a/packages/server/modules/gendo/rest/index.ts b/packages/server/modules/gendo/rest/index.ts index 41c31f1c1..f38633df9 100644 --- a/packages/server/modules/gendo/rest/index.ts +++ b/packages/server/modules/gendo/rest/index.ts @@ -1,4 +1,4 @@ -import { corsMiddleware } from '@/modules/core/configs/cors' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' import { updateRenderRequestFactory } from '@/modules/gendo/services' import type express from 'express' import { @@ -21,47 +21,53 @@ export default function (app: express.Express) { // const responseToken = getGendoAIResponseKey() // Gendo api calls hit these endpoints w/ the results - app.options('/api/thirdparty/gendo/:projectId', corsMiddleware()) - app.post('/api/thirdparty/gendo/:projectId', corsMiddleware(), async (req, res) => { - const sig = Buffer.from(req.get('x-signature-sha256') || '', 'utf8') + app.options('/api/thirdparty/gendo/:projectId', corsMiddlewareFactory()) + app.post( + '/api/thirdparty/gendo/:projectId', + corsMiddlewareFactory(), + async (req, res) => { + const sig = Buffer.from(req.get('x-signature-sha256') || '', 'utf8') - // //Calculate HMAC - const hmac = createHmac('sha256', getGendoAIKey()) - const digest = Buffer.from(hmac.update(req.body).digest('base64'), 'utf-8') + // //Calculate HMAC + const hmac = createHmac('sha256', getGendoAIKey()) + const digest = Buffer.from(hmac.update(req.body).digest('base64'), 'utf-8') - // //Compare HMACs - if (sig.length !== digest.length || !timingSafeEqual(digest, sig)) { - return res.status(401).send('Speckle says your webhook signature is not valid 😠') + // //Compare HMACs + if (sig.length !== digest.length || !timingSafeEqual(digest, sig)) { + return res + .status(401) + .send('Speckle says your webhook signature is not valid 😠') + } + const payload = JSON.parse(req.body) + const responseImage = payload.imageBase64 + const status = payload.status + const gendoGenerationId = payload.generationId + + const projectId = req.params.projectId + const [projectDb, projectStorage] = await Promise.all([ + getProjectDbClient({ projectId }), + getProjectObjectStorage({ projectId }) + ]) + + const storeFileStream = storeFileStreamFactory({ storage: projectStorage }) + const updateRenderRequest = updateRenderRequestFactory({ + getRenderByGenerationId: getRenderByGenerationIdFactory({ db: projectDb }), + uploadFileStream: uploadFileStreamFactory({ + storeFileStream, + upsertBlob: upsertBlobFactory({ db: projectDb }), + updateBlob: updateBlobFactory({ db: projectDb }) + }), + updateRenderRecord: updateRenderRecordFactory({ db: projectDb }), + publish + }) + + await updateRenderRequest({ + gendoGenerationId, + responseImage, + status + }) + + res.status(200).send('Speckle says thank you 💖') } - const payload = JSON.parse(req.body) - const responseImage = payload.imageBase64 - const status = payload.status - const gendoGenerationId = payload.generationId - - const projectId = req.params.projectId - const [projectDb, projectStorage] = await Promise.all([ - getProjectDbClient({ projectId }), - getProjectObjectStorage({ projectId }) - ]) - - const storeFileStream = storeFileStreamFactory({ storage: projectStorage }) - const updateRenderRequest = updateRenderRequestFactory({ - getRenderByGenerationId: getRenderByGenerationIdFactory({ db: projectDb }), - uploadFileStream: uploadFileStreamFactory({ - storeFileStream, - upsertBlob: upsertBlobFactory({ db: projectDb }), - updateBlob: updateBlobFactory({ db: projectDb }) - }), - updateRenderRecord: updateRenderRecordFactory({ db: projectDb }), - publish - }) - - await updateRenderRequest({ - gendoGenerationId, - responseImage, - status - }) - - res.status(200).send('Speckle says thank you 💖') - }) + ) } diff --git a/packages/server/modules/index.ts b/packages/server/modules/index.ts index 1d5a2b325..bc002f0a1 100644 --- a/packages/server/modules/index.ts +++ b/packages/server/modules/index.ts @@ -84,8 +84,9 @@ const getEnabledModuleNames = () => { if (FF_AUTOMATE_MODULE_ENABLED) moduleNames.push('automate') if (FF_GENDOAI_MODULE_ENABLED) moduleNames.push('gendo') - if (FF_WORKSPACES_MODULE_ENABLED) moduleNames.push('workspaces') + // the order of the event listeners matters if (FF_GATEKEEPER_MODULE_ENABLED) moduleNames.push('gatekeeper') + if (FF_WORKSPACES_MODULE_ENABLED) moduleNames.push('workspaces') return moduleNames } diff --git a/packages/server/modules/multiregion/utils/dbSelector.ts b/packages/server/modules/multiregion/utils/dbSelector.ts index 3887ba044..5327035f1 100644 --- a/packages/server/modules/multiregion/utils/dbSelector.ts +++ b/packages/server/modules/multiregion/utils/dbSelector.ts @@ -25,7 +25,7 @@ import { getProjectRegionKey, getRegisteredRegionConfigs } from '@/modules/multiregion/utils/regionSelector' -import { mapValues } from 'lodash' +import { get, mapValues } from 'lodash' import { isMultiRegionEnabled } from '@/modules/multiregion/helpers' let getter: GetProjectDb | undefined = undefined @@ -219,7 +219,10 @@ const setUpUserReplication = async ({ 'Could not create publication {pubName} when setting up user replication for region {regionName}', from.public, { - cause: ensureError(err, 'Unknown database error when creating publication'), + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating publication' + ), info: { pubName, regionName } } ) @@ -232,7 +235,17 @@ const setUpUserReplication = async ({ errorMessage.includes(message) ) ) - throw err + throw new DatabaseError( + 'Unknown error while creating publication {pubName} when setting up user replication for region {regionName}', + from.public, + { + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating publication' + ), + info: { pubName, regionName } + } + ) } const fromUrl = new URL( @@ -264,11 +277,28 @@ const setUpUserReplication = async ({ 'Could not create subscription {subName} to {pubName} when setting up user replication for region {regionName}', to.public, { - cause: ensureError(err, 'Unknown database error when creating subscription'), + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating subscription' + ), + info: { subName, pubName, regionName } + } + ) + if ( + !err.message.includes('already exists') && + !err.message.includes('duplicate key value violates unique constraint') + ) + throw new DatabaseError( + 'Unknown error while creating subscription {subName} to {pubName} when setting up user replication for region {regionName}', + to.public, + { + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating subscription' + ), info: { subName, pubName, regionName } } ) - if (!err.message.includes('already exists')) throw err } } @@ -289,11 +319,28 @@ const setUpProjectReplication = async ({ 'Could not create publication {pubName} when setting up project replication for region {regionName}', from.public, { - cause: ensureError(err, 'Unknown database error when creating publication'), + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating publication' + ), + info: { pubName, regionName } + } + ) + if ( + !err.message.includes('already exists') && + !err.message.includes('duplicate key value violates unique constraint') + ) + throw new DatabaseError( + 'Unknown error while creating publication {pubName} when setting up project replication for region {regionName}', + from.public, + { + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating publication' + ), info: { pubName, regionName } } ) - if (!err.message.includes('already exists')) throw err } const fromUrl = new URL( @@ -325,10 +372,33 @@ const setUpProjectReplication = async ({ 'Could not create subscription {subName} to {pubName} when setting up project replication for region {regionName}', to.public, { - cause: ensureError(err, 'Unknown database error when creating subscription'), + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating subscription' + ), + info: { subName, pubName, regionName } + } + ) + if ( + !err.message.includes('already exists') && + !err.message.includes('duplicate key value violates unique constraint') + ) + throw new DatabaseError( + 'Unknown error while creating subscription {subName} to {pubName} when setting up project replication for region {regionName}', + to.public, + { + cause: ensureError( + sanitizeError(err), + 'Unknown database error when creating subscription' + ), info: { subName, pubName, regionName } } ) - if (!err.message.includes('already exists')) throw err } } + +const sanitizeError = (err: unknown): unknown => { + if (!err) return err + if (get(err, 'where').includes('password=')) + return { ...err, where: '[REDACTED AS IT CONTAINS CONNECTION STRING]' } +} diff --git a/packages/server/modules/previews/index.ts b/packages/server/modules/previews/index.ts index ec2a341ef..8b735c02b 100644 --- a/packages/server/modules/previews/index.ts +++ b/packages/server/modules/previews/index.ts @@ -4,8 +4,6 @@ import { validateScopes, authorizeResolver } from '@/modules/shared' import { makeOgImage } from '@/modules/previews/ogImage' import { moduleLogger } from '@/logging/logging' import { messageProcessor } from '@/modules/previews/resultListener' - -import cors from 'cors' import { db } from '@/db/knex' import { getObjectPreviewBufferOrFilepathFactory, @@ -30,6 +28,7 @@ import { getFormattedObjectFactory } from '@/modules/core/repositories/objects' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { listenFor } from '@/modules/core/utils/dbNotificationListener' import { disablePreviews } from '@/modules/shared/helpers/envHelper' +import { corsMiddlewareFactory } from '@/modules/core/configs/cors' const httpErrorImage = (httpErrorCode: number) => require.resolve(`#/assets/previews/images/preview_${httpErrorCode}.png`) @@ -43,8 +42,8 @@ export const init: SpeckleModule['init'] = (app, isInitial) => { moduleLogger.info('📸 Init object preview module') } - app.options('/preview/:streamId/:angle?', cors()) - app.get('/preview/:streamId/:angle?', cors(), async (req, res) => { + app.options('/preview/:streamId/:angle?', corsMiddlewareFactory()) + app.get('/preview/:streamId/:angle?', corsMiddlewareFactory(), async (req, res) => { const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) const checkStreamPermissions = checkStreamPermissionsFactory({ validateScopes, @@ -96,10 +95,13 @@ export const init: SpeckleModule['init'] = (app, isInitial) => { ) }) - app.options('/preview/:streamId/branches/:branchName/:angle?', cors()) + app.options( + '/preview/:streamId/branches/:branchName/:angle?', + corsMiddlewareFactory() + ) app.get( '/preview/:streamId/branches/:branchName/:angle?', - cors(), + corsMiddlewareFactory(), async (req, res) => { const checkStreamPermissions = checkStreamPermissionsFactory({ validateScopes, @@ -163,88 +165,96 @@ export const init: SpeckleModule['init'] = (app, isInitial) => { } ) - app.options('/preview/:streamId/commits/:commitId/:angle?', cors()) - app.get('/preview/:streamId/commits/:commitId/:angle?', cors(), async (req, res) => { - const checkStreamPermissions = checkStreamPermissionsFactory({ - validateScopes, - authorizeResolver, - // getting the stream from the main DB, cause it needs to join on roles - getStream: getStreamFactory({ db }) - }) - const { hasPermissions, httpErrorCode } = await checkStreamPermissions(req) - if (!hasPermissions) { - // return res.status( httpErrorCode ).end() - return res.sendFile(httpErrorImage(httpErrorCode)) + app.options('/preview/:streamId/commits/:commitId/:angle?', corsMiddlewareFactory()) + app.get( + '/preview/:streamId/commits/:commitId/:angle?', + corsMiddlewareFactory(), + async (req, res) => { + const checkStreamPermissions = checkStreamPermissionsFactory({ + validateScopes, + authorizeResolver, + // getting the stream from the main DB, cause it needs to join on roles + getStream: getStreamFactory({ db }) + }) + const { hasPermissions, httpErrorCode } = await checkStreamPermissions(req) + if (!hasPermissions) { + // return res.status( httpErrorCode ).end() + return res.sendFile(httpErrorImage(httpErrorCode)) + } + + const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) + + const getCommit = getCommitFactory({ db: projectDb }) + const commit = await getCommit(req.params.commitId, { + streamId: req.params.streamId + }) + if (!commit) return res.sendFile(noPreviewImage) + + const getObjectPreviewBufferOrFilepath = getObjectPreviewBufferOrFilepathFactory({ + getObject: getFormattedObjectFactory({ db: projectDb }), + getObjectPreviewInfo: getObjectPreviewInfoFactory({ db: projectDb }), + createObjectPreview: createObjectPreviewFactory({ db: projectDb }), + getPreviewImage: getPreviewImageFactory({ db: projectDb }), + logger: req.log + }) + + const sendObjectPreview = sendObjectPreviewFactory({ + // getting the stream from the projectDb here, to handle preview data properly + getStream: getStreamFactory({ db: projectDb }), + getObjectPreviewBufferOrFilepath, + makeOgImage + }) + return sendObjectPreview( + req, + res, + req.params.streamId, + commit.referencedObject, + req.params.angle + ) } + ) - const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) + app.options('/preview/:streamId/objects/:objectId/:angle?', corsMiddlewareFactory()) + app.get( + '/preview/:streamId/objects/:objectId/:angle?', + corsMiddlewareFactory(), + async (req, res) => { + const checkStreamPermissions = checkStreamPermissionsFactory({ + validateScopes, + authorizeResolver, + // getting the stream from the main DB, cause it needs to join on roles + getStream: getStreamFactory({ db }) + }) + const { hasPermissions } = await checkStreamPermissions(req) + if (!hasPermissions) { + return res.status(403).end() + } + const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) - const getCommit = getCommitFactory({ db: projectDb }) - const commit = await getCommit(req.params.commitId, { - streamId: req.params.streamId - }) - if (!commit) return res.sendFile(noPreviewImage) + const getObjectPreviewBufferOrFilepath = getObjectPreviewBufferOrFilepathFactory({ + getObject: getFormattedObjectFactory({ db: projectDb }), + getObjectPreviewInfo: getObjectPreviewInfoFactory({ db: projectDb }), + createObjectPreview: createObjectPreviewFactory({ db: projectDb }), + getPreviewImage: getPreviewImageFactory({ db: projectDb }), + logger: req.log + }) - const getObjectPreviewBufferOrFilepath = getObjectPreviewBufferOrFilepathFactory({ - getObject: getFormattedObjectFactory({ db: projectDb }), - getObjectPreviewInfo: getObjectPreviewInfoFactory({ db: projectDb }), - createObjectPreview: createObjectPreviewFactory({ db: projectDb }), - getPreviewImage: getPreviewImageFactory({ db: projectDb }), - logger: req.log - }) + const sendObjectPreview = sendObjectPreviewFactory({ + // getting the stream from the projectDb here, to handle preview data properly + getStream: getStreamFactory({ db: projectDb }), + getObjectPreviewBufferOrFilepath, + makeOgImage + }) - const sendObjectPreview = sendObjectPreviewFactory({ - // getting the stream from the projectDb here, to handle preview data properly - getStream: getStreamFactory({ db: projectDb }), - getObjectPreviewBufferOrFilepath, - makeOgImage - }) - return sendObjectPreview( - req, - res, - req.params.streamId, - commit.referencedObject, - req.params.angle - ) - }) - - app.options('/preview/:streamId/objects/:objectId/:angle?', cors()) - app.get('/preview/:streamId/objects/:objectId/:angle?', cors(), async (req, res) => { - const checkStreamPermissions = checkStreamPermissionsFactory({ - validateScopes, - authorizeResolver, - // getting the stream from the main DB, cause it needs to join on roles - getStream: getStreamFactory({ db }) - }) - const { hasPermissions } = await checkStreamPermissions(req) - if (!hasPermissions) { - return res.status(403).end() + return sendObjectPreview( + req, + res, + req.params.streamId, + req.params.objectId, + req.params.angle + ) } - const projectDb = await getProjectDbClient({ projectId: req.params.streamId }) - - const getObjectPreviewBufferOrFilepath = getObjectPreviewBufferOrFilepathFactory({ - getObject: getFormattedObjectFactory({ db: projectDb }), - getObjectPreviewInfo: getObjectPreviewInfoFactory({ db: projectDb }), - createObjectPreview: createObjectPreviewFactory({ db: projectDb }), - getPreviewImage: getPreviewImageFactory({ db: projectDb }), - logger: req.log - }) - - const sendObjectPreview = sendObjectPreviewFactory({ - // getting the stream from the projectDb here, to handle preview data properly - getStream: getStreamFactory({ db: projectDb }), - getObjectPreviewBufferOrFilepath, - makeOgImage - }) - - return sendObjectPreview( - req, - res, - req.params.streamId, - req.params.objectId, - req.params.angle - ) - }) + ) if (isInitial) { listenFor('preview_generation_update', messageProcessor) diff --git a/packages/server/modules/serverinvites/events/subscriptionListeners.ts b/packages/server/modules/serverinvites/events/subscriptionListeners.ts new file mode 100644 index 000000000..8ff20f73d --- /dev/null +++ b/packages/server/modules/serverinvites/events/subscriptionListeners.ts @@ -0,0 +1,101 @@ +import { + ProjectUpdatedMessageType, + UserProjectsUpdatedMessageType +} from '@/modules/core/graph/generated/graphql' +import { ServerInvitesEvents } from '@/modules/serverinvites/domain/events' +import { resolveTarget } from '@/modules/serverinvites/helpers/core' +import { GetProjectInviteProject } from '@/modules/serverinvites/services/operations' +import { StreamPubsubEvents } from '@/modules/shared' +import { DependenciesOf } from '@/modules/shared/helpers/factory' +import { EventBusListen, EventPayload } from '@/modules/shared/services/eventBus' +import { + ProjectSubscriptions, + PublishSubscription, + UserSubscriptions +} from '@/modules/shared/utils/subscriptions' + +const reportProjectInviteCreatedFactory = + (deps: { + publish: PublishSubscription + getProjectInviteProject: GetProjectInviteProject + }) => + async (payload: EventPayload) => { + const { invite } = payload.payload + const project = await deps.getProjectInviteProject({ invite }) + if (!project) return + + await deps.publish(ProjectSubscriptions.ProjectUpdated, { + projectUpdated: { + id: project.id, + type: ProjectUpdatedMessageType.Updated, + project + } + }) + } + +const reportProjectInviteFinalizedFactory = + (deps: { + publish: PublishSubscription + getProjectInviteProject: GetProjectInviteProject + }) => + async (payload: EventPayload) => { + const { invite, accept } = payload.payload + const project = await deps.getProjectInviteProject({ invite }) + if (!project) return + + const userTarget = resolveTarget(invite.target) + if (accept) { + await Promise.all([ + deps.publish(StreamPubsubEvents.UserStreamAdded, { + userStreamAdded: { + id: project.id, + sharedBy: invite.inviterId + }, + ownerId: userTarget.userId! + }), + deps.publish(UserSubscriptions.UserProjectsUpdated, { + userProjectsUpdated: { + id: project.id, + type: UserProjectsUpdatedMessageType.Added, + project + }, + ownerId: userTarget.userId! + }), + deps.publish(ProjectSubscriptions.ProjectUpdated, { + projectUpdated: { + id: project.id, + type: ProjectUpdatedMessageType.Updated, + project + } + }) + ]) + } else { + await deps.publish(ProjectSubscriptions.ProjectUpdated, { + projectUpdated: { + id: project.id, + type: ProjectUpdatedMessageType.Updated, + project + } + }) + } + } + +export const reportSubscriptionEventsFactory = + ( + deps: { + eventListen: EventBusListen + publish: PublishSubscription + } & DependenciesOf & + DependenciesOf + ) => + () => { + const reportProjectInviteCreated = reportProjectInviteCreatedFactory(deps) + const reportProjectInviteFinalized = reportProjectInviteFinalizedFactory(deps) + + const quitCbs = [ + deps.eventListen(ServerInvitesEvents.Created, reportProjectInviteCreated), + deps.eventListen(ServerInvitesEvents.Finalized, reportProjectInviteFinalized) + ] + + return () => quitCbs.forEach((quit) => quit()) + } diff --git a/packages/server/modules/serverinvites/graph/resolvers/serverInvites.ts b/packages/server/modules/serverinvites/graph/resolvers/serverInvites.ts index b34f2847f..6277110a1 100644 --- a/packages/server/modules/serverinvites/graph/resolvers/serverInvites.ts +++ b/packages/server/modules/serverinvites/graph/resolvers/serverInvites.ts @@ -56,11 +56,7 @@ import { processFinalizedProjectInviteFactory, validateProjectInviteBeforeFinalizationFactory } from '@/modules/serverinvites/services/coreFinalization' -import { - addStreamInviteAcceptedActivityFactory, - addStreamInviteDeclinedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { createUserEmailFactory, ensureNoPrimaryEmailForUserFactory, @@ -93,10 +89,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish @@ -321,10 +314,6 @@ export = { }), processInvite: processFinalizedProjectInviteFactory({ getProject: getStream, - addInviteDeclinedActivity: addStreamInviteDeclinedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), addProjectRole: addOrUpdateStreamCollaborator }), deleteInvitesByTarget: deleteInvitesByTargetFactory({ db }), @@ -470,10 +459,6 @@ export = { }), processInvite: processFinalizedProjectInviteFactory({ getProject: getStream, - addInviteDeclinedActivity: addStreamInviteDeclinedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }), addProjectRole: addOrUpdateStreamCollaborator }), deleteInvitesByTarget: deleteInvitesByTargetFactory({ db }), diff --git a/packages/server/modules/serverinvites/index.ts b/packages/server/modules/serverinvites/index.ts index f8e7d5d5a..73c70e001 100644 --- a/packages/server/modules/serverinvites/index.ts +++ b/packages/server/modules/serverinvites/index.ts @@ -3,6 +3,11 @@ import { moduleLogger } from '@/logging/logging' import db from '@/db/knex' import { Scopes } from '@speckle/shared' import { SpeckleModule } from '@/modules/shared/helpers/typeHelper' +import { getEventBus } from '@/modules/shared/services/eventBus' +import { publish } from '@/modules/shared/utils/subscriptions' +import { getStreamFactory } from '@/modules/core/repositories/streams' +import { getProjectInviteProjectFactory } from '@/modules/serverinvites/services/projectInviteManagement' +import { reportSubscriptionEventsFactory } from '@/modules/serverinvites/events/subscriptionListeners' const scopes = [ { @@ -12,11 +17,22 @@ const scopes = [ } ] -export const init: SpeckleModule['init'] = async () => { +export const init: SpeckleModule['init'] = async (_app, isInitial) => { moduleLogger.info('💌 Init invites module') const registerFunc = registerOrUpdateScopeFactory({ db }) for (const scope of scopes) { await registerFunc({ scope }) } + + if (isInitial) { + // Setup GQL sub emits + reportSubscriptionEventsFactory({ + eventListen: getEventBus().listen, + publish, + getProjectInviteProject: getProjectInviteProjectFactory({ + getStream: getStreamFactory({ db }) + }) + })() + } } diff --git a/packages/server/modules/serverinvites/services/coreFinalization.ts b/packages/server/modules/serverinvites/services/coreFinalization.ts index 80fde78f3..56a287241 100644 --- a/packages/server/modules/serverinvites/services/coreFinalization.ts +++ b/packages/server/modules/serverinvites/services/coreFinalization.ts @@ -1,4 +1,3 @@ -import { AddStreamInviteDeclinedActivity } from '@/modules/activitystream/domain/operations' import { AddOrUpdateStreamCollaborator, GetStream @@ -77,28 +76,19 @@ export const validateProjectInviteBeforeFinalizationFactory = type ProcessFinalizedProjectInviteFactoryDeps = { getProject: GetStream - addInviteDeclinedActivity: AddStreamInviteDeclinedActivity addProjectRole: AddOrUpdateStreamCollaborator } export const processFinalizedProjectInviteFactory = (deps: ProcessFinalizedProjectInviteFactoryDeps): ProcessFinalizedResourceInvite => async (params) => { - const { getProject, addInviteDeclinedActivity, addProjectRole } = deps + const { getProject, addProjectRole } = deps const { invite, finalizerUserId, action } = params const project = await getProject({ streamId: invite.resource.resourceId }) if (action === InviteFinalizationAction.DECLINE) { // Skip validation so user can get rid of the invite regardless - if (project) { - await addInviteDeclinedActivity({ - streamId: invite.resource.resourceId, - inviteTargetId: finalizerUserId, - inviterId: invite.inviterId, - stream: project - }) - } return } @@ -116,7 +106,7 @@ export const processFinalizedProjectInviteFactory = invite.resource.role || Roles.Stream.Contributor, invite.inviterId, null, - { fromInvite: true } + { fromInvite: invite } ) } catch (e) { if (!(e instanceof StreamInvalidAccessError)) { diff --git a/packages/server/modules/serverinvites/services/operations.ts b/packages/server/modules/serverinvites/services/operations.ts index 214028a21..d042d18a4 100644 --- a/packages/server/modules/serverinvites/services/operations.ts +++ b/packages/server/modules/serverinvites/services/operations.ts @@ -1,3 +1,4 @@ +import { Project } from '@/modules/core/domain/streams/types' import { TokenResourceIdentifier } from '@/modules/core/domain/tokens/types' import { ServerInfo } from '@/modules/core/helpers/types' import { UserWithOptionalRole } from '@/modules/core/repositories/users' @@ -109,3 +110,7 @@ export type FinalizeInvitedServerRegistration = ( ) => Promise export type ResolveAuthRedirectPath = (invite?: ServerInviteRecord) => string + +export type GetProjectInviteProject = (params: { + invite: ServerInviteRecord +}) => Promise diff --git a/packages/server/modules/serverinvites/services/processing.ts b/packages/server/modules/serverinvites/services/processing.ts index 29b2eb215..6d2887cce 100644 --- a/packages/server/modules/serverinvites/services/processing.ts +++ b/packages/server/modules/serverinvites/services/processing.ts @@ -1,4 +1,3 @@ -import { getStreamRoute } from '@/modules/core/helpers/routeHelper' import { InviteCreateValidationError, InviteFinalizedForNewEmail, @@ -7,12 +6,11 @@ import { } from '@/modules/serverinvites/errors' import { buildUserTarget, - isProjectResourceTarget, ResolvedTargetData, resolveTarget } from '@/modules/serverinvites/helpers/core' -import { getFrontendOrigin, useNewFrontend } from '@/modules/shared/helpers/envHelper' +import { getFrontendOrigin } from '@/modules/shared/helpers/envHelper' import { InviteResourceTargetType, ServerInviteRecord @@ -114,27 +112,10 @@ export const convertToFinalizationValidation = (params: { * Note: Important auth query string params like the access_code are added separately * in auth middlewares */ -export const resolveAuthRedirectPathFactory = - (): ResolveAuthRedirectPath => (invite?: ServerInviteRecord) => { - if (useNewFrontend()) { - // All post-auth redirects are handled by the frontend itself - return getFrontendOrigin() - } - - /** - * @deprecated Deprecated user flow, only relevant in FE1. Thus no need to update it w/ support for workspaces - * and other new features. - */ - if (invite) { - const primaryTarget = invite.resource - if (isProjectResourceTarget(primaryTarget)) { - return `${getStreamRoute(primaryTarget.resourceId)}` - } - } - - // Fall-back to base URL (for server invites) - return getFrontendOrigin() - } +export const resolveAuthRedirectPathFactory = (): ResolveAuthRedirectPath => () => { + // All post-auth redirects are handled by the frontend itself + return getFrontendOrigin() +} /** * Validate that the new user has a valid invite for registering to the server diff --git a/packages/server/modules/serverinvites/services/projectInviteManagement.ts b/packages/server/modules/serverinvites/services/projectInviteManagement.ts index 77206c1dd..32df8633f 100644 --- a/packages/server/modules/serverinvites/services/projectInviteManagement.ts +++ b/packages/server/modules/serverinvites/services/projectInviteManagement.ts @@ -31,6 +31,7 @@ import { } from '@/modules/serverinvites/errors' import { buildUserTarget, + isProjectResourceTarget, resolveInviteTargetTitle, resolveTarget, ResourceTargetTypeRoleTypeMap @@ -39,7 +40,8 @@ import { PendingStreamCollaboratorGraphQLReturn } from '@/modules/serverinvites/ import { CreateAndSendInvite, FinalizeInvite, - GetInvitationTargetUsers + GetInvitationTargetUsers, + GetProjectInviteProject } from '@/modules/serverinvites/services/operations' import { MaybeNullOrUndefined, @@ -292,3 +294,14 @@ export const getPendingProjectCollaboratorsFactory = return results } + +export const getProjectInviteProjectFactory = + (deps: { getStream: GetStream }): GetProjectInviteProject => + async (params) => { + const { invite } = params + const primaryResourceTarget = invite.resource + + if (!isProjectResourceTarget(primaryResourceTarget)) return undefined + + return await deps.getStream({ streamId: primaryResourceTarget.resourceId }) + } diff --git a/packages/server/modules/shared/domain/operations.ts b/packages/server/modules/shared/domain/operations.ts index 75b22db34..9fadc4069 100644 --- a/packages/server/modules/shared/domain/operations.ts +++ b/packages/server/modules/shared/domain/operations.ts @@ -8,6 +8,7 @@ import { Optional, ServerRoles } from '@speckle/shared' +import { OperationTypeNode } from 'graphql' export type GetUserAclRole = (params: { aclTableName: typeof ServerAcl.name | typeof StreamAcl.name | typeof WorkspaceAcl.name @@ -28,7 +29,8 @@ export type AuthorizeResolver = ( userId: MaybeNullOrUndefined, resourceId: string, requiredRole: AvailableRoles, - userResourceAccessLimits: MaybeNullOrUndefined + userResourceAccessLimits: MaybeNullOrUndefined, + operationType?: OperationTypeNode // This is needed to block write operations when user is server admin ) => Promise export type ValidateUserServerRole = ( diff --git a/packages/server/modules/shared/helpers/envHelper.ts b/packages/server/modules/shared/helpers/envHelper.ts index 04a521883..06fe19bf4 100644 --- a/packages/server/modules/shared/helpers/envHelper.ts +++ b/packages/server/modules/shared/helpers/envHelper.ts @@ -50,6 +50,10 @@ export function isProdEnv() { return process.env.NODE_ENV === 'production' } +export function isCompressionEnabled() { + return getBooleanFromEnv('COMPRESSION') +} + export function getServerVersion() { return process.env.SPECKLE_SERVER_VERSION || 'dev' } @@ -66,15 +70,12 @@ export function getFileSizeLimitMB() { return getIntFromEnv('FILE_SIZE_LIMIT_MB', '100') } -export function getMaximumObjectSizeMB() { - return getIntFromEnv('MAX_OBJECT_SIZE_MB', '100') +export function getMaximumRequestBodySizeMB() { + return getIntFromEnv('MAX_REQUEST_BODY_SIZE_MB', '100') } -/** - * Whether the server is supposed to serve frontend 2.0 - */ -export function useNewFrontend() { - return getBooleanFromEnv('USE_FRONTEND_2') +export function getMaximumObjectSizeMB() { + return getIntFromEnv('MAX_OBJECT_SIZE_MB', '100') } export function enableNewFrontendMessaging() { @@ -177,13 +178,12 @@ export function shouldDisableNotificationsConsumption() { /** * Get frontend app origin/base URL */ -export function getFrontendOrigin(forceFe2?: boolean) { - const envKey = useNewFrontend() || forceFe2 ? 'FRONTEND_ORIGIN' : 'CANONICAL_URL' - const trimmedOrigin = trimEnd(process.env[envKey], '/') +export function getFrontendOrigin() { + const trimmedOrigin = trimEnd(process.env['FRONTEND_ORIGIN'], '/') if (!trimmedOrigin) { throw new MisconfiguredEnvironmentError( - `Frontend origin env var (${envKey}) not configured!` + `Frontend origin env var (FRONTEND_ORIGIN) not configured!` ) } @@ -206,7 +206,7 @@ export function getServerOrigin() { const err = ensureError(e) if (e instanceof TypeError && e.message === 'Invalid URL') { throw new MisconfiguredEnvironmentError( - `Server origin environment variable (CANONICAL_URL) is not a valid URL: ${err.message}`, + `Server origin environment variable (CANONICAL_URL) is not a valid URL: ${process.env.CANONICAL_URL} ${err.message}`, { cause: e, info: { diff --git a/packages/server/modules/shared/helpers/factory.ts b/packages/server/modules/shared/helpers/factory.ts new file mode 100644 index 000000000..fe7dead6d --- /dev/null +++ b/packages/server/modules/shared/helpers/factory.ts @@ -0,0 +1,8 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +type Factory = ( + deps: Deps +) => (...args: Args[]) => ReturnType + +export type DependenciesOf = F extends Factory + ? Deps + : never diff --git a/packages/server/modules/shared/middleware/index.ts b/packages/server/modules/shared/middleware/index.ts index f0d2d9c72..095155ccf 100644 --- a/packages/server/modules/shared/middleware/index.ts +++ b/packages/server/modules/shared/middleware/index.ts @@ -5,7 +5,15 @@ import { AuthParams, authHasFailed } from '@/modules/shared/authz' -import { Request, Response, NextFunction, Handler } from 'express' +import { + Request, + Response, + NextFunction, + Handler, + RequestHandler, + raw as expressRawBodyParser, + json as expressJsonBodyParser +} from 'express' import { ForbiddenError, NotFoundError, @@ -41,6 +49,8 @@ import { import { db } from '@/db/knex' import { getTokenAppInfoFactory } from '@/modules/auth/repositories/apps' import { getUserRoleFactory } from '@/modules/core/repositories/users' +import { UserInputError } from '@/modules/core/errors/userinput' +import compression from 'compression' export const authMiddlewareCreator = (steps: AuthPipelineFunction[]) => { const pipeline = authPipelineCreator(steps) @@ -269,3 +279,66 @@ export async function determineClientIpAddressMiddleware( } next() } + +//TODO ideally these should be identified alongside the route handlers +const RAW_BODY_PATH_PREFIXES = ['/api/v1/billing/webhooks', '/api/thirdparty/gendo/'] + +export const requestBodyParsingMiddlewareFactory = + (deps: { maximumRequestBodySizeMb: number }) => + async (req: Request, res: Response, next: NextFunction) => { + const maxRequestBodySize = `${deps.maximumRequestBodySizeMb}mb` + + const nextWithWrappedError = (err: unknown) => { + if (!err) { + next() + return + } + + next( + new UserInputError('Invalid request body', { + cause: ensureError(err, 'Unknown error parsing request body') + }) + ) + return + } + + try { + if (RAW_BODY_PATH_PREFIXES.some((p) => req.path.startsWith(p))) { + expressRawBodyParser({ type: 'application/json', limit: maxRequestBodySize })( + req, + res, + nextWithWrappedError + ) + + // expressRawBodyParser calls `next` internally, so we cannot call it again here + return + } + + //default + expressJsonBodyParser({ limit: maxRequestBodySize })( + req, + res, + nextWithWrappedError + ) + + // expressJsonBodyParser calls `next` internally, so we cannot call it again here + return + } catch (err) { + // something blew up, so let's wrap it and pass it to the error handler + const e = new UserInputError( + 'Error unexpectedly encountered when parsing the request body', + { + info: { cause: ensureError(err, 'Unknown error parsing request body') } + } + ) + next(e) + return + } + } + +export function compressionMiddlewareFactory(deps: { + isCompressionEnabled: boolean +}): RequestHandler { + if (deps.isCompressionEnabled) return compression() + return (_req, _res, next) => next() +} diff --git a/packages/server/modules/shared/services/auth.ts b/packages/server/modules/shared/services/auth.ts index ecede6af1..df3786b1f 100644 --- a/packages/server/modules/shared/services/auth.ts +++ b/packages/server/modules/shared/services/auth.ts @@ -16,6 +16,7 @@ import { adminOverrideEnabled } from '@/modules/shared/helpers/envHelper' import { EventBusEmit } from '@/modules/shared/services/eventBus' import { WorkspaceEvents } from '@/modules/workspacesCore/domain/events' import { isNullOrUndefined, Roles } from '@speckle/shared' +import { OperationTypeNode } from 'graphql' /** * Validates the scope against a list of scopes of the current session. @@ -42,7 +43,7 @@ export const authorizeResolverFactory = getUserAclRole: GetUserAclRole emitWorkspaceEvent: EventBusEmit }): AuthorizeResolver => - async (userId, resourceId, requiredRole, userResourceAccessLimits) => { + async (userId, resourceId, requiredRole, userResourceAccessLimits, operationType) => { userId = userId || null const roles = await deps.getRoles() @@ -63,7 +64,11 @@ export const authorizeResolverFactory = throw new ForbiddenError('You are not authorized to access this resource.') } - if (deps.adminOverrideEnabled() && userId) { + if ( + deps.adminOverrideEnabled() && + userId && + (!operationType || operationType === OperationTypeNode.QUERY) + ) { const serverRole = await deps.getUserServerRole({ userId }) if (serverRole === Roles.Server.Admin) return } diff --git a/packages/server/modules/shared/utils/mixpanel.ts b/packages/server/modules/shared/utils/mixpanel.ts index c231afef1..4b722ea20 100644 --- a/packages/server/modules/shared/utils/mixpanel.ts +++ b/packages/server/modules/shared/utils/mixpanel.ts @@ -13,7 +13,7 @@ import { mixpanelLogger } from '@/logging/logging' let client: Optional = undefined let baseTrackingProperties: Optional> = undefined -function getBaseTrackingProperties() { +export function getBaseTrackingProperties() { if (baseTrackingProperties) return baseTrackingProperties baseTrackingProperties = MixpanelUtils.buildBasePropertiesPayload({ hostApp: 'serverside', diff --git a/packages/server/modules/shared/utils/subscriptions.ts b/packages/server/modules/shared/utils/subscriptions.ts index 2bbb825c6..5f2feea68 100644 --- a/packages/server/modules/shared/utils/subscriptions.ts +++ b/packages/server/modules/shared/utils/subscriptions.ts @@ -56,7 +56,7 @@ import { SubscriptionWorkspaceUpdatedArgs, WorkspaceUpdatedMessage } from '@/modules/core/graph/generated/graphql' -import { Merge } from 'type-fest' +import { Merge, OverrideProperties } from 'type-fest' import { ModelGraphQLReturn, ProjectGraphQLReturn, @@ -276,8 +276,10 @@ type SubscriptionTypeMap = { } [CommentSubscriptions.CommentThreadActivity]: { payload: { - commentThreadActivity: Partial & - Pick + commentThreadActivity: OverrideProperties< + CommentThreadActivityMessage, + { reply?: CommentRecord } + > streamId: string commentId: string } @@ -299,7 +301,7 @@ type SubscriptionTypeMap = { comment: CommentRecord } streamId: string - resourceIds: string[] + resourceIds: string } variables: SubscriptionCommentActivityArgs } diff --git a/packages/server/modules/stats/tests/stats.spec.ts b/packages/server/modules/stats/tests/stats.spec.ts index 42d2000f7..dce68352c 100644 --- a/packages/server/modules/stats/tests/stats.spec.ts +++ b/packages/server/modules/stats/tests/stats.spec.ts @@ -48,9 +48,6 @@ import { import { collectAndValidateCoreTargetsFactory } from '@/modules/serverinvites/services/coreResourceCollection' import { buildCoreInviteEmailContentsFactory } from '@/modules/serverinvites/services/coreEmailContents' import { getEventBus } from '@/modules/shared/services/eventBus' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { publish } from '@/modules/shared/utils/subscriptions' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { countAdminUsersFactory, getUserFactory, @@ -92,11 +89,7 @@ const createCommitByBranchId = createCommitByBranchIdFactory({ insertBranchCommits: insertBranchCommitsFactory({ db }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/modules/workspaces/domain/constants.ts b/packages/server/modules/workspaces/domain/constants.ts deleted file mode 100644 index 987f2685d..000000000 --- a/packages/server/modules/workspaces/domain/constants.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' - -export const WorkspaceEarlyAdopterDiscount = { - name: '50% Early Adopter Discount', - amount: 0.5 -} diff --git a/packages/server/modules/workspaces/domain/operations.ts b/packages/server/modules/workspaces/domain/operations.ts index c31f877f6..66103297a 100644 --- a/packages/server/modules/workspaces/domain/operations.ts +++ b/packages/server/modules/workspaces/domain/operations.ts @@ -68,7 +68,7 @@ export type GetWorkspaceBySlugOrId = (args: { }) => Promise export type GetWorkspaces = (args: { - workspaceIds: string[] + workspaceIds?: string[] userId?: string }) => Promise diff --git a/packages/server/modules/workspaces/domain/sso/logic.ts b/packages/server/modules/workspaces/domain/sso/logic.ts index 09700b911..6e8b542d4 100644 --- a/packages/server/modules/workspaces/domain/sso/logic.ts +++ b/packages/server/modules/workspaces/domain/sso/logic.ts @@ -1,4 +1,9 @@ -import { UserSsoSessionRecord } from '@/modules/workspaces/domain/sso/types' +import { + OidcProfile, + SpeckleOidcProfile, + UserSsoSessionRecord +} from '@/modules/workspaces/domain/sso/types' +import { UnknownObject, UserinfoResponse } from 'openid-client' /** * Get the default expiration time for an SSO session based on the current time. @@ -13,3 +18,22 @@ export const getDefaultSsoSessionExpirationDate = (): Date => { export const isValidSsoSession = (session: UserSsoSessionRecord): boolean => { return session.validUntil.getTime() > new Date().getTime() } + +export const isValidOidcProfile = ( + profile: UserinfoResponse +): profile is OidcProfile => { + return !!profile.email || !!profile.upn +} + +const isSpeckleOidcProfile = ( + profile: OidcProfile +): profile is OidcProfile => { + return Object.hasOwn(profile, 'email') +} + +/** + * Special handling required in case we encounter Entra ID with a particular configuration. + */ +export const getEmailFromOidcProfile = (profile: OidcProfile): string => { + return isSpeckleOidcProfile(profile) ? profile.email : profile.upn +} diff --git a/packages/server/modules/workspaces/domain/sso/types.ts b/packages/server/modules/workspaces/domain/sso/types.ts index 08687d61d..6b4c81f5b 100644 --- a/packages/server/modules/workspaces/domain/sso/types.ts +++ b/packages/server/modules/workspaces/domain/sso/types.ts @@ -53,3 +53,23 @@ export type OidcProviderAttributes = { export type SsoSessionState = { isValidationFlow: boolean } + +export type OidcProfile< + OidcProviderProperties = SpeckleOidcProfile | MicrosoftEntraIdProfile +> = { + sub: string +} & OidcProviderProperties + +/** + * OIDC profile properties required by Speckle SSO logic. + */ +export type SpeckleOidcProfile = { + email: string +} + +/** + * Because of course. + */ +export type MicrosoftEntraIdProfile = { + upn: string +} diff --git a/packages/server/modules/workspaces/domain/types.ts b/packages/server/modules/workspaces/domain/types.ts index d2311646b..4889904e3 100644 --- a/packages/server/modules/workspaces/domain/types.ts +++ b/packages/server/modules/workspaces/domain/types.ts @@ -1,6 +1,6 @@ export { WorkspaceInviteResourceTarget } from '@/modules/workspacesCore/domain/types' import { LimitedUserRecord, UserWithRole } from '@/modules/core/helpers/types' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' import { StreamRoles, WorkspaceRoles } from '@speckle/shared' declare module '@/modules/serverinvites/domain/types' { diff --git a/packages/server/modules/workspaces/events/eventListener.ts b/packages/server/modules/workspaces/events/eventListener.ts index 0154542c2..5d774b06a 100644 --- a/packages/server/modules/workspaces/events/eventListener.ts +++ b/packages/server/modules/workspaces/events/eventListener.ts @@ -5,6 +5,8 @@ import { upsertProjectRoleFactory } from '@/modules/core/repositories/streams' import { + CountWorkspaceRoleWithOptionalProjectRole, + GetDefaultRegion, GetWorkspace, GetWorkspaceRoleForUser, GetWorkspaceRoles, @@ -22,8 +24,8 @@ import { import { logger, moduleLogger } from '@/logging/logging' import { updateWorkspaceRoleFactory } from '@/modules/workspaces/services/management' import { EventPayload, getEventBus } from '@/modules/shared/services/eventBus' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' -import { Roles, WorkspaceRoles } from '@speckle/shared' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' +import { Roles, throwUncoveredError, WorkspaceRoles } from '@speckle/shared' import { DeleteProjectRole, UpsertProjectRole @@ -31,6 +33,7 @@ import { import { WorkspaceEvents } from '@/modules/workspacesCore/domain/events' import { Knex } from 'knex' import { + countWorkspaceRoleWithOptionalProjectRoleFactory, getWorkspaceFactory, getWorkspaceRoleForUserFactory, getWorkspaceRolesFactory, @@ -42,7 +45,10 @@ import { getWorkspaceRoleToDefaultProjectRoleMappingFactory } from '@/modules/workspaces/services/projects' import { withTransaction } from '@/modules/shared/helpers/dbHelper' -import { findVerifiedEmailsByUserIdFactory } from '@/modules/core/repositories/userEmails' +import { + findEmailsByUserIdFactory, + findVerifiedEmailsByUserIdFactory +} from '@/modules/core/repositories/userEmails' import { GetStream } from '@/modules/core/domain/streams/operations' import { GetUserSsoSession, @@ -61,6 +67,20 @@ import { ProjectEvents, ProjectEventsPayloads } from '@/modules/core/domain/projects/events' +import { getBaseTrackingProperties, getClient } from '@/modules/shared/utils/mixpanel' +import { + calculateSubscriptionSeats, + GetWorkspacePlan, + GetWorkspaceSubscription +} from '@/modules/gatekeeper/domain/billing' +import { getWorkspacePlanProductId } from '@/modules/gatekeeper/stripe' +import { Workspace } from '@/modules/workspacesCore/domain/types' +import { FindEmailsByUserId } from '@/modules/core/domain/userEmails/operations' +import { getDefaultRegionFactory } from '@/modules/workspaces/repositories/regions' +import { + getWorkspacePlanFactory, + getWorkspaceSubscriptionFactory +} from '@/modules/gatekeeper/repositories/billing' export const onProjectCreatedFactory = ({ @@ -258,6 +278,134 @@ export const onWorkspaceRoleUpdatedFactory = } } +export const workspaceTrackingFactory = + ({ + getWorkspace, + countWorkspaceRole, + getDefaultRegion, + getWorkspacePlan, + getWorkspaceSubscription, + getUserEmails + }: { + getWorkspace: GetWorkspace + countWorkspaceRole: CountWorkspaceRoleWithOptionalProjectRole + getDefaultRegion: GetDefaultRegion + getWorkspacePlan: GetWorkspacePlan + getWorkspaceSubscription: GetWorkspaceSubscription + getUserEmails: FindEmailsByUserId + }) => + async (params: EventPayload<'workspace.*'> | EventPayload<'gatekeeper.*'>) => { + const { eventName, payload } = params + const mixpanel = getClient() + if (!mixpanel) return + const calculateProperties = async (workspace: Workspace) => { + const workspaceId = workspace.id + const [adminCount, memberCount, guestCount, defaultRegion, plan, subscription] = + await Promise.all([ + countWorkspaceRole({ workspaceId, workspaceRole: Roles.Workspace.Admin }), + countWorkspaceRole({ workspaceId, workspaceRole: Roles.Workspace.Member }), + countWorkspaceRole({ workspaceId, workspaceRole: Roles.Workspace.Guest }), + getDefaultRegion({ workspaceId }), + getWorkspacePlan({ workspaceId }), + getWorkspaceSubscription({ workspaceId }) + ]) + const seats = subscription?.subscriptionData + ? calculateSubscriptionSeats({ + subscriptionData: subscription?.subscriptionData, + guestSeatProductId: getWorkspacePlanProductId({ workspacePlan: 'guest' }) + }) + : { plan: 0, guest: 0 } + return { + name: workspace.name, + description: workspace.description, + domainBasedMembershipProtectionEnabled: + workspace.domainBasedMembershipProtectionEnabled, + discoverabilityEnabled: workspace.discoverabilityEnabled, + defaultRegionKey: defaultRegion?.key, + teamTotalCount: adminCount + memberCount + guestCount, + teamAdminCount: adminCount, + teamMemberCount: memberCount, + teamGuestCount: guestCount, + planName: plan?.name || '', + planStatus: plan?.status || '', + planCreatedAt: plan?.createdAt, + subscriptionBillingInterval: subscription?.billingInterval, + subscriptionCurrentBillingCycleEnd: subscription?.currentBillingCycleEnd, + seats: seats.plan, + seatsGuest: seats.guest, + ...getBaseTrackingProperties() + } + } + const checkForSpeckleMembers = async ({ + userId + }: { + userId: string + }): Promise<{ hasSpeckleMembers: boolean }> => { + const userEmails = await getUserEmails({ userId }) + return { + hasSpeckleMembers: userEmails.some((e) => e.email.endsWith('@speckle.systems')) + } + } + switch (eventName) { + case 'gatekeeper.workspace-plan-updated': + const updatedPlanWorkspace = await getWorkspace({ + workspaceId: payload.workspacePlan.workspaceId + }) + if (!updatedPlanWorkspace) break + mixpanel.groups.set( + 'workspace_id', + payload.workspacePlan.workspaceId, + await calculateProperties(updatedPlanWorkspace) + ) + break + case 'gatekeeper.workspace-trial-expired': + break + case 'workspace.authorized': + break + case 'workspace.created': + payload.createdByUserId + + // we're setting workspace props and attributing to speckle users + mixpanel.groups.set('workspace_id', payload.workspace.id, { + ...(await calculateProperties(payload.workspace)), + ...(await checkForSpeckleMembers({ userId: payload.createdByUserId })) + }) + break + case 'workspace.updated': + // just updating workspace props + mixpanel.groups.set( + 'workspace_id', + payload.workspace.id, + await calculateProperties(payload.workspace) + ) + break + case 'workspace.deleted': + // just marking workspace deleted + mixpanel.groups.set('workspace_id', payload.workspaceId, { + isDeleted: true, + ...getBaseTrackingProperties() + }) + break + case 'workspace.role-deleted': + case 'workspace.role-updated': + const speckleMembers = await checkForSpeckleMembers({ userId: payload.userId }) + const workspace = await getWorkspace({ workspaceId: payload.workspaceId }) + if (!workspace) break + mixpanel.groups.set('workspace_id', payload.workspaceId, { + ...(await calculateProperties(workspace)), + // only marking has speckle members to true + // calculating this for speckle member removal would require getting all users + // that is too costly in here imho + ...(speckleMembers.hasSpeckleMembers ? speckleMembers : {}) + }) + break + case 'workspace.joined-from-discovery': + break + default: + throwUncoveredError(eventName) + } + } + const emitWorkspaceGraphqlSubscriptionsFactory = (deps: { getWorkspace: GetWorkspace }) => async (params: EventPayload<'**'>) => { const { eventName, payload } = params @@ -342,6 +490,26 @@ export const initializeEventListenersFactory = }) await onInviteFinalized(payload) }), + eventBus.listen('workspace.*', async (payload) => { + await workspaceTrackingFactory({ + countWorkspaceRole: countWorkspaceRoleWithOptionalProjectRoleFactory({ db }), + getDefaultRegion: getDefaultRegionFactory({ db }), + getUserEmails: findEmailsByUserIdFactory({ db }), + getWorkspace: getWorkspaceFactory({ db }), + getWorkspacePlan: getWorkspacePlanFactory({ db }), + getWorkspaceSubscription: getWorkspaceSubscriptionFactory({ db }) + })(payload) + }), + eventBus.listen('gatekeeper.*', async (payload) => { + await workspaceTrackingFactory({ + countWorkspaceRole: countWorkspaceRoleWithOptionalProjectRoleFactory({ db }), + getDefaultRegion: getDefaultRegionFactory({ db }), + getUserEmails: findEmailsByUserIdFactory({ db }), + getWorkspace: getWorkspaceFactory({ db }), + getWorkspacePlan: getWorkspacePlanFactory({ db }), + getWorkspaceSubscription: getWorkspaceSubscriptionFactory({ db }) + })(payload) + }), eventBus.listen(WorkspaceEvents.Authorized, async ({ payload }) => { const onWorkspaceAuthorized = onWorkspaceAuthorizedFactory({ getWorkspace, diff --git a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts index 9f6b5a95f..593746ff8 100644 --- a/packages/server/modules/workspaces/graph/resolvers/workspaces.ts +++ b/packages/server/modules/workspaces/graph/resolvers/workspaces.ts @@ -1,9 +1,5 @@ import { db } from '@/db/knex' -import { - Resolvers, - WorkspacePlans, - WorkspacePlanStatuses -} from '@/modules/core/graph/generated/graphql' +import { Resolvers } from '@/modules/core/graph/generated/graphql' import { removePrivateFields } from '@/modules/core/helpers/userHelper' import { getProjectCollaboratorsFactory, @@ -47,7 +43,7 @@ import { getInvitationTargetUsersFactory } from '@/modules/serverinvites/service import { authorizeResolver } from '@/modules/shared' import { getFeatureFlags, getServerOrigin } from '@/modules/shared/helpers/envHelper' import { getEventBus } from '@/modules/shared/services/eventBus' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' import { WorkspaceInvalidRoleError, WorkspaceJoinNotAllowedError, @@ -147,7 +143,6 @@ import { validateStreamAccessFactory } from '@/modules/core/services/streams/access' import { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory } from '@/modules/activitystream/services/streamActivity' @@ -194,13 +189,10 @@ import { getGenericRedis } from '@/modules/shared/redis/redis' import { convertFunctionToGraphQLReturn } from '@/modules/automate/services/functionManagement' import { getWorkspacePlanFactory, - upsertPaidWorkspacePlanFactory, - upsertTrialWorkspacePlanFactory, - upsertUnpaidWorkspacePlanFactory + upsertWorkspacePlanFactory } from '@/modules/gatekeeper/repositories/billing' import { Knex } from 'knex' import { getPaginatedItemsFactory } from '@/modules/shared/services/paginatedItems' -import { InvalidWorkspacePlanStatus } from '@/modules/gatekeeper/errors/billing' import { BadRequestError } from '@/modules/shared/errors' import { dismissWorkspaceJoinRequestFactory, @@ -212,6 +204,8 @@ import { } from '@/modules/workspaces/repositories/workspaceJoinRequests' import { sendWorkspaceJoinRequestReceivedEmailFactory } from '@/modules/workspaces/services/workspaceJoinRequestEmails/received' import { getProjectFactory } from '@/modules/core/repositories/projects' +import { OperationTypeNode } from 'graphql' +import { updateWorkspacePlanFactory } from '@/modules/gatekeeper/services/workspacePlans' const eventBus = getEventBus() const getServerInfo = getServerInfoFactory({ db }) @@ -289,10 +283,7 @@ const updateStreamRoleAndNotify = updateStreamRoleAndNotifyFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish @@ -439,73 +430,13 @@ export = FF_WORKSPACES_MODULE_ENABLED AdminMutations: { updateWorkspacePlan: async (_parent, { input }) => { const { workspaceId, plan: name, status } = input - const workspace = await getWorkspaceFactory({ db })({ - workspaceId - }) - const createdAt = new Date() - if (!workspace) throw new WorkspaceNotFoundError() - switch (name) { - case WorkspacePlans.Starter: - switch (status) { - case WorkspacePlanStatuses.Trial: - case WorkspacePlanStatuses.Expired: - await upsertTrialWorkspacePlanFactory({ db })({ - workspacePlan: { workspaceId, status, name, createdAt } - }) - return true - case WorkspacePlanStatuses.Valid: - case WorkspacePlanStatuses.CancelationScheduled: - case WorkspacePlanStatuses.Canceled: - case WorkspacePlanStatuses.PaymentFailed: - await upsertPaidWorkspacePlanFactory({ db })({ - workspacePlan: { workspaceId, status, name, createdAt } - }) - return true - default: - throwUncoveredError(status) - } - case WorkspacePlans.Business: - case WorkspacePlans.Plus: - switch (status) { - case WorkspacePlanStatuses.Trial: - case WorkspacePlanStatuses.Expired: - throw new InvalidWorkspacePlanStatus() - case WorkspacePlanStatuses.Valid: - case WorkspacePlanStatuses.CancelationScheduled: - case WorkspacePlanStatuses.Canceled: - case WorkspacePlanStatuses.PaymentFailed: - await upsertPaidWorkspacePlanFactory({ db })({ - workspacePlan: { workspaceId, status, name, createdAt } - }) - return true - default: - throwUncoveredError(status) - } - case WorkspacePlans.Academia: - case WorkspacePlans.Unlimited: - case WorkspacePlans.StarterInvoiced: - case WorkspacePlans.PlusInvoiced: - case WorkspacePlans.BusinessInvoiced: - switch (status) { - case WorkspacePlanStatuses.Valid: - await upsertUnpaidWorkspacePlanFactory({ db })({ - workspacePlan: { workspaceId, status, name, createdAt } - }) - - return true - case WorkspacePlanStatuses.CancelationScheduled: - case WorkspacePlanStatuses.Canceled: - case WorkspacePlanStatuses.Expired: - case WorkspacePlanStatuses.PaymentFailed: - case WorkspacePlanStatuses.Trial: - throw new InvalidWorkspacePlanStatus() - default: - throwUncoveredError(status) - } - default: - throwUncoveredError(name) - } + await updateWorkspacePlanFactory({ + getWorkspace: getWorkspaceFactory({ db }), + upsertWorkspacePlan: upsertWorkspacePlanFactory({ db }), + emitEvent: getEventBus().emit + })({ workspaceId, name, status }) + return true } }, WorkspaceMutations: { @@ -584,7 +515,8 @@ export = FF_WORKSPACES_MODULE_ENABLED queryAllWorkspaceProjects: queryAllWorkspaceProjectsFactory({ getStreams: legacyGetStreamsFactory({ db }) }), - deleteSsoProvider: deleteSsoProviderFactory({ db }) + deleteSsoProvider: deleteSsoProviderFactory({ db }), + emitWorkspaceEvent: getEventBus().emit }) // this should be turned into a get all regions and map over the regions... @@ -1005,7 +937,8 @@ export = FF_WORKSPACES_MODULE_ENABLED context.userId!, args.input.workspaceId, Roles.Workspace.Member, - context.resourceAccessRules + context.resourceAccessRules, + OperationTypeNode.MUTATION ) const createWorkspaceProject = createWorkspaceProjectFactory({ @@ -1040,13 +973,15 @@ export = FF_WORKSPACES_MODULE_ENABLED context.userId, projectId, Roles.Stream.Owner, - context.resourceAccessRules + context.resourceAccessRules, + OperationTypeNode.MUTATION ) await authorizeResolver( context.userId, workspaceId, Roles.Workspace.Admin, - context.resourceAccessRules + context.resourceAccessRules, + OperationTypeNode.MUTATION ) const moveProjectToWorkspace = commandFactory({ diff --git a/packages/server/modules/workspaces/helpers/sso.ts b/packages/server/modules/workspaces/helpers/sso.ts index 50d4b490c..ac21b89b0 100644 --- a/packages/server/modules/workspaces/helpers/sso.ts +++ b/packages/server/modules/workspaces/helpers/sso.ts @@ -57,7 +57,10 @@ export const buildValidationErrorRedirectUrl = ( error: string, oidcProvider?: OidcProvider ) => { - const url = new URL(`/workspaces/${workspaceSlug}`, getFrontendOrigin()) + const url = new URL( + `/settings/workspaces/${workspaceSlug}/security`, + getFrontendOrigin() + ) url.searchParams.set('ssoValidationSuccess', 'false') url.searchParams.set('ssoError', error) diff --git a/packages/server/modules/workspaces/repositories/projectRegions.ts b/packages/server/modules/workspaces/repositories/projectRegions.ts index 154e0724a..75413ead9 100644 --- a/packages/server/modules/workspaces/repositories/projectRegions.ts +++ b/packages/server/modules/workspaces/repositories/projectRegions.ts @@ -114,7 +114,7 @@ export const copyWorkspaceFactory = .workspaces(deps.targetDb) .insert(workspace) .onConflict(Workspaces.withoutTablePrefix.col.id) - .merge(Workspaces.withoutTablePrefix.cols as (keyof Workspace)[]) + .ignore() return workspaceId } diff --git a/packages/server/modules/workspaces/repositories/workspaces.ts b/packages/server/modules/workspaces/repositories/workspaces.ts index fdd6ff9e8..fb93fecf7 100644 --- a/packages/server/modules/workspaces/repositories/workspaces.ts +++ b/packages/server/modules/workspaces/repositories/workspaces.ts @@ -54,7 +54,7 @@ import { filterByResource, InvitesRetrievalValidityFilter } from '@/modules/serverinvites/repositories/serverInvites' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' import { clamp } from 'lodash' import { WorkspaceCreationState, @@ -136,17 +136,10 @@ const workspaceWithRoleBaseQuery = ({ export const getWorkspacesFactory = ({ db }: { db: Knex }): GetWorkspaces => - async (params: { - workspaceIds: string[] - /** - * Optionally - for each workspace, return the user's role in that workspace - */ - userId?: string - }) => { - const { workspaceIds, userId } = params - + async ({ workspaceIds, userId }) => { const q = workspaceWithRoleBaseQuery({ db, userId }) - const results = await q.whereIn(Workspaces.col.id, workspaceIds) + if (workspaceIds !== undefined) q.whereIn(Workspaces.col.id, workspaceIds) + const results = await q return results } diff --git a/packages/server/modules/workspaces/rest/sso.ts b/packages/server/modules/workspaces/rest/sso.ts index 4116d4081..fb4eda8c9 100644 --- a/packages/server/modules/workspaces/rest/sso.ts +++ b/packages/server/modules/workspaces/rest/sso.ts @@ -28,6 +28,7 @@ import { getGenericRedis } from '@/modules/shared/redis/redis' import { generators, UserinfoResponse } from 'openid-client' import { oidcProvider } from '@/modules/workspaces/domain/sso/models' import { + OidcProfile, OidcProvider, SsoSessionState, WorkspaceSsoProvider @@ -79,7 +80,11 @@ import { deleteOldAndInsertNewVerificationFactory } from '@/modules/emails/repos import { sendEmail } from '@/modules/emails/services/sending' import { renderEmail } from '@/modules/emails/services/emailRendering' import { createAuthorizationCodeFactory } from '@/modules/auth/repositories/apps' -import { getDefaultSsoSessionExpirationDate } from '@/modules/workspaces/domain/sso/logic' +import { + getDefaultSsoSessionExpirationDate, + isValidOidcProfile, + getEmailFromOidcProfile +} from '@/modules/workspaces/domain/sso/logic' import { GetWorkspaceBySlug, GetWorkspaceRoles @@ -321,7 +326,8 @@ export const getSsoRouter = (): Router => { linkUserWithSsoProvider: linkUserWithSsoProviderFactory({ findEmailsByUserId: findEmailsByUserIdFactory({ db: trx }), createUserEmail: createUserEmailFactory({ db: trx }), - updateUserEmail: updateUserEmailFactory({ db: trx }) + updateUserEmail: updateUserEmailFactory({ db: trx }), + logger: req.log }), upsertUserSsoSession: upsertUserSsoSessionFactory({ db: trx }) }) @@ -642,7 +648,7 @@ const getOidcProviderUserDataFactory = WorkspaceSsoOidcCallbackRequestQuery >, provider: OidcProvider - ): Promise> => { + ): Promise> => { if (!req.session.ssoNonce) throw new OidcStateInvalidError() const codeVerifier = await parseCodeVerifier(req) @@ -658,24 +664,29 @@ const getOidcProviderUserDataFactory = if (!oidcProviderUserData) { throw new SsoProviderProfileMissingError() } - if (!oidcProviderUserData.email) { + if (!isValidOidcProfile(oidcProviderUserData)) { + req.log.error( + { providedClaims: Object.keys(oidcProviderUserData) }, + 'Missing required properties on OIDC provider.' + ) throw new SsoProviderProfileMissingPropertiesError(['email']) } - return oidcProviderUserData as UserinfoResponse<{ email: string }> + return oidcProviderUserData as UserinfoResponse } const tryGetSpeckleUserDataFactory = ({ findEmail, getUser }: { findEmail: FindEmail; getUser: GetUser }) => async ( req: Request, - oidcProviderUserData: UserinfoResponse<{ email: string }> + oidcProviderUserData: UserinfoResponse ): Promise => { // Get currently signed-in user, if available const currentSessionUser = await getUser(req.context.userId ?? '') // Get user with email that matches OIDC provider user email, if match exists - const userEmail = await findEmail({ email: oidcProviderUserData.email }) + const providerEmail = getEmailFromOidcProfile(oidcProviderUserData) + const userEmail = await findEmail({ email: providerEmail }) if (!!userEmail && !userEmail.verified) throw new SsoUserEmailUnverifiedError() const existingSpeckleUser = await getUser(userEmail?.userId ?? '') diff --git a/packages/server/modules/workspaces/services/invites.ts b/packages/server/modules/workspaces/services/invites.ts index d6bfb9ecc..9c8624fa2 100644 --- a/packages/server/modules/workspaces/services/invites.ts +++ b/packages/server/modules/workspaces/services/invites.ts @@ -53,7 +53,7 @@ import { } from '@/modules/serverinvites/services/operations' import { authorizeResolver } from '@/modules/shared' import { getFrontendOrigin } from '@/modules/shared/helpers/envHelper' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' import { GetWorkspace, GetWorkspaceBySlug, diff --git a/packages/server/modules/workspaces/services/management.ts b/packages/server/modules/workspaces/services/management.ts index 5acb3bfbb..1aef7473e 100644 --- a/packages/server/modules/workspaces/services/management.ts +++ b/packages/server/modules/workspaces/services/management.ts @@ -57,7 +57,7 @@ import { FindVerifiedEmailsByUserId } from '@/modules/core/domain/userEmails/operations' import { DeleteAllResourceInvites } from '@/modules/serverinvites/domain/operations' -import { WorkspaceInviteResourceType } from '@/modules/workspaces/domain/constants' +import { WorkspaceInviteResourceType } from '@/modules/workspacesCore/domain/constants' import { ProjectInviteResourceType } from '@/modules/serverinvites/domain/constants' import { chunk, isEmpty, omit } from 'lodash' import { userEmailsCompliantWithWorkspaceDomains } from '@/modules/workspaces/domain/logic' @@ -291,13 +291,15 @@ export const deleteWorkspaceFactory = deleteProject, queryAllWorkspaceProjects, deleteAllResourceInvites, - deleteSsoProvider + deleteSsoProvider, + emitWorkspaceEvent }: { deleteWorkspace: DeleteWorkspace deleteProject: DeleteStreamRecord queryAllWorkspaceProjects: QueryAllWorkspaceProjects deleteAllResourceInvites: DeleteAllResourceInvites deleteSsoProvider: DeleteSsoProvider + emitWorkspaceEvent: EventBus['emit'] }) => async ({ workspaceId }: WorkspaceDeleteArgs): Promise => { // Delete workspace SSO provider, if present @@ -328,6 +330,10 @@ export const deleteWorkspaceFactory = for (const projectIdsChunk of chunk(projectIds, 25)) { await Promise.all(projectIdsChunk.map((projectId) => deleteProject(projectId))) } + await emitWorkspaceEvent({ + eventName: WorkspaceEvents.Deleted, + payload: { workspaceId } + }) } type WorkspaceRoleDeleteArgs = { diff --git a/packages/server/modules/workspaces/services/sso.ts b/packages/server/modules/workspaces/services/sso.ts index 97b82abce..3bffcb78f 100644 --- a/packages/server/modules/workspaces/services/sso.ts +++ b/packages/server/modules/workspaces/services/sso.ts @@ -10,7 +10,8 @@ import { import { OidcProvider, OidcProviderRecord, - OidcProviderAttributes + OidcProviderAttributes, + OidcProfile } from '@/modules/workspaces/domain/sso/types' import cryptoRandomString from 'crypto-random-string' import { UserinfoResponse } from 'openid-client' @@ -33,7 +34,11 @@ import { } from '@/modules/workspaces/errors/sso' import { WorkspaceInvalidRoleError } from '@/modules/workspaces/errors/workspace' import { LimitedWorkspace } from '@/modules/workspacesCore/domain/types' -import { isValidSsoSession } from '@/modules/workspaces/domain/sso/logic' +import { + getEmailFromOidcProfile, + isValidSsoSession +} from '@/modules/workspaces/domain/sso/logic' +import { Logger } from '@/logging/logging' // this probably should go a lean validation endpoint too const validateOidcProviderAttributes = ({ @@ -129,7 +134,7 @@ export const createWorkspaceUserFromSsoProfileFactory = deleteInvite: DeleteInvite }) => async (args: { - ssoProfile: UserinfoResponse<{ email: string }> + ssoProfile: UserinfoResponse workspaceId: string }): Promise> => { // Check if user has email-based invite to given workspace @@ -146,7 +151,8 @@ export const createWorkspaceUserFromSsoProfileFactory = } // Create Speckle user - const { name, email } = args.ssoProfile + const { name } = args.ssoProfile + const email = getEmailFromOidcProfile(args.ssoProfile) if (!name) { throw new SsoProviderProfileInvalidError('SSO provider user requires a name') @@ -185,42 +191,56 @@ export const linkUserWithSsoProviderFactory = ({ findEmailsByUserId, createUserEmail, - updateUserEmail + updateUserEmail, + logger }: { findEmailsByUserId: FindEmailsByUserId createUserEmail: CreateUserEmail updateUserEmail: UpdateUserEmail + logger?: Logger }) => async (args: { userId: string - ssoProfile: UserinfoResponse<{ email: string }> + ssoProfile: UserinfoResponse }): Promise => { // TODO: Chuck's soapbox - // // Assert link between req.user.id & { providerId: decryptedOidcProvider.id, email: oidcProviderUserData.email } // Create link implicitly if req.context.userId exists (user performed SSO flow while signed in) // If req.context.userId does not exist, and link does not exist, throw and require user to sign in before SSO + // + // In addition, investigate using oidcProviderUserData.sub as source of truth here. Some providers appear to allow + // `email` fields to change, or do not guarantee they will exist (Entra ID) - // Add oidcProviderUserData.email to req.user.id verified emails, if not already present + // Add SSO provider email to req.user.id verified emails, if not already present const userEmails = await findEmailsByUserId({ userId: args.userId }) - const maybeSsoEmail = userEmails.find( - (entry) => entry.email === args.ssoProfile.email + const providerEmail = getEmailFromOidcProfile(args.ssoProfile) + const maybeExistingEmail = userEmails.find( + (entry) => entry.email === providerEmail.toLowerCase() ) - if (!maybeSsoEmail) { + logger?.info( + { + userEmails: userEmails.map((entry) => entry.email), + providerEmail + }, + 'Comparing existing user emails against SSO provider email:' + ) + + if (!maybeExistingEmail) { await createUserEmail({ userEmail: { userId: args.userId, - email: args.ssoProfile.email, + email: getEmailFromOidcProfile(args.ssoProfile), verified: true } }) } - if (!!maybeSsoEmail && !maybeSsoEmail.verified) { + if (!!maybeExistingEmail && !maybeExistingEmail.verified) { await updateUserEmail({ query: { - id: maybeSsoEmail.id, + id: maybeExistingEmail.id, userId: args.userId }, update: { diff --git a/packages/server/modules/workspaces/tests/helpers/creation.ts b/packages/server/modules/workspaces/tests/helpers/creation.ts index 90062488d..b7e0ef94c 100644 --- a/packages/server/modules/workspaces/tests/helpers/creation.ts +++ b/packages/server/modules/workspaces/tests/helpers/creation.ts @@ -74,7 +74,7 @@ import { upsertRegionAssignmentFactory } from '@/modules/workspaces/repositories/regions' import { getDb } from '@/modules/multiregion/utils/dbSelector' -import { WorkspacePlan } from '@/modules/gatekeeper/domain/billing' +import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing' const { FF_WORKSPACES_MODULE_ENABLED } = getFeatureFlags() diff --git a/packages/server/modules/workspaces/tests/integration/invites.graph.spec.ts b/packages/server/modules/workspaces/tests/integration/invites.graph.spec.ts index 8b7a767bd..5c85b465e 100644 --- a/packages/server/modules/workspaces/tests/integration/invites.graph.spec.ts +++ b/packages/server/modules/workspaces/tests/integration/invites.graph.spec.ts @@ -58,16 +58,14 @@ import { validateStreamAccessFactory } from '@/modules/core/services/streams/access' import { authorizeResolver } from '@/modules/shared' -import { - addStreamInviteAcceptedActivityFactory, - addStreamPermissionsAddedActivityFactory -} from '@/modules/activitystream/services/streamActivity' +import { addStreamPermissionsAddedActivityFactory } from '@/modules/activitystream/services/streamActivity' import { publish } from '@/modules/shared/utils/subscriptions' import { getUserFactory } from '@/modules/core/repositories/users' import { TestInvitesGraphQLOperations, buildInvitesGraphqlOperations } from '@/modules/workspaces/tests/helpers/invites' +import { getEventBus } from '@/modules/shared/services/eventBus' enum InviteByTarget { Email = 'email', @@ -82,10 +80,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/server/modules/workspaces/tests/integration/projects.graph.spec.ts b/packages/server/modules/workspaces/tests/integration/projects.graph.spec.ts index 49518969d..90f76a6cb 100644 --- a/packages/server/modules/workspaces/tests/integration/projects.graph.spec.ts +++ b/packages/server/modules/workspaces/tests/integration/projects.graph.spec.ts @@ -582,6 +582,7 @@ isMultiRegionTestMode() expect(res).to.not.haveGraphQLErrors() + // TODO: Replace with gql query when possible const automation = await tables .automations(targetRegionDb) .select('*') @@ -623,6 +624,7 @@ isMultiRegionTestMode() expect(res).to.not.haveGraphQLErrors() + // TODO: Replace with gql query when possible const automationRun = await tables .automationRuns(targetRegionDb) .select('*') @@ -658,6 +660,7 @@ isMultiRegionTestMode() expect(res).to.not.haveGraphQLErrors() + // TODO: Replace with gql query when possible const comment = await tables .comments(targetRegionDb) .select('*') diff --git a/packages/server/modules/workspacesCore/domain/events.ts b/packages/server/modules/workspacesCore/domain/events.ts index 40700be33..38be7fbc0 100644 --- a/packages/server/modules/workspacesCore/domain/events.ts +++ b/packages/server/modules/workspacesCore/domain/events.ts @@ -9,6 +9,7 @@ export const WorkspaceEvents = { Authorized: `${eventPrefix}authorized`, Created: `${eventPrefix}created`, Updated: `${eventPrefix}updated`, + Deleted: `${eventPrefix}deleted`, RoleDeleted: `${eventPrefix}role-deleted`, RoleUpdated: `${eventPrefix}role-updated`, JoinedFromDiscovery: `${eventPrefix}joined-from-discovery` @@ -40,6 +41,7 @@ export type WorkspaceEventsPayloads = { [WorkspaceEvents.Authorized]: WorkspaceAuthorizedPayload [WorkspaceEvents.Created]: WorkspaceCreatedPayload [WorkspaceEvents.Updated]: WorkspaceUpdatedPayload + [WorkspaceEvents.Deleted]: { workspaceId: string } [WorkspaceEvents.RoleDeleted]: WorkspaceRoleDeletedPayload [WorkspaceEvents.RoleUpdated]: WorkspaceRoleUpdatedPayload [WorkspaceEvents.JoinedFromDiscovery]: WorkspaceJoinedFromDiscoveryPayload diff --git a/packages/server/package.json b/packages/server/package.json index 588f8e006..a01cdd8a5 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -23,6 +23,7 @@ "dev:clean": "yarn build:clean && yarn dev", "dev:server:test": "cross-env DISABLE_NOTIFICATIONS_CONSUMPTION=true NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true node ./bin/ts-www", "test": "cross-env NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true mocha", + "test:all-ff": "cross-env ENABLE_ALL_FFS=true yarn test", "test:multiregion": "cross-env RUN_TESTS_IN_MULTIREGION_MODE=true FF_WORKSPACES_MODULE_ENABLED=true FF_WORKSPACES_MULTI_REGION_ENABLED=true yarn test", "test:no-ff": "cross-env DISABLE_ALL_FFS=true yarn test", "test:coverage": "cross-env NODE_ENV=test LOG_LEVEL=silent LOG_PRETTY=true nyc --reporter lcov mocha", diff --git a/packages/server/test/speckle-helpers/branchHelper.ts b/packages/server/test/speckle-helpers/branchHelper.ts index f21f7b9be..35a673d78 100644 --- a/packages/server/test/speckle-helpers/branchHelper.ts +++ b/packages/server/test/speckle-helpers/branchHelper.ts @@ -1,13 +1,10 @@ -import { db } from '@/db/knex' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { addBranchCreatedActivityFactory } from '@/modules/activitystream/services/branchActivity' import { createBranchFactory, getStreamBranchByNameFactory } from '@/modules/core/repositories/branches' import { createBranchAndNotifyFactory } from '@/modules/core/services/branch/management' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' -import { publish } from '@/modules/shared/utils/subscriptions' +import { getEventBus } from '@/modules/shared/services/eventBus' import { BasicTestUser } from '@/test/authHelper' import { BasicTestStream } from '@/test/speckle-helpers/streamHelper' import { omit } from 'lodash' @@ -44,10 +41,7 @@ export async function createTestBranch(params: { const createBranchAndNotify = createBranchAndNotifyFactory({ getStreamBranchByName: getStreamBranchByNameFactory({ db: projectDb }), createBranch: createBranchFactory({ db: projectDb }), - addBranchCreatedActivity: addBranchCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + eventEmit: getEventBus().emit }) const id = ( diff --git a/packages/server/test/speckle-helpers/commitHelper.ts b/packages/server/test/speckle-helpers/commitHelper.ts index 5f8afcaa5..6c8b84359 100644 --- a/packages/server/test/speckle-helpers/commitHelper.ts +++ b/packages/server/test/speckle-helpers/commitHelper.ts @@ -1,6 +1,3 @@ -import { db } from '@/db/knex' -import { saveActivityFactory } from '@/modules/activitystream/repositories' -import { addCommitCreatedActivityFactory } from '@/modules/activitystream/services/commitActivity' import { getBranchByIdFactory, getStreamBranchByNameFactory, @@ -23,7 +20,6 @@ import { import { createObjectFactory } from '@/modules/core/services/objects/management' import { getProjectDbClient } from '@/modules/multiregion/utils/dbSelector' import { getEventBus } from '@/modules/shared/services/eventBus' -import { publish } from '@/modules/shared/utils/subscriptions' import { BasicTestUser } from '@/test/authHelper' import { BasicTestStream } from '@/test/speckle-helpers/streamHelper' @@ -123,11 +119,7 @@ export async function createTestCommits( insertBranchCommits: insertBranchCommitsFactory({ db: projectDb }), markCommitStreamUpdated, markCommitBranchUpdated: markCommitBranchUpdatedFactory({ db: projectDb }), - emitEvent: getEventBus().emit, - addCommitCreatedActivity: addCommitCreatedActivityFactory({ - saveActivity: saveActivityFactory({ db }), - publish - }) + emitEvent: getEventBus().emit }) const createCommitByBranchName = createCommitByBranchNameFactory({ diff --git a/packages/server/test/speckle-helpers/streamHelper.ts b/packages/server/test/speckle-helpers/streamHelper.ts index 6414e35ca..78a44ee98 100644 --- a/packages/server/test/speckle-helpers/streamHelper.ts +++ b/packages/server/test/speckle-helpers/streamHelper.ts @@ -1,7 +1,6 @@ import { db } from '@/db/knex' import { saveActivityFactory } from '@/modules/activitystream/repositories' import { - addStreamInviteAcceptedActivityFactory, addStreamPermissionsAddedActivityFactory, addStreamPermissionsRevokedActivityFactory } from '@/modules/activitystream/services/streamActivity' @@ -98,10 +97,7 @@ const addOrUpdateStreamCollaborator = addOrUpdateStreamCollaboratorFactory({ validateStreamAccess, getUser, grantStreamPermissions: grantStreamPermissionsFactory({ db }), - addStreamInviteAcceptedActivity: addStreamInviteAcceptedActivityFactory({ - saveActivity, - publish - }), + emitEvent: getEventBus().emit, addStreamPermissionsAddedActivity: addStreamPermissionsAddedActivityFactory({ saveActivity, publish diff --git a/packages/shared/src/environment/index.ts b/packages/shared/src/environment/index.ts index cbe7619f2..64d27c882 100644 --- a/packages/shared/src/environment/index.ts +++ b/packages/shared/src/environment/index.ts @@ -3,6 +3,8 @@ import { z } from 'zod' const isDisableAllFFsMode = () => ['true', '1'].includes(process.env.DISABLE_ALL_FFS || '') +const isEnableAllFFsMode = () => + ['true', '1'].includes(process.env.ENABLE_ALL_FFS || '') const parseFeatureFlags = () => { //INFO @@ -51,11 +53,6 @@ const parseFeatureFlags = () => { schema: z.boolean(), defaults: { production: false, _: false } }, - // Forces email verification for all users - FF_FORCE_EMAIL_VERIFICATION: { - schema: z.boolean(), - defaults: { production: false, _: false } - }, // Forces onboarding for all users FF_FORCE_ONBOARDING: { schema: z.boolean(), @@ -73,10 +70,10 @@ const parseFeatureFlags = () => { } }) - // Can be used to disable all feature flags for testing purposes - if (isDisableAllFFsMode()) { + // Can be used to disable/enable all feature flags for testing purposes + if (isDisableAllFFsMode() || isEnableAllFFsMode()) { for (const key of Object.keys(res)) { - ;(res as Record)[key] = false + ;(res as Record)[key] = !isDisableAllFFsMode() // disable takes precedence } } @@ -94,7 +91,6 @@ export function getFeatureFlags(): { FF_BILLING_INTEGRATION_ENABLED: boolean FF_WORKSPACES_MULTI_REGION_ENABLED: boolean FF_FILEIMPORT_IFC_DOTNET_ENABLED: boolean - FF_FORCE_EMAIL_VERIFICATION: boolean FF_FORCE_ONBOARDING: boolean FF_OBJECTS_STREAMING_FIX: boolean FF_MOVE_PROJECT_REGION_ENABLED: boolean diff --git a/packages/ui-components/src/components/form/ClipboardInput.vue b/packages/ui-components/src/components/form/ClipboardInput.vue index bab5d0e56..168b37552 100644 --- a/packages/ui-components/src/components/form/ClipboardInput.vue +++ b/packages/ui-components/src/components/form/ClipboardInput.vue @@ -16,7 +16,7 @@ name="contentInput" readonly :model-value="value" - class="relative z-10 text-sm text-foreground font-mono select-all" + class="relative z-10 text-body-2xs text-foreground font-mono select-all" />
& { + 'update:modelValue': (val: string) => void + complete: (val: string) => void + } +> + +export default { + component: FormCodeInput, + parameters: { + docs: { + description: { + component: + 'A verification code input component that handles digit-by-digit entry with auto-advance and paste support.' + } + } + }, + argTypes: { + 'update:modelValue': { + type: 'function', + action: 'v-model' + }, + complete: { + type: 'function', + action: 'complete' + }, + digitCount: { + control: { type: 'number' } + } + } +} as Meta + +export const Default: StoryType = { + render: (args, ctx) => ({ + components: { FormCodeInput }, + setup: () => ({ args }), + template: ` +
+ +
+ `, + methods: { + onModelUpdate(val: string) { + args['update:modelValue'](val) + ctx.updateArgs({ ...args, modelValue: val }) + } + } + }), + args: { + modelValue: '', + digitCount: 6, + disabled: false, + errorMessage: '', + error: false, + complete: (val: string) => console.log('Complete:', val) + } +} + +export const Disabled: StoryType = { + ...Default, + args: { + ...Default.args, + disabled: true, + modelValue: '123456' + } +} + +export const DifferentLength: StoryType = { + ...Default, + args: { + ...Default.args, + digitCount: 4 + } +} + +export const WithError: StoryType = { + ...Default, + args: { + ...Default.args, + error: true, + modelValue: '123456' + } +} diff --git a/packages/ui-components/src/components/form/CodeInput.vue b/packages/ui-components/src/components/form/CodeInput.vue new file mode 100644 index 000000000..517221745 --- /dev/null +++ b/packages/ui-components/src/components/form/CodeInput.vue @@ -0,0 +1,151 @@ + + + diff --git a/packages/ui-components/src/components/form/TextArea.vue b/packages/ui-components/src/components/form/TextArea.vue index 66fe0b7d1..088d99798 100644 --- a/packages/ui-components/src/components/form/TextArea.vue +++ b/packages/ui-components/src/components/form/TextArea.vue @@ -37,6 +37,7 @@ v-bind="$attrs" @change="$emit('change', { event: $event, value })" @input="$emit('input', { event: $event, value })" + @keydown.stop />
@@ -359,8 +360,6 @@ const iconClasses = computed((): string => { if (props.customIcon) { classParts.push('pl-8') - } else { - classParts.push('pl-2') } if (!slots['input-right']) { diff --git a/packages/ui-components/src/components/form/select/Multi.vue b/packages/ui-components/src/components/form/select/Multi.vue index 0fd02da70..e1f3ba7fc 100644 --- a/packages/ui-components/src/components/form/select/Multi.vue +++ b/packages/ui-components/src/components/form/select/Multi.vue @@ -132,7 +132,9 @@ -
+
@@ -162,7 +164,6 @@

): void diff --git a/packages/ui-components/src/components/layout/sidebar/menu/group/Group.vue b/packages/ui-components/src/components/layout/sidebar/menu/group/Group.vue index cf4c7d424..7b00aa81c 100644 --- a/packages/ui-components/src/components/layout/sidebar/menu/group/Group.vue +++ b/packages/ui-components/src/components/layout/sidebar/menu/group/Group.vue @@ -5,44 +5,39 @@ class="h-8 flex items-center justify-between select-none rounded-md" :class="[collapsible && !noHover && 'hover:bg-highlight-1']" > - -

-
- -
-
-
- {{ title }} -
- - {{ tag }} - -
-
+