* fix: dont check OrganizationSettings.orgAutoAcceptEmail uniqueness for platform teams * feat: display organizationId in OAuthClientCard * feat: ApiAuthStrategy handle oauth credentials * refactor: clean up ApiAuthStrategy test * refactor: use ApiAuthGuard in OauthClientsUsersController and OAuthFlowController * fix: copying org id * refactor: more specific error message when api auth * refactor: auto accept team creator membership * feat: useTeamEventType and useTeamEventTypes hooks * refactor: make team event-types public & searchable by eventSlug * feat: include host name in team event-types hosts response * fix: isFixed=true by default for COLLECTIVE event hosts * fix: useTeamEventType eventSlug access * feat: BookerPlatformWrapper enable team events by exposting orgId and teamId props * refactor: provide orgId in atoms context * refactor: use orgId from context in team event-types hooks * refactor: return teams in useMe * chore: examples app teams setup * Revert "refactor: return teams in useMe" This reverts commit de992ddc9af6ee9a2111938069f5b9c34cc2d8ea. * Revert "chore: examples app teams setup" This reverts commit 0766aa21acc25efa2361d38c3f87ddba773a0245. * feat: useTeams hook * chore: setup examples app with team event-type * fix: small fixes * swagger * Revert "refactor: provide orgId in atoms context" This reverts commit f053a498ee6f8fa8ece5ec8d8630c59eda8873e3. * feat: orgId in atoms context * feat: PlatformBilling guard * chore: delete test of the deleted oauth-client-credentials.guard * refactor: org event-types collective events isFixed always true and priority medium * refactor: org event-types COLLECTIVE response ignore isFixed and priority as they are same * fix: organizations event-types e2e * fix: billing guard * refactor: tests cleanup * fix: platform plan guard spec * refactor: e2e test cleanup * seed error if not team * refactor: rename authenticateApiKey to authenticateBearerToken * refactor: transforming response hosts * refactor: rename findUniqueByMatchingAutoAcceptEmail to findUniqueNonPlatformOrgsByMatchingAutoAcceptEmail * refactor: rename findUniqueByMatchingAutoAcceptEmail to findUniqueNonPlatformOrgsByMatchingAutoAcceptEmail --------- Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
Atoms examples
Example apps using atoms - customizable UI components to integrate scheduling into your product.
Running examples apps locally
-
Cal's backend is required to run example apps, so clone
https://github.com/calcom/cal.comand follow setup instructions in the readme. Importantly, you need to have Google credentials setup by following this section in the docs. -
Open "apps/api/v2/.env" and copy environment variables below, and then copy
NEXTAUTH_SECRETfrom the root ".env" of repository cloned in step 1.
NODE_ENV="development"
API_PORT=5555
DATABASE_READ_URL="postgresql://postgres:@localhost:5450/calendso"
DATABASE_WRITE_URL="postgresql://postgres:@localhost:5450/calendso"
API_URL="http://localhost"
NEXTAUTH_SECRET="copy from .env of root of repository cloned in step 1"
DATABASE_URL="postgresql://postgres:@localhost:5450/calendso"
JWT_SECRET="asjdijI1JIO12I3O89198jojioSAJDU"
REDIS_URL="redis://localhost:6379"
- Start "apps/api/v2" api using
yarn dev. - Start "packages/platform/atoms" atoms package with
yarn dev. - Start "apps/web" cal web app using
yarn dx. - Open your browser at "http://localhost:3000/" and login with admin username
admin@example.comand passwordADMINadmin2022!. - In the web app navigate to
http://localhost:3000/settings/organizations/newand create a sample organization. When asked for phone verification code enter111111. - In the web app navigate to
http://localhost:3000/settings/organizations/platform/oauth-clientsand create a new oAuth client - give all permissions and set redirect uri tohttp://localhost:4321which points to example app. - Setup environment for the example app you want to run:
- First, copy ".env.example" into ".env".
- Open ".env" file and paste client id from step 8 in
NEXT_PUBLIC_X_CAL_IDand client secret inX_CAL_SECRET_KEY. If in step 2 you used the same environment variables, thenNEXT_PUBLIC_CALCOM_API_URLcan stay as is. Otherwise adjust the port to point to the sameAPI_PORTas you used in step 2.
- Navigate to example app and setup database by running
rm -f prisma/dev.db && yarn prisma db push. - Start the example app by running
yarn devand go tohttp://localhost:4321. - In the Google Cloud Console "API & Services" "Credentials"
https://console.cloud.google.com/apis/credentialsopen web project setup in step 1 and addhttp://localhost:5555/v2/gcal/oauth/saveto the authorized redirect URIs.