diff --git a/.circleci/config.yml b/.circleci/config.yml index bfde5a1b8..1cdf8630c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,24 @@ orbs: snyk: snyk/snyk@2.0.3 codecov: codecov/codecov@5.0.3 +aliases: + - &docker-base-image + docker: + - image: cimg/base:2024.02 + + - &docker-node-image + docker: + - image: cimg/node:22.6.0 + + - &docker-node-image-w-browsers + docker: + - image: cimg/node:22.6.0-browsers + + - &yarn + run: + name: Install Dependencies + command: PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn + workflows: test-build: jobs: @@ -217,6 +235,7 @@ workflows: filters: *filters-publish requires: - get-version + - publish-approval - docker-publish-webhooks: context: *docker-hub-context @@ -380,8 +399,7 @@ workflows: jobs: get-version: - docker: &docker-base-image - - image: cimg/base:2024.02 + <<: *docker-base-image working_directory: &work-dir /tmp/ci steps: - checkout @@ -430,15 +448,7 @@ jobs: key: cache-pre-commit-<>-{{ checksum "<>" }} paths: - ~/.cache/pre-commit - - run: - name: Install Dependencies - command: yarn - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged + - *yarn - run: name: Build public packages command: yarn build:public @@ -452,7 +462,7 @@ jobs: test-server: &test-server-job docker: - - image: cimg/node:18.19.0 + - image: cimg/node:22.6.0 - image: cimg/redis:7.2.4 - image: 'speckle/speckle-postgres' environment: @@ -487,38 +497,20 @@ jobs: RATELIMITER_ENABLED: 'false' steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build public packages command: yarn build:public - - run: name: Wait for dependencies to start command: 'dockerize -wait tcp://localhost:5432 -wait tcp://localhost:6379 -timeout 1m' - - run: command: cp .env.test-example .env.test working_directory: 'packages/server' - - run: name: 'Lint' command: yarn lint:ci working_directory: 'packages/server' - - run: name: 'Run tests' # Extra formatting to get timestamps on each line in CI (for profiling purposes) @@ -532,25 +524,20 @@ jobs: yarn test:report $GREP_FLAG --color=always | while IFS= read -r line; do echo -e "$(date +%T.%3N) > $line"; done working_directory: 'packages/server' no_output_timeout: 30m - - codecov/upload: files: packages/server/coverage/lcov.info - - run: name: Introspect GQL schema for subsequent checks command: 'IGNORE_MISSING_MIRATIONS=true yarn cli graphql introspect' working_directory: 'packages/server' - - # - run: - # name: Checking for GQL schema breakages against app.speckle.systems - # command: 'yarn rover graph check Speckle-Server@app-speckle-systems --schema ./introspected-schema.graphql' - # working_directory: 'packages/server' - + - run: + name: Checking for GQL schema breakages against app.speckle.systems + command: 'yarn rover graph check Speckle-Server@app-speckle-systems --schema ./introspected-schema.graphql' + working_directory: 'packages/server' - run: name: Checking for GQL schema breakages against latest.speckle.systems command: 'yarn rover graph check Speckle-Server@latest-speckle-systems --schema ./introspected-schema.graphql' working_directory: 'packages/server' - - store_test_results: path: packages/server/reports @@ -638,74 +625,40 @@ jobs: RATELIMITER_ENABLED: 'false' test-frontend-2: - docker: &docker-node-browsers-image - - image: cimg/node:18.19.0-browsers + <<: *docker-node-image-w-browsers resource_class: xlarge steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build public packages command: yarn build:public - - run: name: Lint everything command: yarn lint:ci working_directory: 'packages/frontend-2' test-viewer: - docker: *docker-node-browsers-image + <<: *docker-node-image-w-browsers resource_class: large steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build public packages command: yarn build:public - - run: name: Lint viewer command: yarn lint:ci working_directory: 'packages/viewer' - - run: name: Run tests command: yarn test working_directory: 'packages/viewer' - - run: name: Lint viewer-sandbox command: yarn lint:ci working_directory: 'packages/viewer-sandbox' - - run: name: Build viewer-sandbox command: yarn build @@ -713,7 +666,7 @@ jobs: test-preview-service: docker: - - image: cimg/node:18.19.0 + - image: cimg/node:22.6.0-browsers - image: cimg/postgres:16.4@sha256:2e4f1a965bdd9ba77aa6a0a7b93968c07576ba2a8a7cf86d5eb7b31483db1378 environment: POSTGRES_DB: preview_service_test @@ -723,107 +676,60 @@ jobs: environment: {} steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build public packages command: yarn build:public - - run: name: Lint everything command: yarn lint:ci working_directory: 'packages/preview-service' - - run: name: Copy .env.example to .env command: | #!/usr/bin/env bash cp packages/preview-service/.env.example packages/preview-service/.env sed -i~ '/^PG_CONNECTION_STRING=/s/=.*/="postgres:\/\/preview_service_test:preview_service_test@127.0.0.1:5432\/preview_service_test"/' packages/preview-service/.env - - run: name: Run tests command: yarn test working_directory: 'packages/preview-service' test-shared: - docker: *docker-node-browsers-image + <<: *docker-node-image-w-browsers resource_class: medium+ steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Lint command: yarn lint:ci working_directory: 'packages/shared' - - run: name: Run tests - command: yarn test:single-run + command: yarn test:ci working_directory: 'packages/shared' - + - codecov/upload: + files: packages/shared/coverage/coverage-final.json - run: name: Build command: yarn build working_directory: 'packages/shared' - - run: name: Ensure ESM import works command: node ./e2e/testEsm.mjs working_directory: 'packages/shared' - - run: name: Ensure CJS require works command: node ./e2e/testCjs.cjs working_directory: 'packages/shared' test-objectsender: - docker: *docker-node-browsers-image + <<: *docker-node-image-w-browsers resource_class: large steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build public packages command: yarn build:public @@ -835,78 +741,42 @@ jobs: path: 'packages/objectsender/coverage' test-ui-components: - docker: *docker-node-browsers-image + <<: *docker-node-image-w-browsers resource_class: xlarge steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - run: name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + command: PUPPETEER_SKIP_DOWNLOAD=true yarn - run: name: Build public packages command: yarn build:public - - run: name: Lint tailwind theme command: yarn lint:ci working_directory: 'packages/tailwind-theme' - - run: name: Lint ui components command: yarn lint:ci working_directory: 'packages/ui-components' - - run: name: Lint component nuxt package command: yarn lint:ci working_directory: 'packages/ui-components-nuxt' - - - run: - name: Install Playwright - command: cd ~ && npx playwright install --with-deps - - run: name: Test via Storybook command: yarn storybook:test:ci working_directory: 'packages/ui-components' ui-components-chromatic: + <<: *docker-node-image resource_class: medium+ - docker: &docker-node-image - - image: cimg/node:18.19.0 steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged - + - *yarn - run: name: Build shared packages command: yarn build:public - - run: name: Run chromatic command: yarn chromatic @@ -918,24 +788,12 @@ jobs: # but it is not possible to scan npm/yarn package.json # because it requires node_modules # therefore this scanning has to be triggered via the cli - docker: *docker-node-image - resource_class: medium + <<: *docker-node-image + resource_class: large working_directory: *work-dir steps: - checkout - - restore_cache: - name: Restore Yarn Package cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged + - *yarn - snyk/scan: additional-arguments: --yarn-workspaces --strict-out-of-sync=false fail-on-issues: false @@ -1034,14 +892,12 @@ jobs: echo "🔐 We need 'sudo' to set permissions on postgres-data directory to 775" sudo chmod 775 "./postgres-data" fi - - run: name: Deploy Kubernetes (kind) cluster command: | nix-shell \ --run "ctlptl apply --filename ./.circleci/deployment/cluster-config.yaml" \ ./.circleci/deployment/helm-chart-shell.nix - - run: name: Deploy Kubernetes resources to cluster command: | @@ -1050,7 +906,7 @@ jobs: ./.circleci/deployment/helm-chart-shell.nix docker-build: &build-job - docker: *docker-base-image + <<: *docker-base-image resource_class: medium working_directory: *work-dir steps: @@ -1081,7 +937,7 @@ jobs: SPECKLE_SERVER_PACKAGE: frontend-2 docker-publish-frontend-2-sourcemaps: - docker: *docker-node-image + <<: *docker-node-image resource_class: xlarge working_directory: *work-dir environment: @@ -1137,7 +993,7 @@ jobs: SPECKLE_SERVER_PACKAGE: docker-compose-ingress docker-publish: &publish-job - docker: *docker-base-image + <<: *docker-base-image resource_class: medium working_directory: *work-dir steps: @@ -1201,26 +1057,15 @@ jobs: SPECKLE_SERVER_PACKAGE: docker-compose-ingress publish-npm: - docker: *docker-node-image + <<: *docker-node-image working_directory: *work-dir + resource_class: large steps: - checkout - attach_workspace: at: /tmp/ci/workspace - run: cat workspace/env-vars >> $BASH_ENV - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged + - *yarn - run: name: auth to npm as Speckle command: | @@ -1229,7 +1074,6 @@ jobs: - run: name: try login to npm command: yarn npm whoami - - run: name: build public packages command: yarn workspaces foreach -ptvW --no-private run build @@ -1237,7 +1081,6 @@ jobs: name: bump all versions # bump all versions in dependency tree order but not in parallel command: yarn workspaces foreach -tvW version $IMAGE_VERSION_TAG - - run: name: publish to npm command: 'yarn workspaces foreach -pvW --no-private npm publish --access public' @@ -1259,7 +1102,7 @@ jobs: command: ./.circleci/publish_helm_chart.sh update-helm-documentation: - docker: *docker-node-image + <<: *docker-node-image working_directory: *work-dir steps: - checkout @@ -1274,24 +1117,12 @@ jobs: command: ./.circleci/update_helm_documentation.sh publish-viewer-sandbox-cloudflare-pages: - docker: *docker-node-image + <<: *docker-node-image working_directory: *work-dir resource_class: large steps: - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-server-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-server-{{ checksum "yarn.lock" }} - paths: - - .yarn/cache - - .yarn/unplugged + - *yarn - run: name: Build public packages command: yarn build:public diff --git a/.circleci/deployment/helm-chart-shell.nix b/.circleci/deployment/helm-chart-shell.nix index 477908bdc..3ecb1a317 100644 --- a/.circleci/deployment/helm-chart-shell.nix +++ b/.circleci/deployment/helm-chart-shell.nix @@ -1,9 +1,9 @@ -{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/5b7cd5c39befee629be284970415b6eb3b0ff000.tar.gz") {} }: +{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/63dacb46bf939521bdc93981b4cbb7ecb58427a0.tar.gz") {} }: let corepack = pkgs.stdenv.mkDerivation { name = "corepack"; - buildInputs = [ pkgs.nodejs-18_x ]; + buildInputs = [ pkgs.nodejs_22 ]; phases = [ "installPhase" ]; installPhase = '' mkdir -p $out/bin @@ -15,7 +15,7 @@ in pkgs.mkShell { pkgs.docker pkgs.kind pkgs.kubectl - pkgs.nodejs-18_x + pkgs.nodejs_22 pkgs.ctlptl pkgs.crane pkgs.kubernetes-helm diff --git a/.devcontainer/docker-compose-devcontainer.yml b/.devcontainer/docker-compose-devcontainer.yml index 6562ba975..0e4a03563 100644 --- a/.devcontainer/docker-compose-devcontainer.yml +++ b/.devcontainer/docker-compose-devcontainer.yml @@ -13,10 +13,6 @@ services: source: node_modules # top-level volume target: /workspaces/speckle-server/node_modules read_only: false - - type: volume - source: dui3-node_modules - target: /workspaces/speckle-server/packages/dui3/node_modules - read_only: false - type: volume source: fileimport-service-node_modules target: /workspaces/speckle-server/packages/fileimport-service/node_modules @@ -104,10 +100,6 @@ services: source: node_modules target: /workspaces/speckle-server/node_modules read_only: false - - type: volume - source: dui3-node_modules - target: /workspaces/speckle-server/packages/dui3/node_modules - read_only: false - type: volume source: fileimport-service-node_modules target: /workspaces/speckle-server/packages/fileimport-service/node_modules @@ -176,7 +168,6 @@ volumes: # (this allows the devcontainer to be based on linux yet work on Apple Silicon etc..) # If you add a new package with a new `node_modules`, it needs to be added here node_modules: - dui3-node_modules: fileimport-service-node_modules: frontend-2-node_modules: monitor-deployment-node_modules: diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index 7b8817014..34871f9a3 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -9,9 +9,9 @@ cd "${SCRIPT_DIR}" GIT_ROOT="$(git rev-parse --show-toplevel)" echo "Setting up environment variables by copying .env files" -cp -n "${GIT_ROOT}/packages/server/.env-example" "${GIT_ROOT}/packages/server/.env" || true +cp -n "${GIT_ROOT}/packages/server/.env.example" "${GIT_ROOT}/packages/server/.env" || true cp -n "${GIT_ROOT}/packages/frontend-2/.env.example" "${GIT_ROOT}/packages/frontend-2/.env" || true echo "Installing nodejs dependencies and building shared packages" -yarn +PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn yarn build:public diff --git a/.gitguardian.yml b/.gitguardian.yml index e34613f77..1ba03afb4 100644 --- a/.gitguardian.yml +++ b/.gitguardian.yml @@ -16,7 +16,7 @@ secret: - match: be603148062b367f828a58bdd695149d24f55f7c7f2e2c0bc31abd147cd07e86 name: packages/server/modules/webhooks/tests/cleanup.spec.ts - test password - match: d1c44da2d7d52afaf219ff9789df7c04a79be80977336d7c87652db736b07538 - name: packages/server/.env-example - test password for keycloak + name: packages/server/.env.example - test password for keycloak - match: 05b116fa36d25a831d96d5b4ecd45b962ebf9345dcf81ac0950c4adb49e10183 name: packages/server/modules/serverinvites/tests/invites.spec.ts - test password - match: 22ef4aa9beab564872bb1f15ff7592894ad445a68d6b03364f890cc5c3866b5d diff --git a/.yarnrc.yml b/.yarnrc.yml index 78e561bb6..61defe11c 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -2,6 +2,8 @@ compressionLevel: mixed enableGlobalCache: false +enableMirror: false + nodeLinker: node-modules yarnPath: .yarn/releases/yarn-4.5.0.cjs diff --git a/README.md b/README.md index f64ba2cc1..b9753c875 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ We have a detailed section on [deploying a Speckle server](https://speckle.guide ## TL;DR; We're using yarn and its workspaces functionalities to manage the monorepo. -Make sure you are using [Node](https://nodejs.org/en) version 18. +Make sure you are using [Node](https://nodejs.org/en) version 22. To get started, run: 1. `corepack enable` diff --git a/codecov.yml b/codecov.yml index 9ebf3bec0..24abb6c9a 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,3 +2,38 @@ codecov: notify: notify_error: true require_ci_to_pass: false + +coverage: + status: + project: + default: + target: 90% #overall project/ repo coverage + server: + target: 70% + flags: + - server + shared: + target: 70% + flags: + - shared + patch: + default: + target: 90% #overall project/ repo coverage + server: + target: 90% + flags: + - server + shared: + target: 100% + flags: + - shared + +flags: + server: + paths: + - packages/server/coverage/lcov.info + carryforward: false + shared: + paths: + - packages/shared/coverage/coverage-final.json + carryforward: false diff --git a/package.json b/package.json index b60687e2a..cfa811979 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "name": "root", "private": true, "engines": { - "node": "^18.19.0" + "node": "^22.6.0" }, "scripts": { "build": "yarn workspaces foreach -ptvW run build", @@ -21,6 +21,7 @@ "dev:docker": "docker compose -f ./docker-compose-deps.yml", "dev:docker:up": "docker compose -f ./docker-compose-deps.yml up -d", "dev:docker:down": "docker compose -f ./docker-compose-deps.yml down", + "dev:docker:down:volumes": "docker compose -f ./docker-compose-deps.yml down --volumes", "dev:docker:restart": "yarn dev:docker:down && yarn dev:docker:up", "dev:kind:up": "ctlptl apply --filename ./.circleci/deployment/cluster-config.yaml", "dev:kind:down": "ctlptl delete -f ./.circleci/deployment/cluster-config.yaml", @@ -30,7 +31,7 @@ "dev": "yarn workspaces foreach -pivW -j unlimited run dev", "dev:no-server": "yarn workspaces foreach --exclude @speckle/server -pivW -j unlimited run dev", "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", + "gqlgen": "yarn workspaces foreach -pivW -j unlimited --include '{@speckle/server,@speckle/frontend,@speckle/frontend-2}' run gqlgen", "dev:server": "yarn workspace @speckle/server dev", "dev:frontend-2": "yarn workspace @speckle/frontend-2 dev", "dev:shared": "yarn workspace @speckle/shared dev", @@ -71,7 +72,7 @@ "@aws-sdk/client-sts/fast-xml-parser": ">=4.2.5", "@aws-sdk/client-s3/fast-xml-parser": ">=4.2.5", "@bull-board/express/express": ">=4.19.2", - "@datadog/datadog-ci/ws": "^7.5.10", + "@datadog/datadog-ci/ssh2": "^1.16.0", "@microsoft/api-extractor/semver": "^7.5.4", "@rushstack/node-core-library/semver": "^7.5.4", "@typescript-eslint/eslint-plugin": "^8.20.0", diff --git a/packages/dui3/.env.example b/packages/dui3/.env.example deleted file mode 100644 index 61997a0ae..000000000 --- a/packages/dui3/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -HOST=0.0.0.0 -PORT=8082 - -NUXT_PUBLIC_MIXPANEL_TOKEN_ID=acd87c5a50b56df91a795e999812a3a4 -NUXT_PUBLIC_MIXPANEL_API_HOST=https://analytics.speckle.systems diff --git a/packages/dui3/.gitignore b/packages/dui3/.gitignore deleted file mode 100644 index bc4319efa..000000000 --- a/packages/dui3/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -node_modules -*.log* -.nuxt -.nitro -.cache -.output -.env -dist -.DS_Store -.env \ No newline at end of file diff --git a/packages/dui3/.vscode/settings.json b/packages/dui3/.vscode/settings.json deleted file mode 100644 index 4ef7f0183..000000000 --- a/packages/dui3/.vscode/settings.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "css.validate": false, - "less.validate": false, - "scss.validate": false, - "stylelint.validate": ["css", "scss", "vue", "postcss"], - "stylelint.enable": true, - "stylelint.configFile": "${workspaceFolder}/stylelint.config.js", - "volar.completion.preferredTagNameCase": "pascal", - "javascript.suggest.autoImports": true, - "typescript.suggest.autoImports": true, - "typescript.preferences.importModuleSpecifier": "non-relative", - "javascript.preferences.importModuleSpecifier": "non-relative" -} diff --git a/packages/dui3/README.md b/packages/dui3/README.md deleted file mode 100644 index 37a9b5316..000000000 --- a/packages/dui3/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# dui3 - -DUIv3 is a Speckle interface embedded inside the desktop connectors that allows users to interact with them - sync streams, manage servers etc. It's built in Vue 3 with Nuxt 3 and only supports client side rendering. - -Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. - -## Setup - -Make sure to install the dependencies: - -```bash -# yarn -yarn install -``` - -And create an `.env` file from `.env.example`. - -## Development Server - -Start the development server on `http://localhost:3000` - -```bash -npm run dev -``` - -## Production - -Build the application for production: - -```bash -npm run build -``` - -Locally preview production build: - -```bash -npm run preview -``` - -Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. diff --git a/packages/dui3/app.vue b/packages/dui3/app.vue deleted file mode 100644 index aaadc1d36..000000000 --- a/packages/dui3/app.vue +++ /dev/null @@ -1,30 +0,0 @@ - - diff --git a/packages/dui3/assets/css/tailwind.css b/packages/dui3/assets/css/tailwind.css deleted file mode 100644 index df90400c7..000000000 --- a/packages/dui3/assets/css/tailwind.css +++ /dev/null @@ -1,25 +0,0 @@ -/* stylelint-disable selector-id-pattern */ -@import '@speckle/ui-components/style.css'; -@tailwind base; -@tailwind components; -@tailwind utilities; - -/** - * Don't pollute this - it's going to be bundled in all pages! - */ - -/** - * Making sure page is always stretched to the bottom of the screen even if there's nothing in it - */ -html, -body, -div#__nuxt, -div#__nuxt > div { - min-height: 100%; -} - -html, -body, -div#__nuxt { - height: 100%; -} diff --git a/packages/dui3/assets/images/speckle_logo_big.png b/packages/dui3/assets/images/speckle_logo_big.png deleted file mode 100644 index c2a7002af..000000000 Binary files a/packages/dui3/assets/images/speckle_logo_big.png and /dev/null differ diff --git a/packages/dui3/codegen.ts b/packages/dui3/codegen.ts deleted file mode 100644 index 1614f18a4..000000000 --- a/packages/dui3/codegen.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { CodegenConfig } from '@graphql-codegen/cli' - -const config: CodegenConfig = { - schema: 'http://127.0.0.1:3000/graphql', - documents: ['{lib,components,layouts,pages,middleware}/**/*.{vue,js,ts}'], - ignoreNoDocuments: true, // for better experience with the watcher - generates: { - './lib/common/generated/gql/': { - preset: 'client', - config: { - useTypeImports: true, - fragmentMasking: false, - dedupeFragments: true, - scalars: { - JSONObject: '{}', - DateTime: 'string' - } - }, - presetConfig: { - fragmentMasking: false, - dedupeFragments: true - }, - plugins: [] - } - } -} - -export default config diff --git a/packages/dui3/components/header/LogoBlock.vue b/packages/dui3/components/header/LogoBlock.vue deleted file mode 100644 index 3ef4b3514..000000000 --- a/packages/dui3/components/header/LogoBlock.vue +++ /dev/null @@ -1,28 +0,0 @@ - - diff --git a/packages/dui3/components/header/NavBar.vue b/packages/dui3/components/header/NavBar.vue deleted file mode 100644 index ce7230d16..000000000 --- a/packages/dui3/components/header/NavBar.vue +++ /dev/null @@ -1,20 +0,0 @@ - - diff --git a/packages/dui3/components/header/NavLink.vue b/packages/dui3/components/header/NavLink.vue deleted file mode 100644 index a2035c275..000000000 --- a/packages/dui3/components/header/NavLink.vue +++ /dev/null @@ -1,33 +0,0 @@ - - diff --git a/packages/dui3/components/header/UserAccount.vue b/packages/dui3/components/header/UserAccount.vue deleted file mode 100644 index d66d50b05..000000000 --- a/packages/dui3/components/header/UserAccount.vue +++ /dev/null @@ -1,51 +0,0 @@ - - diff --git a/packages/dui3/components/header/UserMenu.vue b/packages/dui3/components/header/UserMenu.vue deleted file mode 100644 index ac00e6d22..000000000 --- a/packages/dui3/components/header/UserMenu.vue +++ /dev/null @@ -1,105 +0,0 @@ - - diff --git a/packages/dui3/components/user/Avatar.vue b/packages/dui3/components/user/Avatar.vue deleted file mode 100644 index 9d623086e..000000000 --- a/packages/dui3/components/user/Avatar.vue +++ /dev/null @@ -1,163 +0,0 @@ - - diff --git a/packages/dui3/eslint.config.mjs b/packages/dui3/eslint.config.mjs deleted file mode 100644 index efa50520e..000000000 --- a/packages/dui3/eslint.config.mjs +++ /dev/null @@ -1,125 +0,0 @@ -import { omit } from 'lodash-es' -import { baseConfigs, globals, getESMDirname } from '../../eslint.config.mjs' -import withNuxt from './.nuxt/eslint.config.mjs' -import pluginVueA11y from 'eslint-plugin-vuejs-accessibility' - -const configs = await withNuxt([ - { - rules: { - camelcase: [ - 'error', - { - properties: 'always', - allow: ['^[\\w]+_[\\w]+Fragment$'] - } - ], - 'no-alert': 'error', - eqeqeq: ['error', 'always', { null: 'always' }], - 'no-console': 'off', - 'no-var': 'error' - } - }, - { - files: ['**/*.{ts,vue,tsx,mts,cts}'], - languageOptions: { - parserOptions: { - project: ['./tsconfig.eslint.json'], - extraFileExtensions: ['.vue'], - tsconfigRootDir: getESMDirname(import.meta.url) - } - } - }, - { - files: ['**/*.test.{ts,js}'], - languageOptions: { - globals: { - ...globals.jest - } - } - }, - { - files: ['./{components|pages|store|lib}/*.{js,ts,vue}'], - languageOptions: { - globals: { - ...globals.browser - } - } - }, - { - files: ['**/*.{ts,tsx,vue}'], - rules: { - '@typescript-eslint/no-explicit-any': ['error'], - '@typescript-eslint/no-unsafe-argument': ['error'], - '@typescript-eslint/no-unsafe-assignment': 'error', - '@typescript-eslint/no-unsafe-call': 'error', - '@typescript-eslint/no-unsafe-member-access': 'error', - '@typescript-eslint/no-unsafe-return': 'error', - '@typescript-eslint/no-for-in-array': ['error'], - '@typescript-eslint/restrict-plus-operands': ['error'], - '@typescript-eslint/await-thenable': ['warn'], - '@typescript-eslint/no-restricted-types': ['warn'], - 'require-await': 'off', - '@typescript-eslint/require-await': 'error', - 'no-undef': 'off', - - '@typescript-eslint/unified-signatures': 'off', // DX sucks in vue event definitions - '@typescript-eslint/no-dynamic-delete': 'off', // too restrictive - '@typescript-eslint/restrict-template-expressions': 'off', // too restrictive - '@typescript-eslint/no-invalid-void-type': 'off' // too restrictive - } - }, - ...pluginVueA11y.configs['flat/recommended'].map((c) => ({ - ...c, - files: [...(c.files || []), '**/*.vue'], - languageOptions: c.languageOptions - ? omit(c.languageOptions, ['parserOptions', 'parser']) // Prevent overriding parser - : undefined - })), - { - files: ['**/*.vue'], - rules: { - 'vue/component-tags-order': [ - 'error', - { order: ['docs', 'template', 'script', 'style'] } - ], - 'vue/require-default-prop': 'off', - 'vue/multi-word-component-names': 'off', - 'vue/component-name-in-template-casing': [ - 'error', - 'PascalCase', - { registeredComponentsOnly: false } - ], - 'vuejs-accessibility/label-has-for': [ - 'error', - { - required: { - some: ['nesting', 'id'] - } - } - ], - 'vue/html-self-closing': 'off' // messes with prettier - } - }, - { - files: ['**/*.d.ts'], - rules: { - 'no-var': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-restricted-types': 'off' - } - } -]).prepend([ - { - ignores: [ - '**/node_modules/**', - '**/templates/*', - './lib/common/generated/**/*', - 'storybook-static', - '.nuxt/**', - '.output/**' - ] - }, - ...baseConfigs -]) - -export default configs diff --git a/packages/dui3/layouts/default.vue b/packages/dui3/layouts/default.vue deleted file mode 100644 index 47180542b..000000000 --- a/packages/dui3/layouts/default.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/packages/dui3/lib/accounts/composables/setup.ts b/packages/dui3/lib/accounts/composables/setup.ts deleted file mode 100644 index 06da215de..000000000 --- a/packages/dui3/lib/accounts/composables/setup.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { ApolloClient, gql } from '@apollo/client/core' -import { ApolloClients } from '@vue/apollo-composable' -import type { ComputedRef, Ref } from 'vue' -import type { Account } from '~/lib/bindings/definitions/IBasicConnectorBinding' -import { resolveClientConfig } from '~/lib/core/configs/apollo' - -export type DUIAccount = { - /** account info coming from the host app */ - accountInfo: Account - /** the graphql client; a bit superflous */ - client?: ApolloClient - /** whether an intial serverinfo query succeeded. */ - isValid: boolean -} - -export type DUIAccountsState = { - accounts: Ref - validAccounts: ComputedRef - refreshAccounts: () => Promise - defaultAccount: ComputedRef - loading: Ref -} - -const AccountsInjectionKey = 'DUI_ACCOUNTS_STATE' - -/** - * Use this composable to set up the account bindings and graphql clients at the top of the app. - * TODO: Properly handle cases when user was not connected to the internet, - * and then actually got connected. - */ -export function useAccountsSetup(): DUIAccountsState { - const app = useNuxtApp() - const $baseBinding = app.$baseBinding - - const accounts = ref([]) - - const apolloClients = {} as Record> - - // Tries to connect to the accounts and sets their is valid prop to false if fails. - const testAccounts = async (accs: DUIAccount[]) => { - const accountTestQuery = gql` - query AcccountTestQuery { - serverInfo { - version - name - company - } - } - ` - for (const acc of accs) { - if (!acc.client) continue - try { - await acc.client.query({ query: accountTestQuery }) - acc.isValid = true - } catch { - // TODO: properly dispose and kill this client. It's unclear how to do it. - acc.isValid = false - // NOTE: we do not want to delete the client, as we might want to "refresh" in - // case the user was not connected to the interweb. - // acc.client.disableNetworkFetches = true - // acc.client.stop() - // delete acc.client - } - } - } - - const loading = ref(false) - - // Matches local accounts coming from the host app to app state. - const refreshAccounts = async () => { - loading.value = true - - const accs = await $baseBinding.getAccounts() - // We create a whole new list of accounts that will replace the old list. This way we ensure we drop - // out of scope old accounts that not exist anymore (TODO: test), and we don't need to do complex diffing. - const newAccs = [] as DUIAccount[] - for (const acc of accs) { - const existing = accounts.value.find((a) => a.accountInfo.id === acc.id) - if (existing) { - newAccs.push(existing as DUIAccount) - continue - } - - const client = new ApolloClient( - resolveClientConfig({ - httpEndpoint: new URL('/graphql', acc.serverInfo.url).href, - authToken: () => acc.token - }) - ) - - apolloClients[acc.id] = client - - newAccs.push({ - accountInfo: acc, - client, - isValid: true - }) - } - // We test accounts here so we try to prevent the app from querying/using invalid accounts. - await testAccounts(newAccs) - // Once we have tested the new accounts, finally set them. - accounts.value = newAccs - loading.value = false - } - - void refreshAccounts() // Promise that we do not want to await (convention with void) - - const defaultAccount = computed(() => - accounts.value.find((acc) => acc.accountInfo.isDefault) - ) - - const validAccounts = computed(() => { - return accounts.value.filter((a) => a.isValid) - }) - - const accState = { - accounts, - defaultAccount, - validAccounts, - refreshAccounts, - loading - } - - app.vueApp.provide(ApolloClients, apolloClients) - provide(AccountsInjectionKey, accState) - - return accState // as DUIAccountsState -} - -/** - * Use this composable to access the users' local accounts and their corresponding graphql client. - */ -export function useInjectedAccounts(): DUIAccountsState { - const state = inject(AccountsInjectionKey) as DUIAccountsState - return state -} diff --git a/packages/dui3/lib/bindings/definitions/IBasicConnectorBinding.ts b/packages/dui3/lib/bindings/definitions/IBasicConnectorBinding.ts deleted file mode 100644 index 296567095..000000000 --- a/packages/dui3/lib/bindings/definitions/IBasicConnectorBinding.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* eslint-disable @typescript-eslint/require-await */ - -import { BaseBridge } from '~~/lib/bridge/base' -import type { IBinding } from '~~/lib/bindings/definitions/IBinding' - -export const IBasicConnectorBindingKey = 'baseBinding' - -// Needs to be agreed between Frontend and Core -export interface IBasicConnectorBinding - extends IBinding { - getAccounts: () => Promise - getSourceApplicationName: () => Promise - getSourceApplicationVersion: () => Promise - getDocumentInfo: () => Promise -} - -export interface IBasicConnectorBindingHostEvents { - displayToastNotification: (args: ToastInfo) => void - documentChanged: () => void -} - -// An almost 1-1 mapping of what we need from the Core accounts class. -export type Account = { - id: string - isDefault: boolean - token: string - serverInfo: { - name: string - url: string - } - userInfo: { - id: string - avatar: string - email: string - name: string - commits: { totalCount: number } - streams: { totalCount: number } - } -} - -export type DocumentInfo = { - location: string - name: string - id: string -} - -// NOTE: just a reminder for now -export type ToastInfo = { - text: string - details?: string - type: 'info' | 'error' | 'warning' -} - -export class MockedBaseBinding extends BaseBridge { - public async getAccounts() { - return [] - } - - public async getSourceApplicationName() { - return 'Mocks' - } - - public async getSourceApplicationVersion() { - return Math.random().toString() - } - - public async getDocumentInfo() { - return { - name: 'Mocked File', - location: 'www', - id: Math.random().toString() - } - } - - public async showDevTools() { - console.log('Mocked bindings cannot do this') - } -} diff --git a/packages/dui3/lib/bindings/definitions/IBinding.ts b/packages/dui3/lib/bindings/definitions/IBinding.ts deleted file mode 100644 index 1351b5e48..000000000 --- a/packages/dui3/lib/bindings/definitions/IBinding.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Basic interface scaffolding two standard method. - */ -export interface IBinding { - /** - * Events sent over from the host application. - */ - on: (event: E, callback: T[E]) => void - /** - * If possible, opens up dev tools from the embedded browser window. - * Currently needed for CefSharp, as right click inspect doesn't exist. - */ - showDevTools: () => Promise - /** - * Opens an url in the OS's default browser. - */ - openUrl: (url: string) => Promise -} diff --git a/packages/dui3/lib/bindings/definitions/IConfigBinding.ts b/packages/dui3/lib/bindings/definitions/IConfigBinding.ts deleted file mode 100644 index e3874a88a..000000000 --- a/packages/dui3/lib/bindings/definitions/IConfigBinding.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { BaseBridge } from '~~/lib/bridge/base' -import type { IBinding } from '~~/lib/bindings/definitions/IBinding' - -/** - * The name under which this binding will be registered. - */ -export const IConfigBindingKey = 'configBinding' - -/** - * A test binding interface to ensure compatbility. Ideally all host environments would implement and register it. - */ -export interface IConfigBinding extends IBinding { - getConfig: () => Promise - updateConfig: (config: Config) => Promise -} - -export interface IConfigBindingEvents { - void: () => void -} - -export type Config = { - darkTheme: boolean -} - -export class MockedConfigBinding extends BaseBridge { - getConfig() { - return { - darkTheme: false - } - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - updateConfig(config: Config) { - // do nothing - } -} diff --git a/packages/dui3/lib/bindings/definitions/ITestBinding.ts b/packages/dui3/lib/bindings/definitions/ITestBinding.ts deleted file mode 100644 index 838edef6a..000000000 --- a/packages/dui3/lib/bindings/definitions/ITestBinding.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable @typescript-eslint/require-await */ - -import { BaseBridge } from '~~/lib/bridge/base' -import type { IBinding } from '~~/lib/bindings/definitions/IBinding' - -/** - * The name under which this binding will be registered. - */ -export const ITestBindingKey = 'testBinding' - -/** - * A test binding interface to ensure compatbility. Ideally all host environments would implement and register it. - */ -export interface ITestBinding extends IBinding { - sayHi: (name: string, count: number, sayHelloNotHi: boolean) => Promise - goAway: () => Promise - getComplexType: () => Promise - shouldThrow: () => Promise - triggerEvent: (eventName: string) => Promise -} - -export interface ITestBindingEvents { - emptyTestEvent: () => void - testEvent: (args: TestEventArgs) => void -} - -export type TestEventArgs = { - name: string - isOk: boolean - count: number -} - -export type ComplexType = { - id: string - count: number -} - -export class MockedTestBinding extends BaseBridge { - public async sayHi(name: string, count: number, sayHelloNotHi: boolean) { - return `Hello from mocked bindings. Args: name = ${name}, count = ${count}, sayHelloNotHi = ${sayHelloNotHi.toString()}.` - } - - public async goAway() { - return - } - - public async getComplexType() { - return { id: 'wow', count: 42 } - } - - public async shouldThrow() { - return - } - - public async triggerEvent(eventName: string) { - return eventName - } -} diff --git a/packages/dui3/lib/bridge/base.ts b/packages/dui3/lib/bridge/base.ts deleted file mode 100644 index a769589b6..000000000 --- a/packages/dui3/lib/bridge/base.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Emitter } from 'nanoevents' -import { createNanoEvents } from 'nanoevents' - -/** - * A simple (typed) event emitter base class that host applications can use to send messages (and data) to the web ui, - * e.g. via `browser.executeScriptAsync("myBindings.on('eventName', serializedData)")`. - */ -export class BaseBridge { - public emitter: Emitter - - constructor() { - this.emitter = createNanoEvents() - } - - // NOTE: these do not need to be typed extra in here, as they will be properly typed on the specific binding's interface. - on(event: string | number, callback: (...args: unknown[]) => void) { - return this.emitter.on(event, callback) - } - - // NOTE: this could be private - as it should be only used by the host application. - emit(eventName: string, payload: string) { - const parsedPayload = payload ? (JSON.parse(payload) as unknown) : null - this.emitter.emit(eventName, parsedPayload) - } -} diff --git a/packages/dui3/lib/bridge/definitions/index.ts b/packages/dui3/lib/bridge/definitions/index.ts deleted file mode 100644 index b2a789991..000000000 --- a/packages/dui3/lib/bridge/definitions/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Defines the expected contract of the host application bound object. - */ -export type IRawBridge = { - GetBindingsMethodNames: () => Promise - RunMethod: (methodName: string, args: string) => Promise - ShowDevTools: () => Promise - OpenUrl: (url: string) => Promise -} diff --git a/packages/dui3/lib/bridge/generic.ts b/packages/dui3/lib/bridge/generic.ts deleted file mode 100644 index 7b441868c..000000000 --- a/packages/dui3/lib/bridge/generic.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { BaseBridge } from '~/lib/bridge/base' -import type { IRawBridge } from '~/lib/bridge/definitions' -/** - * A generic bridge class for Webivew2 or CefSharp. - */ -export class GenericBridge extends BaseBridge { - private bridge: IRawBridge - - constructor(object: IRawBridge) { - super() - this.bridge = object - } - - public async create(): Promise { - // NOTE: GetMethods is a call to the .NET side. - let availableMethodNames = [] as string[] - - try { - availableMethodNames = await this.bridge.GetBindingsMethodNames() - } catch { - console.warn(`Failed to get method names.`) - return false - } - - // NOTE: hoisting original calls as lowerCasedMethodNames, but using the UpperCasedName for the .NET call - // This allows us to follow js convetions and keep .NET ones too (eg. bindings.sayHi('') => public string SayHi(string name) {} - for (const methodName of availableMethodNames) { - const lowercasedMethodName = lowercaseMethodName(methodName) - const hoistTarget = this as unknown as Record - hoistTarget[lowercasedMethodName] = (...args: unknown[]) => - this.runMethod(methodName, args) - } - - return true - } - - private async runMethod(methodName: string, args: unknown[]): Promise { - const preserializedArgs = args.map((a) => JSON.stringify(a)) - - // NOTE: RunMethod is a call to the .NET side. - const result = await this.bridge.RunMethod( - methodName, - JSON.stringify(preserializedArgs) - ) - - const parsed = result ? (JSON.parse(result) as Record) : null - - if (parsed && parsed['error']) { - console.error(parsed) - throw new Error( - `Failed to run ${methodName} with args ${JSON.stringify( - args - )}. The host app error is logged above.` - ) - } - - return parsed - } - - public showDevTools() { - this.bridge.ShowDevTools() - } - - public openUrl(url: string) { - this.bridge.OpenUrl(url) - } -} - -const lowercaseMethodName = (name: string) => - name.charAt(0).toLowerCase() + name.slice(1) diff --git a/packages/dui3/lib/bridge/sketchup.ts b/packages/dui3/lib/bridge/sketchup.ts deleted file mode 100644 index a8f25d32e..000000000 --- a/packages/dui3/lib/bridge/sketchup.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { uniqueId } from 'lodash-es' -import { BaseBridge } from './base' - -declare let sketchup: { - exec: (data: Record) => void - getCommands: (viewId: string) => void -} - -/** - * This class operates in different way than the others, because calls into Sketchup are one way only. - * E.g., we cannot return values from internal calls to it (e.g., const test = sketchup.rubyCall() does not work ). - * This class basically makes the sketchup bindings work in the same way as cef/webview by returning a promise - * on each method call. That promise is either resolved once sketchup sends back (via receiveResponse) a corresponding - * reply, or it's rejected after a given TIMEOUT_MS (currently 2s). - * TODO: implement the event dispatcher side as well. - */ -export class SketchupBridge extends BaseBridge { - private requests = {} as Record< - string, - { - resolve: (value: unknown) => void - reject: (reason: string | Error) => void - rejectTimerId: number - } - > - private bindingName: string - private TIMEOUT_MS = 2000 // 2s - public isInitalized: Promise - private resolveIsInitializedPromise!: (v: boolean) => unknown - private rejectIsInitializedPromise!: (message: string) => unknown - - constructor(bindingName: string) { - super() - this.bindingName = bindingName || 'default_bindings' - - this.isInitalized = new Promise((resolve, reject) => { - this.resolveIsInitializedPromise = resolve - this.rejectIsInitializedPromise = reject - setTimeout( - () => - reject( - `Failed to get command names from Sketchup; timed out after ${this.TIMEOUT_MS}ms.` - ), - this.TIMEOUT_MS - ) - }) - - // NOTE: we need to hoist the bindings in global scope BEFORE we call sketchup exec get comands below. - ;(globalThis as Record).bindings = this - } - - // NOTE: Overriden emit as we do not need to parse the data back - the Sketchup bridge already parses it for us. - emit(eventName: string, payload: string): void { - this.emitter.emit(eventName, payload as unknown as Record) - } - - public async create(): Promise { - // Initialization continues in the receiveCommandsAndInitializeBridge function, - // where we expect sketchup to return to us the command names for related bindings/views. - sketchup.getCommands(this.bindingName) - - // - try { - await this.isInitalized - return true - } catch { - return false - } - } - - /** - * Will be called by `executeScript('bindings.receiveCommandsAndInitializeBridge()')` from sketchup. This is where the hoisting happens. - * NOTE: Oguhzan, we can defintively have commandNames be a string, and not a string[] - * And do JSON.parse() here to get them out properly. - * @param commandNames - */ - private receiveCommandsAndInitializeBridge(commandNamesString: string) { - const commandNames = JSON.parse(commandNamesString) as string[] - const hoistTarget = this as unknown as Record - for (const commandName of commandNames) { - hoistTarget[commandName] = (...args: unknown[]) => - this.runMethod(commandName, args) - } - - this.resolveIsInitializedPromise(true) - } - - /** - * Will be called by `executeScript('bindings.rejectBindings()')` from sketchup. - * @param message - */ - private rejectBindings(message: string) { - this.rejectIsInitializedPromise(message) - } - - /** - * Internal calls to Sketchup. - * @param methodName - * @param args - */ - private async runMethod(methodName: string, args: unknown[]): Promise { - const requestId = uniqueId(this.bindingName) - - // TODO: more on the ruby end, but for now Oguzhan seems happy with this. - // Changes might be needed in the future. - sketchup.exec({ - name: methodName, - // eslint-disable-next-line camelcase - request_id: requestId, - // eslint-disable-next-line camelcase - binding_name: this.bindingName, - data: { args } - }) - - return new Promise((resolve, reject) => { - this.requests[requestId] = { - resolve, - reject, - rejectTimerId: window.setTimeout(() => { - reject( - `Sketchup response timed out - did not receive anything back in good time (${this.TIMEOUT_MS}ms).` - ) - delete this.requests[requestId] - }, this.TIMEOUT_MS) - } - }) - } - - private receiveResponse(requestId: string, data: object) { - if (!this.requests[requestId]) - throw new Error( - `Sketchup Bridge found no request to resolve with the id of ${requestId}. Something is weird!` - ) - const request = this.requests[requestId] - try { - // eslint-disable-next-line no-prototype-builtins - if (data && data.hasOwnProperty('error')) { - console.error(data) - throw new Error( - `Failed to run ${requestId}. The host app error is logged above.` - ) - } - - // NOTE/TODO: does not need parsing - // const parsedData = JSON.parse(data) as Record // TODO: check if data is undefined - request.resolve(data) - } catch (e) { - request.reject(e as Error) - } finally { - window.clearTimeout(request.rejectTimerId) - delete this.requests[requestId] - } - } - - public showDevTools() { - // eslint-disable-next-line no-alert - window.alert( - 'Sketchup cannot do this. The dev tools menu is accessible via a right click.' - ) - } -} diff --git a/packages/dui3/lib/common/generated/gql/gql.ts b/packages/dui3/lib/common/generated/gql/gql.ts deleted file mode 100644 index 5b13f7036..000000000 --- a/packages/dui3/lib/common/generated/gql/gql.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -import * as types from './graphql'; -import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; - -/** - * Map of all GraphQL operations in the project. - * - * This map has several performance disadvantages: - * 1. It is not tree-shakeable, so it will include all operations in the project. - * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. - * 3. It does not support dead code elimination, so it will add unused operations. - * - * Therefore it is highly recommended to use the babel or swc plugin for production. - */ -const documents = { - "\n query AcccountTestQuery {\n serverInfo {\n version\n name\n company\n }\n }\n ": types.AcccountTestQueryDocument, -}; - -/** - * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. - * - * - * @example - * ```ts - * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); - * ``` - * - * The query argument is unknown! - * Please regenerate the types. - */ -export function graphql(source: string): unknown; - -/** - * 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 AcccountTestQuery {\n serverInfo {\n version\n name\n company\n }\n }\n "): (typeof documents)["\n query AcccountTestQuery {\n serverInfo {\n version\n name\n company\n }\n }\n "]; - -export function graphql(source: string) { - return (documents as any)[source] ?? {}; -} - -export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/packages/dui3/lib/common/generated/gql/graphql.ts b/packages/dui3/lib/common/generated/gql/graphql.ts deleted file mode 100644 index 91ca5203f..000000000 --- a/packages/dui3/lib/common/generated/gql/graphql.ts +++ /dev/null @@ -1,5095 +0,0 @@ -/* eslint-disable */ -import type { 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: {}; output: {}; } -}; - -export type ActiveUserMutations = { - __typename?: 'ActiveUserMutations'; - emailMutations: UserEmailMutations; - /** Mark onboarding as complete */ - finishOnboarding: Scalars['Boolean']['output']; - meta: UserMetaMutations; - setActiveWorkspace: Scalars['Boolean']['output']; - /** Edit a user's profile */ - update: User; -}; - - -export type ActiveUserMutationsFinishOnboardingArgs = { - input?: InputMaybe; -}; - - -export type ActiveUserMutationsSetActiveWorkspaceArgs = { - isProjectsActive?: InputMaybe; - slug?: InputMaybe; -}; - - -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; -}; - -/** Additional resources to validate user access to. */ -export type AutomateAuthCodeResources = { - 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 include featured ("public") functions. Set this to false to exclude them. */ - includeFeatured?: InputMaybe; - /** By default, we exclude functions without releases. Set this to false to include them. */ - requireRelease?: 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']; - permissions: AutomationPermissionChecks; - 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 AutomationPermissionChecks = { - __typename?: 'AutomationPermissionChecks'; - canDelete: PermissionCheckResult; - canRead: PermissionCheckResult; - canUpdate: PermissionCheckResult; -}; - -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; - currency?: InputMaybe; - 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; - permissions: CommentPermissionChecks; - /** Plain-text version of the comment text, ideal for previews */ - rawText?: Maybe; - /** @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?: Maybe; - /** 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 CommentPermissionChecks = { - __typename?: 'CommentPermissionChecks'; - canArchive: PermissionCheckResult; -}; - -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 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 enum Currency { - Gbp = 'gbp', - Usd = 'usd' -} - -export type CurrencyBasedPrices = { - __typename?: 'CurrencyBasedPrices'; - gbp: WorkspacePaidPlanPrices; - usd: WorkspacePaidPlanPrices; -}; - -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 DiscoverableWorkspaceCollaborator = { - __typename?: 'DiscoverableWorkspaceCollaborator'; - avatar?: Maybe; -}; - -export type DiscoverableWorkspaceCollaboratorCollection = { - __typename?: 'DiscoverableWorkspaceCollaboratorCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['output']; -}; - -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 InvitableCollaboratorsFilter = { - search?: InputMaybe; -}; - -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 = { - workspaceSlug?: 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']; - /** Workspace members visible to people with verified email domain */ - team?: Maybe; -}; - - -/** Workspace metadata visible to non-workspace members. */ -export type LimitedWorkspaceTeamArgs = { - cursor?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - -export type LimitedWorkspaceJoinRequest = { - __typename?: 'LimitedWorkspaceJoinRequest'; - createdAt: Scalars['DateTime']['output']; - id: Scalars['String']['output']; - status: WorkspaceJoinRequestStatus; - user: LimitedUser; - workspace: LimitedWorkspace; -}; - -export type LimitedWorkspaceJoinRequestCollection = { - __typename?: 'LimitedWorkspaceJoinRequestCollection'; - cursor?: Maybe; - items: Array; - totalCount: Scalars['Int']['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; - permissions: ModelPermissionChecks; - 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 ModelPermissionChecks = { - __typename?: 'ModelPermissionChecks'; - canCreateVersion: PermissionCheckResult; - canDelete: PermissionCheckResult; - canUpdate: PermissionCheckResult; -}; - -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 type OnboardingCompletionInput = { - plans?: InputMaybe>; - role?: InputMaybe; - source?: InputMaybe; -}; - -export enum PaidWorkspacePlans { - Business = 'business', - Plus = 'plus', - Pro = 'pro', - ProUnlimited = 'proUnlimited', - Starter = 'starter', - Team = 'team', - TeamUnlimited = 'teamUnlimited' -} - -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 PermissionCheckResult = { - __typename?: 'PermissionCheckResult'; - authorized: Scalars['Boolean']['output']; - code: Scalars['String']['output']; - message: Scalars['String']['output']; - payload?: Maybe; -}; - -export type Price = { - __typename?: 'Price'; - amount: Scalars['Float']['output']; - currency: Scalars['String']['output']; - currencySymbol: Scalars['String']['output']; -}; - -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']; - invitableCollaborators: WorkspaceCollaboratorCollection; - /** 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; - /** Returns information about the potential effects of moving a project to a given workspace. */ - moveToWorkspaceDryRun: ProjectMoveToWorkspaceDryRun; - 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; - permissions: ProjectPermissionChecks; - /** 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: SimpleProjectVisibility; - 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 ProjectInvitableCollaboratorsArgs = { - cursor?: InputMaybe; - filter?: InputMaybe; - limit?: Scalars['Int']['input']; -}; - - -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 ProjectMoveToWorkspaceDryRunArgs = { - workspaceId: Scalars['String']['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; - delete: Scalars['Boolean']['output']; - /** - * 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 ProjectAutomationMutationsDeleteArgs = { - 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']; - /** The collaborator's workspace seat type for the workspace this project is in */ - seatType?: Maybe; - user: LimitedUser; - /** The collaborator's workspace role for the workspace this project is in, if any */ - workspaceRole?: Maybe; -}; - -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 ProjectMoveToWorkspaceDryRun = { - __typename?: 'ProjectMoveToWorkspaceDryRun'; - addedToWorkspace: Array; - addedToWorkspaceTotalCount: Scalars['Int']['output']; -}; - - -export type ProjectMoveToWorkspaceDryRunAddedToWorkspaceArgs = { - limit?: InputMaybe; -}; - -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 ProjectPermissionChecks = { - __typename?: 'ProjectPermissionChecks'; - canBroadcastActivity: PermissionCheckResult; - canCreateAutomation: PermissionCheckResult; - canCreateComment: PermissionCheckResult; - canCreateModel: PermissionCheckResult; - canDelete: PermissionCheckResult; - canLeave: PermissionCheckResult; - canMoveToWorkspace: PermissionCheckResult; - canRead: PermissionCheckResult; - canReadSettings: PermissionCheckResult; - canReadWebhooks: PermissionCheckResult; - canRequestRender: PermissionCheckResult; - canUpdate: PermissionCheckResult; - canUpdateAllowPublicComments: PermissionCheckResult; -}; - - -export type ProjectPermissionChecksCanMoveToWorkspaceArgs = { - workspaceId?: InputMaybe; -}; - -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; - /** - * 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; - /** 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; - resources?: InputMaybe; -}; - - -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']; -}; - -export type RootPermissionChecks = { - __typename?: 'RootPermissionChecks'; - canCreatePersonalProject: PermissionCheckResult; -}; - -/** Available scopes. */ -export type Scope = { - __typename?: 'Scope'; - description: Scalars['String']['output']; - name: Scalars['String']['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']; - /** Whether the email feature is enabled on this server */ - isEmailEnabled: Scalars['Boolean']['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'; - /** Up-to-date prices for paid & non-invoiced Workspace plans */ - planPrices?: Maybe; - /** - * 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']; -}; - -/** Visibility without the "discoverable" option */ -export enum SimpleProjectVisibility { - Private = 'PRIVATE', - Unlisted = 'UNLISTED' -} - -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'; - /** The last-visited workspace for the given user */ - activeWorkspace?: Maybe; - /** - * 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; - /** Returns `true` if last visited project was "legacy" "personal project" outside of a workspace */ - isProjectsActive?: Maybe; - meta: UserMeta; - name: Scalars['String']['output']; - notificationPreferences: Scalars['JSONObject']['output']; - permissions: RootPermissionChecks; - 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; - workspaceJoinRequests?: Maybe; - /** 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']; - sortBy?: 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 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 UserWorkspaceJoinRequestsArgs = { - 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 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 UserMeta = { - __typename?: 'UserMeta'; - legacyProjectsExplainerCollapsed: Scalars['Boolean']['output']; - newWorkspaceExplainerDismissed: Scalars['Boolean']['output']; -}; - -export type UserMetaMutations = { - __typename?: 'UserMetaMutations'; - setLegacyProjectsExplainerCollapsed: Scalars['Boolean']['output']; - setNewWorkspaceExplainerDismissed: Scalars['Boolean']['output']; -}; - - -export type UserMetaMutationsSetLegacyProjectsExplainerCollapsedArgs = { - value: Scalars['Boolean']['input']; -}; - - -export type UserMetaMutationsSetNewWorkspaceExplainerDismissedArgs = { - value: Scalars['Boolean']['input']; -}; - -export type UserProjectCollection = { - __typename?: 'UserProjectCollection'; - cursor?: Maybe; - items: Array; - numberOfHidden: Scalars['Int']['output']; - totalCount: Scalars['Int']['output']; -}; - -export type UserProjectsFilter = { - /** - * If set to true, will also include streams that the user may not have an explicit role on, - * but has implicit access to because of workspaces - */ - includeImplicitAccess?: InputMaybe; - /** Only include projects where user has the specified roles */ - onlyWithRoles?: InputMaybe>; - /** Only include personal projects (not in any workspace) */ - personalOnly?: InputMaybe; - /** Filter out projects by name */ - search?: InputMaybe; - /** Only include projects in the specified workspace */ - 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>>; - permissions: VersionPermissionChecks; - previewUrl: Scalars['String']['output']; - referencedObject?: Maybe; - 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 VersionPermissionChecks = { - __typename?: 'VersionPermissionChecks'; - canReceive: PermissionCheckResult; - canUpdate: PermissionCheckResult; -}; - -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. - * @deprecated Always the reviewer role. Will be removed in the future. - */ - 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']; - permissions: WorkspacePermissionChecks; - plan?: Maybe; - /** Shows the plan prices localized for the given workspace */ - planPrices?: 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; - /** Active user's seat type for this workspace. `null` if request is not authenticated, or the workspace is not explicitly shared with you. */ - seatType?: Maybe; - seats?: 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; - teamByRole: WorkspaceTeamByRole; - 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']; - /** Date that the user joined the workspace. */ - joinDate: Scalars['DateTime']['output']; - projectRoles: Array; - role: Scalars['String']['output']; - seatType?: Maybe; - 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; - /** Add this domain to the workspace as a verified domain and enable domain discoverability */ - enableDomainDiscoverabilityForDomain?: 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 WorkspaceJoinRequestFilter = { - status?: InputMaybe; -}; - -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; - updateSeatType: 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 type WorkspaceMutationsUpdateSeatTypeArgs = { - input: WorkspaceUpdateSeatTypeInput; -}; - -export type WorkspacePaidPlanPrices = { - __typename?: 'WorkspacePaidPlanPrices'; - pro: WorkspacePlanPrice; - proUnlimited: WorkspacePlanPrice; - team: WorkspacePlanPrice; - teamUnlimited: WorkspacePlanPrice; -}; - -export enum WorkspacePaymentMethod { - Billing = 'billing', - Invoice = 'invoice', - Unpaid = 'unpaid' -} - -export type WorkspacePermissionChecks = { - __typename?: 'WorkspacePermissionChecks'; - canCreateProject: PermissionCheckResult; - canMoveProjectToWorkspace: PermissionCheckResult; -}; - - -export type WorkspacePermissionChecksCanMoveProjectToWorkspaceArgs = { - projectId?: InputMaybe; -}; - -export type WorkspacePlan = { - __typename?: 'WorkspacePlan'; - createdAt: Scalars['DateTime']['output']; - name: WorkspacePlans; - paymentMethod: WorkspacePaymentMethod; - status: WorkspacePlanStatuses; - usage: WorkspacePlanUsage; -}; - -export type WorkspacePlanPrice = { - __typename?: 'WorkspacePlanPrice'; - monthly: Price; - yearly: Price; -}; - -export enum WorkspacePlanStatuses { - CancelationScheduled = 'cancelationScheduled', - Canceled = 'canceled', - Expired = 'expired', - PaymentFailed = 'paymentFailed', - Trial = 'trial', - Valid = 'valid' -} - -export type WorkspacePlanUsage = { - __typename?: 'WorkspacePlanUsage'; - modelCount: Scalars['Int']['output']; - projectCount: Scalars['Int']['output']; -}; - -export enum WorkspacePlans { - Academia = 'academia', - Business = 'business', - BusinessInvoiced = 'businessInvoiced', - Free = 'free', - Plus = 'plus', - PlusInvoiced = 'plusInvoiced', - Pro = 'pro', - ProUnlimited = 'proUnlimited', - ProUnlimitedInvoiced = 'proUnlimitedInvoiced', - Starter = 'starter', - StarterInvoiced = 'starterInvoiced', - Team = 'team', - TeamUnlimited = 'teamUnlimited', - TeamUnlimitedInvoiced = 'teamUnlimitedInvoiced', - 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; - /** - * Schedule a job that will: - * - Move all regional data to target region - * - Update project region key - * - TODO: Eventually delete data in previous region - */ - moveToRegion: Scalars['String']['output']; - moveToWorkspace: Project; - updateRole: Project; -}; - - -export type WorkspaceProjectMutationsCreateArgs = { - input: WorkspaceProjectCreateInput; -}; - - -export type WorkspaceProjectMutationsMoveToRegionArgs = { - projectId: Scalars['String']['input']; - regionKey: Scalars['String']['input']; -}; - - -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; - /** Only return workspace projects that the active user has an explicit project role in */ - withProjectRoleOnly?: 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 WorkspaceRoleCollection = { - __typename?: 'WorkspaceRoleCollection'; - totalCount: Scalars['Int']['output']; -}; - -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 WorkspaceSeatCollection = { - __typename?: 'WorkspaceSeatCollection'; - totalCount: Scalars['Int']['output']; -}; - -export enum WorkspaceSeatType { - Editor = 'editor', - Viewer = 'viewer' -} - -export type WorkspaceSeatsByType = { - __typename?: 'WorkspaceSeatsByType'; - editors?: Maybe; - viewers?: Maybe; -}; - -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']; - currency: Currency; - currentBillingCycleEnd: Scalars['DateTime']['output']; - seats: WorkspaceSubscriptionSeats; - updatedAt: Scalars['DateTime']['output']; -}; - -export type WorkspaceSubscriptionSeatCount = { - __typename?: 'WorkspaceSubscriptionSeatCount'; - /** Total number of seats in use by workspace users */ - assigned: Scalars['Int']['output']; - /** Total number of seats purchased and available in the current subscription cycle */ - available: Scalars['Int']['output']; -}; - -export type WorkspaceSubscriptionSeats = { - __typename?: 'WorkspaceSubscriptionSeats'; - editors: WorkspaceSubscriptionSeatCount; - viewers: WorkspaceSubscriptionSeatCount; -}; - -export type WorkspaceTeamByRole = { - __typename?: 'WorkspaceTeamByRole'; - admins?: Maybe; - guests?: Maybe; - members?: Maybe; -}; - -export type WorkspaceTeamFilter = { - /** Limit team members to provided role(s) */ - roles?: InputMaybe>; - /** Search for team members by name or email */ - search?: InputMaybe; - seatType?: InputMaybe; -}; - -export type WorkspaceUpdateInput = { - description?: InputMaybe; - discoverabilityEnabled?: InputMaybe; - domainBasedMembershipProtectionEnabled?: InputMaybe; - id: Scalars['String']['input']; - /** Logo image as base64-encoded string */ - logo?: InputMaybe; - name?: InputMaybe; - slug?: InputMaybe; -}; - -export type WorkspaceUpdateSeatTypeInput = { - seatType: WorkspaceSeatType; - userId: Scalars['String']['input']; - workspaceId: Scalars['String']['input']; -}; - -export type WorkspaceUpdatedMessage = { - __typename?: 'WorkspaceUpdatedMessage'; - /** Workspace ID */ - id: Scalars['String']['output']; - /** Workspace itself */ - workspace: Workspace; -}; - -export type AcccountTestQueryQueryVariables = Exact<{ [key: string]: never; }>; - - -export type AcccountTestQueryQuery = { __typename?: 'Query', serverInfo: { __typename?: 'ServerInfo', version?: string | null, name: string, company?: string | null } }; - - -export const AcccountTestQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AcccountTestQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"serverInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"company"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/packages/dui3/lib/common/generated/gql/index.ts b/packages/dui3/lib/common/generated/gql/index.ts deleted file mode 100644 index af7839936..000000000 --- a/packages/dui3/lib/common/generated/gql/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./gql"; \ No newline at end of file diff --git a/packages/dui3/lib/core/configs/apollo.ts b/packages/dui3/lib/core/configs/apollo.ts deleted file mode 100644 index 164e82cf8..000000000 --- a/packages/dui3/lib/core/configs/apollo.ts +++ /dev/null @@ -1,348 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import type { ApolloLink, ApolloClientOptions } from '@apollo/client/core' -import { InMemoryCache, split, from } from '@apollo/client/core' -import { setContext } from '@apollo/client/link/context' -import { SubscriptionClient } from 'subscriptions-transport-ws' -import { createUploadLink } from 'apollo-upload-client' -import { WebSocketLink } from '@apollo/client/link/ws' -import { getMainDefinition } from '@apollo/client/utilities' -import type { OperationDefinitionNode } from 'graphql' -import { Kind } from 'graphql' -import type { Nullable } from '@speckle/shared' -import { - buildAbstractCollectionMergeFunction, - buildArrayMergeFunction, - incomingOverwritesExistingMergeFunction -} from '~~/lib/core/helpers/apolloSetup' -import { onError } from '@apollo/client/link/error' -import * as Observability from '@speckle/shared/dist/esm/observability/index.js' - -let subscriptionsStopped = false -const errorRpm = Observability.simpleRpmCounter() -const STOP_SUBSCRIPTIONS_AT_ERRORS_PER_MIN = 100 - -const appVersion = (import.meta.env.SPECKLE_SERVER_VERSION as string) || 'unknown' -const appName = 'dui-3' - -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 the `apolloSetup` helper 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: { - Query: { - fields: { - otherUser: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'LimitedUser', id: args.id }) - } - - return original - } - }, - activeUser: { - merge(existing, incoming, { mergeObjects }) { - return mergeObjects(existing, incoming) - }, - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'User', 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('UserStreamCollection', { - checkIdentity: true - }) - }, - project: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'Project', id: args.id }) - } - - return original - } - }, - projects: { - merge: buildArrayMergeFunction() - } - } - }, - LimitedUser: { - fields: { - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection') - } - } - }, - User: { - fields: { - timeline: { - keyArgs: ['after', 'before'], - merge: buildAbstractCollectionMergeFunction('ActivityCollection') - }, - commits: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommitCollection') - }, - favoriteStreams: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('StreamCollection') - }, - projects: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('ProjectCollection') - } - } - }, - Project: { - fields: { - models: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('ModelCollection') - }, - versions: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('VersionCollection') - }, - commentThreads: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('CommentCollection') - }, - modelsTree: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('ModelsTreeItemCollection') - }, - replyAuthors: { - keyArgs: false, - merge: buildAbstractCollectionMergeFunction('CommentReplyAuthorCollection') - }, - viewerResources: { - merge: (_existing, incoming) => [...incoming] - }, - model: { - read(original, { args, toReference }) { - if (args?.id) { - return toReference({ __typename: 'Model', id: args.id }) - } - - return original - } - }, - team: { - merge: (_existing, incoming) => incoming - }, - invitedTeam: { - merge: (_existing, incoming) => incoming - }, - pendingImportedModels: { - merge: (_existing, incoming) => incoming - } - } - }, - Model: { - fields: { - versions: { - keyArgs: ['filter', 'limit'], - merge: buildAbstractCollectionMergeFunction('VersionCollection') - }, - pendingImportedVersions: { - merge: (_existing, incoming) => incoming - } - } - }, - Comment: { - fields: { - replies: { - keyArgs: ['limit'] - } - } - }, - 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 - } - } - }) -} - -function createWsClient(params: { - wsEndpoint: string - authToken: () => Nullable -}): SubscriptionClient { - const { wsEndpoint, authToken } = params - - return new SubscriptionClient(wsEndpoint, { - reconnect: true, - reconnectionAttempts: 3, - connectionParams: () => { - const token = authToken() - const Authorization = token?.length ? `Bearer ${token}` : null - return Authorization ? { Authorization, headers: { Authorization } } : {} - } - }) -} - -function createLink(params: { - httpEndpoint: string - wsClient?: SubscriptionClient - authToken: () => Nullable -}): ApolloLink { - const { httpEndpoint, wsClient, authToken } = params - // Prepare links - const httpLink = createUploadLink({ - uri: httpEndpoint - }) - - const authLink = setContext((_, { headers }) => { - const token = authToken() - const authHeader = token?.length ? { Authorization: `Bearer ${token}` } : {} - return { - headers: { - ...headers, - ...authHeader - } - } - }) - - let link = authLink.concat(httpLink as unknown as ApolloLink) - - 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 - ) - } - - const errorLink = onError((res) => { - console.error('Apollo Client error', res) - - // Disable subscriptions if too many errors per minute - const rpm = errorRpm.hit() - if ( - import.meta.client && - wsClient && - !subscriptionsStopped && - rpm > STOP_SUBSCRIPTIONS_AT_ERRORS_PER_MIN - ) { - subscriptionsStopped = true - console.error( - `Too many errors (${rpm} errors per minute), stopping subscriptions!` - ) - wsClient.use([ - { - applyMiddleware: () => { - // never invokes next() - essentially stuck - } - } - ]) - } - }) - - return from([errorLink, link]) -} - -type ResolveClientConfigParams = { - httpEndpoint: string - authToken: () => Nullable -} - -export const resolveClientConfig = ( - params: ResolveClientConfigParams -): Pick, 'cache' | 'link' | 'name' | 'version'> => { - const { httpEndpoint, authToken } = params - const wsEndpoint = httpEndpoint.replace('http', 'ws') - - const wsClient = import.meta.client - ? createWsClient({ wsEndpoint, authToken }) - : undefined - const link = createLink({ httpEndpoint, wsClient, authToken }) - - return { - // If we don't markRaw the cache, sometimes we get cryptic internal Apollo Client errors that essentially - // result from parts of its internals being made reactive, even tho they shouldn't be - cache: markRaw(createCache()), - link, - name: appName, - version: appVersion - } -} diff --git a/packages/dui3/lib/core/helpers/apolloSetup.ts b/packages/dui3/lib/core/helpers/apolloSetup.ts deleted file mode 100644 index f028563f2..000000000 --- a/packages/dui3/lib/core/helpers/apolloSetup.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type { Optional } from '@speckle/shared' -import type { FieldMergeFunction } from '@apollo/client/core' - -interface AbstractCollection { - __typename: T - totalCount: number - cursor: string | null - items: Record[] -} - -interface MergeSettings { - /** - * 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. - * Defaults to true - */ - checkIdentity: boolean - /** - * Optionally change the prop that should be used to compare - * equality between items - * Defaults to '__ref', which is the prop added by Apollo that contains the globally unique ID of the object - */ - identityProp: string -} - -const prepareMergeSettings = ( - settings: Optional> -): MergeSettings => ({ - checkIdentity: true, - identityProp: '__ref', - ...(settings || {}) -}) - -/** - * Build an Apollo merge function for a field that returns an array of identifiable objects - */ -export function buildArrayMergeFunction( - settings?: Partial -): FieldMergeFunction[], Record[]> { - const { checkIdentity, identityProp } = prepareMergeSettings(settings) - return (existing, incoming) => { - let finalItems: Record[] - if (checkIdentity) { - finalItems = [...(existing || [])] - for (const newItem of incoming || []) { - if ( - finalItems.findIndex( - (item) => item[identityProp] === newItem[identityProp] - ) === -1 - ) { - finalItems.push(newItem) - } - } - } else { - finalItems = [...(existing || []), ...(incoming || [])] - } - - return finalItems - } -} - -/** - * Build an Apollo merge function for a field that returns a collection like AbstractCollection - */ -export function buildAbstractCollectionMergeFunction( - typeName: T, - settings?: Partial -): FieldMergeFunction>, AbstractCollection> { - const { checkIdentity, identityProp } = prepareMergeSettings(settings) - 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/dui3/nuxt.config.ts b/packages/dui3/nuxt.config.ts deleted file mode 100644 index b1e43cc78..000000000 --- a/packages/dui3/nuxt.config.ts +++ /dev/null @@ -1,76 +0,0 @@ -import legacy from '@vitejs/plugin-legacy' - -// https://nuxt.com/docs/api/configuration/nuxt-config -export default defineNuxtConfig({ - typescript: { - shim: false, - strict: true - }, - modules: [ - '@nuxt/eslint', - '@nuxtjs/tailwindcss', - '@speckle/ui-components-nuxt', - '@pinia/nuxt' - ], - alias: { - // Rewriting all lodash calls to lodash-es for proper tree-shaking & chunk splitting - lodash: 'lodash-es' - }, - - vite: { - resolve: { - alias: [{ find: /^lodash$/, replacement: 'lodash-es' }] - }, - - build: { - // older chrome version for CEF 65 support. all identifiers except the chrome one are default ones. - target: ['es2020', 'edge88', 'firefox78', 'chrome65', 'safari14'], - // optionally disable minification for debugging - minify: false - }, - plugins: [ - // again - only for CEF 65 - legacy({ - renderLegacyChunks: false, - // only adding the specific polyfills we need to reduce bundle size - modernPolyfills: ['es.global-this', 'es/object', 'es/array'] - }) - ] - }, - ssr: false, - build: { - transpile: [ - /^@apollo\/client/, - 'ts-invariant/process', - '@vue/apollo-composable', - '@headlessui/vue', - /^@heroicons\/vue/, - '@vueuse/core', - '@vueuse/shared', - '@speckle/ui-components' - ] - }, - hooks: { - 'build:manifest': (manifest) => { - // kinda hacky, vite polyfills are incorrectly being loaded last so we have to move them to appear first in the object. - // we can't replace `manifest` entirely, cause then we're only mutating a local variable, not the actual manifest - // which is why we have to mutate the reference. - // since ES2015 object string property order is more or less guaranteed - the order is chronological - const polyfillKey = 'vite/legacy-polyfills' - const polyfillEntry = manifest[polyfillKey] - if (!polyfillEntry) return - - const oldManifest = { ...manifest } - delete oldManifest[polyfillKey] - - for (const key in manifest) { - delete manifest[key] - } - - manifest[polyfillKey] = polyfillEntry - for (const key in oldManifest) { - manifest[key] = oldManifest[key] - } - } - } -}) diff --git a/packages/dui3/package.json b/packages/dui3/package.json deleted file mode 100644 index f9aaaa806..000000000 --- a/packages/dui3/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "@speckle/dui3", - "description": "Speckle desktop UI embedded in connectors. Built w/ Vue 3 & Nuxt 3", - "version": "0.0.1", - "private": true, - "engines": { - "node": "^18.19.0" - }, - "scripts": { - "build": "nuxt build", - "dev:nuxt": "nuxt dev", - "dev": "concurrently \"nuxt dev\" \"yarn gqlgen:watch\"", - "generate": "nuxt generate", - "preview": "nuxt preview", - "postinstall": "yarn ensure:tailwind-deps && nuxt prepare", - "lint:js": "eslint .", - "lint:tsc": "vue-tsc --noEmit", - "lint:prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check .", - "lint:css": "stylelint \"**/*.{css,vue}\"", - "lint": "yarn lint:js && yarn lint:tsc && yarn lint:prettier && yarn lint:css", - "lint:ci": "yarn lint:tsc && yarn lint:css", - "gqlgen": "graphql-codegen", - "gqlgen:watch": "graphql-codegen --watch" - }, - "dependencies": { - "@apollo/client": "^3.7.14", - "@headlessui/vue": "^1.7.13", - "@heroicons/vue": "^2.0.12", - "@pinia/nuxt": "^0.4.11", - "@speckle/shared": "workspace:^", - "@speckle/ui-components": "workspace:^", - "@speckle/ui-components-nuxt": "workspace:^", - "@vue/apollo-composable": "^4.0.0-beta.5", - "@vueuse/core": "^9.13.0", - "apollo-upload-client": "^17.0.0", - "graphql": "^16.6.0", - "graphql-tag": "^2.12.6", - "lodash-es": "^4.17.21", - "nanoevents": "^8.0.0", - "pinia": "^2.1.4", - "portal-vue": "^3.0.0", - "subscriptions-transport-ws": "^0.11.0", - "vue-tippy": "^6.2.0" - }, - "devDependencies": { - "@graphql-codegen/cli": "^5.0.5", - "@graphql-codegen/client-preset": "^4.3.0", - "@nuxt/eslint": "^0.3.13", - "@nuxtjs/tailwindcss": "^6.7.0", - "@parcel/watcher": "^2.5.1", - "@types/apollo-upload-client": "^17.0.1", - "@types/eslint": "^8.56.10", - "@types/lodash-es": "^4.17.6", - "@types/node": "^18", - "@typescript-eslint/eslint-plugin": "^7.12.0", - "@typescript-eslint/parser": "^7.12.0", - "@vitejs/plugin-legacy": "^4.0.3", - "autoprefixer": "^10.4.14", - "concurrently": "^7.5.0", - "eslint": "^9.4.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-vuejs-accessibility": "^2.3.0", - "nuxt": "^3.6.3", - "postcss": "^8.4.31", - "postcss-custom-properties": "^12.1.9", - "postcss-html": "^1.5.0", - "postcss-nesting": "^10.2.0", - "prettier": "^2.7.1", - "stylelint": "^15.10.1", - "stylelint-config-prettier": "^9.0.3", - "stylelint-config-recommended-vue": "^1.4.0", - "stylelint-config-standard": "^26.0.0", - "tailwindcss": "^3.3.2", - "type-fest": "^3.5.1", - "typescript": "^4.8.3", - "vue-tsc": "^2.2.2" - }, - "installConfig": { - "hoistingLimits": "workspaces" - } -} diff --git a/packages/dui3/pages/index.vue b/packages/dui3/pages/index.vue deleted file mode 100644 index c4096a8ba..000000000 --- a/packages/dui3/pages/index.vue +++ /dev/null @@ -1,10 +0,0 @@ - - diff --git a/packages/dui3/pages/test.vue b/packages/dui3/pages/test.vue deleted file mode 100644 index 5f01daa83..000000000 --- a/packages/dui3/pages/test.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - diff --git a/packages/dui3/plugins/00.bindings.ts b/packages/dui3/plugins/00.bindings.ts deleted file mode 100644 index 59e3c788a..000000000 --- a/packages/dui3/plugins/00.bindings.ts +++ /dev/null @@ -1,103 +0,0 @@ -import type { IRawBridge } from '~/lib/bridge/definitions' - -import { GenericBridge } from '~/lib/bridge/generic' -import { SketchupBridge } from '~/lib/bridge/sketchup' - -import type { IBasicConnectorBinding } from '~/lib/bindings/definitions/IBasicConnectorBinding' -import { - IBasicConnectorBindingKey, - MockedBaseBinding -} from '~/lib/bindings/definitions/IBasicConnectorBinding' - -import type { ITestBinding } from '~/lib/bindings/definitions/ITestBinding' -import { - ITestBindingKey, - MockedTestBinding -} from '~/lib/bindings/definitions/ITestBinding' - -import type { IConfigBinding } from '~/lib/bindings/definitions/IConfigBinding' -import { - IConfigBindingKey, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - MockedConfigBinding -} from '~/lib/bindings/definitions/IConfigBinding' - -// Makes TS happy -declare let globalThis: Record & { - CefSharp?: { BindObjectAsync: (name: string) => Promise } - chrome?: { webview: { hostObjects: Record } } - sketchup?: Record -} - -/** - * Here we are loading any bindings that we expect to have from all - * connectors. If some are not present, that's okay - we're going to - * strip or customize functionality from the ui itself. - */ -export default defineNuxtPlugin(async () => { - // Registers some default test bindings. - const testBindings = - (await tryHoistBinding(ITestBindingKey)) || new MockedTestBinding() - - // Tries to register some non-existant bindings. - const nonExistantBindings = await tryHoistBinding('nonExistantBindings') - - // Registers a set of default bindings. - const baseBinding = - (await tryHoistBinding(IBasicConnectorBindingKey)) || - new MockedBaseBinding() - - // UI configuration bindings. - const configBinding = await tryHoistBinding(IConfigBindingKey) - - const showDevTools = () => { - baseBinding.showDevTools() - } - - const openUrl = (url: string) => { - baseBinding.openUrl(url) - } - - return { - provide: { - testBindings, - nonExistantBindings, - baseBinding, - configBinding, - showDevTools, - openUrl - } - } -}) - -/** - * Checks possible browser window targets for a given binding, and, if it finds it, - * creates a bridge for it and registers it in the global scope. - * @param name binding name - * @returns null if the binding was not found, or the binding. - */ -const tryHoistBinding = async (name: string) => { - let bridge: GenericBridge | SketchupBridge | null = null - let tempBridge: GenericBridge | SketchupBridge | null = null - - if (globalThis.CefSharp) { - await globalThis.CefSharp.BindObjectAsync(name) - tempBridge = new GenericBridge(globalThis[name] as unknown as IRawBridge) - } - - if (globalThis.chrome && globalThis.chrome.webview && !tempBridge) { - tempBridge = new GenericBridge(globalThis.chrome.webview.hostObjects[name]) - } - - if (globalThis.sketchup && !tempBridge) { - tempBridge = new SketchupBridge(name) - } - - const res = await tempBridge?.create() - if (res) bridge = tempBridge - - if (!bridge) console.warn(`Failed to bind ${name} binding.`) - - globalThis[name] = bridge - return bridge as unknown as T -} diff --git a/packages/dui3/plugins/portal.ts b/packages/dui3/plugins/portal.ts deleted file mode 100644 index 2670aa801..000000000 --- a/packages/dui3/plugins/portal.ts +++ /dev/null @@ -1,5 +0,0 @@ -import PortalVue from 'portal-vue' - -export default defineNuxtPlugin((nuxtApp) => { - nuxtApp.vueApp.use(PortalVue) -}) diff --git a/packages/dui3/plugins/tippy.ts b/packages/dui3/plugins/tippy.ts deleted file mode 100644 index a3a674eb8..000000000 --- a/packages/dui3/plugins/tippy.ts +++ /dev/null @@ -1,11 +0,0 @@ -import VueTippy from 'vue-tippy' -import 'tippy.js/dist/tippy.css' - -export default defineNuxtPlugin((nuxtApp) => { - nuxtApp.vueApp.use(VueTippy, { - defaultProps: { - arrow: true - }, - flipDuration: 0 - }) -}) diff --git a/packages/dui3/postcss.config.js b/packages/dui3/postcss.config.js deleted file mode 100644 index 2cc9b88b8..000000000 --- a/packages/dui3/postcss.config.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - 'postcss-nesting': {} - } -} diff --git a/packages/dui3/public/favicon.ico b/packages/dui3/public/favicon.ico deleted file mode 100644 index 18993ad91..000000000 Binary files a/packages/dui3/public/favicon.ico and /dev/null differ diff --git a/packages/dui3/server/tsconfig.json b/packages/dui3/server/tsconfig.json deleted file mode 100644 index b9ed69c19..000000000 --- a/packages/dui3/server/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../.nuxt/tsconfig.server.json" -} diff --git a/packages/dui3/store/accounts.ts b/packages/dui3/store/accounts.ts deleted file mode 100644 index 16872ea9d..000000000 --- a/packages/dui3/store/accounts.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineStore } from 'pinia' -import { useInjectedAccounts } from '~/lib/accounts/composables/setup' - -// NOTE: this store simply wraps around the injected accounts composable (for now) -export const useAccountStore = defineStore('accountStore', () => { - const { accounts, refreshAccounts, defaultAccount, validAccounts, loading } = - useInjectedAccounts() - - return { accounts, refreshAccounts, defaultAccount, validAccounts, loading } -}) diff --git a/packages/dui3/store/documentInfo.ts b/packages/dui3/store/documentInfo.ts deleted file mode 100644 index 76f9485d9..000000000 --- a/packages/dui3/store/documentInfo.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { defineStore } from 'pinia' -import type { DocumentInfo } from 'lib/bindings/definitions/IBasicConnectorBinding' - -export const useDocumentInfoStore = defineStore('documentInfoStore', () => { - const app = useNuxtApp() - const documentInfo = ref() - - app.$baseBinding.on('documentChanged', () => { - console.log('doc changed') - setTimeout(async () => { - const docInfo = await app.$baseBinding.getDocumentInfo() - documentInfo.value = docInfo - }, 500) // Rhino needs some time. - }) - - const initDocInfo = async () => { - documentInfo.value = await app.$baseBinding.getDocumentInfo() - } - - void initDocInfo() - - return { documentInfo } -}) diff --git a/packages/dui3/store/uiConfig.ts b/packages/dui3/store/uiConfig.ts deleted file mode 100644 index 48fe4c25f..000000000 --- a/packages/dui3/store/uiConfig.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { defineStore } from 'pinia' -import type { Config } from 'lib/bindings/definitions/IConfigBinding' - -export const useDocumentInfoStore = defineStore('documentInfoStore', () => { - const { $configBinding } = useNuxtApp() - - const hasConfigBindings = ref(!!$configBinding) - const uiConfig = ref({ darkTheme: false }) - - watch( - uiConfig, - async (newValue) => { - if (!newValue || !$configBinding) return - await $configBinding.updateConfig(newValue) - }, - { deep: true } - ) - - const isDarkTheme = computed(() => { - return uiConfig.value?.darkTheme - }) - - const toggleTheme = () => { - uiConfig.value.darkTheme = !uiConfig.value.darkTheme - } - - const init = async () => { - if (!$configBinding) return - uiConfig.value = await $configBinding.getConfig() - } - void init() - - return { hasConfigBindings, isDarkTheme, toggleTheme } -}) diff --git a/packages/dui3/stylelint.config.js b/packages/dui3/stylelint.config.js deleted file mode 100644 index 6c7552c57..000000000 --- a/packages/dui3/stylelint.config.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - extends: [ - 'stylelint-config-standard', - 'stylelint-config-recommended-vue', - 'stylelint-config-prettier' - ], - // add your custom config here - // https://stylelint.io/user-guide/configuration - rules: { - // Rules to make stylelint happy with tailwind syntax - 'at-rule-no-unknown': [ - true, - { - ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen'] - } - ], - 'declaration-block-trailing-semicolon': null, - 'no-descending-specificity': null - }, - overrides: [ - { - files: '**/*.vue', - rules: { - 'value-keyword-case': null - } - } - ] -} diff --git a/packages/dui3/tailwind.config.mjs b/packages/dui3/tailwind.config.mjs deleted file mode 100644 index b952f6bfb..000000000 --- a/packages/dui3/tailwind.config.mjs +++ /dev/null @@ -1,26 +0,0 @@ -import speckleTheme from '@speckle/tailwind-theme' -import { tailwindContentEntries as themeEntries } from '@speckle/tailwind-theme/tailwind-configure' -import { tailwindContentEntries as uiLibEntries } from '@speckle/ui-components/tailwind-configure' -import formsPlugin from '@tailwindcss/forms' - -/** @type {import('tailwindcss').Config} */ -const config = { - darkMode: 'class', - content: [ - `./components/**/*.{vue,js,ts}`, - `./layouts/**/*.vue`, - `./pages/**/*.vue`, - `./composables/**/*.{js,ts}`, - `./plugins/**/*.{js,ts}`, - './stories/**/*.{js,ts,vue,mdx}', - './app.vue', - './.storybook/**/*.{js,ts,vue}', - './lib/**/composables/*.{js,ts}', - ...themeEntries(), - ...uiLibEntries() - // `./lib/**/*.{js,ts,vue}`, // TODO: Wait for fix https://github.com/nuxt/framework/issues/2886#issuecomment-1108312903 - ], - plugins: [speckleTheme, formsPlugin] -} - -export default config diff --git a/packages/dui3/tsconfig.eslint.json b/packages/dui3/tsconfig.eslint.json deleted file mode 100644 index 9e092003c..000000000 --- a/packages/dui3/tsconfig.eslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - // https://v3.nuxtjs.org/concepts/typescript - "extends": "./tsconfig.json", - "include": ["./.nuxt/nuxt.d.ts", "**/*", ".*.js"] -} diff --git a/packages/dui3/tsconfig.json b/packages/dui3/tsconfig.json deleted file mode 100644 index a746f2a70..000000000 --- a/packages/dui3/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - // https://nuxt.com/docs/guide/concepts/typescript - "extends": "./.nuxt/tsconfig.json" -} diff --git a/packages/fileimport-service/.env.example b/packages/fileimport-service/.env.example index b6a66fe86..d162e5f97 100644 --- a/packages/fileimport-service/.env.example +++ b/packages/fileimport-service/.env.example @@ -4,4 +4,11 @@ POSTGRES_MAX_CONNECTIONS_FILE_IMPORT_SERVICE='1' POSTGRES_CONNECTION_ACQUIRE_TIMEOUT_MILLIS='16000' POSTGRES_CONNECTION_CREATE_TIMEOUT_MILLIS='5000' FF_WORKSPACES_MULTI_REGION_ENABLED=false +USE_LEGACY_IFC_IMPORTER=true # IFC_DOTNET_DLL_PATH='packages/fileimport-service/src/ifc-dotnet/ifc-converter.dll' + +########################################################## +# Local dev settings +########################################################## +# Uncomment to enable pino-pretty log formatting in debug mode (disabled cause of node22 issues) +# ALLOW_PRETTY_DEBUGGER=true \ No newline at end of file diff --git a/packages/fileimport-service/Dockerfile b/packages/fileimport-service/Dockerfile index affd23451..34bdec8cc 100644 --- a/packages/fileimport-service/Dockerfile +++ b/packages/fileimport-service/Dockerfile @@ -15,17 +15,17 @@ WORKDIR /speckle-server ARG TINI_VERSION=v0.19.0 ENV TINI_VERSION=${TINI_VERSION} +# hadolint ignore=DL3008 RUN apt-get update -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --no-install-recommends \ ca-certificates=20240203 \ curl=8.5.0-2ubuntu10.6 \ - && curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh \ - && chmod +x ./nodesource_setup.sh \ - && ./nodesource_setup.sh \ - && rm ./nodesource_setup.sh \ + gosu=1.17-1ubuntu0.24.04.2 \ && curl -fsSL https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /usr/bin/tini \ && chmod +x /usr/bin/tini \ + && curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh \ + && gosu root:root bash nodesource_setup.sh \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --no-install-recommends \ nodejs=22.14.0-1nodesource1 \ @@ -44,7 +44,7 @@ COPY packages/frontend-2/type-augmentations/stubs packages/frontend-2/type-augme COPY packages/shared/package.json packages/shared/ COPY packages/fileimport-service/package.json packages/fileimport-service/ -RUN yarn workspaces focus --all +RUN PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn workspaces focus --all # build shared libraries COPY packages/shared packages/shared/ diff --git a/packages/fileimport-service/package.json b/packages/fileimport-service/package.json index 1223c9499..fb266c9e8 100644 --- a/packages/fileimport-service/package.json +++ b/packages/fileimport-service/package.json @@ -13,7 +13,7 @@ "url": "git+https://github.com/specklesystems/speckle-server.git" }, "engines": { - "node": "^18.19.0" + "node": "^22.6.0" }, "scripts": { "build:tsc:watch": "tsc -p ./tsconfig.build.json --watch", @@ -33,6 +33,7 @@ "dependencies": { "@speckle/shared": "workspace:^", "bcrypt": "^5.0.0", + "bull": "^4.16.5", "crypto": "^1.0.1", "crypto-random-string": "^3.2.0", "dotenv": "^16.4.5", @@ -47,7 +48,8 @@ "tarn": "^3.0.2", "undici": "^5.28.4", "valid-filename": "^3.1.0", - "web-ifc": "^0.0.36" + "web-ifc": "^0.0.36", + "znv": "^0.5.0" }, "devDependencies": { "@types/bcrypt": "^5.0.0", diff --git a/packages/fileimport-service/src/bin.ts b/packages/fileimport-service/src/bin.ts index 5a087f0b8..9af469c65 100644 --- a/packages/fileimport-service/src/bin.ts +++ b/packages/fileimport-service/src/bin.ts @@ -1,9 +1,15 @@ import '@/bootstrap.js' // This has side-effects and has to be imported first +import * as Environment from '@speckle/shared/environment' -import { main } from '@/controller/daemon.js' +const { FF_NEXT_GEN_FILE_IMPORTER_ENABLED } = Environment.getFeatureFlags() +import { main as oldMain } from '@/controller/daemon.js' const start = () => { - void main() + if (FF_NEXT_GEN_FILE_IMPORTER_ENABLED) { + throw new Error('Not yet implemented') + } else { + void oldMain() + } } start() diff --git a/packages/fileimport-service/src/knex.ts b/packages/fileimport-service/src/clients/knex.ts similarity index 91% rename from packages/fileimport-service/src/knex.ts rename to packages/fileimport-service/src/clients/knex.ts index 6062b4761..d8311e30f 100644 --- a/packages/fileimport-service/src/knex.ts +++ b/packages/fileimport-service/src/clients/knex.ts @@ -1,10 +1,10 @@ -import Environment from '@speckle/shared/dist/commonjs/environment/index.js' +import * as Environment from '@speckle/shared/environment' import { loadMultiRegionsConfig, configureKnexClient -} from '@speckle/shared/dist/commonjs/environment/multiRegionConfig.js' +} from '@speckle/shared/environment/multiRegionConfig' import { logger } from '@/observability/logging.js' -import { Knex } from 'knex' +import type { Knex } from 'knex' const { FF_WORKSPACES_MULTI_REGION_ENABLED } = Environment.getFeatureFlags() diff --git a/packages/fileimport-service/src/controller/api.ts b/packages/fileimport-service/src/controller/api.ts index b7523df0c..7e8309320 100644 --- a/packages/fileimport-service/src/controller/api.ts +++ b/packages/fileimport-service/src/controller/api.ts @@ -3,7 +3,7 @@ import crs from 'crypto-random-string' import bcrypt from 'bcrypt' import { chunk } from 'lodash-es' import { logger as parentLogger } from '@/observability/logging.js' -import Observability from '@speckle/shared/dist/commonjs/observability/index.js' +import * as Observability from '@speckle/shared/observability' import type { Knex } from 'knex' import type { Logger } from 'pino' diff --git a/packages/fileimport-service/src/controller/daemon.ts b/packages/fileimport-service/src/controller/daemon.ts index 4b70b7338..a1002ff7c 100644 --- a/packages/fileimport-service/src/controller/daemon.ts +++ b/packages/fileimport-service/src/controller/daemon.ts @@ -4,7 +4,7 @@ import { metricInputFileSize, metricOperationErrors } from '@/controller/prometheusMetrics.js' -import { getDbClients } from '@/knex.js' +import { getDbClients } from '@/clients/knex.js' import { downloadFile } from '@/controller/filesApi.js' import fs from 'fs' diff --git a/packages/fileimport-service/src/controller/filesApi.ts b/packages/fileimport-service/src/controller/filesApi.ts index 02afaa469..a0944826b 100644 --- a/packages/fileimport-service/src/controller/filesApi.ts +++ b/packages/fileimport-service/src/controller/filesApi.ts @@ -1,4 +1,4 @@ -import { ensureError } from '@speckle/shared/dist/esm/index.js' +import { ensureError } from '@speckle/shared' import fs from 'fs' import path from 'node:path' import { pipeline } from 'node:stream/promises' diff --git a/packages/fileimport-service/src/controller/prometheusMetrics.ts b/packages/fileimport-service/src/controller/prometheusMetrics.ts index 8a27d803b..9f56d6fcd 100644 --- a/packages/fileimport-service/src/controller/prometheusMetrics.ts +++ b/packages/fileimport-service/src/controller/prometheusMetrics.ts @@ -1,6 +1,6 @@ import http from 'http' import prometheusClient, { Counter, Summary } from 'prom-client' -import { getDbClients } from '@/knex.js' +import { getDbClients } from '@/clients/knex.js' import { Knex } from 'knex' import { Pool } from 'tarn' import { isObject } from 'lodash-es' diff --git a/packages/fileimport-service/src/ifc/import_file.js b/packages/fileimport-service/src/ifc/import_file.js index a57845eb4..27120fc67 100644 --- a/packages/fileimport-service/src/ifc/import_file.js +++ b/packages/fileimport-service/src/ifc/import_file.js @@ -1,7 +1,7 @@ import fs from 'fs' -import Observability from '@speckle/shared/dist/commonjs/observability/index.js' +import * as Observability from '@speckle/shared/observability' import { logger as parentLogger } from '@/observability/logging.js' -import { getDbClients } from '@/knex.js' +import { getDbClients } from '@/clients/knex.js' import { parseAndCreateCommitFactory } from '@/ifc/index.js' async function main() { diff --git a/packages/fileimport-service/src/ifc/index.js b/packages/fileimport-service/src/ifc/index.js index eea1e94c4..353821ed5 100644 --- a/packages/fileimport-service/src/ifc/index.js +++ b/packages/fileimport-service/src/ifc/index.js @@ -1,6 +1,6 @@ import { performance } from 'perf_hooks' import { fetch } from 'undici' -import Observability from '@speckle/shared/dist/commonjs/observability/index.js' +import * as Observability from '@speckle/shared/observability' import { ServerAPI } from '@/controller/api.js' import { logger as parentLogger } from '@/observability/logging.js' import { IFCParser } from '@/ifc/parser.js' diff --git a/packages/fileimport-service/src/ifc/parser.js b/packages/fileimport-service/src/ifc/parser.js index e960fde30..e0dddafbb 100644 --- a/packages/fileimport-service/src/ifc/parser.js +++ b/packages/fileimport-service/src/ifc/parser.js @@ -1,6 +1,6 @@ import { performance } from 'perf_hooks' import WebIFC from 'web-ifc/web-ifc-api-node.js' -import Observability from '@speckle/shared/dist/commonjs/observability/index.js' +import * as Observability from '@speckle/shared/observability' import { logger as parentLogger } from '@/observability/logging.js' import { getHash, diff --git a/packages/fileimport-service/src/observability/logging.ts b/packages/fileimport-service/src/observability/logging.ts index 65cbc6741..0b5a53c1b 100644 --- a/packages/fileimport-service/src/observability/logging.ts +++ b/packages/fileimport-service/src/observability/logging.ts @@ -1,4 +1,4 @@ -import Observability from '@speckle/shared/dist/commonjs/observability/index.js' +import * as Observability from '@speckle/shared/observability' // loggers for specific components within normal operation export const logger = Observability.extendLoggerComponent( diff --git a/packages/frontend-2/.env.example b/packages/frontend-2/.env.example index 6caf83c7b..27434a886 100644 --- a/packages/frontend-2/.env.example +++ b/packages/frontend-2/.env.example @@ -38,4 +38,10 @@ NUXT_PUBLIC_ENABLE_AUTOMATE_MODULE=false NUXT_PUBLIC_SURVICATE_WORKSPACE_KEY= # Ghost API -NUXT_PUBLIC_GHOST_API_KEY= \ No newline at end of file +NUXT_PUBLIC_GHOST_API_KEY= + +########################################################## +# Local dev settings +########################################################## +# Uncomment to enable pino-pretty log formatting in debug mode (disabled cause of node22 issues) +# ALLOW_PRETTY_DEBUGGER=true \ No newline at end of file diff --git a/packages/frontend-2/Dockerfile b/packages/frontend-2/Dockerfile index de8f8b18f..cda52f5be 100644 --- a/packages/frontend-2/Dockerfile +++ b/packages/frontend-2/Dockerfile @@ -1,6 +1,5 @@ -FROM node:18-bookworm-slim@sha256:408f8cbbb7b33a5bb94bdb8862795a94d2b64c2d516856824fd86c4a5594a443 AS build-stage +FROM node:22-bookworm-slim@sha256:221ee67425de7a3c11ce4e81e63e50caaec82ede3a7d34599ab20e59d29a0cb5 AS build-stage ARG NODE_ENV=production -ARG SPECKLE_SERVER_VERSION=custom ARG BUILD_SOURCEMAPS=false # for better sourcemaps (the app still gets minified at the end) @@ -20,7 +19,7 @@ COPY packages/ui-components/package.json ./packages/ui-components/ COPY packages/ui-components-nuxt/package.json ./packages/ui-components-nuxt/ COPY packages/tailwind-theme/package.json ./packages/tailwind-theme/ COPY packages/frontend-2/package.json ./packages/frontend-2/ -COPY packages/frontend-2/type-augmentations ./packages/frontend-2/ +COPY packages/frontend-2/type-augmentations ./packages/frontend-2/ COPY packages/objectloader ./packages/objectloader/ COPY packages/viewer ./packages/viewer/ @@ -31,11 +30,17 @@ COPY packages/tailwind-theme ./packages/tailwind-theme/ COPY packages/frontend-2 ./packages/frontend-2/ # hadolint ignore=DL3059 -RUN yarn workspaces focus -A +RUN PUPPETEER_SKIP_DOWNLOAD=true PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn workspaces focus -A # hadolint ignore=DL3059 -RUN yarn workspaces foreach -W run build +RUN yarn workspaces foreach --exclude "@speckle/frontend-2" -W run build -ENV TINI_VERSION v0.19.0 +# improve caching as other builds do not depend on server version +ARG SPECKLE_SERVER_VERSION=custom +# hadolint ignore=DL3059 +RUN yarn workspaces foreach --include "packages/frontend-2" -W run build + + +ENV TINI_VERSION=v0.19.0 RUN apt-get update -y \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \ --no-install-recommends \ @@ -48,7 +53,7 @@ RUN apt-get update -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -FROM gcr.io/distroless/nodejs18-debian12:nonroot@sha256:afdea027580f7afcaf1f316b2b3806690c297cb3ce6ddc5cf6a15804dc1c790f AS production-stage +FROM gcr.io/distroless/nodejs22-debian12:nonroot@sha256:ed26b3ab750110c51d9dbdfd6c697561dc40a01c296460c3494d47b550ef4126 AS production-stage ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} diff --git a/packages/frontend-2/components/Cal/PopUp.vue b/packages/frontend-2/components/Cal/PopUp.vue new file mode 100644 index 000000000..8f4866c70 --- /dev/null +++ b/packages/frontend-2/components/Cal/PopUp.vue @@ -0,0 +1,41 @@ + + + diff --git a/packages/frontend-2/components/Cal/Widget.vue b/packages/frontend-2/components/Cal/Widget.vue new file mode 100644 index 000000000..448bfcec3 --- /dev/null +++ b/packages/frontend-2/components/Cal/Widget.vue @@ -0,0 +1,24 @@ + + + diff --git a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue index 96bc6bbd5..2a577f9d3 100644 --- a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue +++ b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue @@ -69,10 +69,7 @@ import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables import { ensureError } from '@speckle/shared' import { useAuthManager } from '~~/lib/auth/composables/auth' import { loginRoute } from '~~/lib/common/helpers/route' -import { - passwordRules, - doesNotContainBlockedDomain -} from '~~/lib/auth/helpers/validation' +import { passwordRules } from '~~/lib/auth/helpers/validation' import { graphql } from '~~/lib/common/generated/gql' import type { ServerTermsOfServicePrivacyPolicyFragmentFragment } from '~~/lib/common/generated/gql/graphql' import { useMounted } from '@vueuse/core' @@ -96,18 +93,13 @@ const router = useRouter() const { signUpWithEmail, inviteToken } = useAuthManager() const { triggerNotification } = useGlobalToast() const isMounted = useMounted() -const isNoPersonalEmailsEnabled = useIsNoPersonalEmailsEnabled() const newsletterConsent = defineModel('newsletterConsent', { required: true }) const loading = ref(false) const password = ref('') const email = ref('') -const emailRules = computed(() => - inviteToken.value || !isNoPersonalEmailsEnabled.value - ? [isEmail] - : [isEmail, doesNotContainBlockedDomain] -) +const emailRules = [isEmail] const nameRules = [isRequired] const isEmailDisabled = computed(() => !!props.inviteEmail?.length || loading.value) diff --git a/packages/frontend-2/components/automate/automation/CreateDialog.vue b/packages/frontend-2/components/automate/automation/CreateDialog.vue index 4451cd7bb..63b482964 100644 --- a/packages/frontend-2/components/automate/automation/CreateDialog.vue +++ b/packages/frontend-2/components/automate/automation/CreateDialog.vue @@ -54,24 +54,15 @@ v-model:has-errors="hasParameterErrors" :fn="selectedFunction" /> - + @@ -191,8 +182,7 @@ const shouldShowStepsWidget = computed(() => { }) const enableSubmitTestAutomation = computed(() => { - const isValidInput = - !!automationName.value && !!selectedModel.value && !!selectedFunction.value + const isValidInput = !!automationName.value && !!selectedModel.value const isLoading = creationLoading.value return isValidInput && !isLoading @@ -353,7 +343,7 @@ const onDetailsSubmit = handleDetailsSubmit(async () => { const parameters = functionParameters.value const name = automationName.value - if (!fn || !project || !model || !name?.length || !fnRelease) { + if (!project || !model || !name?.length) { logger.error('Missing required data', { fn, project, @@ -376,7 +366,6 @@ const onDetailsSubmit = handleDetailsSubmit(async () => { projectId: project.id, input: { name, - functionId: fn.id, modelId: model.id } }) @@ -391,6 +380,19 @@ const onDetailsSubmit = handleDetailsSubmit(async () => { return } + // Test automations can be created without functions + if (!fn || !fnRelease) { + logger.error('Missing required data', { + fn, + project, + model, + parameters, + name, + fnRelease + }) + return + } + const createRes = await createAutomation({ projectId: project.id, input: { diff --git a/packages/frontend-2/components/common/TitleDescription.vue b/packages/frontend-2/components/common/TitleDescription.vue index c71c390ff..5fc4424fa 100644 --- a/packages/frontend-2/components/common/TitleDescription.vue +++ b/packages/frontend-2/components/common/TitleDescription.vue @@ -1,5 +1,5 @@