Stripe to monorepo (#2063)

* downgrade func

* fix security hole lol

* fix query conditions

* - set to trial not free
- auto create stripe customer if missing
- fix production check

* Extracts downgrade logic to script, fixes ts-node conflicts with prisma

* Adds trialEndsAt field to users

* Updates trial/downgrade logic

* Typo

* Legibility fixes

* Update team-billing.ts

* Legibility improvements

* Updates illegal logic

* WIP

* WIP migrating stripe to package

* Update website

* Import fixes

* Import fixes

* Fixes to downgrade script

* Check for premium usernames before downgrading

* Fixed formatting

* Delete deploy-env.sh

* Locks dayjs to 1.10.6

* Type fixes

* Seems like we're stuck with dayjs 1.10.4

* Script fixes

* Adds first name to dump

* Loop fix

Co-authored-by: Jamie <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-03-09 15:56:05 -07:00
1 parent adbae64619
commit 5625cf226b
40 files changed
+454 -405

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ import _ from "lodash";
import { JSONObject } from "superjson/dist/types";
import { z } from "zod";
import { checkPremiumUsername } from "@ee/lib/core/checkPremiumUsername";
import { checkPremiumUsername } from "@calcom/ee/lib/core/checkPremiumUsername";
import { checkRegularUsername } from "@lib/core/checkRegularUsername";
import { getCalendarCredentials, getConnectedCalendars } from "@lib/integrations/calendar/CalendarManager";
+1 -1
View File
@@ -10,7 +10,7 @@ import {
downgradeTeamMembers,
upgradeTeam,
ensureSubscriptionQuantityCorrectness,
} from "@ee/lib/stripe/team-billing";
} from "@calcom/stripe/team-billing";
import { BASE_URL } from "@lib/config/constants";
import { HOSTED_CAL_FEATURES } from "@lib/config/constants";