Commit Graph

182 Commits

Author SHA1 Message Date
Alessandro Magionami a363f0e81a feat(workspaces): expose graphql field readonly for workspace type (#3659)
* feat(workspaces): add readOnly field to workspace gql type

* feat(workspaces): add readOnly logic for workspace

* refactor(gatekeeper): use exhaustive switch pattern

* chore(billing): fix test

* feat(gatekeeper): fix tests

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-12-18 13:47:27 +00:00
Gergő Jedlicska 68938bab94 feat(gatekeeper): show subscription seats (#3679)
* feat(gatekeeper): show subscription seats

* Enabled summary on billing page

* Made interval dynamic

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-12-11 22:19:22 +01:00
Gergő Jedlicska 229a19c981 gergo/workspaceAdmin (#3677)
* feat(workspaces): add unified paginated items service

* feat(workspaces): admin update workspace plan
2024-12-11 18:54:24 +01:00
Kristaps Fabians Geikins 4b6e7af19d feat(fe2): scope comment mentions to parent project collaborators (#3635)
* backend done

* get rid of email mention

* project scoped mentions work

* lint fix

* better user sanitization safety

* tests fix
2024-12-05 13:33:05 +02:00
Mike 8f4593e606 Feat: Workspace creation wizard (#3625) 2024-12-04 14:19:52 +01:00
Gergő Jedlicska c68090a041 feat(projects): filter projects, that are not available under sso (#3585)
* feat(projects): filter projects, that are not available under sso

* feat(fe2): add SSO authentication warning banner

* Use specific fragment types

* fix(streams): stream load behavior should match old implementation

* Add user id to ProjectsHiddenProjectWarning_User fragment

* GQL gen

* Copy update

* fix(streams): admin override logic

* chore: gqlcodegen

* Update fragment name

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
2024-12-03 11:51:27 +01:00
Mike 2d41213229 Fix: Billing switch (#3596) 2024-12-02 15:40:23 +01:00
Chuck Driesler e312110933 Automate Public Beta (#3472)
* feat(automate): query active user functions

* fix(automate): show automations to non-stream-owners

* feat(automate): associate function with workspace

* fix(automate): split functions page between user and example functions

* fix(automate): ugh

* fix(functions): use correct query type in different places

* fix(automate): workspace functions page

* feat(automate): query specific categories of functions

* fix(automate): checkpoint

* fix(workspaces): successful queries w local env

* fix(automate): createFunctionWithoutVersion

* fix(automate): successful associate function with workspace

* fix(automate): query and return workspaces on functions

* fix(automate): show current function workspace

* fix(automate): query functions in automation create dialog

* fix(automate): audit non-owner automation access

* refactor(automate): logs api can get the projectId from the path

* fix(automate): multiregion gql resolvers

* fix(automate): multiregion event listeners

* fix(automate): drop automationCount

* fix(automate): multiregion run status

* fix(automate): correctness

* fix(automate): successful usage of multiregion results

* fix(automate): actually finish event listeners

* chore(automate): fix tests fix tests

* fix(automate): fix tests but make it multiregion flavor

* fix(automate): logs endpoint

* fix(automate): inject projectid correctly

* fix(automate): drop user-source functions

* fix(automate): owners edit, others can view

* fix(automate): simplify queries, auto workspace association

* chore(automate): appease

* chore(automate): fix function types

* fix(automate): get to workspace functions from empty state

* chore(automate): death to all slugs

* fix(automate): no create automation from function

* fix(automate): hide workspace change, tweak role access

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-11-29 17:33:14 +01:00
Gergő Jedlicska ec27e394d9 feat(workspaces): add workspace creation state (#3578) 2024-11-28 20:50:53 +01:00
Mike b2cebea7eb Fix: Various billing fixes (#3569) 2024-11-28 20:24:05 +01:00
Gergő Jedlicska ec02e63707 feat(gatekeeper): upgrade workspace plan (#3572) 2024-11-28 11:15:32 +01:00
Chuck Driesler fd5f316af0 fix(automate): automate module multi region (#3531)
* refactor(automate): logs api can get the projectId from the path

* fix(automate): multiregion gql resolvers

* fix(automate): multiregion event listeners

* fix(automate): drop automationCount

* fix(automate): multiregion run status

* fix(automate): correctness

* fix(automate): actually finish event listeners

* chore(automate): fix tests fix tests

* fix(automate): fix tests but make it multiregion flavor

* fix(automate): logs endpoint

* chore(automate): globalDb to db

* fix(automate): inject projectid correctly

* fix(automate): debug log fetch failure

* chore(automate): fix tests for new message

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-11-27 15:26:09 +00:00
Kristaps Fabians Geikins 1800dbbdbd feat(server): improved subscription testing DX + tests for common subs + new subs (#3554)
* userProjectsUpdated.added test

* multi region support

* userStreamAdded

* commit subs tested

* fix for proj workspace assignment

* undo commitHelper main changes

* disable all ffs mode

* createTestWorkspace support when workspaces arent enabled

* project create fix

* workspace projects updated subscription

* WIP new workspace sub

* updated workspaceCreated

* updated workspaceUpdated

* BE for workspace updated sub

* workspace updated sub

* ts err fix
2024-11-27 15:41:04 +02:00
Kristaps Fabians Geikins a9a313ee63 feat(server): cli and cross-server-sync multiregion support (#3527)
* feat(server): cross-server-sync multiregion ready

* fixed various db commands

* db cli works

* final changes
2024-11-22 19:52:58 +01:00
Gergő Jedlicska 01b222ced8 gergo/web 2155 gendo module multi region (#3528)
* fix(workspaces): allow workspace delete for paid workspaces

* feat(gendo): multi region gendo with new api integration and limits

* feat(gendo): user credits

* feat: adds limits to gendo panel, and terms and conditions link

* fix: reworks setting back camera view

* feat(gendo): webhook signature verification

* fix(gendo): nullability

* test(blobstorage): fix test dependency injection

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-11-22 16:43:31 +01:00
Gergő Jedlicska 83a991bfac feat(gatekeeper): rename workspace plans (#3533)
* feat(gatekeeper): rename workspace plans

* Updated plans in FE

* feat(gatekeeper): stripe redirect to workspace dashboard

* test(gatekeeper): fix tests

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-22 05:50:16 +01:00
Mike 065644b31d Fix: Remove remaining billing query (#3517)
* Fix: Remove remaining billing query

* fix types
2024-11-19 18:42:18 +01:00
Alessandro Magionami 146060355f Alessandro/web 2161 commits (#3511)
* chore(multiregion): commits resolvers multiregion

* chore(multiregion): fix tests
2024-11-19 16:00:45 +01:00
Gergő Jedlicska e30b8c83b9 gergo/workspacesMultiRegion (#3477)
* feat(webhook-service): learn to speak multi region

* feat(fileimport-service): talk multi region to me

* feat(fileuploads, blobs): multi region

* feat(workspaces): update delet workspace with billing and regions

* fix typo

* feat(workspaces): remove old billing resolvers

* test(workspaces): fix tests

* fix(workspaces): remove unused schema
2024-11-19 15:45:03 +01:00
Gergő Jedlicska 381c4e2a85 feat(gatekeeper): feature access resolver (#3514) 2024-11-19 15:44:43 +01:00
Kristaps Fabians Geikins 42db2f6b82 feat(server): comments module multiregion support (#3493)
* prepwork

* more prep for testing

* tests/linting seems fine

* a couple of query fixes

* fix up notifications for multiregion

* test fixes?

* wal_level issue fix?

* fileupload test fix

* anotha test fix

* undo unnecessary changes

* streamActivity -> main DB
2024-11-19 12:15:43 +02:00
Chuck Driesler 566bec59a5 Revert "fix(automate): drop specklecon function templates (#3503)" (#3504)
This reverts commit adeb529826.
2024-11-16 19:57:04 +00:00
Chuck Driesler adeb529826 fix(automate): drop specklecon function templates (#3503) 2024-11-16 13:06:51 +00:00
Chuck Driesler be08246d4d SpeckleCon Templates (#3497)
* fix(specklecon): add specklecon function templates

* fix(specklecon): more templates

* Update executionEngine.ts

* Update functionManagement.ts
2024-11-14 14:47:51 +00:00
Chuck Driesler 4159a2277a fix(specklecon): add specklecon function templates (#3491) 2024-11-13 16:13:02 +01:00
Chuck Driesler 22167d215f feat(sso): delete sso (#3452)
* feat(sso): delete sso

* fix(sso): simplify delete
2024-11-12 09:17:48 +00:00
Gergő Jedlicska 153b1c3802 feat(version): require project id in version mutations 2024-11-11 09:57:22 +01:00
Gergő Jedlicska b77d70585e fix(redis): make redis client singleton from a module (#3469)
* fix(redis): make redis client singleton from a module

* fix(projectDownload): pass region key properly
2024-11-08 17:18:28 +01:00
Gergő Jedlicska 73cc7e67d3 gergo/webhookRegions (#3459)
* feat(webhooks): multi region webhook resolver

* feat(webhooks): multi region webhook cleanup

* fix(webhooks): DI fixes

* feat(activitystream): region aware save activity

* feat(accessrequests): multi region

* feat(cli): allow multi region project and commit download

* feat(postgres): make docker postgres 0 day multi region ready

* feat(cli): allow multi region project and commit download properly

* fix(cross-server-sync): di fix

* feat(activitystream): non region aware activities, they are not project data

* fix(webhooks): triggers need to be included

* feat(stream/projectCreate): activity save is not needed any more, its all event based

* feat(multiRegion): get all registered db clients

* fix(regions): test equal in any order

* fix(projectDownload): need to await
2024-11-08 10:45:39 +01:00
Gergő Jedlicska f210d9b749 gergo/web 2109 project region based db connection selector (#3434)
* feat(projects): add project regions, default to null

* feat(multiregion): add projectRegion Db client lookup logic

* feat(multiregion): add project region repositories and caching

* feat(multiRegion): db initialization and get project db client

* feat(docker-compose): add second db for regions testing

* feat(multiRegion): initialize region with pubs and subs working

* fix(multiRegion): get region client even if it was registered in another pod

* feat(workspaces): create workspace resolver split

* feat: update server region metadata

* feat(projects): rewrite project creation

* feat(multiRegion): getRegionDb

* fix(workspaces): get projects now can retur null

* feat(multiRegion): make local multi region DB-s work

* feat: set d efault workspace region

* CR changes

* tests

* feat(multiRegion): bind region properly

* fe update

* test fixes

* feat(multiRegion): automatically create aiven extras plugin

* ci(postgres): use published postgres with aiven extras

* fix(multiRegion): roll back the aiven extras migration, there is a better way

* tests fix

* fix(billing): we do not need to add a seat, if the workspace is on a plan, but has no sub

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-11-06 17:29:08 +01:00
Kristaps Fabians Geikins 1c0482b48a feat: update server region metadata (#3433) 2024-11-05 13:29:51 +01:00
Chuck Driesler b195df37d6 feat(sso): active user sso information (#3432)
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* WIP

* fix(sso): restructure to handle all branches at end of flow

* fix(sso): add and validate emails used for sso

* fix(sso): park progress

* chore(workspaces): review sso login/valdate

* fix(sso): adjust validate url

* chore(sso): auth header puzzle

* fix(sso): happy-path config

* chore(gql): gqlgen

* fix(sso): almost almost

* fix(sso): auth endpoint

* a lil more terse

* fix(sso): light at the end of the tunnel

* fix(sso): improve catch block error messages

* fix(sso): session lifespan => validUntil

* fix(sso): I think we've got it

* feat(sso): limited workspace values for public sso login

* fix(sso): use factory functions

* fix(sso): til decrypt is single-use

* fix(sso): correct usage of access codes

* fix(sso): use finalize middleware in all routes

* chore(sso): cheeky tweak

* fix(sso): move some types around

* fix(sso): stencil final shape I'm sleepy

* fix(sso): more factories more factories

* fix(sso): on to final boss of factories

* fix(sso): needs a haircut but she works

* fix(sso): init rest w function, not side-effects

* fix(sso): /authn => /sso

* chore(sso): errors

* chore(sso): test test test

* chore(sso): test all the corners

* feat(sso): list workspace sso memberships

* chore(sso): tests, expose in rest

* fix(sso): sketch active user auth

* fix(sso): expose search via gql

* fix(sso): active user session information

* chore(sso): sso session test utils

* chore(sso): test sso session repo/services

* chore(sso): gqlgen

* fix(sso): simplify gql resolver structure

* chore(sso): gqlgen

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-05 12:27:46 +00:00
Chuck Driesler e6e65a2f7d feat(sso): list sso associations by user email (#3420)
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* WIP

* fix(sso): restructure to handle all branches at end of flow

* fix(sso): add and validate emails used for sso

* fix(sso): park progress

* chore(workspaces): review sso login/valdate

* fix(sso): adjust validate url

* chore(sso): auth header puzzle

* fix(sso): happy-path config

* chore(gql): gqlgen

* fix(sso): almost almost

* fix(sso): auth endpoint

* a lil more terse

* fix(sso): light at the end of the tunnel

* fix(sso): improve catch block error messages

* fix(sso): session lifespan => validUntil

* fix(sso): I think we've got it

* feat(sso): limited workspace values for public sso login

* fix(sso): use factory functions

* fix(sso): til decrypt is single-use

* fix(sso): correct usage of access codes

* fix(sso): use finalize middleware in all routes

* chore(sso): cheeky tweak

* fix(sso): move some types around

* fix(sso): stencil final shape I'm sleepy

* fix(sso): more factories more factories

* fix(sso): on to final boss of factories

* fix(sso): needs a haircut but she works

* fix(sso): init rest w function, not side-effects

* fix(sso): /authn => /sso

* chore(sso): errors

* chore(sso): test test test

* chore(sso): test all the corners

* feat(sso): list workspace sso memberships

* chore(sso): tests, expose in rest

* fix(sso): expose search via gql

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-01 11:27:12 +01:00
Kristaps Fabians Geikins 5df716bf1c feat: add & list server regions (#3423)
* WIP create modal

* babababa

* create dialog looks ok

* FE largely there

* workss

* cleanup

* fixed up test plumbing to avoid deadlocks and simplify GQL calls

* test fix

* added all tests

* CI fix
2024-10-31 16:08:50 +01:00
Kristaps Fabians Geikins 55d0d10103 Merge pull request #3406 from specklesystems/fabians/multi-region-base
feat(server): multi region module base w/ a test (mocked) mutation
2024-10-30 10:25:04 +00:00
Kristaps Fabians Geikins 610808fc15 feat(server): multi region module base w/ a test (mocked) mutation 2024-10-29 14:07:35 +02:00
Gergő Jedlicska 3184855aa7 gergo/checkoutGqlResolver (#3405)
* feat(gatekeeper): add all plan statuses

* chore(gatekeeper): gqlgen
2024-10-28 18:10:31 +01:00
Alessandro Magionami 11c13796c2 Merge pull request #3393 from specklesystems/fabians/gendo-ioc-5
chore(server): gendo IoC #5 - getVersionRenderRequestFactory
2024-10-28 15:17:56 +01:00
Gergő Jedlicska af3857a209 gergo/web 2038 billing graphql api (#3379)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag

* WIP billing gql api

* feat(gatekeeper): cancel checkout session api

* feat(gatekeeper): handle existing checkout sessions, when trying to create a new one

* feat(gatekeeper): add workspace plans gql api

* feat(gatekeeper): handle cancelation and subscription updates

* fix(gatekeeper): scope initialization

* fix(gatekeeper): eliminate stripe client import sideeffect

* fix(gatekeeper): eliminate stripe client import sideeffect 2

* fix(mainConstants): fitler gatekeeper scopes with feature flag
2024-10-25 10:46:09 +02:00
Kristaps Fabians Geikins 4a29e5f650 chore(server): gendo IoC #5 - getVersionRenderRequestFactory 2024-10-24 17:01:09 +03:00
Kristaps Fabians Geikins 6d53308fd8 chore(server): gendo IoC #1 - prep/cleanup before getting started 2024-10-24 15:39:41 +03:00
Chuck Driesler dc9519f141 fix(workspaces): emit slug with discoverable workspaces (#3361)
* fix(workspaces): emit slug with discoverable workspaces

* chore(workspaces): gql lint
2024-10-23 09:50:08 +01:00
Alessandro Magionami a2e9693a6a chore(activitystream): addBranchCreatedActivity refactor multiregion 2024-10-22 09:52:47 +02:00
Alessandro Magionami 8502ac5db4 chore(activitystream): add missing deps 2024-10-21 17:58:16 +02:00
Alessandro Magionami 59663a81f9 chore(activitystream): addReplyAddedActivity refactor multiregion 2024-10-21 17:52:09 +02:00
Alessandro Magionami 8e794a78c0 Merge pull request #3340 from specklesystems/alessandro/web-943-add-comment-created-activity
Activitystream IoC 1 addCommentCreatedActivity
2024-10-21 10:46:02 +02:00
Alessandro Magionami 42fa2d0460 Merge pull request #3328 from specklesystems/fabians/core-ioc-88
chore(server): core IoC #88 - createObjectFactory
2024-10-21 10:08:32 +02:00
Gergő Jedlicska 8cba7eb6f7 gergo/web 1968 add features list (#3332)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag
2024-10-20 15:40:31 +02:00
Alessandro Magionami 221904756d Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-943-add-comment-created-activity 2024-10-18 16:00:46 +02:00
Alessandro Magionami 16b99388e1 chore(activitystream): addCommentCreatedActivity refactor multiregion 2024-10-18 15:57:09 +02:00