perf: move stripe to billing service out of app store (#20376)

* add more methods to billingService

* update profile handler

* stripe customer handler

* verify email

* move imports + move generic methods to billing service

* move to strip ebilling service class

* push changes to mocks

* fix enum

* fix typo

* correctly update customer metadata

* fix userId type to number

* fix types on billing services

* fix type errors due to return methods differing

* fix return types
This commit is contained in:
sean-brydon authored and GitHub committed 2025-03-31 09:20:27 +00:00
1 parent f15d347804
commit 5cd2ba1362
17 files changed
+116 -58

No files matched your search

@@ -3,7 +3,7 @@ import type { NextApiRequest } from "next";
import { createMocks } from "node-mocks-http";
import { describe, it, expect, vi, beforeEach } from "vitest";
import stripe from "@calcom/app-store/stripepayment/lib/server";
import stripe from "@calcom/features/ee/payments/server/stripe";
import { stripeWebhookHandler, HttpCode } from "./__handler";
@@ -11,7 +11,7 @@ vi.mock("micro", () => ({
buffer: vi.fn(),
}));
vi.mock("@calcom/app-store/stripepayment/lib/server", () => ({
vi.mock("@calcom/features/ee/payments/server/stripe", () => ({
default: {
webhooks: {
constructEvent: vi.fn(),
@@ -3,7 +3,7 @@ import { buffer } from "micro";
import type { NextApiRequest } from "next";
import type Stripe from "stripe";
import stripe from "@calcom/app-store/stripepayment/lib/server";
import stripe from "@calcom/features/ee/payments/server/stripe";
import { HttpError } from "@calcom/lib/http-error";
/** Stripe Webhook Handler Mappings */