From b94aa603c5a24ef649d743f12559884a4106df77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Fri, 26 Jul 2024 03:10:46 -0700 Subject: [PATCH] chore: Add missing comments for self hosted billing (#15923) * WIP: UI created to see if it matches RFC idea * Remove schema as we validate on the backend with old+new key schemas * Add comment about proxy URL request when on older versions * feat: create custom axios instance to use signature middleware * fix: update form to respect new schema * Add cal signature token to trubo env * use backend mutation for creating license keys * add loading state to creation button * update form to have a success state * fix type error for console.warning :') * use api version v1 * Inital setup * Fix verifyApi Key tests * Implement tests for LicenseKeyService * Restore old checkLicense code * check license key first * fix imports * fix url in tests. Implement prisma extention to track creation * Use data.status for licenseCheck * extract fetch to class * improve error * [wip] per user tracking * Remove new URL as it was breaking search params * Use client extention in customPrismaClient * Remove log * Remove license required from creation form as itll fail * Fix annual price calculation * add api route to .env.example and constants * re-word instructions in .env.example * chore: feedback * Update packages/features/ee/common/server/LicenseKeyService.ts * Add IS_E2E_ENABLED constant + update tests * Revert "Add IS_E2E_ENABLED constant + update tests" This reverts commit d059b73f6272bc06fd2ab5ed505b6d52ea030a56. * chore: tests fixes * fixes: unit tests Signed-off-by: zomars * chore: add missing instructions --------- Signed-off-by: zomars Co-authored-by: sean-brydon Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> --- .env.example | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.env.example b/.env.example index 0a910e8429..d609d8d670 100644 --- a/.env.example +++ b/.env.example @@ -18,6 +18,10 @@ # To enable enterprise-only features please add your envrionment variable to the .env file then make your way to /auth/setup to select your license and follow instructions. CALCOM_LICENSE_KEY= +# Signature token for the Cal.com License API (used for self-hosted integrations) +# We will give you a token when we provide you with a license key this ensure you and only you can communicate with the Cal.com License API for your license key +CAL_SIGNATURE_TOKEN= +# The route to the Cal.com License API CALCOM_PRIVATE_API_ROUTE="https://goblin.cal.com" # ***********************************************************************************************************