Commit Graph

92 Commits

Author SHA1 Message Date
Gergő Jedlicska bf80347abf gergo/web 2664 workspace backend powered metrics (#3985)
* feat(workspaces): delete workspace emit event

* feat(workspaces): move workspace group metrics to the backend

* Removed FE mixpanel group update

* Remove fragment

* test(gatekeeper): add unittest to new gatekeeper service

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-02-17 09:50:16 +01:00
Chuck Driesler a8969c9b33 fix(billing): can't be read only if no billing (#3949) 2025-02-11 17:08:09 +01:00
Iain Sproat c59e6043bb fix(server/errors): derive errors from BaseError (#3918) 2025-01-30 18:15:56 +01:00
Gergő Jedlicska 7b295ba408 gergo/web 2428 academia should be free business (#3842)
* feat(server): workspace shoul equal unpaid business

* feat(server): add free workspace plans

* feat(gatekeeper): rename plans to invoiced

* chore(gatekeeper): regen gql

* feat(gatekeeper): calculate workspace plan payment method

* fix(fe2): add missing workspace plans
2025-01-16 18:14:33 +01:00
Gergő Jedlicska 35bc6918cb gergo/web 2428 academia should be free business (#3831)
* feat(server): workspace shoul equal unpaid business

* feat(server): add free workspace plans

* feat(gatekeeper): rename plans to invoiced
2025-01-16 10:21:59 +01:00
Kristaps Fabians Geikins 82c7814b39 feat(server): track wp trial expiratiom email sends (#3753)
* feat(server): track wp trial expiratiom email sends

* cr fix
2025-01-02 13:28:55 +02:00
Alessandro Magionami 934b148912 Merge pull request #3703 from specklesystems/gergo/web-2124-set-up-email-notifications-for-trial-expiration
Set up email notifications for trial expirations
2024-12-30 09:58:45 +01:00
Alessandro Magionami fa4022ad14 Merge branch 'main' of github.com:specklesystems/speckle-server into gergo/web-2124-set-up-email-notifications-for-trial-expiration 2024-12-23 10:29:12 +01:00
Alessandro Magionami 5c3887f36a feat(gatekeeper): add text email 2024-12-23 10:23:16 +01:00
Alessandro Magionami 66f7e98aa7 feat(gatekeeper): remove 14 days trial expiration email 2024-12-20 19:31:47 +01:00
Alessandro Magionami 1ba905d61d Merge branch 'main' of github.com:specklesystems/speckle-server into gergo/web-2124-set-up-email-notifications-for-trial-expiration 2024-12-20 11:08:30 +01:00
Alessandro Magionami ff04755a5c feat(gatekeeper): readOnly validation for version and commit creation 2024-12-20 09:56:47 +01:00
Alessandro Magionami 3b82b62943 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2310-return-error-on-object-creation-for-projects-in-readonly 2024-12-20 09:21:19 +01:00
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
Benjamin Ottensten 8afe68e1c5 Change trial email copy 2024-12-17 23:59:54 +01:00
Gergő Jedlicska 38eeba2d2c fix(gatekeeper): fix crontab 2024-12-17 09:21:21 +01:00
Alessandro Magionami 11beefeada feat(gatekeeper): readOnly validation logic 2024-12-16 10:17:16 +01:00
Gergő Jedlicska dbc439e7d2 feat(gatekeeper): use daily cron tab for trial emails 2024-12-13 17:48:00 +01:00
Gergő Jedlicska c186b23db6 feat(gatekeeper): send workspace trial expiry emails 2024-12-13 17:30:02 +01:00
Alessandro Magionami 15bc6738ba chore(billing): fix test 2024-12-12 15:29:27 +01:00
Alessandro Magionami fd2d6381f8 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2304-expose-graphql-field-readonly-for-workspace-type 2024-12-12 09:41:03 +01: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
Gergő Jedlicska 2a72631e8b feat(gatekeeper): expire trail workspace plans (#3669) 2024-12-11 17:22:04 +01:00
Gergő Jedlicska fb7a7684e7 refactor(gatekeeper): use exhaustive switch pattern 2024-12-11 16:07:49 +01:00
Alessandro Magionami b08f25dffa feat(workspaces): add readOnly logic for workspace 2024-12-09 14:31:59 +01:00
Mike 8f4593e606 Feat: Workspace creation wizard (#3625) 2024-12-04 14:19:52 +01:00
Gergő Jedlicska 2ba2ef28dc feat(gatekeeper): lower checkout session expiry (#3626) 2024-12-04 11:52:33 +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
Kristaps Fabians Geikins a90bc3a1ed fix(fe2): workspace region settings broken if non-admin + Workspace.subscription errors (#3567)
* regions fix

* skip logging subscription error

* added default region set mp track

* removed no longer necessary test
2024-11-27 16:42:58 +02: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
Gergő Jedlicska a043624974 fix(gatekeeper): parse cancellation date properly (#3564) 2024-11-27 10:04:08 +01:00
Gergő Jedlicska f381dc3d9d gergo/workspaceDefaultPlan (#3561)
* feat(gatekeeper): create workspaces with trial plan by default

* feat(gatekeeper): default to starter trial plan

* fix(eventBus): fix tests
2024-11-27 09:51:32 +01:00
Gergő Jedlicska 80cf6b3904 fix(gatekeeper): fix the checkout session cancellation logic (#3553)
* fix(gatekeeper): fix the checkout session cancellation logic

* Updated FE

* Remove debug

* Add error toast

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-26 16:30:55 +01:00
Gergő Jedlicska be7be141e8 fix(gatekeeper): migrate plan rename (#3552)
* fix(gatekeeper): migrate plan rename

* fix(cli): fix yargs
2024-11-26 12:41:56 +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
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 f961a6da81 chore(server): various useful multiregion changes from comments pr (#3499)
* chore(server): various useful multiregion changes from comments pr

* hopefully fixing CI?

* test fix

* more test fixes??

* more test fixes..

* plz work ;((((

* revert multiregion on by default
2024-11-15 15:49:34 +02:00
Mike 5260111f8c Feat: Add billing summary (#3456)
* Feat: Add billing summary

* Update linting

* Fix workspacePricingPlanInformation include info object

* Fix typing

* Cleanup

* Update seat prices

* Fix casing

* Remove old billing logic
2024-11-08 11:28:23 +01:00
Chuck Driesler 0ab53111a9 fix(sso): gatekeeper (#3442)
* 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

* feat(sso): throw error on missing or expired sso session

* chore(sso): tests for SSO access protection

* fix(sso): use gatekeeper to protect sso access

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-06 16:29:49 +00: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
Gergő Jedlicska 3352fc4327 Merge branch 'main' of github.com:specklesystems/speckle-server into gergo/gatekeeperFunctions 2024-11-05 06:44:03 +01:00
Gergő Jedlicska ee514dc7b9 test: fix flaky tests (#3422) 2024-10-31 09:04:49 +01:00
Gergő Jedlicska da7f0dda0e gergo/web 2047 user joins the workspace event (#3412)
* 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

* feat(gatekeeper): upsize subscription on workspace role change

* feat(shared): add command pattern implementation

* refactor(eventBus): remove return capabilities from the event bus

* refactor(workspaces): use new commandFactory in workspace resolver

* feat(core): facelift taskLock

* feat(gatekeeper): shedule subscription downscale

* feat(gatekeeper): manage subscription downscale

* feat(gatekeeper): get workspace subscriptions, that are about to expire

* feat(gatekeeper): manage subscription downscale

* fix(gatekeeper): do not update subscription to canceled subs

* ci: bump postgres and max connections

* feat(workspaces): fix command factory event bugs
2024-10-30 15:51:40 +01:00
Gergő Jedlicska 8e239ec744 feat(gatekeeper): feature access functions 2024-10-30 09:00:00 +01:00
Gergő Jedlicska edc70b76bc fix(gatekeeper): do not update subscription to canceled subs 2024-10-29 20:44:13 +01:00
Gergő Jedlicska 81c20dbdf3 feat(gatekeeper): manage subscription downscale 2024-10-29 20:17:19 +01:00